diff -Nru ruby-gon-6.0.1/debian/changelog ruby-gon-6.1.0/debian/changelog --- ruby-gon-6.0.1/debian/changelog 2015-09-15 19:00:24.000000000 +0000 +++ ruby-gon-6.1.0/debian/changelog 2016-09-07 09:13:01.000000000 +0000 @@ -1,3 +1,14 @@ +ruby-gon (6.1.0-1) unstable; urgency=medium + + * Team upload + * New upstream release + + [ Pirate Praveen ] + * Refresh patches + * Update ruby-tests.rake to include spec.rspec_opts from Rakefile + + -- Sruthi Chandran Wed, 07 Sep 2016 14:24:08 +0530 + ruby-gon (6.0.1-1) unstable; urgency=medium * Team upload diff -Nru ruby-gon-6.0.1/debian/compat ruby-gon-6.1.0/debian/compat --- ruby-gon-6.0.1/debian/compat 2014-11-18 19:31:50.000000000 +0000 +++ ruby-gon-6.1.0/debian/compat 2016-09-07 09:13:01.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru ruby-gon-6.0.1/debian/control ruby-gon-6.1.0/debian/control --- ruby-gon-6.0.1/debian/control 2014-11-18 20:03:35.000000000 +0000 +++ ruby-gon-6.1.0/debian/control 2016-09-07 09:14:51.000000000 +0000 @@ -3,8 +3,8 @@ Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Cédric Boutillier -Build-Depends: debhelper (>= 7.0.50~), - gem2deb (>= 0.3.0~), +Build-Depends: debhelper (>= 9~), + gem2deb, rake, ruby-actionpack | ruby-actionpack-3.2, ruby-jbuilder, @@ -14,9 +14,9 @@ ruby-rabl-rails (>= 0.4~), ruby-request-store, ruby-rspec -Standards-Version: 3.9.6 -Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-gon.git -Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-gon.git;a=summary +Standards-Version: 3.9.8 +Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/ruby-gon.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-gon.git Homepage: https://github.com/gazay/gon XS-Ruby-Versions: all @@ -29,7 +29,9 @@ ruby-request-store, ${misc:Depends}, ${shlibs:Depends} -Recommends: ruby-jbuilder, ruby-rabl, ruby-rabl-rails +Recommends: ruby-jbuilder, + ruby-rabl, + ruby-rabl-rails Description: Ruby library to send data to JavaScript from a Ruby application Gon is a Ruby library allowing one to easily send the content of variables of a Ruby web application to JavaScript. It supports JBuilder, diff -Nru ruby-gon-6.0.1/debian/patches/fix-json-scaping-on-tests-strings ruby-gon-6.1.0/debian/patches/fix-json-scaping-on-tests-strings --- ruby-gon-6.0.1/debian/patches/fix-json-scaping-on-tests-strings 2015-09-01 10:46:00.000000000 +0000 +++ ruby-gon-6.1.0/debian/patches/fix-json-scaping-on-tests-strings 2016-09-07 09:13:01.000000000 +0000 @@ -6,11 +6,9 @@ Bug-Debian: https://bugs.debian.org/759909 Last-Update: 2014-10-11 -Index: ruby-gon/spec/gon/basic_spec.rb -=================================================================== ---- ruby-gon.orig/spec/gon/basic_spec.rb -+++ ruby-gon/spec/gon/basic_spec.rb -@@ -117,7 +117,11 @@ describe Gon do +--- a/spec/gon/basic_spec.rb ++++ b/spec/gon/basic_spec.rb +@@ -110,7 +110,11 @@ it 'outputs correct js with a script string' do Gon.str = %q() @@ -20,14 +18,12 @@ + else + escaped_str = "\\u003c/script\\u003e\\u003cscript\\u003ealert('!')\\u003c/script\\u003e" + end - expect(@base.include_gon).to eq(') @@ -40,11 +36,9 @@ expect(@base.include_gon).to eq("') + expect(@base.include_gon).to eq(wrap_script( + 'window.gon={};' + + 'gon.int=1;')) end it 'outputs correct js with a string' do Gon.str = %q(a'b"c) - expect(@base.include_gon).to eq('') + expect(@base.include_gon).to eq(wrap_script( + 'window.gon={};' + + %q(gon.str="a'b\"c";)) + ) end it 'outputs correct js with a script string' do Gon.str = %q() escaped_str = "\\u003c/script\\u003e\\u003cscript\\u003ealert('!')\\u003c/script\\u003e" - expect(@base.include_gon).to eq('') + expect(@base.include_gon).to eq(wrap_script( + 'window.gon={};' + + %Q(gon.str="#{escaped_str}";)) + ) end it 'outputs correct js with an integer and type' do @@ -138,49 +129,33 @@ it 'outputs correct js with an integer, camel-case and namespace' do Gon.int_cased = 1 - expect(@base.include_gon(camel_case: true, namespace: 'camel_cased')).to eq( \ - '' + expect(@base.include_gon(camel_case: true, namespace: 'camel_cased')).to eq( + wrap_script('window.camel_cased={};' + + 'camel_cased.intCased=1;') ) end it 'outputs correct js with camel_depth = :recursive' do Gon.test_hash = { test_depth_one: { test_depth_two: 1 } } - expect(@base.include_gon(camel_case: true, camel_depth: :recursive)).to eq( \ - '' + expect(@base.include_gon(camel_case: true, camel_depth: :recursive)).to eq( + wrap_script('window.gon={};' + + 'gon.testHash={"testDepthOne":{"testDepthTwo":1}};') ) end it 'outputs correct js with camel_depth = 2' do Gon.test_hash = { test_depth_one: { test_depth_two: 1 } } - expect(@base.include_gon(camel_case: true, camel_depth: 2)).to eq( \ - '' + expect(@base.include_gon(camel_case: true, camel_depth: 2)).to eq( + wrap_script('window.gon={};' + + 'gon.testHash={"testDepthOne":{"test_depth_two":1}};') ) end it 'outputs correct js for an array with camel_depth = :recursive' do Gon.test_hash = { test_depth_one: [{ test_depth_two: 1 }, { test_depth_two: 2 }] } expect(@base.include_gon(camel_case: true, camel_depth: :recursive)).to eq( \ - '' + wrap_script('window.gon={};' + + 'gon.testHash={"testDepthOne":[{"testDepthTwo":1},{"testDepthTwo":2}]};') ) end @@ -217,44 +192,25 @@ it 'outputs correct js without cdata, without type, gon init and an integer' do Gon.int = 1 - expect(@base.include_gon(cdata: false, type: false)).to eq( \ - '' + "\n", false) ) end it 'outputs correct js with type text/javascript' do - expect(@base.include_gon(need_type: true, init: true)).to eq( \ - '' - ) + expect(@base.include_gon(need_type: true, init: true)).to eq(wrap_script('window.gon={};')) end it 'outputs correct js with namespace check' do - expect(@base.include_gon(namespace_check: true)).to eq( \ - '' - ) + expect(@base.include_gon(namespace_check: true)).to eq(wrap_script('window.gon=window.gon||{};')) end it 'outputs correct js without namespace check' do - expect(@base.include_gon(namespace_check: false)).to eq( \ - '' - ) + expect(@base.include_gon(namespace_check: false)).to eq(wrap_script('window.gon={};')) end context "without a current_gon instance" do @@ -273,18 +229,11 @@ end it 'outputs correct js with init' do - expect(@base.include_gon(init: true)).to eq( \ - '' - ) + expect(@base.include_gon(init: true)).to eq(wrap_script('window.gon={};')) end end - end describe '#include_gon_amd' do @@ -336,16 +285,8 @@ let(:controller) { ActionController::Base.new } - it 'should be able to handle ruby 1.8.7 style constants array (strings)' do - constants_as_strings = Gon.constants.map(&:to_s) - allow(Gon).to receive(:constants) { constants_as_strings } - expect { Gon.rabl :template => 'spec/test_data/sample.rabl', :controller => controller }.not_to raise_error - expect { Gon.jbuilder :template => 'spec/test_data/sample.json.jbuilder', :controller => controller }.not_to raise_error - end - - it 'should be able to handle ruby 1.9+ style constants array (symbols)' do - constants_as_symbols = Gon.constants.map(&:to_sym) - allow(Gon).to receive(:constants) { constants_as_symbols } + it 'should be able to handle constants array (symbols)' do + allow(Gon).to receive(:constants) { Gon.constants } expect { Gon.rabl :template => 'spec/test_data/sample.rabl', :controller => controller }.not_to raise_error expect { Gon.jbuilder :template => 'spec/test_data/sample.json.jbuilder', :controller => controller }.not_to raise_error end diff -Nru ruby-gon-6.0.1/spec/gon/global_spec.rb ruby-gon-6.1.0/spec/gon/global_spec.rb --- ruby-gon-6.0.1/spec/gon/global_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/global_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon::Global do before(:each) do diff -Nru ruby-gon-6.0.1/spec/gon/jbuilder_spec.rb ruby-gon-6.1.0/spec/gon/jbuilder_spec.rb --- ruby-gon-6.0.1/spec/gon/jbuilder_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/jbuilder_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon do describe '.jbuilder' do diff -Nru ruby-gon-6.0.1/spec/gon/rabl_with_rabl_rails_spec.rb ruby-gon-6.1.0/spec/gon/rabl_with_rabl_rails_spec.rb --- ruby-gon-6.0.1/spec/gon/rabl_with_rabl_rails_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/rabl_with_rabl_rails_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon do before(:all) do diff -Nru ruby-gon-6.0.1/spec/gon/rabl_with_rabl_spec.rb ruby-gon-6.1.0/spec/gon/rabl_with_rabl_spec.rb --- ruby-gon-6.0.1/spec/gon/rabl_with_rabl_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/rabl_with_rabl_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon do before(:all) do diff -Nru ruby-gon-6.0.1/spec/gon/templates_spec.rb ruby-gon-6.1.0/spec/gon/templates_spec.rb --- ruby-gon-6.0.1/spec/gon/templates_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/templates_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon do describe '.template_path' do diff -Nru ruby-gon-6.0.1/spec/gon/thread_spec.rb ruby-gon-6.1.0/spec/gon/thread_spec.rb --- ruby-gon-6.0.1/spec/gon/thread_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/thread_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - class GonTestWorker include Gon::ControllerHelpers diff -Nru ruby-gon-6.0.1/spec/gon/watch_spec.rb ruby-gon-6.1.0/spec/gon/watch_spec.rb --- ruby-gon-6.0.1/spec/gon/watch_spec.rb 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/spec/gon/watch_spec.rb 2016-08-01 22:17:49.000000000 +0000 @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Gon::Watch do let(:controller) { ActionController::Base.new } @@ -13,7 +11,7 @@ env['REQUEST_METHOD'] = 'GET' Gon::Watch.clear - Gon.send(:current_gon).instance_variable_set(:@request_env, env) + Gon.send(:current_gon).instance_variable_set(:@env, env) Gon.send(:current_gon).env['action_controller.instance'] = controller Gon.clear end @@ -45,7 +43,7 @@ describe 'Render concrete variable' do before do - env = Gon.send(:current_gon).instance_variable_get(:@request_env) + env = Gon.send(:current_gon).env env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest' allow(controller).to receive_messages(request: ActionDispatch::Request.new(env)) diff -Nru ruby-gon-6.0.1/.travis.yml ruby-gon-6.1.0/.travis.yml --- ruby-gon-6.0.1/.travis.yml 2015-08-01 23:42:53.000000000 +0000 +++ ruby-gon-6.1.0/.travis.yml 2016-08-01 22:17:49.000000000 +0000 @@ -3,12 +3,15 @@ rvm: - 1.9.3 - 2.0.0 - - 2.1.6 - - 2.2.2 + - 2.1 + - 2.2 + - 2.3.0 + - ruby-head - jruby-19mode # JRuby in 1.9 mode - rbx matrix: allow_failures: - rvm: rbx + - rvm: ruby-head # uncomment this line if your project needs to run something other than `rake`: # script: bundle exec rspec spec