New Upstream Snapshot - ruby-seed-fu
Ready changes
Summary
Merged new upstream version: 2.3.9 (was: 2.3.7).
Resulting package
Built on 2022-10-21T19:37 (took 3m2s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots ruby-seed-fu
Lintian Result
Diff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index baf714c..42b4a4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+Version 2.3.8
+-------------
+
+Bug fixes:
+
+* Restored support for PostgreSQL with Rails versions before 5.0.0 broken in Seed Fu 2.3.7.
+
Version 2.3.7
-------------
diff --git a/debian/changelog b/debian/changelog
index f5ec628..0058548 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ruby-seed-fu (2.3.7-4) UNRELEASED; urgency=medium
+ruby-seed-fu (2.3.9-1) UNRELEASED; urgency=medium
* Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
Repository-Browse.
@@ -9,8 +9,9 @@ ruby-seed-fu (2.3.7-4) UNRELEASED; urgency=medium
ruby-activesupport and ruby-rspec.
+ ruby-seed-fu: Drop versioned constraint on ruby-activerecord and
ruby-activesupport in Depends.
+ * New upstream release.
- -- Debian Janitor <janitor@jelmer.uk> Sat, 14 Mar 2020 15:33:45 +0000
+ -- Debian Janitor <janitor@jelmer.uk> Fri, 21 Oct 2022 19:35:53 -0000
ruby-seed-fu (2.3.7-3) unstable; urgency=medium
diff --git a/debian/patches/activerecord-api-fix.patch b/debian/patches/activerecord-api-fix.patch
index 2e76b02..5146cfb 100644
--- a/debian/patches/activerecord-api-fix.patch
+++ b/debian/patches/activerecord-api-fix.patch
@@ -5,9 +5,11 @@ 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 @@
+Index: ruby-seed-fu.git/spec/spec_helper.rb
+===================================================================
+--- ruby-seed-fu.git.orig/spec/spec_helper.rb
++++ ruby-seed-fu.git/spec/spec_helper.rb
+@@ -35,7 +35,13 @@ class SeededModel < ActiveRecord::Base
attr_protected :first_name if self.respond_to?(:protected_attributes)
attr_accessor :fail_to_save
diff --git a/debian/patches/bundler b/debian/patches/bundler
index 8308414..f080618 100644
--- a/debian/patches/bundler
+++ b/debian/patches/bundler
@@ -4,8 +4,10 @@ Author: Balasankar C <balasankarc@autistici.org>
Last-Update: 2015-07-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/spec/spec_helper.rb
-+++ b/spec/spec_helper.rb
+Index: ruby-seed-fu.git/spec/spec_helper.rb
+===================================================================
+--- ruby-seed-fu.git.orig/spec/spec_helper.rb
++++ ruby-seed-fu.git/spec/spec_helper.rb
@@ -1,5 +1,5 @@
+require 'fileutils'
require 'rubygems'
diff --git a/debian/patches/rspec-from-2-to-3.patch b/debian/patches/rspec-from-2-to-3.patch
index dddcecb..81a675d 100644
--- a/debian/patches/rspec-from-2-to-3.patch
+++ b/debian/patches/rspec-from-2-to-3.patch
@@ -5,9 +5,11 @@ Description: Replace RSpec syntax "should" with "expect"
Author: Jongmin Kim <jmkim@pukyong.ac.kr>
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 @@
+Index: ruby-seed-fu.git/spec/runner_spec.rb
+===================================================================
+--- ruby-seed-fu.git.orig/spec/runner_spec.rb
++++ ruby-seed-fu.git/spec/runner_spec.rb
+@@ -4,21 +4,21 @@ describe SeedFu::Runner do
it "should seed data from Ruby and gzipped Ruby files in the given fixtures directory" do
SeedFu.seed(File.dirname(__FILE__) + '/fixtures')
@@ -35,9 +37,11 @@ Last-Update: 2019-08-29
+ expect(SeededModel.count).to eq(3)
end
end
---- a/spec/seeder_spec.rb
-+++ b/spec/seeder_spec.rb
-@@ -20,12 +20,12 @@
+Index: ruby-seed-fu.git/spec/seeder_spec.rb
+===================================================================
+--- ruby-seed-fu.git.orig/spec/seeder_spec.rb
++++ ruby-seed-fu.git/spec/seeder_spec.rb
+@@ -20,12 +20,12 @@ describe SeedFu::Seeder do
end
bob = SeededModel.find_by_id(-2)
@@ -53,7 +57,7 @@ Last-Update: 2019-08-29
end
end
-@@ -39,8 +39,8 @@
+@@ -39,8 +39,8 @@ describe SeedFu::Seeder do
end
bob = SeededModel.find_by_id(5)
@@ -64,7 +68,7 @@ Last-Update: 2019-08-29
end
it "should be able to handle multiple constraints" do
-@@ -50,7 +50,7 @@
+@@ -50,7 +50,7 @@ describe SeedFu::Seeder do
s.first_name = "Bob"
end
@@ -73,7 +77,7 @@ Last-Update: 2019-08-29
SeededModel.seed(:title, :login) do |s|
s.login = "frank"
-@@ -58,15 +58,15 @@
+@@ -58,15 +58,15 @@ describe SeedFu::Seeder do
s.first_name = "Frank"
end
@@ -92,7 +96,7 @@ Last-Update: 2019-08-29
end
it "should be able to create models from an array of seed attributes" do
-@@ -76,9 +76,9 @@
+@@ -76,9 +76,9 @@ describe SeedFu::Seeder do
{:login => "harry", :title => "Noble", :first_name => "Harry"}
])
@@ -105,7 +109,7 @@ Last-Update: 2019-08-29
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 @@
+@@ -88,9 +88,9 @@ describe SeedFu::Seeder do
{:login => "harry", :title => "Noble", :first_name => "Harry"}
)
@@ -118,7 +122,7 @@ Last-Update: 2019-08-29
end
it "should update, not create, if constraints are met" do
-@@ -111,8 +111,8 @@
+@@ -111,8 +111,8 @@ describe SeedFu::Seeder do
end
bob = SeededModel.find_by_id(1)
@@ -129,7 +133,7 @@ Last-Update: 2019-08-29
end
it "should create but not update with seed_once" do
-@@ -133,15 +133,15 @@
+@@ -133,15 +133,15 @@ describe SeedFu::Seeder do
end
bob = SeededModel.find_by_id(1)
@@ -148,9 +152,11 @@ Last-Update: 2019-08-29
end
it "should require that all constraints are defined" do
---- a/spec/writer_spec.rb
-+++ b/spec/writer_spec.rb
-@@ -16,8 +16,8 @@
+Index: ruby-seed-fu.git/spec/writer_spec.rb
+===================================================================
+--- ruby-seed-fu.git.orig/spec/writer_spec.rb
++++ ruby-seed-fu.git/spec/writer_spec.rb
+@@ -16,8 +16,8 @@ describe SeedFu::Writer do
end
load @file_name
@@ -161,7 +167,7 @@ Last-Update: 2019-08-29
end
it "should support chunking" do
-@@ -28,8 +28,8 @@
+@@ -28,8 +28,8 @@ describe SeedFu::Writer do
end
load @file_name
@@ -172,7 +178,7 @@ Last-Update: 2019-08-29
end
it "should support specifying the output to use 'seed_once' rather than 'seed'" do
-@@ -40,6 +40,6 @@
+@@ -40,6 +40,6 @@ describe SeedFu::Writer do
end
load @file_name
diff --git a/lib/seed-fu/seeder.rb b/lib/seed-fu/seeder.rb
index def2a43..3a48393 100644
--- a/lib/seed-fu/seeder.rb
+++ b/lib/seed-fu/seeder.rb
@@ -91,7 +91,8 @@ module SeedFu
quoted_id = @model_class.connection.quote_column_name(@model_class.primary_key)
sequence = @model_class.sequence_name
- if @model_class.connection.postgresql_version >= 100000
+ # TODO postgresql_version was made public in Rails 5.0.0, remove #send when support for earlier versions are dropped
+ if @model_class.connection.send(:postgresql_version) >= 100000
sql =<<-EOS
SELECT setval('#{sequence}', (SELECT GREATEST(MAX(#{quoted_id})+(SELECT seqincrement FROM pg_sequence WHERE seqrelid = '#{sequence}'::regclass), (SELECT seqmin FROM pg_sequence WHERE seqrelid = '#{sequence}'::regclass)) FROM #{@model_class.quoted_table_name}), false)
EOS
diff --git a/lib/seed-fu/version.rb b/lib/seed-fu/version.rb
index 65f7c65..d284b77 100644
--- a/lib/seed-fu/version.rb
+++ b/lib/seed-fu/version.rb
@@ -1,4 +1,4 @@
module SeedFu
# The current version of Seed Fu
- VERSION = '2.3.7'
+ VERSION = '2.3.9'
end
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/share/rubygems-integration/all/specifications/seed-fu-2.3.9.gemspec
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/share/rubygems-integration/all/specifications/seed-fu-2.3.7.gemspec
Control files: lines which differ (wdiff format)
Ruby-Versions: all