storey 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +11 -7
  4. data/Appraisals +9 -4
  5. data/CHANGELOG.md +26 -9
  6. data/Gemfile +1 -2
  7. data/README.md +13 -0
  8. data/docker-compose.yml +10 -0
  9. data/gemfiles/rails_5.0.gemfile +10 -0
  10. data/gemfiles/rails_5.0.gemfile.lock +154 -0
  11. data/gemfiles/rails_5.1.gemfile +9 -0
  12. data/gemfiles/rails_5.1.gemfile.lock +153 -0
  13. data/gemfiles/rails_5.2.gemfile +9 -0
  14. data/gemfiles/rails_5.2.gemfile.lock +161 -0
  15. data/lib/storey/builds_dump_command.rb +7 -1
  16. data/lib/storey/duplicator.rb +2 -6
  17. data/lib/storey/get_migration_versions.rb +21 -0
  18. data/lib/storey/migrator.rb +29 -8
  19. data/lib/storey/sql_dumper.rb +10 -6
  20. data/lib/storey/suffixifier.rb +2 -2
  21. data/lib/storey/version.rb +1 -1
  22. data/lib/storey.rb +6 -7
  23. data/spec/dummy/config/database.yml.sample +2 -1
  24. data/spec/dummy/config/initializers/migrations_path.rb +2 -2
  25. data/spec/dummy/db/migrate/20120115060713_create_companies.rb +1 -1
  26. data/spec/dummy/db/migrate/20120115060728_create_posts.rb +1 -1
  27. data/spec/migrator_spec.rb +15 -10
  28. data/spec/storey/builds_dump_command_spec.rb +26 -0
  29. data/spec/storey/create_spec.rb +2 -2
  30. data/spec/storey/duplicate_spec.rb +2 -2
  31. data/spec/storey/get_migration_versions_spec.rb +42 -0
  32. data/spec/storey/schema_search_path_for_spec.rb +2 -2
  33. data/spec/storey/schema_spec.rb +6 -0
  34. data/spec/storey/schemas_spec.rb +15 -7
  35. data/spec/storey/suffixifier_spec.rb +4 -4
  36. data/spec/storey/switch_spec.rb +4 -2
  37. data/spec/tasks/storey_rake_spec.rb +12 -12
  38. data/storey.gemspec +2 -2
  39. metadata +29 -23
  40. data/gemfiles/rails_3.gemfile +0 -9
  41. data/gemfiles/rails_3.gemfile.lock +0 -130
  42. data/gemfiles/rails_4.gemfile +0 -9
  43. data/gemfiles/rails_4.gemfile.lock +0 -144
@@ -0,0 +1,21 @@
1
+ module Storey
2
+ class GetMigrationVersions
3
+
4
+ def self.call(schema = nil)
5
+ return migration_versions if schema.nil?
6
+ Storey.switch(schema) { migration_versions }
7
+ end
8
+
9
+ private
10
+
11
+ def self.migration_versions
12
+ if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new("5.2")
13
+ ::ActiveRecord::Migrator.get_all_versions
14
+ else
15
+ ::ActiveRecord::Base.connection.migration_context.
16
+ get_all_versions
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -13,18 +13,13 @@ module Storey
13
13
  def self.migrate(schema, options={})
14
14
  Storey.switch schema do
15
15
  puts "= Migrating #{schema}"
16
- ::ActiveRecord::Migrator.migrate(::ActiveRecord::Migrator.migrations_path,
17
- options[:version])
16
+ active_record_migrate(options[:version])
18
17
  end
19
18
  end
20
19
 
21
20
  def self.run(direction, schema, version)
22
21
  Storey.switch schema do
23
- ::ActiveRecord::Migrator.run(
24
- direction,
25
- ::ActiveRecord::Migrator.migrations_path,
26
- version
27
- )
22
+ active_record_run(direction, version)
28
23
  end
29
24
  end
30
25
 
@@ -39,11 +34,37 @@ module Storey
39
34
  Storey.switch schema do
40
35
  puts "= Rolling back `#{schema}` #{step} steps"
41
36
  ::ActiveRecord::Migrator.rollback(
42
- ::ActiveRecord::Migrator.migrations_path,
37
+ ::ActiveRecord::Migrator.migrations_paths,
43
38
  step
44
39
  )
45
40
  end
46
41
  end
47
42
 
43
+ private
44
+
45
+ def self.active_record_migrate(version)
46
+ if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new("5.2")
47
+ ::ActiveRecord::Migrator.migrate(
48
+ ::ActiveRecord::Migrator.migrations_paths,
49
+ version,
50
+ )
51
+ else
52
+ ::ActiveRecord::Tasks::DatabaseTasks.migrate
53
+ end
54
+ end
55
+
56
+ def self.active_record_run(direction, target_version)
57
+ if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new("5.2")
58
+ ::ActiveRecord::Migrator.run(
59
+ direction,
60
+ ::ActiveRecord::Migrator.migrations_paths,
61
+ target_version
62
+ )
63
+ else
64
+ ::ActiveRecord::Base.connection.migration_context.
65
+ run(direction, target_version)
66
+ end
67
+ end
68
+
48
69
  end
49
70
  end
@@ -8,8 +8,8 @@ module Storey
8
8
  end
9
9
 
10
10
  def dump
11
- `#{command}`
12
- raise 'Error dumping database' if $?.exitstatus == 1
11
+ stdout_str, stderr_str, status = Open3.capture3(command)
12
+ raise "Error dumping database: #{stderr_str}" if status.exitstatus != 0
13
13
  end
14
14
 
15
15
  private
@@ -27,10 +27,14 @@ module Storey
27
27
  end
28
28
 
29
29
  def command
30
- @command ||= BuildsDumpCommand.execute(structure_only: true,
31
- file: @file,
32
- schemas: search_path,
33
- database: database_name)
30
+ return @command if defined?(@command)
31
+ args = Storey.database_config.slice(:host, :username, :password).merge(
32
+ structure_only: true,
33
+ file: @file,
34
+ schemas: search_path,
35
+ database: database_name,
36
+ )
37
+ @command = BuildsDumpCommand.execute(args)
34
38
  end
35
39
 
36
40
  end
@@ -16,13 +16,13 @@ module Storey
16
16
  else
17
17
  "#{schema_name}#{suffix}"
18
18
  end
19
- end.join(',')
19
+ end.join(', ')
20
20
  end
21
21
 
22
22
  private
23
23
 
24
24
  def schema_names
25
- @schema_names ||= @schema_name.split(',')
25
+ @schema_names ||= @schema_name.split(',').map(&:strip)
26
26
  end
27
27
 
28
28
  def suffix
@@ -1,3 +1,3 @@
1
1
  module Storey
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
data/lib/storey.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'easy_class_to_instance_method'
2
2
  require "active_support/core_ext/module" # so we can use mattr_accessor
3
+ require "open3"
3
4
 
4
5
  require "storey/version"
5
6
  require "rails/all"
@@ -20,6 +21,7 @@ require 'storey/builds_dump_command'
20
21
  require 'storey/builds_load_command'
21
22
  require 'storey/schema_name'
22
23
  require 'storey/sets_env_password'
24
+ require 'storey/get_migration_versions'
23
25
 
24
26
  module Storey
25
27
 
@@ -56,12 +58,9 @@ module Storey
56
58
  options[:suffix] ||= false
57
59
 
58
60
  name = ::ActiveRecord::Base.connection.schema_search_path
59
-
60
- if options[:suffix]
61
- name
62
- else
63
- unsuffixify name
64
- end
61
+ name = unsuffixify(name) if !options[:suffix]
62
+ return name.split(",").map(&:strip) if options[:array]
63
+ name
65
64
  end
66
65
 
67
66
  def create(name, options={}, &block)
@@ -155,7 +154,7 @@ module Storey
155
154
 
156
155
  schemas_in_db = self.schemas(suffix: self.suffix.present?)
157
156
  schemas_in_db << %("$user")
158
- schema_names = schema_name.split(',')
157
+ schema_names = schema_name.split(',').map(&:strip)
159
158
  schemas_not_in_db = schema_names - schemas_in_db
160
159
  schemas_not_in_db.empty?
161
160
  end
@@ -1,6 +1,7 @@
1
1
  test:
2
- database: storey_test
2
+ database: postgres
3
3
  adapter: postgresql
4
4
  min_messages: WARNING
5
5
  username: postgres
6
6
  password:
7
+ host: localhost
@@ -1,2 +1,2 @@
1
- dummy_migrations_path = File.join(File.dirname(__FILE__), '..', '..', 'db', 'migrate')
2
- ActiveRecord::Migrator.migrations_path = dummy_migrations_path
1
+ dummy_migrations_paths = File.join(File.dirname(__FILE__), '..', '..', 'db', 'migrate')
2
+ ActiveRecord::Migrator.migrations_paths = dummy_migrations_paths
@@ -1,4 +1,4 @@
1
- class CreateCompanies < ActiveRecord::Migration
1
+ class CreateCompanies < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :companies do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreatePosts < ActiveRecord::Migration
1
+ class CreatePosts < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :posts do |t|
4
4
  t.string :name
@@ -2,7 +2,9 @@ require 'spec_helper'
2
2
 
3
3
  describe Storey::Migrator do
4
4
  before do
5
- @original_schema = ::ActiveRecord::Base.connection.schema_search_path
5
+ # split and join to make the expectation later consistent with the code
6
+ @original_schema = ::ActiveRecord::Base.connection.schema_search_path.
7
+ split(",").map(&:strip).join(", ")
6
8
  @schema_1 = "first_schema"
7
9
  Storey.create @schema_1
8
10
  end
@@ -37,7 +39,6 @@ describe Storey::Migrator do
37
39
  end
38
40
 
39
41
  it "should migrate db" do
40
- ActiveRecord::Migrator.should_receive(:migrate)
41
42
  Storey::Migrator.migrate(@schema_1)
42
43
  end
43
44
  end
@@ -58,10 +59,12 @@ describe Storey::Migrator do
58
59
  Storey::Migrator.run(:up, @schema_1, @migration_version_2)
59
60
  end
60
61
 
61
- it "should migrate to a version" do
62
- ActiveRecord::Migrator.should_receive(:run).
63
- with(:up, anything, @migration_version_1)
64
- Storey::Migrator.run(:up, @schema_1, @migration_version_1)
62
+ it "migrates up a specific version" do
63
+ Storey.create("blankschema", load_database_structure: false)
64
+ Storey::Migrator.run(:up, "blankschema", @migration_version_1)
65
+
66
+ expect(Storey::GetMigrationVersions.("blankschema")).
67
+ to match([@migration_version_1])
65
68
  end
66
69
  end
67
70
 
@@ -74,10 +77,12 @@ describe Storey::Migrator do
74
77
  Storey::Migrator.run(:down, @schema_1, @migration_version_2)
75
78
  end
76
79
 
77
- it "should migrate to a version" do
78
- ActiveRecord::Migrator.should_receive(:run).
79
- with(:down, anything, @migration_version_1)
80
- Storey::Migrator.run(:down, @schema_1, @migration_version_1)
80
+ it "migrates down a specific version" do
81
+ Storey.create("blankschema")
82
+ Storey::Migrator.run(:down, "blankschema", @migration_version_1)
83
+
84
+ expect(Storey::GetMigrationVersions.("blankschema")).
85
+ to match([@migration_version_2])
81
86
  end
82
87
  end
83
88
 
@@ -16,6 +16,32 @@ describe Storey::BuildsDumpCommand do
16
16
  }
17
17
  end
18
18
 
19
+ context "when host is specified" do
20
+ before do
21
+ options.merge!(host: "localhost")
22
+ end
23
+
24
+ it { is_expected.to include("--host=localhost") }
25
+ end
26
+
27
+ context "when username is specified" do
28
+ before do
29
+ options.merge!(username: "username")
30
+ end
31
+
32
+ it { is_expected.to include("--username=username") }
33
+ end
34
+
35
+ context "when password is specified" do
36
+ before do
37
+ options.merge!(password: "pass")
38
+ end
39
+
40
+ it "sets the PGPASSWORD env variable" do
41
+ expect(subject).to match(/^PGPASSWORD=pass/)
42
+ end
43
+ end
44
+
19
45
  context 'when structure_only: true' do
20
46
  before do
21
47
  options.merge!(
@@ -46,9 +46,9 @@ describe Storey, "#create" do
46
46
 
47
47
  it "should copy the schema_migrations over" do
48
48
  Storey.create "foobar"
49
- public_schema_migrations = Storey.switch { ActiveRecord::Migrator.get_all_versions }
49
+ public_schema_migrations = Storey.switch { Storey::GetMigrationVersions.() }
50
50
  Storey.switch "foobar" do
51
- ActiveRecord::Migrator.get_all_versions.should == public_schema_migrations
51
+ Storey::GetMigrationVersions.().should == public_schema_migrations
52
52
  end
53
53
  end
54
54
 
@@ -43,9 +43,9 @@ describe Storey, "#duplicate!" do
43
43
  end
44
44
 
45
45
  it 'should copy all the schema_migrations over' do
46
- public_schema_migrations = Storey.switch { ActiveRecord::Migrator.get_all_versions }
46
+ public_schema_migrations = Storey.switch { Storey::GetMigrationVersions.() }
47
47
  Storey.switch 'bobby' do
48
- ActiveRecord::Migrator.get_all_versions.should == public_schema_migrations
48
+ Storey::GetMigrationVersions.().should == public_schema_migrations
49
49
  end
50
50
  end
51
51
  end
@@ -0,0 +1,42 @@
1
+ require 'spec_helper'
2
+
3
+ module Storey
4
+ RSpec.describe GetMigrationVersions do
5
+
6
+ before do
7
+ Storey.create("schema_1") do
8
+ ActiveRecord::SchemaMigration.create!(version: 123)
9
+ end
10
+
11
+ Storey.create("schema_2") do
12
+ ActiveRecord::SchemaMigration.create!(version: 200)
13
+ ActiveRecord::SchemaMigration.create!(version: 201)
14
+ end
15
+
16
+ Storey.create("schema_3") do
17
+ ActiveRecord::SchemaMigration.create!(version: 300)
18
+ ActiveRecord::SchemaMigration.create!(version: 301)
19
+ ActiveRecord::SchemaMigration.create!(version: 302)
20
+ end
21
+ end
22
+
23
+ context "given a schema" do
24
+ it "returns the migration versions in that schema and switches back the schema" do
25
+ expect(described_class.("schema_1")).to include(123)
26
+ expect(Storey).to be_default_schema
27
+ expect(described_class.("schema_3")).to include(300, 301, 302)
28
+ expect(Storey).to be_default_schema
29
+ end
30
+ end
31
+
32
+ context "without a schema" do
33
+ it "returns the migration version in the current schema" do
34
+ Storey.switch "schema_1"
35
+ expect(described_class.()).to include(123)
36
+ Storey.switch "schema_2"
37
+ expect(described_class.()).to include(200, 201)
38
+ end
39
+ end
40
+
41
+ end
42
+ end
@@ -4,9 +4,9 @@ describe Storey, '#schema_search_path_for' do
4
4
 
5
5
  context 'given a search path that is one of the persistent schemas' do
6
6
  Storey.persistent_schemas = %w(halla)
7
- Storey.schema_search_path_for('bola,halla').should == 'bola,halla'
7
+ Storey.schema_search_path_for('bola,halla').should == 'bola, halla'
8
8
  Storey.schema_search_path_for('halla').should == 'halla'
9
- Storey.schema_search_path_for('halla,bola').should == 'halla,bola'
9
+ Storey.schema_search_path_for('halla,bola').should == 'halla, bola'
10
10
  end
11
11
 
12
12
  end
@@ -5,6 +5,12 @@ describe Storey, "#schema" do
5
5
  Storey.schema.should == %{"$user",public}
6
6
  end
7
7
 
8
+ context "array: true" do
9
+ it "returns it as an array of strings" do
10
+ expect(Storey.schema(array: true)).to eq %w("$user" public)
11
+ end
12
+ end
13
+
8
14
  context "when a suffix is set" do
9
15
  before do
10
16
  Storey.suffix = "_rock"
@@ -36,15 +36,23 @@ describe Storey, "#schemas" do
36
36
  end
37
37
  end
38
38
 
39
- context "when :public => true" do
40
- it "should return an array of the schemas without the public schema" do
41
- Storey.schemas(:public => true).should include("public")
39
+ context "`:public` option" do
40
+ context "when `public: true`" do
41
+ it "returns an array of the schemas including the public schema" do
42
+ expect(Storey.schemas(public: true)).to include("public")
43
+ end
44
+ end
45
+
46
+ context "when `public: false`" do
47
+ it "returns an array of the schemas without the public schema" do
48
+ expect(Storey.schemas(public: false)).to_not include("public")
49
+ end
42
50
  end
43
- end
44
51
 
45
- context "when :public => false" do
46
- it "should return an array of the schemas with the public schema" do
47
- Storey.schemas(:public => false).should_not include("public")
52
+ context "when `public` is not set" do
53
+ it "returns an array of the schemas including the public schema" do
54
+ expect(Storey.schemas).to include("public")
55
+ end
48
56
  end
49
57
  end
50
58
 
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Storey::Suffixifier do
4
4
 
5
5
  describe '#suffixify' do
6
- subject do
6
+ subject(:schemas) do
7
7
  described_class.new(schema_name).suffixify
8
8
  end
9
9
 
@@ -20,11 +20,11 @@ describe Storey::Suffixifier do
20
20
  it { should == 'boom_suff' }
21
21
  end
22
22
 
23
- context 'when given comma separated schemas' do
24
- let(:schema_name) { '"$user",public,foo,bar,baz' }
23
+ context 'when given comma separated schemas (with inconsistent spaces)' do
24
+ let(:schema_name) { '"$user", public,foo, bar, baz' }
25
25
 
26
26
  it 'should return a comma separted schema string with the non-native schemas suffixified' do
27
- subject.should == '"$user",public,foo_suff,bar_suff,baz_suff'
27
+ subject.should == '"$user", public, foo_suff, bar_suff, baz_suff'
28
28
  end
29
29
  end
30
30
  end
@@ -136,10 +136,12 @@ describe Storey, "#switch" do
136
136
 
137
137
  it 'should switch to the schema with the persitent schemas still in the search path' do
138
138
  Storey.switch 'foobar'
139
- Storey.schema.should == %{foobar,handle,bar,foo}
139
+ expect(Storey.schema(array: true)).
140
+ to match_array %w(foobar handle bar foo)
140
141
 
141
142
  Storey.switch
142
- Storey.schema.should == %{"$user",public,handle,bar,foo}
143
+ expect(Storey.schema(array: true)).
144
+ to match_array %w("$user" public handle bar foo)
143
145
  end
144
146
  end
145
147
 
@@ -6,8 +6,8 @@ describe Storey, "rake tasks" do
6
6
  @migration_version_1 = 20120115060713
7
7
  @migration_version_2 = 20120115060728
8
8
 
9
- @number_of_dbs = rand(3) + 1
10
- @number_of_dbs.times do |db|
9
+ @number_of_schemas = rand(3) + 1
10
+ @number_of_schemas.times do |db|
11
11
  Storey.create "schema_#{db}"
12
12
  end
13
13
  end
@@ -15,21 +15,21 @@ describe Storey, "rake tasks" do
15
15
  describe "storey:migrate" do
16
16
  before do
17
17
  # We don't care how it's migrated
18
- ActiveRecord::Migrator.stub(:migrate)
18
+ Storey::Migrator.migrate_all
19
19
  end
20
20
 
21
21
  it "should migrate all schemas including public" do
22
22
  # +1 to take into account the public schema
23
- ActiveRecord::Migrator.should_receive(:migrate).exactly(@number_of_dbs + 1).times
23
+ Storey::Migrator.should_receive(:migrate).exactly(@number_of_schemas + 1).times
24
24
  @rake["storey:migrate"].invoke
25
25
  end
26
26
 
27
27
  context 'when a version is given' do
28
- it 'should migrate to the given version' do
28
+ it 'migrates to the given version for each schema' do
29
29
  ENV['VERSION'] = '3299329'
30
- ActiveRecord::Migrator.should_receive(:migrate).
31
- with(ActiveRecord::Migrator.migrations_path, 3299329).
32
- exactly(@number_of_dbs + 1).times
30
+ expect(Storey::Migrator).to receive(:migrate_all).
31
+ with(version: "3299329").
32
+ once
33
33
  @rake["storey:migrate"].invoke
34
34
  end
35
35
  end
@@ -57,7 +57,7 @@ describe Storey, "rake tasks" do
57
57
  :up,
58
58
  anything,
59
59
  @migration_version_2.to_i
60
- ).exactly(@number_of_dbs+1).times
60
+ ).exactly(@number_of_schemas+1).times
61
61
 
62
62
  @rake['storey:migrate:up'].invoke
63
63
  end
@@ -86,7 +86,7 @@ describe Storey, "rake tasks" do
86
86
  :down,
87
87
  anything,
88
88
  @migration_version_1
89
- ).exactly(@number_of_dbs+1).times
89
+ ).exactly(@number_of_schemas+1).times
90
90
 
91
91
  @rake['storey:migrate:down'].invoke
92
92
  end
@@ -94,12 +94,12 @@ describe Storey, "rake tasks" do
94
94
  end
95
95
 
96
96
  describe "storey:rollback" do
97
- it "should rollback dbs" do
97
+ it "should rollback schemas" do
98
98
  Storey::Migrator.should_receive(:rollback_all).once
99
99
  @rake['storey:rollback'].invoke
100
100
  end
101
101
 
102
- it "should rollback dbs STEP amt" do
102
+ it "should rollback schemas STEP amt" do
103
103
  step = 2
104
104
  Storey::Migrator.should_receive(:rollback_all).with(step).once
105
105
  ENV['STEP'] = step.to_s
data/storey.gemspec CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # specify any dependencies here; for example:
23
23
  s.add_development_dependency "rspec-rails"
24
- s.add_development_dependency "pg", "~> 0.12"
25
24
  s.add_development_dependency "database_cleaner"
26
25
  s.add_runtime_dependency 'easy_class_to_instance_method', '~> 0.0.2'
27
- s.add_runtime_dependency "rails", ">= 3.2.0"
26
+ s.add_runtime_dependency "rails", ">= 4.0.0"
27
+ s.add_runtime_dependency "pg"
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storey
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-07 00:00:00.000000000 Z
11
+ date: 2018-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: pg
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.12'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.12'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: database_cleaner
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +58,28 @@ dependencies:
72
58
  requirements:
73
59
  - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: 3.2.0
61
+ version: 4.0.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 4.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: pg
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 3.2.0
82
+ version: '0'
83
83
  description: Storey aims to simplify the implementation of managing a multi-tenant
84
84
  application.
85
85
  email:
@@ -98,16 +98,20 @@ files:
98
98
  - LICENSE.txt
99
99
  - README.md
100
100
  - Rakefile
101
- - gemfiles/rails_3.gemfile
102
- - gemfiles/rails_3.gemfile.lock
103
- - gemfiles/rails_4.gemfile
104
- - gemfiles/rails_4.gemfile.lock
101
+ - docker-compose.yml
102
+ - gemfiles/rails_5.0.gemfile
103
+ - gemfiles/rails_5.0.gemfile.lock
104
+ - gemfiles/rails_5.1.gemfile
105
+ - gemfiles/rails_5.1.gemfile.lock
106
+ - gemfiles/rails_5.2.gemfile
107
+ - gemfiles/rails_5.2.gemfile.lock
105
108
  - lib/storey.rb
106
109
  - lib/storey/builds_dump_command.rb
107
110
  - lib/storey/builds_load_command.rb
108
111
  - lib/storey/dumper.rb
109
112
  - lib/storey/duplicator.rb
110
113
  - lib/storey/exceptions.rb
114
+ - lib/storey/get_migration_versions.rb
111
115
  - lib/storey/hstore.rb
112
116
  - lib/storey/migrator.rb
113
117
  - lib/storey/native_schema_matcher.rb
@@ -175,6 +179,7 @@ files:
175
179
  - spec/storey/duplicate_spec.rb
176
180
  - spec/storey/duplicator_spec.rb
177
181
  - spec/storey/excluded_models_spec.rb
182
+ - spec/storey/get_migration_versions_spec.rb
178
183
  - spec/storey/hstore_spec.rb
179
184
  - spec/storey/native_schema_matcher_spec.rb
180
185
  - spec/storey/persistent_schemas_spec.rb
@@ -212,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
217
  version: '0'
213
218
  requirements: []
214
219
  rubyforge_project: storey
215
- rubygems_version: 2.2.2
220
+ rubygems_version: 2.7.3
216
221
  signing_key:
217
222
  specification_version: 4
218
223
  summary: Manage multiple PostgreSQL schemas in your multi-tenant app.
@@ -270,6 +275,7 @@ test_files:
270
275
  - spec/storey/duplicate_spec.rb
271
276
  - spec/storey/duplicator_spec.rb
272
277
  - spec/storey/excluded_models_spec.rb
278
+ - spec/storey/get_migration_versions_spec.rb
273
279
  - spec/storey/hstore_spec.rb
274
280
  - spec/storey/native_schema_matcher_spec.rb
275
281
  - spec/storey/persistent_schemas_spec.rb
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "pry"
6
- gem "appraisal"
7
- gem "rails", "3.2.14"
8
-
9
- gemspec :path => "../"