diff -Nru ruby-seed-fu-2.3.7/debian/changelog ruby-seed-fu-2.3.7/debian/changelog --- ruby-seed-fu-2.3.7/debian/changelog 2019-01-08 09:08:54.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/changelog 2019-08-29 14:49:28.000000000 +0000 @@ -1,3 +1,18 @@ +ruby-seed-fu (2.3.7-3) unstable; urgency=medium + + * Team upload + + [ Utkarsh Gupta ] + * Add salsa-ci.yml + + [ Jongmin Kim ] + * Fix the API mismatch bug for ActiveRecord 5.1+ (Closes: #918595) + * Fix the RSpec deprecated syntax + * Bump the policy std-ver to 4.4.0 (no changes) + * Bump the debhelper to 12 + + -- Jongmin Kim Thu, 29 Aug 2019 23:49:28 +0900 + ruby-seed-fu (2.3.7-2) unstable; urgency=medium * Team upload diff -Nru ruby-seed-fu-2.3.7/debian/compat ruby-seed-fu-2.3.7/debian/compat --- ruby-seed-fu-2.3.7/debian/compat 2019-01-08 09:08:54.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru ruby-seed-fu-2.3.7/debian/control ruby-seed-fu-2.3.7/debian/control --- ruby-seed-fu-2.3.7/debian/control 2019-01-08 09:08:54.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/control 2019-08-29 14:49:28.000000000 +0000 @@ -3,14 +3,14 @@ Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Balasankar C -Build-Depends: debhelper (>= 11~), +Build-Depends: debhelper-compat (= 12), gem2deb, rake, ruby-activerecord (>= 3.1), ruby-activesupport (>= 3.1), - ruby-rspec, + ruby-rspec (>= 2.11), ruby-sqlite3 -Standards-Version: 4.3.0 +Standards-Version: 4.4.0 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-seed-fu.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-seed-fu Homepage: https://github.com/mbleigh/seed-fu diff -Nru ruby-seed-fu-2.3.7/debian/patches/activerecord-api-fix.patch ruby-seed-fu-2.3.7/debian/patches/activerecord-api-fix.patch --- ruby-seed-fu-2.3.7/debian/patches/activerecord-api-fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/patches/activerecord-api-fix.patch 2019-08-29 14:49:28.000000000 +0000 @@ -0,0 +1,24 @@ +Description: Make compatible with ActiveRecord 5.1+ + Throw :abort instead of returning false while before_save. +Author: Jongmin Kim +Bug: https://github.com/mbleigh/seed-fu/issues/132 +Bug-Debian: https://bugs.debian.org/918595 +Forwarded: https://github.com/mbleigh/seed-fu/pull/137 +Last-Update: 2019-08-29 +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -35,7 +35,13 @@ + attr_protected :first_name if self.respond_to?(:protected_attributes) + attr_accessor :fail_to_save + +- before_save { false if fail_to_save } ++ # From Rails 5.1, returning 'false' will not implicitly halt a callback chain. ++ # It was deprecated from Rails 5.0. ++ if ActiveRecord::VERSION::MAJOR < 5 ++ before_save { false if fail_to_save } ++ else ++ before_save { throw :abort if fail_to_save } ++ end + end + + class SeededModelNoPrimaryKey < ActiveRecord::Base diff -Nru ruby-seed-fu-2.3.7/debian/patches/disable-failing-test.patch ruby-seed-fu-2.3.7/debian/patches/disable-failing-test.patch --- ruby-seed-fu-2.3.7/debian/patches/disable-failing-test.patch 2019-01-08 09:08:54.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/patches/disable-failing-test.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Reported upstream https://github.com/mbleigh/seed-fu/issues/132 - ---- a/spec/seeder_spec.rb -+++ b/spec/seeder_spec.rb -@@ -169,7 +169,7 @@ - end - end - -- it "should raise an ActiveRecord::RecordNotSaved exception if any records fail to save" do -+ xit "should raise an ActiveRecord::RecordNotSaved exception if any records fail to save" do - expect { SeededModel.seed(:fail_to_save => true, :title => "Foo") }.to raise_error(ActiveRecord::RecordNotSaved) - end - end diff -Nru ruby-seed-fu-2.3.7/debian/patches/rspec-from-2-to-3.patch ruby-seed-fu-2.3.7/debian/patches/rspec-from-2-to-3.patch --- ruby-seed-fu-2.3.7/debian/patches/rspec-from-2-to-3.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/patches/rspec-from-2-to-3.patch 2019-08-29 14:49:28.000000000 +0000 @@ -0,0 +1,182 @@ +Description: Replace RSpec syntax "should" with "expect" + `:should` syntax without explicitly enabling the syntax is deprecated in + RSpec. This patch will replace `:should` syntax with `#expect`, which + introduced in RSpec 2.11. +Author: Jongmin Kim +Forwarded: https://github.com/mbleigh/seed-fu/pull/137 +Last-Update: 2019-08-29 +--- a/spec/runner_spec.rb ++++ b/spec/runner_spec.rb +@@ -4,21 +4,21 @@ + it "should seed data from Ruby and gzipped Ruby files in the given fixtures directory" do + SeedFu.seed(File.dirname(__FILE__) + '/fixtures') + +- SeededModel.find(1).title.should == "Foo" +- SeededModel.find(2).title.should == "Bar" +- SeededModel.find(3).title.should == "Baz" ++ expect(SeededModel.find(1).title).to eq("Foo") ++ expect(SeededModel.find(2).title).to eq("Bar") ++ expect(SeededModel.find(3).title).to eq("Baz") + end + + it "should seed only the data which matches the filter, if one is given" do + SeedFu.seed(File.dirname(__FILE__) + '/fixtures', /_2/) + +- SeededModel.count.should == 1 +- SeededModel.find(2).title.should == "Bar" ++ expect(SeededModel.count).to eq(1) ++ expect(SeededModel.find(2).title).to eq("Bar") + end + + it "should use the SpecFu.fixtures_path variable to determine where fixtures are" do + SeedFu.fixture_paths = [File.dirname(__FILE__) + '/fixtures'] + SeedFu.seed +- SeededModel.count.should == 3 ++ expect(SeededModel.count).to eq(3) + end + end +--- a/spec/seeder_spec.rb ++++ b/spec/seeder_spec.rb +@@ -20,12 +20,12 @@ + end + + bob = SeededModel.find_by_id(-2) +- bob.first_name.should == "Bob" +- bob.last_name.should == "Bobson" ++ expect(bob.first_name).to eq("Bob") ++ expect(bob.last_name).to eq("Bobson") + + if ENV['DB'] == 'postgresql' + next_id = SeededModel.connection.execute("select nextval('seeded_models_id_seq')") +- next_id[0]['nextval'].to_i.should == 11 ++ expect(next_id[0]['nextval'].to_i).to eq(11) + end + end + +@@ -39,8 +39,8 @@ + end + + bob = SeededModel.find_by_id(5) +- bob.first_name.should == "Bob" +- bob.last_name.should == "Bobson" ++ expect(bob.first_name).to eq("Bob") ++ expect(bob.last_name).to eq("Bobson") + end + + it "should be able to handle multiple constraints" do +@@ -50,7 +50,7 @@ + s.first_name = "Bob" + end + +- SeededModel.count.should == 1 ++ expect(SeededModel.count).to eq(1) + + SeededModel.seed(:title, :login) do |s| + s.login = "frank" +@@ -58,15 +58,15 @@ + s.first_name = "Frank" + end + +- SeededModel.count.should == 2 ++ expect(SeededModel.count).to eq(2) + +- SeededModel.find_by_login("bob").first_name.should == "Bob" ++ expect(SeededModel.find_by_login("bob").first_name).to eq("Bob") + SeededModel.seed(:title, :login) do |s| + s.login = "bob" + s.title = "Peon" + s.first_name = "Steve" + end +- SeededModel.find_by_login("bob").first_name.should == "Steve" ++ expect(SeededModel.find_by_login("bob").first_name).to eq("Steve") + end + + it "should be able to create models from an array of seed attributes" do +@@ -76,9 +76,9 @@ + {:login => "harry", :title => "Noble", :first_name => "Harry"} + ]) + +- SeededModel.find_by_login("bob").first_name.should == "Steve" +- SeededModel.find_by_login("frank").first_name.should == "Francis" +- SeededModel.find_by_login("harry").first_name.should == "Harry" ++ expect(SeededModel.find_by_login("bob").first_name).to eq("Steve") ++ expect(SeededModel.find_by_login("frank").first_name).to eq("Francis") ++ expect(SeededModel.find_by_login("harry").first_name).to eq("Harry") + end + + it "should be able to create models from a list of seed attribute hashes at the end of the args" do +@@ -88,9 +88,9 @@ + {:login => "harry", :title => "Noble", :first_name => "Harry"} + ) + +- SeededModel.find_by_login("bob").first_name.should == "Steve" +- SeededModel.find_by_login("frank").first_name.should == "Francis" +- SeededModel.find_by_login("harry").first_name.should == "Harry" ++ expect(SeededModel.find_by_login("bob").first_name).to eq("Steve") ++ expect(SeededModel.find_by_login("frank").first_name).to eq("Francis") ++ expect(SeededModel.find_by_login("harry").first_name).to eq("Harry") + end + + it "should update, not create, if constraints are met" do +@@ -111,8 +111,8 @@ + end + + bob = SeededModel.find_by_id(1) +- bob.first_name.should == "Robert" +- bob.last_name.should == "Bobson" ++ expect(bob.first_name).to eq("Robert") ++ expect(bob.last_name).to eq("Bobson") + end + + it "should create but not update with seed_once" do +@@ -133,15 +133,15 @@ + end + + bob = SeededModel.find_by_id(1) +- bob.first_name.should == "Bob" +- bob.last_name.should == "Bobson" ++ expect(bob.first_name).to eq("Bob") ++ expect(bob.last_name).to eq("Bobson") + end + + it "should default to an id constraint" do + SeededModel.seed(:title => "Bla", :id => 1) + SeededModel.seed(:title => "Foo", :id => 1) + +- SeededModel.find(1).title.should == "Foo" ++ expect(SeededModel.find(1).title).to eq("Foo") + end + + it "should require that all constraints are defined" do +--- a/spec/writer_spec.rb ++++ b/spec/writer_spec.rb +@@ -16,8 +16,8 @@ + end + load @file_name + +- SeededModel.find(1).title.should == "Mr" +- SeededModel.find(2).title.should == "Dr" ++ expect(SeededModel.find(1).title).to eq("Mr") ++ expect(SeededModel.find(2).title).to eq("Dr") + end + + it "should support chunking" do +@@ -28,8 +28,8 @@ + end + load @file_name + +- SeededModel.count.should == 3 +- File.read(@file_name).should include("# BREAK EVAL\n") ++ expect(SeededModel.count).to eq(3) ++ expect(File.read(@file_name)).to include("# BREAK EVAL\n") + end + + it "should support specifying the output to use 'seed_once' rather than 'seed'" do +@@ -40,6 +40,6 @@ + end + load @file_name + +- SeededModel.find(1).title.should == "Dr" ++ expect(SeededModel.find(1).title).to eq("Dr") + end + end diff -Nru ruby-seed-fu-2.3.7/debian/patches/series ruby-seed-fu-2.3.7/debian/patches/series --- ruby-seed-fu-2.3.7/debian/patches/series 2019-01-08 09:08:54.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/patches/series 2019-08-29 14:49:28.000000000 +0000 @@ -1,2 +1,3 @@ bundler -disable-failing-test.patch +activerecord-api-fix.patch +rspec-from-2-to-3.patch diff -Nru ruby-seed-fu-2.3.7/debian/salsa-ci.yml ruby-seed-fu-2.3.7/debian/salsa-ci.yml --- ruby-seed-fu-2.3.7/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-seed-fu-2.3.7/debian/salsa-ci.yml 2019-08-29 14:49:28.000000000 +0000 @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml