jbuilder 2.2.13 → 2.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/jbuilder.gemspec +1 -1
- data/lib/generators/rails/scaffold_controller_generator.rb +2 -2
- data/lib/jbuilder.rb +2 -2
- data/lib/jbuilder/railtie.rb +6 -0
- 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: 8a60b857eac6c1b2059ad61636a8929b6c6ef6be
|
4
|
+
data.tar.gz: 48234dc178d3336434a4911eb2edde2bb59cc3cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dea7079d397c923ae895a5da9c59e728750c4aae47f2a95234c14d0083d77373a9df7cb579f6b7234e6d7c5e0daa0b16135d8be67d4e177a5c1f26e1f4f943f2
|
7
|
+
data.tar.gz: 089f9a14f9e73fdd8f73b15e343273c6093b005413c8bc42a378644d9f002683506aa47c22c98e8dc3eb0d2e261b6f58974c8bcc63e76ed350597a80a5b033b1
|
data/CHANGELOG.md
CHANGED
data/jbuilder.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'jbuilder'
|
3
|
-
s.version = '2.2.
|
3
|
+
s.version = '2.2.14'
|
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'
|
@@ -4,9 +4,9 @@ require 'rails/generators/rails/scaffold_controller/scaffold_controller_generato
|
|
4
4
|
module Rails
|
5
5
|
module Generators
|
6
6
|
class ScaffoldControllerGenerator
|
7
|
-
|
7
|
+
source_paths.unshift File.expand_path('../templates', __FILE__)
|
8
8
|
|
9
9
|
hook_for :jbuilder, default: true
|
10
10
|
end
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
data/lib/jbuilder.rb
CHANGED
@@ -18,8 +18,8 @@ class Jbuilder
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# Yields a builder and automatically turns the result into a JSON string
|
21
|
-
def self.encode(*args)
|
22
|
-
new(*args,
|
21
|
+
def self.encode(*args, &block)
|
22
|
+
new(*args, &block).target!
|
23
23
|
end
|
24
24
|
|
25
25
|
BLANK = Blank.new
|
data/lib/jbuilder/railtie.rb
CHANGED
@@ -8,6 +8,12 @@ class Jbuilder
|
|
8
8
|
ActionView::Template.register_template_handler :jbuilder, JbuilderHandler
|
9
9
|
require 'jbuilder/dependency_tracker'
|
10
10
|
end
|
11
|
+
|
12
|
+
if app.config.try(:api_only)
|
13
|
+
ActiveSupport.on_load :action_controller do
|
14
|
+
include ActionView::Rendering
|
15
|
+
end
|
16
|
+
end
|
11
17
|
end
|
12
18
|
|
13
19
|
if Rails::VERSION::MAJOR >= 4
|
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.2.
|
4
|
+
version: 2.2.14
|
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: 2015-
|
12
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|