├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── .jrubyrc ├── .repobot.yml ├── .rspec ├── .rubocop.yml ├── .yardopts ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── Gemfile ├── LICENSE.md ├── README.md ├── Rakefile ├── hanami-helpers.gemspec ├── lib └── hanami │ ├── helpers.rb │ └── helpers │ ├── escape_helper.rb │ ├── form_helper.rb │ ├── form_helper │ ├── form_builder.rb │ ├── html_node.rb │ └── values.rb │ ├── html_helper.rb │ ├── html_helper │ ├── empty_html_node.rb │ ├── html_builder.rb │ ├── html_fragment.rb │ ├── html_node.rb │ └── text_node.rb │ ├── link_to_helper.rb │ ├── number_formatting_helper.rb │ ├── routing_helper.rb │ └── version.rb ├── script ├── ci └── test └── spec ├── integration ├── escape_helper_spec.rb ├── form_helper_spec.rb ├── html_helper_spec.rb ├── link_to_helper_spec.rb ├── number_formatter_helper_spec.rb └── routing_helper_spec.rb ├── spec_helper.rb ├── support ├── fixtures.rb ├── fixtures │ └── templates │ │ ├── albums │ │ └── new.html.erb │ │ ├── bills │ │ ├── edit.html.erb │ │ └── edit2.html.erb │ │ ├── books │ │ └── show.html.erb │ │ ├── deliveries │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ └── new.html.erb │ │ ├── full_stack │ │ ├── cart │ │ │ └── show.html.erb │ │ └── dashboard │ │ │ └── index.html.erb │ │ ├── link_to │ │ └── index.html.erb │ │ ├── sessions │ │ └── new.html.erb │ │ ├── settings │ │ └── edit.html.erb │ │ └── users │ │ └── show.html.erb └── rspec.rb └── unit └── hanami └── helpers ├── escape_helper_spec.rb ├── form_helper_spec.rb ├── html_helper └── html_builder_spec.rb ├── html_helper_spec.rb ├── link_to_helper_spec.rb ├── number_formatting_helper_spec.rb ├── routing_helper_spec.rb └── version_spec.rb /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: hanami 2 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | "on": 4 | push: 5 | paths: 6 | - ".github/workflows/ci.yml" 7 | - "lib/**" 8 | - "*.gemspec" 9 | - "spec/**" 10 | - "Rakefile" 11 | - "Gemfile" 12 | - ".rubocop.yml" 13 | pull_request: 14 | branches: 15 | - main 16 | schedule: 17 | - cron: "30 4 * * *" 18 | create: 19 | 20 | jobs: 21 | tests: 22 | runs-on: ubuntu-latest 23 | strategy: 24 | fail-fast: false 25 | matrix: 26 | ruby: 27 | - "3.1" 28 | - "3.0" 29 | steps: 30 | - uses: ravsamhq/notify-slack-action@v1 31 | if: always() 32 | with: 33 | status: ${{ job.status }} 34 | notify_when: "failure" 35 | env: 36 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 37 | - uses: actions/checkout@v1 38 | - name: Install package dependencies 39 | run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS" 40 | - name: Set up Ruby 41 | uses: ruby/setup-ruby@v1 42 | with: 43 | ruby-version: ${{matrix.ruby}} 44 | - name: Install latest bundler 45 | run: | 46 | gem install bundler --no-document 47 | - name: Bundle install 48 | run: bundle install --jobs 4 --retry 3 49 | - name: Run all tests 50 | run: script/ci 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | .yardoc 6 | Gemfile.lock 7 | InstalledFiles 8 | _yardoc 9 | coverage 10 | doc/ 11 | lib/bundler/man 12 | pkg 13 | rdoc 14 | spec/reports 15 | test/tmp 16 | test/version_tmp 17 | tmp 18 | *.bundle 19 | *.so 20 | *.o 21 | *.a 22 | mkmf.log 23 | .greenbar 24 | .rubocop-* 25 | .byebug_history 26 | -------------------------------------------------------------------------------- /.jrubyrc: -------------------------------------------------------------------------------- 1 | debug.fullTrace=true 2 | -------------------------------------------------------------------------------- /.repobot.yml: -------------------------------------------------------------------------------- 1 | # This is a config synced from hanami/template-gem repo 2 | 3 | sources: 4 | - repo: hanami/template-gem 5 | sync: 6 | - ".repobot.yml.erb" 7 | - ".github/FUNDING.yml" 8 | - "CODE_OF_CONDUCT.md" 9 | - "LICENSE.md.erb" 10 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | # Please keep AllCops, Bundler, Style, Metrics groups and then order cops 2 | # alphabetically 3 | inherit_from: 4 | - https://raw.githubusercontent.com/hanami/devtools/main/.rubocop.yml 5 | Naming/HeredocDelimiterNaming: 6 | Enabled: false 7 | Layout/LineLength: 8 | Exclude: 9 | - "lib/hanami/helpers/escape_helper.rb" 10 | - "lib/hanami/helpers/form_helper.rb" 11 | - "lib/hanami/helpers/form_helper/form_builder.rb" 12 | - "spec/**/*.rb" 13 | Lint/EmptyBlock: 14 | Exclude: 15 | - "spec/unit/hanami/helpers/form_helper_spec.rb" 16 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --private 2 | - 3 | README.md 4 | LICENSE.md 5 | lib/**/*.rb 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Hanami::Helpers 2 | View helpers for Ruby web applications 3 | 4 | ## v2.0.0.alpha1 (unreleased) 5 | ### Changed 6 | - [Luca Guidi] Drop support for Ruby: MRI 2.3, 2.4, and 2.5 7 | 8 | ## v1.3.3 - 2020-02-03 9 | ### Added 10 | - [Luca Guidi] Official support for Ruby: MRI 2.7 11 | 12 | ## v1.3.2 - 2019-10-31 13 | ### Added 14 | - [Nenad] Support block syntax for `label` helper 15 | - [Luca Guidi] Allow `form_for` to accept `params:` argument to override params coming from the view 16 | 17 | ### Fixed 18 | - [Danny Santos] When `prompt:` option is used in `select` helper, set to `disabled="disabled"` the related `