Hello community, here is the log from the commit of package rubygem-jbuilder for openSUSE:Factory checked in at 2018-11-10 17:00:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-jbuilder (Old) and /work/SRC/openSUSE:Factory/.rubygem-jbuilder.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-jbuilder" Sat Nov 10 17:00:16 2018 rev:20 rq:646831 version:2.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-jbuilder/rubygem-jbuilder.changes 2017-06-15 11:24:29.526092441 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-jbuilder.new/rubygem-jbuilder.changes 2018-11-10 17:02:17.183540376 +0100 @@ -1,0 +2,7 @@ +Tue Nov 6 10:20:54 UTC 2018 - mschnitzer@suse.com + +- updated to version 2.8.0 + + * Replace deprecated fragment_cache_key for Rails 5.2 support + +------------------------------------------------------------------- Old: ---- jbuilder-2.7.0.gem New: ---- jbuilder-2.8.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-jbuilder.spec ++++++ --- /var/tmp/diff_new_pack.Wbq0Bu/_old 2018-11-10 17:02:17.627539834 +0100 +++ /var/tmp/diff_new_pack.Wbq0Bu/_new 2018-11-10 17:02:17.631539829 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-jbuilder # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-jbuilder -Version: 2.7.0 +Version: 2.8.0 Release: 0 %define mod_name jbuilder %define mod_full_name %{mod_name}-%{version} @@ -33,7 +33,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 Url: https://github.com/rails/jbuilder -Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Create JSON structures via a Builder-style DSL License: MIT ++++++ jbuilder-2.7.0.gem -> jbuilder-2.8.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2017-06-05 12:08:10.000000000 +0200 +++ new/.travis.yml 2018-11-05 16:49:16.000000000 +0100 @@ -3,23 +3,23 @@ sudo: false cache: bundler +before_install: + - gem update --system + - gem install bundler + rvm: - 1.9 - 2.0 - 2.1 - - 2.2.5 - - 2.3.1 - - 2.4.0 + - 2.2.10 + - 2.3.7 + - 2.4.4 + - 2.5.1 - ruby-head - jruby-19mode - rbx gemfile: - - gemfiles/rails_3_0.gemfile - - gemfiles/rails_3_1.gemfile - - gemfiles/rails_3_2.gemfile - - gemfiles/rails_4_0.gemfile - - gemfiles/rails_4_1.gemfile - gemfiles/rails_4_2.gemfile - gemfiles/rails_5_0.gemfile - gemfiles/rails_5_1.gemfile @@ -51,16 +51,6 @@ gemfile: gemfiles/rails_5_0.gemfile - rvm: rbx gemfile: gemfiles/rails_5_1.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/rails_3_0.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/rails_3_1.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/rails_3_2.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/rails_4_0.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/rails_4_1.gemfile notifications: email: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Appraisals new/Appraisals --- old/Appraisals 2017-06-05 12:08:10.000000000 +0200 +++ new/Appraisals 2018-11-05 16:49:16.000000000 +0100 @@ -1,17 +1,13 @@ appraise "rails-4-2" do - gem "railties", "~> 4.2.0" - gem "actionpack", "~> 4.2.0" - gem "activemodel", "~> 4.2.0" + gem "rails", "~> 4.2.0" end -appraise "rails-5-0" do - gem "railties", "~> 5.0.0" - gem "actionpack", "~> 5.0.0" - gem "activemodel", "~> 5.0.0" -end +if RUBY_VERSION >= "2.2.2" + appraise "rails-5-0" do + gem "rails", ">= 5.0.0", "< 5.1" + end -appraise "rails-5-1" do - gem "railties", ">= 5.1.0", "< 5.2" - gem "actionpack", ">= 5.1.0", "< 5.2" - gem "activemodel", ">= 5.1.0", "< 5.2" + appraise "rails-5-1" do + gem "rails", ">= 5.1.0", "< 5.2" + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-06-05 12:08:10.000000000 +0200 +++ new/CHANGELOG.md 2018-11-05 16:49:16.000000000 +0100 @@ -1,5 +1,17 @@ # Changelog +2.8.0 +----- + +* [Replace deprecated fragment_cache_key for Rails 5.2 support](https://github.com/rails/jbuilder/pull/430) + +2.7.0 +----- + +* [Requires Rails 4+](https://github.com/rails/jbuilder/commit/5207ff394533177fffdd768bfaa6413a0cd...) +* [Fix implicitly rendering a JSON partial with the same name as an + HTML partial](https://github.com/rails/jbuilder/pull/400) + 2.6.4 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE --- old/MIT-LICENSE 2017-06-05 12:08:10.000000000 +0200 +++ new/MIT-LICENSE 2018-11-05 16:49:16.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright (c) 2011-2017 David Heinemeier Hansson, 37signals +Copyright (c) 2011-2018 David Heinemeier Hansson, 37signals Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-06-05 12:08:10.000000000 +0200 +++ new/README.md 2018-11-05 16:49:16.000000000 +0100 @@ -67,6 +67,19 @@ # => {"author": { "name": "David" }} ``` + +To merge existing hash or array to current context: + +``` ruby +hash = { author: { name: "David" } } +json.post do + json.title "Merge HOWTO" + json.merge! hash +end + +# => "post": { "title": "Merge HOWTO", "author": { "name": "David" } } +``` + Top level arrays can be handled directly. Useful for index and other collection actions. ``` ruby Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_4_2.gemfile new/gemfiles/rails_4_2.gemfile --- old/gemfiles/rails_4_2.gemfile 2017-06-05 12:08:10.000000000 +0200 +++ new/gemfiles/rails_4_2.gemfile 2018-11-05 16:49:16.000000000 +0100 @@ -6,8 +6,6 @@ gem "mocha", require: false gem "appraisal" gem "pry" -gem "railties", "~> 4.2.0" -gem "actionpack", "~> 4.2.0" -gem "activemodel", "~> 4.2.0" +gem "rails", "~> 4.2.0" gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_5_0.gemfile new/gemfiles/rails_5_0.gemfile --- old/gemfiles/rails_5_0.gemfile 2017-06-05 12:08:10.000000000 +0200 +++ new/gemfiles/rails_5_0.gemfile 2018-11-05 16:49:16.000000000 +0100 @@ -6,8 +6,6 @@ gem "mocha", require: false gem "appraisal" gem "pry" -gem "railties", "~> 5.0.0" -gem "actionpack", "~> 5.0.0" -gem "activemodel", "~> 5.0.0" +gem "rails", ">= 5.0.0", "< 5.1" gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_5_1.gemfile new/gemfiles/rails_5_1.gemfile --- old/gemfiles/rails_5_1.gemfile 2017-06-05 12:08:10.000000000 +0200 +++ new/gemfiles/rails_5_1.gemfile 2018-11-05 16:49:16.000000000 +0100 @@ -6,8 +6,6 @@ gem "mocha", require: false gem "appraisal" gem "pry" -gem "railties", ">= 5.1.0", "< 5.2" -gem "actionpack", ">= 5.1.0", "< 5.2" -gem "activemodel", ">= 5.1.0", "< 5.2" +gem "rails", ">= 5.1.0", "< 5.2" gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jbuilder.gemspec new/jbuilder.gemspec --- old/jbuilder.gemspec 2017-06-05 12:08:10.000000000 +0200 +++ new/jbuilder.gemspec 2018-11-05 16:49:16.000000000 +0100 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'jbuilder' - s.version = '2.7.0' + s.version = '2.8.0' s.authors = 'David Heinemeier Hansson' s.email = 'david@basecamp.com' s.summary = 'Create JSON structures via a Builder-style DSL' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/jbuilder/jbuilder_template.rb new/lib/jbuilder/jbuilder_template.rb --- old/lib/jbuilder/jbuilder_template.rb 2017-06-05 12:08:10.000000000 +0200 +++ new/lib/jbuilder/jbuilder_template.rb 2018-11-05 16:49:16.000000000 +0100 @@ -151,8 +151,8 @@ name_options = options.slice(:skip_digest, :virtual_path) key = _fragment_name_with_digest(key, name_options) - if @context.respond_to?(:fragment_cache_key) - key = @context.fragment_cache_key(key) + if @context.respond_to?(:combined_fragment_cache_key) + key = @context.combined_fragment_cache_key(key) else key = url_for(key).split('://', 2).last if ::Hash === key end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-06-05 12:08:10.000000000 +0200 +++ new/metadata 2018-11-05 16:49:16.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: jbuilder version: !ruby/object:Gem::Version - version: 2.7.0 + version: 2.8.0 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: bin cert_chain: [] -date: 2017-06-05 00:00:00.000000000 Z +date: 2018-11-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: activesupport @@ -99,7 +99,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.11 +rubygems_version: 2.7.6 signing_key: specification_version: 4 summary: Create JSON structures via a Builder-style DSL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/jbuilder_dependency_tracker_test.rb new/test/jbuilder_dependency_tracker_test.rb --- old/test/jbuilder_dependency_tracker_test.rb 2017-06-05 12:08:10.000000000 +0200 +++ new/test/jbuilder_dependency_tracker_test.rb 2018-11-05 16:49:16.000000000 +0100 @@ -53,7 +53,7 @@ assert_equal %w[path/to/partial], dependencies end - test 'detects partial in indirect collecton calls' do + test 'detects partial in indirect collection calls' do dependencies = track_dependencies <<-RUBY json.comments @post.comments, partial: 'comments/comment', as: :comment RUBY diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/jbuilder_template_test.rb new/test/jbuilder_template_test.rb --- old/test/jbuilder_template_test.rb 2017-06-05 12:08:10.000000000 +0200 +++ new/test/jbuilder_template_test.rb 2018-11-05 16:49:16.000000000 +0100 @@ -320,10 +320,10 @@ JBUILDER end - test "fragment caching uses fragment_cache_key" do + test "fragment caching uses combined_fragment_cache_key" do undef_context_methods :fragment_name_with_digest, :cache_fragment_name - @context.expects(:fragment_cache_key).with("cachekey") + @context.expects(:combined_fragment_cache_key).with("cachekey") jbuild <<-JBUILDER json.cache! "cachekey" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/jbuilder_test.rb new/test/jbuilder_test.rb --- old/test/jbuilder_test.rb 2017-06-05 12:08:10.000000000 +0200 +++ new/test/jbuilder_test.rb 2018-11-05 16:49:16.000000000 +0100 @@ -49,7 +49,7 @@ class JbuilderTest < ActiveSupport::TestCase - setup do + teardown do Jbuilder.send :class_variable_set, '@@key_formatter', nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_helper.rb new/test/test_helper.rb --- old/test/test_helper.rb 2017-06-05 12:08:10.000000000 +0200 +++ new/test/test_helper.rb 2018-11-05 16:49:16.000000000 +0100 @@ -1,6 +1,8 @@ require "bundler/setup" require "active_support" +require 'active_support/core_ext/array/access' require "rails/version" +require "jbuilder" if Rails::VERSION::STRING > "4.0" require "active_support/testing/autorun"