├── .circleci └── config.yml ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── Gemfile ├── Gemfile.lock ├── MIT-LICENSE.txt ├── README.md ├── Rakefile ├── bin └── test ├── lib ├── nice_partials.rb └── nice_partials │ ├── helper.rb │ ├── monkey_patch.rb │ ├── partial.rb │ ├── partial │ ├── content.rb │ └── section.rb │ └── version.rb ├── nice_partials.gemspec └── test ├── fixtures ├── (special) │ └── translations │ │ └── _special_nice_partials_translated.html.erb ├── _basic.html.erb ├── _card.html.erb ├── _clobberer.html.erb ├── _columns.html.erb ├── _local_assigns.html.erb ├── _partial_accessed_in_outer_context.html.erb ├── _partial_with_helpers.html.erb ├── _strict_locals.html.erb ├── _yield_label.html.erb ├── card_test.html.erb ├── mixed_yield_test.html.erb ├── mixed_yield_with_object_test.html.erb ├── nested_render_without_rendering_block.erb ├── translations │ ├── _nice_partials_translated.html.erb │ ├── _nice_partials_translated_nested.html.erb │ ├── _nice_partials_translated_symbol.html.erb │ ├── _t.html.erb │ └── _translated.html.erb └── yields │ ├── _mixed.html.erb │ ├── _mixed_with_object.html.erb │ ├── _object.html.erb │ ├── _plain.html.erb │ ├── _plain_nested.html.erb │ └── _symbol.html.erb ├── nice_partials └── partial_test.rb ├── renderer └── translation_test.rb ├── renderer_test.rb └── test_helper.rb /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/Gemfile -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/Gemfile.lock -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/MIT-LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/Rakefile -------------------------------------------------------------------------------- /bin/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/bin/test -------------------------------------------------------------------------------- /lib/nice_partials.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials.rb -------------------------------------------------------------------------------- /lib/nice_partials/helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials/helper.rb -------------------------------------------------------------------------------- /lib/nice_partials/monkey_patch.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials/monkey_patch.rb -------------------------------------------------------------------------------- /lib/nice_partials/partial.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials/partial.rb -------------------------------------------------------------------------------- /lib/nice_partials/partial/content.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials/partial/content.rb -------------------------------------------------------------------------------- /lib/nice_partials/partial/section.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/lib/nice_partials/partial/section.rb -------------------------------------------------------------------------------- /lib/nice_partials/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module NicePartials 4 | VERSION = "0.10.1" 5 | end 6 | -------------------------------------------------------------------------------- /nice_partials.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/nice_partials.gemspec -------------------------------------------------------------------------------- /test/fixtures/(special)/translations/_special_nice_partials_translated.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/(special)/translations/_special_nice_partials_translated.html.erb -------------------------------------------------------------------------------- /test/fixtures/_basic.html.erb: -------------------------------------------------------------------------------- 1 | <%= partial.yield :message %> 2 | -------------------------------------------------------------------------------- /test/fixtures/_card.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_card.html.erb -------------------------------------------------------------------------------- /test/fixtures/_clobberer.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_clobberer.html.erb -------------------------------------------------------------------------------- /test/fixtures/_columns.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_columns.html.erb -------------------------------------------------------------------------------- /test/fixtures/_local_assigns.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_local_assigns.html.erb -------------------------------------------------------------------------------- /test/fixtures/_partial_accessed_in_outer_context.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_partial_accessed_in_outer_context.html.erb -------------------------------------------------------------------------------- /test/fixtures/_partial_with_helpers.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_partial_with_helpers.html.erb -------------------------------------------------------------------------------- /test/fixtures/_strict_locals.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/_strict_locals.html.erb -------------------------------------------------------------------------------- /test/fixtures/_yield_label.html.erb: -------------------------------------------------------------------------------- 1 | <%= partial.label.yield %> 2 | -------------------------------------------------------------------------------- /test/fixtures/card_test.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/card_test.html.erb -------------------------------------------------------------------------------- /test/fixtures/mixed_yield_test.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/mixed_yield_test.html.erb -------------------------------------------------------------------------------- /test/fixtures/mixed_yield_with_object_test.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/mixed_yield_with_object_test.html.erb -------------------------------------------------------------------------------- /test/fixtures/nested_render_without_rendering_block.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/nested_render_without_rendering_block.erb -------------------------------------------------------------------------------- /test/fixtures/translations/_nice_partials_translated.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/translations/_nice_partials_translated.html.erb -------------------------------------------------------------------------------- /test/fixtures/translations/_nice_partials_translated_nested.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/translations/_nice_partials_translated_nested.html.erb -------------------------------------------------------------------------------- /test/fixtures/translations/_nice_partials_translated_symbol.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/translations/_nice_partials_translated_symbol.html.erb -------------------------------------------------------------------------------- /test/fixtures/translations/_t.html.erb: -------------------------------------------------------------------------------- 1 | <%= partial.t :title, description: :header, byline: "custom.key" %> 2 | -------------------------------------------------------------------------------- /test/fixtures/translations/_translated.html.erb: -------------------------------------------------------------------------------- 1 | <%= t ".message" %> 2 | -------------------------------------------------------------------------------- /test/fixtures/yields/_mixed.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/yields/_mixed.html.erb -------------------------------------------------------------------------------- /test/fixtures/yields/_mixed_with_object.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/yields/_mixed_with_object.html.erb -------------------------------------------------------------------------------- /test/fixtures/yields/_object.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/yields/_object.html.erb -------------------------------------------------------------------------------- /test/fixtures/yields/_plain.html.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /test/fixtures/yields/_plain_nested.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/fixtures/yields/_plain_nested.html.erb -------------------------------------------------------------------------------- /test/fixtures/yields/_symbol.html.erb: -------------------------------------------------------------------------------- 1 | <%= yield :message %> 2 | -------------------------------------------------------------------------------- /test/nice_partials/partial_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/nice_partials/partial_test.rb -------------------------------------------------------------------------------- /test/renderer/translation_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/renderer/translation_test.rb -------------------------------------------------------------------------------- /test/renderer_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/renderer_test.rb -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bullet-train-co/nice_partials/HEAD/test/test_helper.rb --------------------------------------------------------------------------------