jbuilder 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Appraisals +3 -2
- data/CHANGELOG.md +6 -1
- data/CONTRIBUTING.md +102 -0
- data/MIT-LICENSE +1 -1
- data/README.md +10 -10
- data/gemfiles/rails_edge.gemfile +4 -2
- data/jbuilder.gemspec +1 -1
- data/lib/jbuilder.rb +2 -2
- data/lib/jbuilder/jbuilder_template.rb +3 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fd6ceffeb8702bf3239431ba2d2938500937d57
|
4
|
+
data.tar.gz: 35822ade1066472dd5d4bd241b40d677fa6e1234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 331609bd2b08cca7f6dc8e23ca3bfc5c1ac2bf740ae0874375024c4624caebdc84643c0cbad5b839555ce0057dc4753a6c01e28031b63c05c1452e9b3b1c0785
|
7
|
+
data.tar.gz: 043a81f2ae16fa51913bb21e8e0ded28b981ecde782338a47a6974c8ae0509d828e87cd83734831fb37fb9dca81c1ea90218ec31b933ca634e9031d03a1e7878
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
@@ -38,6 +38,7 @@ appraise "rails-4-2" do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
appraise "rails-edge" do
|
41
|
-
gem "rails", github: "rails/rails"
|
42
|
-
gem "arel", github: "rails/arel"
|
41
|
+
gem "rails", ">= 5.0.0.alpha", github: "rails/rails"
|
42
|
+
gem "arel", ">= 7.0.0.alpha", github: "rails/arel"
|
43
|
+
gem "rack", ">= 2.0.0.alpha", github: "rack/rack"
|
43
44
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
2.3.2
|
4
|
+
-----
|
5
|
+
|
6
|
+
* [Remove Mime Types deprecation message](https://github.com/rails/jbuilder/commit/5ba4e4ac654cc8388619538f576fe234659b84ec)
|
7
|
+
|
3
8
|
2.3.1
|
4
9
|
-----
|
5
10
|
|
@@ -185,7 +190,7 @@
|
|
185
190
|
|
186
191
|
1.2.1
|
187
192
|
-----
|
188
|
-
* [Added explicit dependency for MultiJson](https://github.com/rails/jbuilder/commit/4d58eacb6cd613679fb243484ff73a79bbbff2d2
|
193
|
+
* [Added explicit dependency for MultiJson](https://github.com/rails/jbuilder/commit/4d58eacb6cd613679fb243484ff73a79bbbff2d2)
|
189
194
|
|
190
195
|
1.2.0
|
191
196
|
-----
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
Contributing to Jbuilder
|
2
|
+
=====================
|
3
|
+
|
4
|
+
[]()
|
5
|
+
[]()
|
6
|
+
[]()
|
7
|
+
[]()
|
8
|
+
|
9
|
+
Jbuilder is work of [many contributors](https://github.com/rails/jbuilder/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/jbuilder/pulls), [propose features and discuss issues](https://github.com/rails/jbuilder/issues).
|
10
|
+
|
11
|
+
#### Fork the Project
|
12
|
+
|
13
|
+
Fork the [project on Github](https://github.com/rails/jbuilder) and check out your copy.
|
14
|
+
|
15
|
+
```
|
16
|
+
git clone https://github.com/contributor/jbuilder.git
|
17
|
+
cd jbuilder
|
18
|
+
git remote add upstream https://github.com/rails/jbuilder.git
|
19
|
+
```
|
20
|
+
|
21
|
+
#### Create a Topic Branch
|
22
|
+
|
23
|
+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
24
|
+
|
25
|
+
```
|
26
|
+
git checkout master
|
27
|
+
git pull upstream master
|
28
|
+
git checkout -b my-feature-branch
|
29
|
+
```
|
30
|
+
|
31
|
+
#### Bundle Install and Test
|
32
|
+
|
33
|
+
Ensure that you can build the project and run tests.
|
34
|
+
|
35
|
+
```
|
36
|
+
bundle install
|
37
|
+
bundle exec rake test
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Write Tests
|
41
|
+
|
42
|
+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [test](test).
|
43
|
+
|
44
|
+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
45
|
+
|
46
|
+
#### Write Code
|
47
|
+
|
48
|
+
Implement your feature or bug fix.
|
49
|
+
|
50
|
+
Make sure that `bundle exec rake test` completes without errors.
|
51
|
+
|
52
|
+
#### Write Documentation
|
53
|
+
|
54
|
+
Document any external behavior in the [README](README.md).
|
55
|
+
|
56
|
+
#### Commit Changes
|
57
|
+
|
58
|
+
Make sure git knows your name and email address:
|
59
|
+
|
60
|
+
```
|
61
|
+
git config --global user.name "Your Name"
|
62
|
+
git config --global user.email "contributor@example.com"
|
63
|
+
```
|
64
|
+
|
65
|
+
Writing good commit logs is important. A commit log should describe what changed and why.
|
66
|
+
|
67
|
+
```
|
68
|
+
git add ...
|
69
|
+
git commit
|
70
|
+
```
|
71
|
+
|
72
|
+
#### Push
|
73
|
+
|
74
|
+
```
|
75
|
+
git push origin my-feature-branch
|
76
|
+
```
|
77
|
+
|
78
|
+
#### Make a Pull Request
|
79
|
+
|
80
|
+
Go to https://github.com/contributor/jbuilder and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
81
|
+
|
82
|
+
#### Rebase
|
83
|
+
|
84
|
+
If you've been working on a change for a while, rebase with upstream/master.
|
85
|
+
|
86
|
+
```
|
87
|
+
git fetch upstream
|
88
|
+
git rebase upstream/master
|
89
|
+
git push origin my-feature-branch -f
|
90
|
+
```
|
91
|
+
|
92
|
+
#### Check on Your Pull Request
|
93
|
+
|
94
|
+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
95
|
+
|
96
|
+
#### Be Patient
|
97
|
+
|
98
|
+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
|
99
|
+
|
100
|
+
#### Thank You
|
101
|
+
|
102
|
+
Please do know that we really appreciate and value your time and work. We love you, really.
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,5 @@
|
|
1
1
|
# Jbuilder
|
2
2
|
|
3
|
-
[][travis]
|
4
|
-
[][gem]
|
5
|
-
[][codeclimate]
|
6
|
-
[][gemnasium]
|
7
|
-
|
8
|
-
[travis]: https://travis-ci.org/rails/jbuilder
|
9
|
-
[gem]: https://rubygems.org/gems/jbuilder
|
10
|
-
[codeclimate]: https://codeclimate.com/github/rails/jbuilder
|
11
|
-
[gemnasium]: https://gemnasium.com/rails/jbuilder
|
12
|
-
|
13
3
|
Jbuilder gives you a simple DSL for declaring JSON structures that beats
|
14
4
|
massaging giant hash structures. This is particularly helpful when the
|
15
5
|
generation process is fraught with conditionals and loops. Here's a simple
|
@@ -258,3 +248,13 @@ for MultiJson:
|
|
258
248
|
require 'multi_json'
|
259
249
|
MultiJson.use :yajl
|
260
250
|
```
|
251
|
+
|
252
|
+
## Contributing to Jbuilder
|
253
|
+
|
254
|
+
Jbuilder is work of many contributors. You're encouraged to submit pull requests, propose
|
255
|
+
features and discuss issues.
|
256
|
+
|
257
|
+
See [CONTRIBUTING](CONTRIBUTING.md).
|
258
|
+
|
259
|
+
## License
|
260
|
+
Jbuilder is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
data/gemfiles/rails_edge.gemfile
CHANGED
@@ -5,7 +5,9 @@ source "https://rubygems.org"
|
|
5
5
|
gem "rake"
|
6
6
|
gem "mocha", :require => false
|
7
7
|
gem "appraisal"
|
8
|
-
gem "
|
9
|
-
gem "
|
8
|
+
gem "pry"
|
9
|
+
gem "rails", ">= 5.0.0.alpha", :github => "rails/rails"
|
10
|
+
gem "arel", ">= 7.0.0.alpha", :github => "rails/arel"
|
11
|
+
gem "rack", ">= 2.0.0.alpha", :github => "rack/rack"
|
10
12
|
|
11
13
|
gemspec :path => "../"
|
data/jbuilder.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'jbuilder'
|
3
|
-
s.version = '2.3.
|
3
|
+
s.version = '2.3.2'
|
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'
|
data/lib/jbuilder.rb
CHANGED
@@ -11,14 +11,14 @@ class JbuilderTemplate < Jbuilder
|
|
11
11
|
|
12
12
|
def initialize(context, *args)
|
13
13
|
@context = context
|
14
|
-
super
|
14
|
+
super(*args)
|
15
15
|
end
|
16
16
|
|
17
17
|
def partial!(*args)
|
18
18
|
if args.one? && _is_active_model?(args.first)
|
19
19
|
_render_active_model_partial args.first
|
20
20
|
else
|
21
|
-
_render_explicit_partial
|
21
|
+
_render_explicit_partial(*args)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -170,7 +170,7 @@ end
|
|
170
170
|
|
171
171
|
class JbuilderHandler
|
172
172
|
cattr_accessor :default_format
|
173
|
-
self.default_format = Mime
|
173
|
+
self.default_format = Mime[:json]
|
174
174
|
|
175
175
|
def self.call(template)
|
176
176
|
# this juggling is required to keep line numbers right in the error
|
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.3.
|
4
|
+
version: 2.3.2
|
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-09-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- ".travis.yml"
|
58
58
|
- Appraisals
|
59
59
|
- CHANGELOG.md
|
60
|
+
- CONTRIBUTING.md
|
60
61
|
- Gemfile
|
61
62
|
- MIT-LICENSE
|
62
63
|
- README.md
|