jbuilder 2.4.1 → 2.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2772c97d74b0d758e3c0d5ea5f9a3b4c6e183ca2
4
- data.tar.gz: 90cd6541479870d8f980c16efb259610a8f3c84e
3
+ metadata.gz: 5ce8173d024f2eb565369d2e8f26ea09dc5235e7
4
+ data.tar.gz: b73633ccd806484d4f5c2a11533f1787fbf90d2b
5
5
  SHA512:
6
- metadata.gz: ccb161cc31da1151f75abb7d28d9c3c0fcb66945d22ebe6e93442cc2aa6b3be8e95eb53067d6f546ff86f05efa1de304b96b2afeed4424a998b8d52e5285886f
7
- data.tar.gz: a2e3d859a9a5fb8909cdfe085f99f9881c2ca24da64c906d804cb7714ad636512e4de12e8a970f9dcf159c7394f9bc2db6f7be90886b5877bd1b5d4f5bb9dc27
6
+ metadata.gz: 63ab27131b380962043ca8c17440ee0d8da28196c17793d61c2fbacf19045799a4c652402ec5d65afa6d899cc91e54c56cf460e86c809c402d37024ecc734469
7
+ data.tar.gz: 8d0def4d3db80aa215246f3b8fb2df57943adc02fbe9e678c88d2f40523959ecf285a36f905fe0ac1a566b583a2abb9432feb1064bf6f1a7d276db6e2382c104
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ 2.5.0
4
+ -----
5
+
6
+ * [Rails 5 compatibility](https://github.com/rails/jbuilder/commit/64c510ec69d9e63b73ffd5942e802d21a7d14701)
7
+
3
8
  2.4.1
4
9
  -----
5
10
 
@@ -42,12 +47,12 @@
42
47
  2.2.13
43
48
  ------
44
49
 
45
- * Several peformance optimizations: [#260](https://github.com/rails/jbuilder/pull/260) & [#261](https://github.com/rails/jbuilder/pull/261)
50
+ * Several performance optimizations: [#260](https://github.com/rails/jbuilder/pull/260) & [#261](https://github.com/rails/jbuilder/pull/261)
46
51
 
47
52
  2.2.12
48
53
  ------
49
54
 
50
- * [Replace explici block calls with yield for performance](https://github.com/rails/jbuilder/commit/3184f941276ad03a071cf977133d1a32302afa47)
55
+ * [Replace explicit block calls with yield for performance](https://github.com/rails/jbuilder/commit/3184f941276ad03a071cf977133d1a32302afa47)
51
56
 
52
57
  2.2.11
53
58
  ------
@@ -191,7 +196,7 @@
191
196
  -----
192
197
  * [Add quick collection attribute extraction](https://github.com/rails/jbuilder/commit/c2b966cf653ea4264fbb008b8cc6ce5359ebe40a)
193
198
  * [Block has priority over attributes extraction](https://github.com/rails/jbuilder/commit/77c24766362c02769d81dac000b1879a9e4d4a00)
194
- * [Meaningfull error messages when adding properties to null](https://github.com/rails/jbuilder/commit/e26764602e34b3772e57e730763d512e59489e3b)
199
+ * [Meaningful error messages when adding properties to null](https://github.com/rails/jbuilder/commit/e26764602e34b3772e57e730763d512e59489e3b)
195
200
  * [Do not enforce template format, enforce handlers instead](https://github.com/rails/jbuilder/commit/72576755224b15da45e50cbea877679800ab1398)
196
201
 
197
202
  1.3.0
data/README.md CHANGED
@@ -168,7 +168,7 @@ json.partial! partial: 'posts/post', collection: @posts, as: :post
168
168
 
169
169
  # or
170
170
 
171
- json.comments @post.comments, partial: 'comment/comment', as: :comment
171
+ json.comments @post.comments, partial: 'comments/comment', as: :comment
172
172
  ```
173
173
 
174
174
  You can pass any objects into partial templates with or without `:locals` option.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jbuilder'
3
- s.version = '2.4.1'
3
+ s.version = '2.5.0'
4
4
  s.authors = ['David Heinemeier Hansson', 'Pavel Pravosud']
5
5
  s.email = ['david@37signals.com', 'pavel@pravosud.com']
6
6
  s.summary = 'Create JSON structures via a Builder-style DSL'
@@ -9,11 +9,18 @@ class Jbuilder
9
9
  require 'jbuilder/dependency_tracker'
10
10
  end
11
11
 
12
- if app.config.respond_to?(:api_only) && app.config.api_only
12
+ if Rails::VERSION::MAJOR >= 5
13
+ module ::ActionController
14
+ module ApiRendering
15
+ include ActionView::Rendering
16
+ end
17
+ end
18
+
13
19
  ActiveSupport.on_load :action_controller do
14
- include ActionView::Rendering
15
- include ActionController::Helpers
16
- include ActionController::ImplicitRender
20
+ if self == ActionController::API
21
+ include ActionController::Helpers
22
+ include ActionController::ImplicitRender
23
+ end
17
24
  end
18
25
  end
19
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-09 00:00:00.000000000 Z
12
+ date: 2016-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.5.2
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Create JSON structures via a Builder-style DSL