jbuilder 2.0.4 → 2.0.5

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: 4ac0617f83abd9f18566f7abb54b4bfb40f43292
4
- data.tar.gz: 81ee411aedba8b8532011a4d02b30a287352aefc
3
+ metadata.gz: 2ed3f4d4cc774f72e1fc5c90566f7e9a62820a17
4
+ data.tar.gz: e1e6cd0221562a24c384c4fdc0cbd1ca89ee7a44
5
5
  SHA512:
6
- metadata.gz: 9775756c8e0bceed5f9187629e23c50b11440c6d98f96831c90e0763319b540437d353be56737132a383a15514d1348b032d512448cee6bda4b9c76bae03173c
7
- data.tar.gz: d56cca82eb949371a3dc93a4a6e2820de63b58426f9256907473874c46e6448c29dd96479115cd56ba26cff59f9c9a5aa30ae9dd253d47e7991639922c19e306
6
+ metadata.gz: 73ac812c548d0a49805415b5ac66f3562d4d2e0f587c0d04d9dcc8b179dbbd906458a4b83f27e85ae30621db3f8e1765e4216df8ecd607f797847e422d88bc27
7
+ data.tar.gz: 3b93e2700b834d6b1bf894678eb07d1575a635c9f0a359264a6640e6678351ec1844b6f873ce95b2f89331229740b49d8fb548c5500e599bb84f76a069ef5144
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - 2.1.0
7
- - ruby-head
7
+ - 2.1.1
8
8
  - jruby-19mode
9
9
  - rbx
10
10
 
@@ -14,8 +14,6 @@ gemfile:
14
14
 
15
15
  matrix:
16
16
  allow_failures:
17
- - rvm: 2.1.0
18
- - rvm: ruby-head
19
17
  - rvm: jruby-19mode
20
18
  - rvm: rbx
21
19
 
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ 2.0.5
4
+ -----
5
+ * [Fix edgecase when json is defined as a method](https://github.com/rails/jbuilder/commit/ca711a0c0a5760e26258ce2d93c14bef8fff0ead)
6
+
3
7
  2.0.4
4
8
  -----
5
- * [Add cache_if! to conditionally cache JSON fragments](https://github.com/rails/jbuilder/commit/commit/14a5afd8a2c939a6fd710d355a194c114db96eb2)
9
+ * [Add cache_if! to conditionally cache JSON fragments](https://github.com/rails/jbuilder/commit/14a5afd8a2c939a6fd710d355a194c114db96eb2)
6
10
 
7
11
  2.0.3
8
12
  -----
data/README.md CHANGED
@@ -1,5 +1,12 @@
1
- Jbuilder [![Build Status](https://travis-ci.org/rails/jbuilder.png)](https://travis-ci.org/rails/jbuilder) [![Gem Version](https://badge.fury.io/rb/jbuilder.png)](https://rubygems.org/gems/jbuilder) [![Code Climate](https://codeclimate.com/github/rails/jbuilder.png)](https://codeclimate.com/github/rails/jbuilder)
2
- ========
1
+ # Jbuilder
2
+
3
+ [![Build Status](http://img.shields.io/travis/rails/jbuilder.svg)][travis]
4
+ [![Gem Version](http://img.shields.io/gem/v/jbuilder.svg)][gem]
5
+ [![Code Climate](http://img.shields.io/codeclimate/github/rails/jbuilder.svg)][codeclimate]
6
+
7
+ [travis]: https://travis-ci.org/rails/jbuilder
8
+ [gem]: https://rubygems.org/gems/jbuilder
9
+ [codeclimate]: https://codeclimate.com/github/rails/jbuilder
3
10
 
4
11
  Jbuilder gives you a simple DSL for declaring JSON structures that beats massaging giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops. Here's a simple example:
5
12
 
data/jbuilder.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jbuilder'
3
- s.version = '2.0.4'
3
+ s.version = '2.0.5'
4
4
  s.author = 'David Heinemeier Hansson'
5
5
  s.email = 'david@37signals.com'
6
6
  s.summary = 'Create JSON structures via a Builder-style DSL'
@@ -125,7 +125,7 @@ class JbuilderHandler
125
125
  def self.call(template)
126
126
  # this juggling is required to keep line numbers right in the error
127
127
  %{__already_defined = defined?(json); json||=JbuilderTemplate.new(self); #{template.source}
128
- json.target! unless __already_defined}
128
+ json.target! unless (__already_defined && __already_defined != "method")}
129
129
  end
130
130
  end
131
131
 
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
4
+ version: 2.0.5
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-03-04 00:00:00.000000000 Z
11
+ date: 2014-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport