jbuilder 2.0.2 → 2.0.3
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/CHANGELOG.md +81 -0
- data/jbuilder.gemspec +1 -1
- data/lib/jbuilder/jbuilder_template.rb +3 -3
- data/test/jbuilder_template_test.rb +12 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17575b4f4e87733b1e46d7762554f5387904cbd9
|
4
|
+
data.tar.gz: 75c4a40da60c398469b52b1f2aeede6b7daf4527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 221cc1da2d52352427b3631dbc7204db44bdcf0b71b2964afbe6cf527731f456f774b2b5cbeafacb4d6a00f898313152d1823c937593e22457fe01a1aa56442d
|
7
|
+
data.tar.gz: 49801cf8ba732d8a6cea0586ae0b31bbc2bebb1a1ade669aacf89e7505fca992570710379f1916eb0b71377024447295dd8e5dd2fa85e4c306c55254ee89d998
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
2.0.3
|
4
|
+
-----
|
5
|
+
* [Pass options when calling cache_fragment_name](https://github.com/rails/jbuilder/commit/07c2cc7486fe9ef423d7bc821b83f6d485f330e0)
|
6
|
+
|
7
|
+
2.0.2
|
8
|
+
-----
|
9
|
+
* [Fix Dependency Tracking fail to detect single-quoted partial correctly](https://github.com/rails/jbuilder/commit/448679a6d3098eb34d137f782a05f1767711991a)
|
10
|
+
* [Prevent Dependency Tracker constants leaking into global namespace](https://github.com/rails/jbuilder/commit/3544b288b63f504f46fa8aafd1d17ee198d77536)
|
11
|
+
|
12
|
+
2.0.1
|
13
|
+
-----
|
14
|
+
* [Dependency tracking support for Rails 3 with cache_digest gem](https://github.com/rails/jbuilder/commit/6b471d7a38118e8f7645abec21955ef793401daf)
|
15
|
+
|
16
|
+
2.0.0
|
17
|
+
-----
|
18
|
+
* [Respond to PUT/PATCH API request with :ok](https://github.com/rails/jbuilder/commit/9dbce9c12181e89f8f472ac23c764ffe8438040a)
|
19
|
+
* [Remove Ruby 1.8 support](https://github.com/rails/jbuilder/commit/d53fff42d91f33d662eafc2561c4236687ecf6c9)
|
20
|
+
* [Remove deprecated two argument block call](https://github.com/rails/jbuilder/commit/07a35ee7e79ae4b06dba9dbff5c4e07c1e627218)
|
21
|
+
* [Make Jbuilder object initialize with single hash](https://github.com/rails/jbuilder/commit/38bf551db0189327aaa90b9be010c0d1b792c007)
|
22
|
+
* [Track template dependencies](https://github.com/rails/jbuilder/commit/8e73cea39f60da1384afd687cc8e5e399630d8cc)
|
23
|
+
* [Expose merge! method](https://github.com/rails/jbuilder/commit/0e2eb47f6f3c01add06a1a59b37cdda8baf24f29)
|
24
|
+
|
25
|
+
1.5.3
|
26
|
+
-----
|
27
|
+
* [Generators add `:id` column by default](https://github.com/rails/jbuilder/commit/0b52b86773e48ac2ce35d4155c7b70ad8b3e8937)
|
28
|
+
|
29
|
+
1.5.2
|
30
|
+
-----
|
31
|
+
* [Nil-collection should be treated as empty array](https://github.com/rails/jbuilder/commit/2f700bb00ab663c6b7fcb28d2967aeb989bd43c7)
|
32
|
+
|
33
|
+
1.5.1
|
34
|
+
-----
|
35
|
+
* [Expose template lookup options](https://github.com/rails/jbuilder/commit/404c18dee1af96ac6d8052a04062629ef1db2945)
|
36
|
+
|
37
|
+
1.5.0
|
38
|
+
-----
|
39
|
+
* [Do not perform any caching when `controller.perform_caching` is false](https://github.com/rails/jbuilder/commit/94633facde1ac43580f8cd5e13ae9cc83e1da8f4)
|
40
|
+
* [Add partial collection rendering](https://github.com/rails/jbuilder/commit/e8c10fc885e41b18178aaf4dcbc176961c928d76)
|
41
|
+
* [Deprecate extract! calling private methods](https://github.com/rails/jbuilder/commit/b9e19536c2105d7f2e813006bbcb8ca5730d28a3)
|
42
|
+
* [Add array of partials rendering](https://github.com/rails/jbuilder/commit/7d7311071720548047f98f14ad013c560b8d9c3a)
|
43
|
+
|
44
|
+
1.4.2
|
45
|
+
-----
|
46
|
+
* [Require MIME dependency explicitly](https://github.com/rails/jbuilder/commit/b1ed5ac4f08b056f8839b4b19b43562e81e02a59)
|
47
|
+
|
48
|
+
1.4.1
|
49
|
+
-----
|
50
|
+
* [Removed deprecated positioned arguments initializer support](https://github.com/rails/jbuilder/commit/6e03e0452073eeda77e6dfe66aa31e5ec67a3531)
|
51
|
+
* [Deprecate two-arguments block calling](https://github.com/rails/jbuilder/commit/2b10bb058bb12bc782cbcc16f6ec67b489e5ed43)
|
52
|
+
|
53
|
+
1.4.0
|
54
|
+
-----
|
55
|
+
* [Add quick collection attribute extraction](https://github.com/rails/jbuilder/commit/c2b966cf653ea4264fbb008b8cc6ce5359ebe40a)
|
56
|
+
* [Block has priority over attributes extraction](https://github.com/rails/jbuilder/commit/77c24766362c02769d81dac000b1879a9e4d4a00)
|
57
|
+
* [Meaningfull error messages when adding properties to null](https://github.com/rails/jbuilder/commit/e26764602e34b3772e57e730763d512e59489e3b)
|
58
|
+
* [Do not enforce template format, enforce handlers instead](https://github.com/rails/jbuilder/commit/72576755224b15da45e50cbea877679800ab1398)
|
59
|
+
|
60
|
+
1.3.0
|
61
|
+
-----
|
62
|
+
* [Add nil! method for nil JSON](https://github.com/rails/jbuilder/commit/822a906f68664f61a1209336bb681077692c8475)
|
63
|
+
|
64
|
+
1.2.1
|
65
|
+
-----
|
66
|
+
* [Added explicit dependency for MultiJson](https://github.com/rails/jbuilder/commit/4d58eacb6cd613679fb243484ff73a79bbbff2d2
|
67
|
+
|
68
|
+
1.2.0
|
69
|
+
-----
|
70
|
+
* Multiple documentation improvements and internal refactoring
|
71
|
+
* [Fixes fragment caching to work with latest digests](https://github.com/rails/jbuilder/commit/da937d6b8732124074c612abb7ff38868d1d96c0)
|
72
|
+
|
73
|
+
1.0.2
|
74
|
+
-----
|
75
|
+
* [Support non-Enumerable collections](https://github.com/rails/jbuilder/commit/4c20c59bf8131a1e419bb4ebf84f2b6bdcb6b0cf)
|
76
|
+
* [Ensure that the default URL is in json format](https://github.com/rails/jbuilder/commit/0b46782fb7b8c34a3c96afa801fe27a5a97118a4)
|
77
|
+
|
78
|
+
1.0.0
|
79
|
+
-----
|
80
|
+
* Adopt Semantic Versioning
|
81
|
+
* Add rails generators
|
data/jbuilder.gemspec
CHANGED
@@ -50,7 +50,7 @@ class JbuilderTemplate < Jbuilder
|
|
50
50
|
# end
|
51
51
|
def cache!(key=nil, options={}, &block)
|
52
52
|
if @context.controller.perform_caching
|
53
|
-
value = ::Rails.cache.fetch(_cache_key(key), options) do
|
53
|
+
value = ::Rails.cache.fetch(_cache_key(key, options), options) do
|
54
54
|
_scope { yield self }
|
55
55
|
end
|
56
56
|
|
@@ -83,11 +83,11 @@ class JbuilderTemplate < Jbuilder
|
|
83
83
|
@context.render options
|
84
84
|
end
|
85
85
|
|
86
|
-
def _cache_key(key)
|
86
|
+
def _cache_key(key, options)
|
87
87
|
if @context.respond_to?(:cache_fragment_name)
|
88
88
|
# Current compatibility, fragment_name_with_digest is private again and cache_fragment_name
|
89
89
|
# should be used instead.
|
90
|
-
@context.cache_fragment_name(key)
|
90
|
+
@context.cache_fragment_name(key, options)
|
91
91
|
elsif @context.respond_to?(:fragment_name_with_digest)
|
92
92
|
# Backwards compatibility for period of time when fragment_name_with_digest was made public.
|
93
93
|
@context.fragment_name_with_digest(key)
|
@@ -228,6 +228,18 @@ class JbuilderTemplateTest < ActionView::TestCase
|
|
228
228
|
JBUILDER
|
229
229
|
end
|
230
230
|
|
231
|
+
test 'current cache digest option accepts options' do
|
232
|
+
undef_context_methods :fragment_name_with_digest
|
233
|
+
|
234
|
+
@context.expects(:cache_fragment_name).with('cachekey', skip_digest: true)
|
235
|
+
|
236
|
+
render_jbuilder <<-JBUILDER
|
237
|
+
json.cache! 'cachekey', skip_digest: true do
|
238
|
+
json.name 'Cache'
|
239
|
+
end
|
240
|
+
JBUILDER
|
241
|
+
end
|
242
|
+
|
231
243
|
test 'does not perform caching when controller.perform_caching is false' do
|
232
244
|
controller.perform_caching = false
|
233
245
|
render_jbuilder <<-JBUILDER
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.2.0
|
41
41
|
description:
|
@@ -44,8 +44,9 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
-
- .gitignore
|
48
|
-
- .travis.yml
|
47
|
+
- ".gitignore"
|
48
|
+
- ".travis.yml"
|
49
|
+
- CHANGELOG.md
|
49
50
|
- Gemfile
|
50
51
|
- Gemfile.old
|
51
52
|
- MIT-LICENSE
|
@@ -76,17 +77,17 @@ require_paths:
|
|
76
77
|
- lib
|
77
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
79
|
requirements:
|
79
|
-
- -
|
80
|
+
- - ">="
|
80
81
|
- !ruby/object:Gem::Version
|
81
82
|
version: 1.9.3
|
82
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
84
|
requirements:
|
84
|
-
- -
|
85
|
+
- - ">="
|
85
86
|
- !ruby/object:Gem::Version
|
86
87
|
version: '0'
|
87
88
|
requirements: []
|
88
89
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.1
|
90
|
+
rubygems_version: 2.2.1
|
90
91
|
signing_key:
|
91
92
|
specification_version: 4
|
92
93
|
summary: Create JSON structures via a Builder-style DSL
|