jbuilder 2.9.0 → 2.9.1

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
  SHA256:
3
- metadata.gz: 780a2d0395698145f0e1c9e96a7a2079b70def4be27846b74537ec90786b9495
4
- data.tar.gz: da6e2704a1060b023c7a78d4539ad39da447dba6e3d7c657834a81badcd47afa
3
+ metadata.gz: 79b2c794b6341ee3d94c4c2d1ed8236e97357dac75dc9e49618a6a885ab35601
4
+ data.tar.gz: 4bb8128da8ec6305ae36c3fa866cf19cd1eb08037128b2c3716002525e97014b
5
5
  SHA512:
6
- metadata.gz: c088b1a55e41c650bccd49901ab964ac9b4b715bdab5d51d68a5b34b6a3bb18adcb37ade32548fa1f69ecd4d2cb29c8f34f747dd4af80daa4c8115e99bd80489
7
- data.tar.gz: 23e2b31830276ba589c941a484ac6d9b80dc0e3a0f4c4767f8d534f1bdfae5d9e76d1e75a31127103a045afba127c6eb2a7e87f35327860729ef7f08aafdd766
6
+ metadata.gz: c931310549e6384945735110e6c3a2ce36e566d12d691f33d8a5e68f1dca055eeda1ebe606fb093ec85b4c2481c05ebb7dc639f9209a8e4d324f59dd7b4c8693
7
+ data.tar.gz: 277b4c68a0fe426e308f6c5fbc59c8b7453d61291aaf3968e4500532f86e902bbc8ac34970ccd2496935c361584773616a4ff71745b7adbabc752b09ba0da9de
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ gemfiles/*.lock
3
3
  Gemfile.lock
4
4
  .ruby-version
5
5
  pkg
6
+ *.gem
@@ -20,6 +20,7 @@ gemfile:
20
20
  - gemfiles/rails_5_0.gemfile
21
21
  - gemfiles/rails_5_1.gemfile
22
22
  - gemfiles/rails_5_2.gemfile
23
+ - gemfiles/rails_6_0.gemfile
23
24
  - gemfiles/rails_head.gemfile
24
25
 
25
26
  matrix:
@@ -43,6 +44,12 @@ matrix:
43
44
  gemfile: gemfiles/rails_4_2.gemfile
44
45
  - rvm: 2.6.2
45
46
  gemfile: gemfiles/rails_4_2.gemfile
47
+ - rvm: 2.2.10
48
+ gemfile: gemfiles/rails_6_0.gemfile
49
+ - rvm: 2.3.8
50
+ gemfile: gemfiles/rails_6_0.gemfile
51
+ - rvm: 2.4.6
52
+ gemfile: gemfiles/rails_6_0.gemfile
46
53
  - rvm: 2.2.10
47
54
  gemfile: gemfiles/rails_head.gemfile
48
55
  - rvm: 2.3.8
data/Appraisals CHANGED
@@ -17,6 +17,10 @@ if RUBY_VERSION >= "2.2.2"
17
17
  end
18
18
 
19
19
  if RUBY_VERSION >= "2.5.0"
20
+ appraise "rails-6-0" do
21
+ gem "rails", "~> 6.0.0.rc1"
22
+ end
23
+
20
24
  appraise "rails-head" do
21
25
  gem "rails", github: "rails/rails"
22
26
  end
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ 2.9.1
4
+ -----
5
+
6
+ * [Respect JSON encoding customizations](https://github.com/rails/jbuilder/commit/e2e8623b08078ad6a2323ce8ecaf642b7afe1166)
7
+
8
+ 2.9.0
9
+ -----
10
+
11
+ * [Fix passing object with partial without locals](https://github.com/rails/jbuilder/pull/435)
12
+ * [Fix deprecation warning in Rails 6.0](https://github.com/rails/jbuilder/pull/453)
13
+ * [Use quotes consistently in generated templates](https://github.com/rails/jbuilder/pull/455)
14
+ * [Allow omitting timestamps from generated partials](https://github.com/rails/jbuilder/pull/448)
15
+ * [Respect changing scaffold generator](https://github.com/rails/jbuilder/pull/458)
16
+ * [Use a symbolic default format for Rails 6.0 forward compatibility](https://github.com/rails/jbuilder/commit/3895a7243f3db292b0bf15513fc05494e6e50576)
17
+ * [Drop MultiJSON in favor of Ruby standard library JSON](https://github.com/rails/jbuilder/commit/b952ae096eb1828b0fcfde06e6ba62311494ec49)
18
+
3
19
  2.8.0
4
20
  -----
5
21
 
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rake"
6
+ gem "mocha", require: false
7
+ gem "appraisal"
8
+ gem "rails", "~> 6.0.0.rc1"
9
+
10
+ gemspec path: "../"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jbuilder'
3
- s.version = '2.9.0'
3
+ s.version = '2.9.1'
4
4
  s.authors = 'David Heinemeier Hansson'
5
5
  s.email = 'david@basecamp.com'
6
6
  s.summary = 'Create JSON structures via a Builder-style DSL'
@@ -247,7 +247,7 @@ class Jbuilder
247
247
 
248
248
  # Encodes the current builder as JSON.
249
249
  def target!
250
- ::JSON.dump(@attributes)
250
+ @attributes.to_json
251
251
  end
252
252
 
253
253
  private
@@ -713,4 +713,13 @@ class JbuilderTest < ActiveSupport::TestCase
713
713
  end
714
714
  end
715
715
  end
716
+
717
+ if RUBY_VERSION >= "2.2.10"
718
+ test "respects JSON encoding customizations" do
719
+ # Active Support overrides Time#as_json for custom formatting.
720
+ # Ensure we call #to_json on the final attributes instead of JSON.dump.
721
+ result = JSON.load(Jbuilder.encode { |json| json.time Time.parse("2018-05-13 11:51:00.485 -0400") })
722
+ assert_equal "2018-05-13T11:51:00.485-04:00", result["time"]
723
+ end
724
+ end
716
725
  end
@@ -3,6 +3,7 @@ require "bundler/setup"
3
3
  require "active_support"
4
4
  require "active_support/core_ext/array/access"
5
5
  require "active_support/cache/memory_store"
6
+ require "active_support/json"
6
7
  require "active_model"
7
8
  require "action_view"
8
9
  require "rails/version"
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.9.0
4
+ version: 2.9.1
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: 2019-05-13 00:00:00.000000000 Z
11
+ date: 2019-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -43,6 +43,7 @@ files:
43
43
  - gemfiles/rails_5_0.gemfile
44
44
  - gemfiles/rails_5_1.gemfile
45
45
  - gemfiles/rails_5_2.gemfile
46
+ - gemfiles/rails_6_0.gemfile
46
47
  - gemfiles/rails_head.gemfile
47
48
  - jbuilder.gemspec
48
49
  - lib/generators/rails/jbuilder_generator.rb