jbuilder 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jbuilder.gemspec +1 -1
- data/lib/jbuilder.rb +2 -5
- data/lib/jbuilder/dependency_tracker.rb +19 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3141e1a87d6a858eed1e1744e0d3f77dfd1f2285
|
4
|
+
data.tar.gz: 20846381277c1288b86db8fb0c7bfd53421ce484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90cef844168896f3deef2cd9b83dfea34b3080687e33b412acc884e76f66f1e4b5994f71302712097f47028eba0482c57ac43dcf07e16b18956ddaa93a777f1d
|
7
|
+
data.tar.gz: d4c479bdf1b91218a821cf10ae3823c1f3bf8fafd7df54605d724510ea69a4da276112cbb71d54e0ee8b5dfab2538f64835189d0f023c359ed5e62f9c9465865
|
data/jbuilder.gemspec
CHANGED
data/lib/jbuilder.rb
CHANGED
@@ -328,8 +328,5 @@ class Jbuilder < JbuilderProxy
|
|
328
328
|
end
|
329
329
|
|
330
330
|
require 'jbuilder/jbuilder_template' if defined?(ActionView::Template)
|
331
|
-
|
332
|
-
if defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR == 4
|
333
|
-
require 'jbuilder/railtie'
|
334
|
-
require 'jbuilder/dependency_tracker'
|
335
|
-
end
|
331
|
+
require 'jbuilder/dependency_tracker'
|
332
|
+
require 'jbuilder/railtie' if defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR == 4
|
@@ -1,9 +1,21 @@
|
|
1
1
|
require 'jbuilder'
|
2
|
-
require 'action_view'
|
3
|
-
require 'action_view/dependency_tracker'
|
4
2
|
|
5
|
-
|
6
|
-
|
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
|
+
dependency_tracking_module = Module.new do
|
7
19
|
# Matches:
|
8
20
|
# json.partial! "messages/message"
|
9
21
|
# json.partial!('messages/message')
|
@@ -40,11 +52,8 @@ class Jbuilder
|
|
40
52
|
source.scan(INDIRECT_RENDERS).map(&:second)
|
41
53
|
end
|
42
54
|
end
|
43
|
-
end
|
44
|
-
|
45
55
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
56
|
+
::Jbuilder::DependencyTracker = Class.new(dependency_tracker::ERBTracker)
|
57
|
+
::Jbuilder::DependencyTracker.send :include, dependency_tracking_module
|
58
|
+
dependency_tracker.register_tracker :jbuilder, ::Jbuilder::DependencyTracker
|
50
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1
|
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: 2013-12-
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|