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 +4 -4
- data/.travis.yml +1 -3
- data/CHANGELOG.md +5 -1
- data/README.md +9 -2
- data/jbuilder.gemspec +1 -1
- data/lib/jbuilder/jbuilder_template.rb +1 -1
- 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: 2ed3f4d4cc774f72e1fc5c90566f7e9a62820a17
|
4
|
+
data.tar.gz: e1e6cd0221562a24c384c4fdc0cbd1ca89ee7a44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73ac812c548d0a49805415b5ac66f3562d4d2e0f587c0d04d9dcc8b179dbbd906458a4b83f27e85ae30621db3f8e1765e4216df8ecd607f797847e422d88bc27
|
7
|
+
data.tar.gz: 3b93e2700b834d6b1bf894678eb07d1575a635c9f0a359264a6640e6678351ec1844b6f873ce95b2f89331229740b49d8fb548c5500e599bb84f76a069ef5144
|
data/.travis.yml
CHANGED
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/
|
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
|
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
@@ -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
|
+
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-
|
11
|
+
date: 2014-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|