jbuilder 2.11.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.devcontainer/devcontainer.json +25 -0
 - data/.github/workflows/ruby.yml +56 -0
 - data/.gitignore +1 -0
 - data/Appraisals +14 -13
 - data/CONTRIBUTING.md +4 -10
 - data/Gemfile +2 -0
 - data/README.md +113 -26
 - data/Rakefile +3 -1
 - data/bin/release +14 -0
 - data/bin/test +6 -0
 - data/gemfiles/{rails_5_1.gemfile → rails_7_0.gemfile} +2 -1
 - data/gemfiles/{rails_5_2.gemfile → rails_7_1.gemfile} +1 -1
 - data/gemfiles/{rails_6_0.gemfile → rails_7_2.gemfile} +1 -1
 - data/gemfiles/{rails_5_0.gemfile → rails_8_0.gemfile} +1 -1
 - data/gemfiles/rails_head.gemfile +1 -1
 - data/jbuilder.gemspec +16 -3
 - data/lib/generators/rails/jbuilder_generator.rb +6 -0
 - data/lib/generators/rails/scaffold_controller_generator.rb +2 -0
 - data/lib/generators/rails/templates/api_controller.rb +7 -1
 - data/lib/generators/rails/templates/controller.rb +16 -14
 - data/lib/generators/rails/templates/index.json.jbuilder +1 -1
 - data/lib/generators/rails/templates/show.json.jbuilder +1 -1
 - data/lib/jbuilder/blank.rb +2 -0
 - data/lib/jbuilder/collection_renderer.rb +58 -0
 - data/lib/jbuilder/errors.rb +3 -1
 - data/lib/jbuilder/jbuilder.rb +3 -7
 - data/lib/jbuilder/jbuilder_dependency_tracker.rb +75 -0
 - data/lib/jbuilder/jbuilder_template.rb +81 -47
 - data/lib/jbuilder/key_formatter.rb +19 -21
 - data/lib/jbuilder/railtie.rb +17 -19
 - data/lib/jbuilder/version.rb +5 -0
 - data/lib/jbuilder.rb +84 -50
 - data/test/jbuilder_dependency_tracker_test.rb +2 -3
 - data/test/jbuilder_generator_test.rb +19 -9
 - data/test/jbuilder_template_test.rb +133 -8
 - data/test/jbuilder_test.rb +152 -14
 - data/test/scaffold_api_controller_generator_test.rb +52 -47
 - data/test/scaffold_controller_generator_test.rb +38 -12
 - data/test/test_helper.rb +23 -10
 - metadata +37 -18
 - data/.travis.yml +0 -52
 - data/CHANGELOG.md +0 -300
 - data/lib/jbuilder/dependency_tracker.rb +0 -61
 
    
        data/.travis.yml
    DELETED
    
    | 
         @@ -1,52 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            language: ruby
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            cache: bundler
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            before_install:
         
     | 
| 
       6 
     | 
    
         
            -
              - "gem install bundler -v '<2'"
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
            rvm:
         
     | 
| 
       9 
     | 
    
         
            -
              - 2.2.10
         
     | 
| 
       10 
     | 
    
         
            -
              - 2.3.8
         
     | 
| 
       11 
     | 
    
         
            -
              - 2.4.10
         
     | 
| 
       12 
     | 
    
         
            -
              - 2.5.8
         
     | 
| 
       13 
     | 
    
         
            -
              - 2.6.6
         
     | 
| 
       14 
     | 
    
         
            -
              - 2.7.1
         
     | 
| 
       15 
     | 
    
         
            -
              - ruby-head
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            gemfile:
         
     | 
| 
       18 
     | 
    
         
            -
              - gemfiles/rails_5_0.gemfile
         
     | 
| 
       19 
     | 
    
         
            -
              - gemfiles/rails_5_1.gemfile
         
     | 
| 
       20 
     | 
    
         
            -
              - gemfiles/rails_5_2.gemfile
         
     | 
| 
       21 
     | 
    
         
            -
              - gemfiles/rails_6_0.gemfile
         
     | 
| 
       22 
     | 
    
         
            -
              - gemfiles/rails_head.gemfile
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
            matrix:
         
     | 
| 
       25 
     | 
    
         
            -
              exclude:
         
     | 
| 
       26 
     | 
    
         
            -
                - rvm: 2.7.1
         
     | 
| 
       27 
     | 
    
         
            -
                  gemfile: gemfiles/rails_5_0.gemfile
         
     | 
| 
       28 
     | 
    
         
            -
                - rvm: 2.7.1
         
     | 
| 
       29 
     | 
    
         
            -
                  gemfile: gemfiles/rails_5_1.gemfile
         
     | 
| 
       30 
     | 
    
         
            -
                - rvm: 2.2.10
         
     | 
| 
       31 
     | 
    
         
            -
                  gemfile: gemfiles/rails_5_2.gemfile
         
     | 
| 
       32 
     | 
    
         
            -
                - rvm: 2.7.1
         
     | 
| 
       33 
     | 
    
         
            -
                  gemfile: gemfiles/rails_5_2.gemfile
         
     | 
| 
       34 
     | 
    
         
            -
                - rvm: 2.2.10
         
     | 
| 
       35 
     | 
    
         
            -
                  gemfile: gemfiles/rails_6_0.gemfile
         
     | 
| 
       36 
     | 
    
         
            -
                - rvm: 2.3.8
         
     | 
| 
       37 
     | 
    
         
            -
                  gemfile: gemfiles/rails_6_0.gemfile
         
     | 
| 
       38 
     | 
    
         
            -
                - rvm: 2.4.10
         
     | 
| 
       39 
     | 
    
         
            -
                  gemfile: gemfiles/rails_6_0.gemfile
         
     | 
| 
       40 
     | 
    
         
            -
                - rvm: 2.2.10
         
     | 
| 
       41 
     | 
    
         
            -
                  gemfile: gemfiles/rails_head.gemfile
         
     | 
| 
       42 
     | 
    
         
            -
                - rvm: 2.3.8
         
     | 
| 
       43 
     | 
    
         
            -
                  gemfile: gemfiles/rails_head.gemfile
         
     | 
| 
       44 
     | 
    
         
            -
                - rvm: 2.4.10
         
     | 
| 
       45 
     | 
    
         
            -
                  gemfile: gemfiles/rails_head.gemfile
         
     | 
| 
       46 
     | 
    
         
            -
              allow_failures:
         
     | 
| 
       47 
     | 
    
         
            -
                - rvm: ruby-head
         
     | 
| 
       48 
     | 
    
         
            -
                - gemfile: gemfiles/rails_head.gemfile
         
     | 
| 
       49 
     | 
    
         
            -
              fast_finish: true
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
            notifications:
         
     | 
| 
       52 
     | 
    
         
            -
              email: false
         
     | 
    
        data/CHANGELOG.md
    DELETED
    
    | 
         @@ -1,300 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Changelog
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            2.11.0
         
     | 
| 
       4 
     | 
    
         
            -
            ------
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            * [Allow jbuilder instance to be passed to #merge!](https://github.com/rails/jbuilder/pull/485)
         
     | 
| 
       7 
     | 
    
         
            -
            * [Fix for key_format! when using nested hashes](https://github.com/rails/jbuilder/pull/486)
         
     | 
| 
       8 
     | 
    
         
            -
            * [Include rich_text, attachment, and attachments fields in json partial](https://github.com/rails/jbuilder/pull/459)
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            2.10.2
         
     | 
| 
       11 
     | 
    
         
            -
            ------
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            * Update scaffold generator to use double quotes, 422 form error responds, and modern string-of-arrays syntax [DHH]
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            2.10.1
         
     | 
| 
       16 
     | 
    
         
            -
            ------
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            * Fix keyword arguments warning on Ruby 2.7
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            2.10.0
         
     | 
| 
       21 
     | 
    
         
            -
            ------
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            * Requires Rails 5+ and Ruby 2.2+
         
     | 
| 
       24 
     | 
    
         
            -
            * Nested hashes are deep-merged
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
            2.9.1
         
     | 
| 
       27 
     | 
    
         
            -
            -----
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
            * [Respect JSON encoding customizations](https://github.com/rails/jbuilder/commit/e2e8623b08078ad6a2323ce8ecaf642b7afe1166)
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
            2.9.0
         
     | 
| 
       32 
     | 
    
         
            -
            -----
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
            * [Fix passing object with partial without locals](https://github.com/rails/jbuilder/pull/435)
         
     | 
| 
       35 
     | 
    
         
            -
            * [Fix deprecation warning in Rails 6.0](https://github.com/rails/jbuilder/pull/453)
         
     | 
| 
       36 
     | 
    
         
            -
            * [Use quotes consistently in generated templates](https://github.com/rails/jbuilder/pull/455)
         
     | 
| 
       37 
     | 
    
         
            -
            * [Allow omitting timestamps from generated partials](https://github.com/rails/jbuilder/pull/448)
         
     | 
| 
       38 
     | 
    
         
            -
            * [Respect changing scaffold generator](https://github.com/rails/jbuilder/pull/458)
         
     | 
| 
       39 
     | 
    
         
            -
            * [Use a symbolic default format for Rails 6.0 forward compatibility](https://github.com/rails/jbuilder/commit/3895a7243f3db292b0bf15513fc05494e6e50576)
         
     | 
| 
       40 
     | 
    
         
            -
            * [Drop MultiJSON in favor of Ruby standard library JSON](https://github.com/rails/jbuilder/commit/b952ae096eb1828b0fcfde06e6ba62311494ec49)
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
            2.8.0
         
     | 
| 
       43 
     | 
    
         
            -
            -----
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
            * [Replace deprecated fragment_cache_key for Rails 5.2 support](https://github.com/rails/jbuilder/pull/430)
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
            2.7.0
         
     | 
| 
       48 
     | 
    
         
            -
            -----
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
            * [Requires Rails 4+](https://github.com/rails/jbuilder/commit/5207ff394533177fffdd768bfaa6413a0cd16dc8)
         
     | 
| 
       51 
     | 
    
         
            -
            * [Fix implicitly rendering a JSON partial with the same name as an
         
     | 
| 
       52 
     | 
    
         
            -
               HTML partial](https://github.com/rails/jbuilder/pull/400)
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
            2.6.4
         
     | 
| 
       55 
     | 
    
         
            -
            -----
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            * Drop the pessimistic upper-bound restriction on Active Support and MultiJSON to prevent future gemfile resolution deadlocks *DHH*
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
            2.6.3
         
     | 
| 
       60 
     | 
    
         
            -
            -----
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
            * Support Rails 5.1
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
            2.6.2
         
     | 
| 
       65 
     | 
    
         
            -
            -----
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            * Fix thor warnings
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
            2.6.1
         
     | 
| 
       70 
     | 
    
         
            -
            -----
         
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
            * [Optimize root caches with cache_root!](https://github.com/rails/jbuilder/pull/370)
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
            2.6.0
         
     | 
| 
       75 
     | 
    
         
            -
            -----
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
            * [Rails 5 cache! with expire support](https://github.com/rails/jbuilder/commit/d61e3354563863731bc1f358f495b1dbb7ae9d32)
         
     | 
| 
       78 
     | 
    
         
            -
            * [Generated view DRYed by using model partial](https://github.com/rails/jbuilder/commit/83256f4d7e9211c9dc47972feaed7fd31e4f7cac)
         
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
            2.5.0
         
     | 
| 
       81 
     | 
    
         
            -
            -----
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
            * [Rails 5 compatibility](https://github.com/rails/jbuilder/commit/64c510ec69d9e63b73ffd5942e802d21a7d14701)
         
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
            2.4.1
         
     | 
| 
       86 
     | 
    
         
            -
            -----
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
            * [Fix controller generators to be Rails 5 compatible](https://github.com/rails/jbuilder/commit/2dc6203c5c4a98701d5b64c2a5200835a48bb533)
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
            2.4.0
         
     | 
| 
       91 
     | 
    
         
            -
            -----
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
            * [Rails 5 compatibility](https://github.com/rails/jbuilder/commit/4aa2cfcc19a4634d65a28ffc75f0ac0cb8304115)
         
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
            2.3.2
         
     | 
| 
       96 
     | 
    
         
            -
            -----
         
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
            * [Remove Mime Types deprecation message](https://github.com/rails/jbuilder/commit/5ba4e4ac654cc8388619538f576fe234659b84ec)
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
            2.3.1
         
     | 
| 
       101 
     | 
    
         
            -
            -----
         
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
            * [Explicitly require ostruct to prevent NameError](https://github.com/rails/jbuilder/pull/281)
         
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
            2.3.0
         
     | 
| 
       106 
     | 
    
         
            -
            -----
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
            * [Add new in-place partial invocation support](https://github.com/rails/jbuilder/commit/1feda7ee605c136e59fb4de970f4674de518e6de)
         
     | 
| 
       109 
     | 
    
         
            -
            * [Add implicit partial rendering for AM::Models](https://github.com/rails/jbuilder/commit/4d5bf7d0ea92765adb7be36834e84f9855a061df)
         
     | 
| 
       110 
     | 
    
         
            -
            * [Generate API controller if Rails API option is enabled](https://github.com/rails/jbuilder/commit/db68f6bd327cf42b47ef22d455fb5721a8c2cf5f)
         
     | 
| 
       111 
     | 
    
         
            -
            * [JBuilder's templates have less priority than app templates](https://github.com/rails/jbuilder/commit/7c1a5f25603ec1f4e51fba3dbba9db23726a5d69)
         
     | 
| 
       112 
     | 
    
         
            -
            * [Add AC::Helpers module to jbuilder for api only apps](https://github.com/rails/jbuilder/commit/7cf1d1eb7d125caf38309b5427952030011c1aa0)
         
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
            2.2.16
         
     | 
| 
       115 
     | 
    
         
            -
            ------
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
            * [Fix NoMethodError around `api_only` in railtie](https://github.com/rails/jbuilder/commit/b08d1da10b14720b46d383b2917e336060fd9ffa)
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
            2.2.14
         
     | 
| 
       120 
     | 
    
         
            -
            ------
         
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
            * [Make Jbuilder compatible with Rails API](https://github.com/rails/jbuilder/commit/29c0014a9c954c990075d42c45c66075260e924b)
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
            2.2.13
         
     | 
| 
       125 
     | 
    
         
            -
            ------
         
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
            * Several performance optimizations: [#260](https://github.com/rails/jbuilder/pull/260) & [#261](https://github.com/rails/jbuilder/pull/261)
         
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
            2.2.12
         
     | 
| 
       130 
     | 
    
         
            -
            ------
         
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
            * [Replace explicit block calls with yield for performance](https://github.com/rails/jbuilder/commit/3184f941276ad03a071cf977133d1a32302afa47)
         
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
            2.2.11
         
     | 
| 
       135 
     | 
    
         
            -
            ------
         
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
            * Generate the templates for Rails 5+ [#258](https://github.com/rails/jbuilder/pull/258) [@amatsuda](https://github.com/amatsuda)
         
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
            2.2.10
         
     | 
| 
       140 
     | 
    
         
            -
            ------
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
            * Add Jbuilder::Blank#empty? to tell if attributes are empty [#257](https://github.com/rails/jbuilder/pull/257) [@a2ikm](https://github.com/a2ikm)
         
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
            2.2.9
         
     | 
| 
       145 
     | 
    
         
            -
            -----
         
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
            * Support `partial!` call with `locals` option in `JbuilderTemplate` [#251](https://github.com/rails/jbuilder/pull/251)
         
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
            2.2.8
         
     | 
| 
       150 
     | 
    
         
            -
            -----
         
     | 
| 
       151 
     | 
    
         
            -
            * [Raise ArrayError when trying to add key to an array](https://github.com/rails/jbuilder/commit/869e4be1ad165ce986d8fca78311bdd3ed166087)
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
            2.2.7
         
     | 
| 
       154 
     | 
    
         
            -
            -----
         
     | 
| 
       155 
     | 
    
         
            -
            * [Make Blank object serializable with Marshal](https://github.com/rails/jbuilder/commit/7083f28d8b665aa60d0d1b1927ae88bb5c6290ba)
         
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
            2.2.6
         
     | 
| 
       158 
     | 
    
         
            -
            -----
         
     | 
| 
       159 
     | 
    
         
            -
            * [Make sure dependency tracker loads after template handler](https://github.com/rails/jbuilder/commit/3ba404b1207b557e14771c90b8832bc01ae67a42)
         
     | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
       161 
     | 
    
         
            -
            2.2.5
         
     | 
| 
       162 
     | 
    
         
            -
            -----
         
     | 
| 
       163 
     | 
    
         
            -
            * [Refactor merge block behavior to raise error for unexpected values](https://github.com/rails/jbuilder/commit/4503162fb26f53f613fc83ac081fd244748b6fe9)
         
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
            2.2.4
         
     | 
| 
       166 
     | 
    
         
            -
            -----
         
     | 
| 
       167 
     | 
    
         
            -
            * [Typecast locals hash key during collection render](https://github.com/rails/jbuilder/commit/a6b0c8651a08e01cb53eee38e211c65423f275f7)
         
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
            2.2.3
         
     | 
| 
       170 
     | 
    
         
            -
            -----
         
     | 
| 
       171 
     | 
    
         
            -
            * [Move template handler registration into railtie](https://github.com/rails/jbuilder/commit/c8acc5cea6da2a79b7b345adc301cb5ff2517647)
         
     | 
| 
       172 
     | 
    
         
            -
            * [Do not capture the block where it is possible](https://github.com/rails/jbuilder/commit/973b382c3924cb59fc0e4e25266b18e74d41d646)
         
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
            2.2.2
         
     | 
| 
       175 
     | 
    
         
            -
            -----
         
     | 
| 
       176 
     | 
    
         
            -
            * [Fix `Jbuilder#merge!` inside block](https://github.com/rails/jbuilder/commit/a7b328552eb0d36315f75bff813bea7eecf8c1d7)
         
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
            2.2.1
         
     | 
| 
       179 
     | 
    
         
            -
            -----
         
     | 
| 
       180 
     | 
    
         
            -
            * [Fix empty block handling](https://github.com/rails/jbuilder/commit/972a11141403269e9b17b45b0c95f8a9788245ee)
         
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
            2.2.0
         
     | 
| 
       183 
     | 
    
         
            -
            -----
         
     | 
| 
       184 
     | 
    
         
            -
            * [Allow to skip `array!` iterations by calling `next`](https://github.com/rails/jbuilder/commit/81a63308fb9d5002519dd871f829ccc58067251a)
         
     | 
| 
       185 
     | 
    
         
            -
             
     | 
| 
       186 
     | 
    
         
            -
            2.1.2
         
     | 
| 
       187 
     | 
    
         
            -
            -----
         
     | 
| 
       188 
     | 
    
         
            -
            * [Cast array-like objects to array before merging](https://github.com/rails/jbuilder/commit/7b8c8a1cb09b7f3dd26e5643ebbd6b2ec67185db)
         
     | 
| 
       189 
     | 
    
         
            -
             
     | 
| 
       190 
     | 
    
         
            -
            2.1.1
         
     | 
| 
       191 
     | 
    
         
            -
            -----
         
     | 
| 
       192 
     | 
    
         
            -
            * [Remove unused file](https://github.com/rails/jbuilder/commit/e49e1047976fac93b8242ab212c7b1a463b70809)
         
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
       194 
     | 
    
         
            -
            2.1.0
         
     | 
| 
       195 
     | 
    
         
            -
            -----
         
     | 
| 
       196 
     | 
    
         
            -
            * [Blocks and their extract! shortcuts are additive by default](https://github.com/rails/jbuilder/commit/a49390736c5f6e2d7a31111df6531bc28dba9fb1)
         
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
            2.0.8
         
     | 
| 
       199 
     | 
    
         
            -
            -----
         
     | 
| 
       200 
     | 
    
         
            -
            * [Eliminate circular dependencies](https://github.com/rails/jbuilder/commit/0879484dc74e7be93b695f66e3708ba48cdb1be3)
         
     | 
| 
       201 
     | 
    
         
            -
            * [Support cache key generation for complex objects](https://github.com/rails/jbuilder/commit/ca9622cca30c1112dd4408fcb2e658849abe1dd5)
         
     | 
| 
       202 
     | 
    
         
            -
            * [Remove JbuilderProxy class](https://github.com/rails/jbuilder/commit/5877482fc7da3224e42d4f72a1386f7a3a08173b)
         
     | 
| 
       203 
     | 
    
         
            -
            * [Move KeyFormatter into a separate file](https://github.com/rails/jbuilder/commit/13fee8464ff53ce853030114283c03c135c052b6)
         
     | 
| 
       204 
     | 
    
         
            -
            * [Move NullError into a separate file](https://github.com/rails/jbuilder/commit/13fee8464ff53ce853030114283c03c135c052b6)
         
     | 
| 
       205 
     | 
    
         
            -
             
     | 
| 
       206 
     | 
    
         
            -
            2.0.7
         
     | 
| 
       207 
     | 
    
         
            -
            -----
         
     | 
| 
       208 
     | 
    
         
            -
            * [Add destroy notice to scaffold generator](https://github.com/rails/jbuilder/commit/8448e86f8cdfa0f517bd59576947875775a1d43c)
         
     | 
| 
       209 
     | 
    
         
            -
             
     | 
| 
       210 
     | 
    
         
            -
            2.0.6
         
     | 
| 
       211 
     | 
    
         
            -
            -----
         
     | 
| 
       212 
     | 
    
         
            -
            * [Use render short form in controller generator](https://github.com/rails/jbuilder/commit/acf37320a7cea7fcc70c791bc94bd5f46b8349ff)
         
     | 
| 
       213 
     | 
    
         
            -
             
     | 
| 
       214 
     | 
    
         
            -
            2.0.5
         
     | 
| 
       215 
     | 
    
         
            -
            -----
         
     | 
| 
       216 
     | 
    
         
            -
            * [Fix edgecase when json is defined as a method](https://github.com/rails/jbuilder/commit/ca711a0c0a5760e26258ce2d93c14bef8fff0ead)
         
     | 
| 
       217 
     | 
    
         
            -
             
     | 
| 
       218 
     | 
    
         
            -
            2.0.4
         
     | 
| 
       219 
     | 
    
         
            -
            -----
         
     | 
| 
       220 
     | 
    
         
            -
            * [Add cache_if! to conditionally cache JSON fragments](https://github.com/rails/jbuilder/commit/14a5afd8a2c939a6fd710d355a194c114db96eb2)
         
     | 
| 
       221 
     | 
    
         
            -
             
     | 
| 
       222 
     | 
    
         
            -
            2.0.3
         
     | 
| 
       223 
     | 
    
         
            -
            -----
         
     | 
| 
       224 
     | 
    
         
            -
            * [Pass options when calling cache_fragment_name](https://github.com/rails/jbuilder/commit/07c2cc7486fe9ef423d7bc821b83f6d485f330e0)
         
     | 
| 
       225 
     | 
    
         
            -
             
     | 
| 
       226 
     | 
    
         
            -
            2.0.2
         
     | 
| 
       227 
     | 
    
         
            -
            -----
         
     | 
| 
       228 
     | 
    
         
            -
            * [Fix Dependency Tracking fail to detect single-quoted partial correctly](https://github.com/rails/jbuilder/commit/448679a6d3098eb34d137f782a05f1767711991a)
         
     | 
| 
       229 
     | 
    
         
            -
            * [Prevent Dependency Tracker constants leaking into global namespace](https://github.com/rails/jbuilder/commit/3544b288b63f504f46fa8aafd1d17ee198d77536)
         
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
            2.0.1
         
     | 
| 
       232 
     | 
    
         
            -
            -----
         
     | 
| 
       233 
     | 
    
         
            -
            * [Dependency tracking support for Rails 3 with cache_digest gem](https://github.com/rails/jbuilder/commit/6b471d7a38118e8f7645abec21955ef793401daf)
         
     | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
       235 
     | 
    
         
            -
            2.0.0
         
     | 
| 
       236 
     | 
    
         
            -
            -----
         
     | 
| 
       237 
     | 
    
         
            -
            * [Respond to PUT/PATCH API request with :ok](https://github.com/rails/jbuilder/commit/9dbce9c12181e89f8f472ac23c764ffe8438040a)
         
     | 
| 
       238 
     | 
    
         
            -
            * [Remove Ruby 1.8 support](https://github.com/rails/jbuilder/commit/d53fff42d91f33d662eafc2561c4236687ecf6c9)
         
     | 
| 
       239 
     | 
    
         
            -
            * [Remove deprecated two argument block call](https://github.com/rails/jbuilder/commit/07a35ee7e79ae4b06dba9dbff5c4e07c1e627218)
         
     | 
| 
       240 
     | 
    
         
            -
            * [Make Jbuilder object initialize with single hash](https://github.com/rails/jbuilder/commit/38bf551db0189327aaa90b9be010c0d1b792c007)
         
     | 
| 
       241 
     | 
    
         
            -
            * [Track template dependencies](https://github.com/rails/jbuilder/commit/8e73cea39f60da1384afd687cc8e5e399630d8cc)
         
     | 
| 
       242 
     | 
    
         
            -
            * [Expose merge! method](https://github.com/rails/jbuilder/commit/0e2eb47f6f3c01add06a1a59b37cdda8baf24f29)
         
     | 
| 
       243 
     | 
    
         
            -
             
     | 
| 
       244 
     | 
    
         
            -
            1.5.3
         
     | 
| 
       245 
     | 
    
         
            -
            -----
         
     | 
| 
       246 
     | 
    
         
            -
            * [Generators add `:id` column by default](https://github.com/rails/jbuilder/commit/0b52b86773e48ac2ce35d4155c7b70ad8b3e8937)
         
     | 
| 
       247 
     | 
    
         
            -
             
     | 
| 
       248 
     | 
    
         
            -
            1.5.2
         
     | 
| 
       249 
     | 
    
         
            -
            -----
         
     | 
| 
       250 
     | 
    
         
            -
            * [Nil-collection should be treated as empty array](https://github.com/rails/jbuilder/commit/2f700bb00ab663c6b7fcb28d2967aeb989bd43c7)
         
     | 
| 
       251 
     | 
    
         
            -
             
     | 
| 
       252 
     | 
    
         
            -
            1.5.1
         
     | 
| 
       253 
     | 
    
         
            -
            -----
         
     | 
| 
       254 
     | 
    
         
            -
            * [Expose template lookup options](https://github.com/rails/jbuilder/commit/404c18dee1af96ac6d8052a04062629ef1db2945)
         
     | 
| 
       255 
     | 
    
         
            -
             
     | 
| 
       256 
     | 
    
         
            -
            1.5.0
         
     | 
| 
       257 
     | 
    
         
            -
            -----
         
     | 
| 
       258 
     | 
    
         
            -
            * [Do not perform any caching when `controller.perform_caching` is false](https://github.com/rails/jbuilder/commit/94633facde1ac43580f8cd5e13ae9cc83e1da8f4)
         
     | 
| 
       259 
     | 
    
         
            -
            * [Add partial collection rendering](https://github.com/rails/jbuilder/commit/e8c10fc885e41b18178aaf4dcbc176961c928d76)
         
     | 
| 
       260 
     | 
    
         
            -
            * [Deprecate extract! calling private methods](https://github.com/rails/jbuilder/commit/b9e19536c2105d7f2e813006bbcb8ca5730d28a3)
         
     | 
| 
       261 
     | 
    
         
            -
            * [Add array of partials rendering](https://github.com/rails/jbuilder/commit/7d7311071720548047f98f14ad013c560b8d9c3a)
         
     | 
| 
       262 
     | 
    
         
            -
             
     | 
| 
       263 
     | 
    
         
            -
            1.4.2
         
     | 
| 
       264 
     | 
    
         
            -
            -----
         
     | 
| 
       265 
     | 
    
         
            -
            * [Require MIME dependency explicitly](https://github.com/rails/jbuilder/commit/b1ed5ac4f08b056f8839b4b19b43562e81e02a59)
         
     | 
| 
       266 
     | 
    
         
            -
             
     | 
| 
       267 
     | 
    
         
            -
            1.4.1
         
     | 
| 
       268 
     | 
    
         
            -
            -----
         
     | 
| 
       269 
     | 
    
         
            -
            * [Removed deprecated positioned arguments initializer support](https://github.com/rails/jbuilder/commit/6e03e0452073eeda77e6dfe66aa31e5ec67a3531)
         
     | 
| 
       270 
     | 
    
         
            -
            * [Deprecate two-arguments block calling](https://github.com/rails/jbuilder/commit/2b10bb058bb12bc782cbcc16f6ec67b489e5ed43)
         
     | 
| 
       271 
     | 
    
         
            -
             
     | 
| 
       272 
     | 
    
         
            -
            1.4.0
         
     | 
| 
       273 
     | 
    
         
            -
            -----
         
     | 
| 
       274 
     | 
    
         
            -
            * [Add quick collection attribute extraction](https://github.com/rails/jbuilder/commit/c2b966cf653ea4264fbb008b8cc6ce5359ebe40a)
         
     | 
| 
       275 
     | 
    
         
            -
            * [Block has priority over attributes extraction](https://github.com/rails/jbuilder/commit/77c24766362c02769d81dac000b1879a9e4d4a00)
         
     | 
| 
       276 
     | 
    
         
            -
            * [Meaningful error messages when adding properties to null](https://github.com/rails/jbuilder/commit/e26764602e34b3772e57e730763d512e59489e3b)
         
     | 
| 
       277 
     | 
    
         
            -
            * [Do not enforce template format, enforce handlers instead](https://github.com/rails/jbuilder/commit/72576755224b15da45e50cbea877679800ab1398)
         
     | 
| 
       278 
     | 
    
         
            -
             
     | 
| 
       279 
     | 
    
         
            -
            1.3.0
         
     | 
| 
       280 
     | 
    
         
            -
            -----
         
     | 
| 
       281 
     | 
    
         
            -
            * [Add nil! method for nil JSON](https://github.com/rails/jbuilder/commit/822a906f68664f61a1209336bb681077692c8475)
         
     | 
| 
       282 
     | 
    
         
            -
             
     | 
| 
       283 
     | 
    
         
            -
            1.2.1
         
     | 
| 
       284 
     | 
    
         
            -
            -----
         
     | 
| 
       285 
     | 
    
         
            -
            * [Added explicit dependency for MultiJson](https://github.com/rails/jbuilder/commit/4d58eacb6cd613679fb243484ff73a79bbbff2d2)
         
     | 
| 
       286 
     | 
    
         
            -
             
     | 
| 
       287 
     | 
    
         
            -
            1.2.0
         
     | 
| 
       288 
     | 
    
         
            -
            -----
         
     | 
| 
       289 
     | 
    
         
            -
            * Multiple documentation improvements and internal refactoring
         
     | 
| 
       290 
     | 
    
         
            -
            * [Fixes fragment caching to work with latest digests](https://github.com/rails/jbuilder/commit/da937d6b8732124074c612abb7ff38868d1d96c0)
         
     | 
| 
       291 
     | 
    
         
            -
             
     | 
| 
       292 
     | 
    
         
            -
            1.0.2
         
     | 
| 
       293 
     | 
    
         
            -
            -----
         
     | 
| 
       294 
     | 
    
         
            -
            * [Support non-Enumerable collections](https://github.com/rails/jbuilder/commit/4c20c59bf8131a1e419bb4ebf84f2b6bdcb6b0cf)
         
     | 
| 
       295 
     | 
    
         
            -
            * [Ensure that the default URL is in json format](https://github.com/rails/jbuilder/commit/0b46782fb7b8c34a3c96afa801fe27a5a97118a4)
         
     | 
| 
       296 
     | 
    
         
            -
             
     | 
| 
       297 
     | 
    
         
            -
            1.0.0
         
     | 
| 
       298 
     | 
    
         
            -
            -----
         
     | 
| 
       299 
     | 
    
         
            -
            * Adopt Semantic Versioning
         
     | 
| 
       300 
     | 
    
         
            -
            * Add rails generators
         
     | 
| 
         @@ -1,61 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'jbuilder/jbuilder'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            dependency_tracker = false
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            begin
         
     | 
| 
       6 
     | 
    
         
            -
              require 'action_view'
         
     | 
| 
       7 
     | 
    
         
            -
              require 'action_view/dependency_tracker'
         
     | 
| 
       8 
     | 
    
         
            -
              dependency_tracker = ::ActionView::DependencyTracker
         
     | 
| 
       9 
     | 
    
         
            -
            rescue LoadError
         
     | 
| 
       10 
     | 
    
         
            -
              begin
         
     | 
| 
       11 
     | 
    
         
            -
                require 'cache_digests'
         
     | 
| 
       12 
     | 
    
         
            -
                dependency_tracker = ::CacheDigests::DependencyTracker
         
     | 
| 
       13 
     | 
    
         
            -
              rescue LoadError
         
     | 
| 
       14 
     | 
    
         
            -
              end
         
     | 
| 
       15 
     | 
    
         
            -
            end
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            if dependency_tracker
         
     | 
| 
       18 
     | 
    
         
            -
              class Jbuilder
         
     | 
| 
       19 
     | 
    
         
            -
                module DependencyTrackerMethods
         
     | 
| 
       20 
     | 
    
         
            -
                  # Matches:
         
     | 
| 
       21 
     | 
    
         
            -
                  #   json.partial! "messages/message"
         
     | 
| 
       22 
     | 
    
         
            -
                  #   json.partial!('messages/message')
         
     | 
| 
       23 
     | 
    
         
            -
                  #
         
     | 
| 
       24 
     | 
    
         
            -
                  DIRECT_RENDERS = /
         
     | 
| 
       25 
     | 
    
         
            -
                    \w+\.partial!     # json.partial!
         
     | 
| 
       26 
     | 
    
         
            -
                    \(?\s*            # optional parenthesis
         
     | 
| 
       27 
     | 
    
         
            -
                    (['"])([^'"]+)\1  # quoted value
         
     | 
| 
       28 
     | 
    
         
            -
                  /x
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                  # Matches:
         
     | 
| 
       31 
     | 
    
         
            -
                  #   json.partial! partial: "comments/comment"
         
     | 
| 
       32 
     | 
    
         
            -
                  #   json.comments @post.comments, partial: "comments/comment", as: :comment
         
     | 
| 
       33 
     | 
    
         
            -
                  #   json.array! @posts, partial: "posts/post", as: :post
         
     | 
| 
       34 
     | 
    
         
            -
                  #   = render partial: "account"
         
     | 
| 
       35 
     | 
    
         
            -
                  #
         
     | 
| 
       36 
     | 
    
         
            -
                  INDIRECT_RENDERS = /
         
     | 
| 
       37 
     | 
    
         
            -
                    (?::partial\s*=>|partial:)  # partial: or :partial =>
         
     | 
| 
       38 
     | 
    
         
            -
                    \s*                         # optional whitespace
         
     | 
| 
       39 
     | 
    
         
            -
                    (['"])([^'"]+)\1            # quoted value
         
     | 
| 
       40 
     | 
    
         
            -
                  /x
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                  def dependencies
         
     | 
| 
       43 
     | 
    
         
            -
                    direct_dependencies + indirect_dependencies + explicit_dependencies
         
     | 
| 
       44 
     | 
    
         
            -
                  end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                  private
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                  def direct_dependencies
         
     | 
| 
       49 
     | 
    
         
            -
                    source.scan(DIRECT_RENDERS).map(&:second)
         
     | 
| 
       50 
     | 
    
         
            -
                  end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                  def indirect_dependencies
         
     | 
| 
       53 
     | 
    
         
            -
                    source.scan(INDIRECT_RENDERS).map(&:second)
         
     | 
| 
       54 
     | 
    
         
            -
                  end
         
     | 
| 
       55 
     | 
    
         
            -
                end
         
     | 
| 
       56 
     | 
    
         
            -
              end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
              ::Jbuilder::DependencyTracker = Class.new(dependency_tracker::ERBTracker)
         
     | 
| 
       59 
     | 
    
         
            -
              ::Jbuilder::DependencyTracker.send :include, ::Jbuilder::DependencyTrackerMethods
         
     | 
| 
       60 
     | 
    
         
            -
              dependency_tracker.register_tracker :jbuilder, ::Jbuilder::DependencyTracker
         
     | 
| 
       61 
     | 
    
         
            -
            end
         
     |