standalone_migrations 5.0.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b640177349b47a8904146d2f384d09a7331b4d2b
4
- data.tar.gz: f323ddaf24bba9f31fe7f1be9bfb146f09c327c3
3
+ metadata.gz: f0857768f92ba94ec01b7adc33a3d03562aa2b0e
4
+ data.tar.gz: b92b3c837151e3f13fa72767ecb6ab7a951002ac
5
5
  SHA512:
6
- metadata.gz: 182fa86bf13c7ba8acd43941953793225dd7922d92a173bb7fa17dc4c9aaf8b2af00f2292ef600e80831bf500b4b7db1eaae1ccbac83a6f19bc53622c294b6fc
7
- data.tar.gz: a630e75e91e70282f237ff5198390f15a7bcb27e6fe5ac914f3d17b1cd1c0482670a29015e0afea9f168230cbe18b904c6512d1b4ccf9266d9aace1e18ccbca7
6
+ metadata.gz: dce97ca4b488a481ba8cd0a471399448e57a240679061b1014be36bd72cdc9bd3d5c82bc57db7ba5c8facd20f3bc74443ff65d0b7c859f9eaa25179bc7c16bb4
7
+ data.tar.gz: e81b9c2198fa31bd8800a519d3c7bdfa3fca1f464ba57b9ddfad84af2e9f07595d37d4476af08c58985443ca6b8d5df119f31e266781449f465a60be0b3fa060
data/.travis.yml CHANGED
@@ -1,4 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.2
4
+ env:
5
+ - AR="~> 4.2.0" NOKOGIRI_USE_SYSTEM_LIBRARIES=1
6
+ - AR="~> 5.0.0" NOKOGIRI_USE_SYSTEM_LIBRARIES=1
7
+ - AR=">= 5.1.0.rc2,< 5.2" NOKOGIRI_USE_SYSTEM_LIBRARIES=1
4
8
  script: bundle exec rake specs:travis
data/Gemfile CHANGED
@@ -1,11 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake', '~> 10.0'
4
- gem 'activerecord', ENV['AR'] || [">= 4.2.7", "< 5.1.0"]
5
- gem 'railties', ENV['AR'] || [">= 4.2.7", "< 5.1.0"]
4
+ gem 'activerecord', ENV['AR'] ? ENV['AR'].split(",") : [">= 4.2.7", "< 5.2.0"]
5
+ gem 'railties', ENV['AR'] ? ENV['AR'].split(",") : [">= 4.2.7", "< 5.2.0"]
6
6
 
7
7
  group :dev do
8
8
  gem 'sqlite3'
9
- gem 'rspec', '~>2'
9
+ gem 'rspec', '~> 2.0'
10
10
  gem 'jeweler'
11
11
  end
data/README.markdown CHANGED
@@ -4,7 +4,7 @@ Rails migrations in non-Rails (and non Ruby) projects.
4
4
 
5
5
  WHAT'S NEW
6
6
  ==========
7
- In the 5.x release we have moved to using Rails 5 migrations instead of maintaining our own migration related code. Just about anything you can do with Rails 5 migrations you can now do with [Standalone Migrations](https://github.com/thuss/standalone-migrations) too!
7
+ In the 5.x release we have moved to using Rails 5 migrations instead of maintaining our own migration related code. Just about anything you can do with Rails 5 migrations you can now do with [Standalone Migrations](https://github.com/thuss/standalone-migrations) too!
8
8
 
9
9
  CONTRIBUTE
10
10
  ==========
@@ -134,10 +134,10 @@ app/
134
134
  | |-- migrate/
135
135
  | | |-- db1/
136
136
  | | | |-- 001_migration.rb
137
- | | |
137
+ | | |
138
138
  | | |-- db2/
139
139
  | | |-- 001_migration.rb
140
- | |
140
+ | |
141
141
  | |-- config_db1.yml
142
142
  | |-- config_db2.yml
143
143
  | |-- seeds_db1.rb
@@ -262,3 +262,4 @@ Contributors
262
262
  - [Marcell Jusztin](http://www.morcmarc.com)
263
263
  - [Eric Hayes](http://ejhay.es)
264
264
  - [Yi Wen](https://github.com/ywen)
265
+ - [Jonathan Rochkind](https://github.com/jrochkind)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0
1
+ 5.2.0
@@ -1,4 +1,4 @@
1
- class CreateTableAwesomeMigration < ActiveRecord::Migration
1
+ class CreateTableAwesomeMigration < ActiveRecord::Migration[5.0]
2
2
  def up
3
3
  end
4
4
 
@@ -24,7 +24,7 @@ module StandaloneMigrations
24
24
  # invoke the callbacks
25
25
  StandaloneMigrations.run_on_load_callbacks
26
26
 
27
- callback_was_called.should be_true
27
+ callback_was_called.should be true
28
28
  end
29
29
 
30
30
  it "can pass multiple blocks to on_loaded" do
@@ -45,4 +45,4 @@ module StandaloneMigrations
45
45
 
46
46
  end
47
47
 
48
- end
48
+ end
@@ -52,9 +52,15 @@ end
52
52
  end
53
53
 
54
54
  def write_multiple_migrations
55
+ migration_superclass = if Rails::VERSION::MAJOR >= 5
56
+ "ActiveRecord::Migration[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
57
+ else
58
+ "ActiveRecord::Migration"
59
+ end
60
+
55
61
  write_rakefile %{t.migrations = "db/migrations", "db/migrations2"}
56
62
  write "db/migrate/20100509095815_create_tests.rb", <<-TXT
57
- class CreateTests < ActiveRecord::Migration
63
+ class CreateTests < #{migration_superclass}
58
64
  def up
59
65
  puts "UP-CreateTests"
60
66
  end
@@ -65,7 +71,7 @@ class CreateTests < ActiveRecord::Migration
65
71
  end
66
72
  TXT
67
73
  write "db/migrate/20100509095816_create_tests2.rb", <<-TXT
68
- class CreateTests2 < ActiveRecord::Migration
74
+ class CreateTests2 < #{migration_superclass}
69
75
  def up
70
76
  puts "UP-CreateTests2"
71
77
  end
@@ -118,10 +124,10 @@ test:
118
124
  connection_established = true
119
125
  end
120
126
  StandaloneMigrations.should_receive(:run_on_load_callbacks) do
121
- connection_established.should be_true
127
+ connection_established.should be true
122
128
  end
123
129
 
124
- Dir.chdir(File.join(File.dirname(__FILE__), "tmp")) do
130
+ Dir.chdir(File.join(File.dirname(__FILE__), "tmp")) do
125
131
  load "Rakefile"
126
132
  Rake::Task['standalone:connection'].invoke
127
133
  end
@@ -137,7 +143,7 @@ test:
137
143
  run("rake db:new_migration name=test_abc_env").should =~ %r{create(.*)db/migrate/\d+_test_abc_env\.rb}
138
144
  run("ls db/migrate").should =~ /^\d+_test_abc_env.rb$/
139
145
  end
140
-
146
+
141
147
  it "generates a new migration with this name from args and timestamp" do
142
148
  run("rake db:new_migration[test_abc_args]").should =~ %r{create(.*)db/migrate/\d+_test_abc_args\.rb}
143
149
  run("ls db/migrate").should =~ /^\d+_test_abc_args.rb$/
@@ -197,7 +203,9 @@ test:
197
203
 
198
204
  it "fails without version" do
199
205
  make_migration('yyy')
200
- lambda{ run("rake db:migrate:down") }.should raise_error(/VERSION/)
206
+ # Rails has a bug where it's sending a bad failure exception
207
+ # https://github.com/rails/rails/issues/28905
208
+ lambda{ run("rake db:migrate:down") }.should raise_error(/VERSION|version/)
201
209
  end
202
210
  end
203
211
 
@@ -214,7 +222,9 @@ test:
214
222
 
215
223
  it "fails without version" do
216
224
  make_migration('yyy')
217
- lambda{ run("rake db:migrate:up") }.should raise_error(/VERSION/)
225
+ # Rails has a bug where it's sending a bad failure exception
226
+ # https://github.com/rails/rails/issues/28905
227
+ lambda{ run("rake db:migrate:up") }.should raise_error(/VERSION|version/)
218
228
  end
219
229
  end
220
230
 
@@ -333,7 +343,7 @@ test:
333
343
  it "should not error when a seeds file does not exist" do
334
344
  make_migration('yyy')
335
345
  run('rake db:migrate DB=test')
336
- run("rake db:reset").should_not raise_error(/rake aborted/)
346
+ lambda{ run("rake db:reset") }.should_not raise_error
337
347
  end
338
348
  end
339
349
 
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: standalone_migrations 5.0.0 ruby lib
5
+ # stub: standalone_migrations 5.2.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "standalone_migrations"
9
- s.version = "5.0.0"
9
+ s.version = "5.2.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Todd Huss", "Michael Grosser"]
14
- s.date = "2016-08-09"
14
+ s.date = "2017-04-27"
15
15
  s.email = "thuss@gabrito.com"
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE",
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  ".rspec",
22
22
  ".travis.yml",
23
23
  "Gemfile",
24
- "Gemfile.lock",
25
24
  "LICENSE",
26
25
  "README.markdown",
27
26
  "Rakefile",
@@ -60,17 +59,17 @@ Gem::Specification.new do |s|
60
59
 
61
60
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
62
61
  s.add_runtime_dependency(%q<rake>, ["~> 10.0"])
63
- s.add_runtime_dependency(%q<activerecord>, ["< 5.1.0", ">= 4.2.7"])
64
- s.add_runtime_dependency(%q<railties>, ["< 5.1.0", ">= 4.2.7"])
62
+ s.add_runtime_dependency(%q<activerecord>, ["< 5.2.0", ">= 4.2.7"])
63
+ s.add_runtime_dependency(%q<railties>, ["< 5.2.0", ">= 4.2.7"])
65
64
  else
66
65
  s.add_dependency(%q<rake>, ["~> 10.0"])
67
- s.add_dependency(%q<activerecord>, ["< 5.1.0", ">= 4.2.7"])
68
- s.add_dependency(%q<railties>, ["< 5.1.0", ">= 4.2.7"])
66
+ s.add_dependency(%q<activerecord>, ["< 5.2.0", ">= 4.2.7"])
67
+ s.add_dependency(%q<railties>, ["< 5.2.0", ">= 4.2.7"])
69
68
  end
70
69
  else
71
70
  s.add_dependency(%q<rake>, ["~> 10.0"])
72
- s.add_dependency(%q<activerecord>, ["< 5.1.0", ">= 4.2.7"])
73
- s.add_dependency(%q<railties>, ["< 5.1.0", ">= 4.2.7"])
71
+ s.add_dependency(%q<activerecord>, ["< 5.2.0", ">= 4.2.7"])
72
+ s.add_dependency(%q<railties>, ["< 5.2.0", ">= 4.2.7"])
74
73
  end
75
74
  end
76
75
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standalone_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Huss
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-09 00:00:00.000000000 Z
12
+ date: 2017-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: 5.1.0
34
+ version: 5.2.0
35
35
  - - ">="
36
36
  - !ruby/object:Gem::Version
37
37
  version: 4.2.7
@@ -41,7 +41,7 @@ dependencies:
41
41
  requirements:
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
- version: 5.1.0
44
+ version: 5.2.0
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.2.7
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: 5.1.0
54
+ version: 5.2.0
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: 4.2.7
@@ -61,7 +61,7 @@ dependencies:
61
61
  requirements:
62
62
  - - "<"
63
63
  - !ruby/object:Gem::Version
64
- version: 5.1.0
64
+ version: 5.2.0
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: 4.2.7
@@ -76,7 +76,6 @@ files:
76
76
  - ".rspec"
77
77
  - ".travis.yml"
78
78
  - Gemfile
79
- - Gemfile.lock
80
79
  - LICENSE
81
80
  - README.markdown
82
81
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,122 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- actionpack (5.0.0)
5
- actionview (= 5.0.0)
6
- activesupport (= 5.0.0)
7
- rack (~> 2.0)
8
- rack-test (~> 0.6.3)
9
- rails-dom-testing (~> 2.0)
10
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
11
- actionview (5.0.0)
12
- activesupport (= 5.0.0)
13
- builder (~> 3.1)
14
- erubis (~> 2.7.0)
15
- rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
- activemodel (5.0.0)
18
- activesupport (= 5.0.0)
19
- activerecord (5.0.0)
20
- activemodel (= 5.0.0)
21
- activesupport (= 5.0.0)
22
- arel (~> 7.0)
23
- activesupport (5.0.0)
24
- concurrent-ruby (~> 1.0, >= 1.0.2)
25
- i18n (~> 0.7)
26
- minitest (~> 5.1)
27
- tzinfo (~> 1.1)
28
- addressable (2.4.0)
29
- arel (7.1.1)
30
- builder (3.2.2)
31
- concurrent-ruby (1.0.2)
32
- descendants_tracker (0.0.4)
33
- thread_safe (~> 0.3, >= 0.3.1)
34
- diff-lcs (1.2.5)
35
- erubis (2.7.0)
36
- faraday (0.9.2)
37
- multipart-post (>= 1.2, < 3)
38
- git (1.3.0)
39
- github_api (0.14.5)
40
- addressable (~> 2.4.0)
41
- descendants_tracker (~> 0.0.4)
42
- faraday (~> 0.8, < 0.10)
43
- hashie (>= 3.4)
44
- oauth2 (~> 1.0)
45
- hashie (3.4.4)
46
- highline (1.7.8)
47
- i18n (0.7.0)
48
- jeweler (2.1.1)
49
- builder
50
- bundler (>= 1.0)
51
- git (>= 1.2.5)
52
- github_api
53
- highline (>= 1.6.15)
54
- nokogiri (>= 1.5.10)
55
- rake
56
- rdoc
57
- semver
58
- json (1.8.3)
59
- jwt (1.5.4)
60
- loofah (2.0.3)
61
- nokogiri (>= 1.5.9)
62
- method_source (0.8.2)
63
- mini_portile2 (2.1.0)
64
- minitest (5.9.0)
65
- multi_json (1.12.1)
66
- multi_xml (0.5.5)
67
- multipart-post (2.0.0)
68
- nokogiri (1.6.8)
69
- mini_portile2 (~> 2.1.0)
70
- pkg-config (~> 1.1.7)
71
- oauth2 (1.2.0)
72
- faraday (>= 0.8, < 0.10)
73
- jwt (~> 1.0)
74
- multi_json (~> 1.3)
75
- multi_xml (~> 0.5)
76
- rack (>= 1.2, < 3)
77
- pkg-config (1.1.7)
78
- rack (2.0.1)
79
- rack-test (0.6.3)
80
- rack (>= 1.0)
81
- rails-dom-testing (2.0.1)
82
- activesupport (>= 4.2.0, < 6.0)
83
- nokogiri (~> 1.6.0)
84
- rails-html-sanitizer (1.0.3)
85
- loofah (~> 2.0)
86
- railties (5.0.0)
87
- actionpack (= 5.0.0)
88
- activesupport (= 5.0.0)
89
- method_source
90
- rake (>= 0.8.7)
91
- thor (>= 0.18.1, < 2.0)
92
- rake (10.5.0)
93
- rdoc (4.2.2)
94
- json (~> 1.4)
95
- rspec (2.99.0)
96
- rspec-core (~> 2.99.0)
97
- rspec-expectations (~> 2.99.0)
98
- rspec-mocks (~> 2.99.0)
99
- rspec-core (2.99.2)
100
- rspec-expectations (2.99.2)
101
- diff-lcs (>= 1.1.3, < 2.0)
102
- rspec-mocks (2.99.4)
103
- semver (1.0.1)
104
- sqlite3 (1.3.11)
105
- thor (0.19.1)
106
- thread_safe (0.3.5)
107
- tzinfo (1.2.2)
108
- thread_safe (~> 0.1)
109
-
110
- PLATFORMS
111
- ruby
112
-
113
- DEPENDENCIES
114
- activerecord (>= 4.2.7, < 5.1.0)
115
- jeweler
116
- railties (>= 4.2.7, < 5.1.0)
117
- rake (~> 10.0)
118
- rspec (~> 2)
119
- sqlite3
120
-
121
- BUNDLED WITH
122
- 1.12.5