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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 332d9c49a287b19d5b1afb7c64af39cbda9ccfc4
4
- data.tar.gz: 332ccfb496127ea17c8f3def19a2fb28c2c8c17e
3
+ metadata.gz: 8a60b857eac6c1b2059ad61636a8929b6c6ef6be
4
+ data.tar.gz: 48234dc178d3336434a4911eb2edde2bb59cc3cc
5
5
  SHA512:
6
- metadata.gz: 149866f11d9ae0814d83a40faa89380149516a50fef38829274092323b7ad74a5d2c05bce5443d8cb7a289e02b1307dd8b547530369d1127e338eadf3dbbcc9d
7
- data.tar.gz: 3a6ce99d14c7ed4b67d29c0c6a1e840ef44074796ff3052de2e7148d31aa40ae106cbca923fb6b6f382cbb1cee41d36dba7bf048cd581eaa1e2bd9f1faad4c2a
6
+ metadata.gz: dea7079d397c923ae895a5da9c59e728750c4aae47f2a95234c14d0083d77373a9df7cb579f6b7234e6d7c5e0daa0b16135d8be67d4e177a5c1f26e1f4f943f2
7
+ data.tar.gz: 089f9a14f9e73fdd8f73b15e343273c6093b005413c8bc42a378644d9f002683506aa47c22c98e8dc3eb0d2e261b6f58974c8bcc63e76ed350597a80a5b033b1
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ 2.2.14
4
+ ------
5
+
6
+ * [Make Jbuilder compatible with Rails API](https://github.com/rails/jbuilder/commit/29c0014a9c954c990075d42c45c66075260e924b)
7
+
3
8
  2.2.13
4
9
  ------
5
10
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jbuilder'
3
- s.version = '2.2.13'
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
- source_root File.expand_path('../templates', __FILE__)
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
@@ -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, &::Proc.new).target!
21
+ def self.encode(*args, &block)
22
+ new(*args, &block).target!
23
23
  end
24
24
 
25
25
  BLANK = Blank.new
@@ -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.13
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-04-10 00:00:00.000000000 Z
12
+ date: 2015-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport