standalone_migrations 2.1.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.rspec +2 -0
- data/.travis.yml +1 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +87 -82
- data/README.markdown +3 -5
- data/VERSION +1 -1
- data/lib/standalone_migrations/configurator.rb +5 -1
- data/spec/standalone_migrations_spec.rb +6 -5
- data/standalone_migrations.gemspec +10 -9
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
OWY1ZTQ2MGQyODA4Mzc0NzRjOTBlM2M5Y2JlNzQ0NTNjNmM2Yjk5Ng==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MWUzYzZkYjk0ZmZmMzM3ZjFkN2MyZWVjMGQ1ZWFlYWM3MGJhYTEyNw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NzNlZTY3ZDBkYjVkYjA0ZTcyMDIzMjkxODI0MzRiN2U1ZDIwNmY1MzYwNzg3
|
|
10
|
+
ODdmN2YwNmFkYTQxYzk5ZmFjMDQxODRjMDhmZmFlMjBiNDY2ZTZmMzE0YTcx
|
|
11
|
+
MzBkMjAwYTJkNDk1NzhiMzhkZjAzMTc3ZTBhYzViNjYxZjI5NTU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NjA0OGU2NTBmYTU3Mzc3NmM3NGQ2ZTY4MjUwNTVkMGM1MzI0NDQxN2QxMDI1
|
|
14
|
+
NzJhN2Y4N2JjYTRlNjQ0MDVhZWIwOWQ4MjA2NjE3OGQwZjZlMDBkYTAzMmU1
|
|
15
|
+
YTFhNGUyYTY0ODEzZGUzZThiMzQyMDc3YTBjM2EzODY3YjlkNzI=
|
data/.rspec
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
actionpack (
|
|
5
|
-
|
|
6
|
-
activesupport (=
|
|
7
|
-
|
|
4
|
+
actionpack (4.2.0)
|
|
5
|
+
actionview (= 4.2.0)
|
|
6
|
+
activesupport (= 4.2.0)
|
|
7
|
+
rack (~> 1.6.0)
|
|
8
|
+
rack-test (~> 0.6.2)
|
|
9
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
10
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
|
11
|
+
actionview (4.2.0)
|
|
12
|
+
activesupport (= 4.2.0)
|
|
13
|
+
builder (~> 3.1)
|
|
8
14
|
erubis (~> 2.7.0)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
|
17
|
+
activemodel (4.2.0)
|
|
18
|
+
activesupport (= 4.2.0)
|
|
19
|
+
builder (~> 3.1)
|
|
20
|
+
activerecord (4.2.0)
|
|
21
|
+
activemodel (= 4.2.0)
|
|
22
|
+
activesupport (= 4.2.0)
|
|
23
|
+
arel (~> 6.0)
|
|
24
|
+
activesupport (4.2.0)
|
|
25
|
+
i18n (~> 0.7)
|
|
26
|
+
json (~> 1.7, >= 1.7.7)
|
|
27
|
+
minitest (~> 5.1)
|
|
28
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
29
|
+
tzinfo (~> 1.1)
|
|
30
|
+
addressable (2.3.7)
|
|
31
|
+
arel (6.0.0)
|
|
32
|
+
builder (3.2.2)
|
|
33
|
+
descendants_tracker (0.0.4)
|
|
34
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
|
35
|
+
diff-lcs (1.2.5)
|
|
29
36
|
erubis (2.7.0)
|
|
30
|
-
faraday (0.
|
|
31
|
-
multipart-post (
|
|
32
|
-
git (1.2.
|
|
33
|
-
github_api (0.
|
|
34
|
-
addressable
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
faraday (0.9.1)
|
|
38
|
+
multipart-post (>= 1.2, < 3)
|
|
39
|
+
git (1.2.9.1)
|
|
40
|
+
github_api (0.12.3)
|
|
41
|
+
addressable (~> 2.3)
|
|
42
|
+
descendants_tracker (~> 0.0.4)
|
|
43
|
+
faraday (~> 0.8, < 0.10)
|
|
44
|
+
hashie (>= 3.3)
|
|
45
|
+
multi_json (>= 1.7.5, < 2.0)
|
|
46
|
+
nokogiri (~> 1.6.3)
|
|
39
47
|
oauth2
|
|
40
|
-
hashie (
|
|
41
|
-
highline (1.
|
|
42
|
-
|
|
43
|
-
i18n (0.6.1)
|
|
48
|
+
hashie (3.4.0)
|
|
49
|
+
highline (1.7.1)
|
|
50
|
+
i18n (0.7.0)
|
|
44
51
|
jeweler (2.0.1)
|
|
45
52
|
builder
|
|
46
53
|
bundler (>= 1.0)
|
|
@@ -50,64 +57,62 @@ GEM
|
|
|
50
57
|
nokogiri (>= 1.5.10)
|
|
51
58
|
rake
|
|
52
59
|
rdoc
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
mini_portile (0.
|
|
58
|
-
|
|
60
|
+
json (1.8.2)
|
|
61
|
+
jwt (1.4.1)
|
|
62
|
+
loofah (2.0.1)
|
|
63
|
+
nokogiri (>= 1.5.9)
|
|
64
|
+
mini_portile (0.6.2)
|
|
65
|
+
minitest (5.5.1)
|
|
66
|
+
multi_json (1.11.0)
|
|
59
67
|
multi_xml (0.5.5)
|
|
60
|
-
multipart-post (
|
|
61
|
-
nokogiri (1.6.
|
|
62
|
-
mini_portile (~> 0.
|
|
63
|
-
oauth2 (0.
|
|
68
|
+
multipart-post (2.0.0)
|
|
69
|
+
nokogiri (1.6.6.2)
|
|
70
|
+
mini_portile (~> 0.6.0)
|
|
71
|
+
oauth2 (1.0.0)
|
|
64
72
|
faraday (>= 0.8, < 0.10)
|
|
65
|
-
jwt (~>
|
|
73
|
+
jwt (~> 1.0)
|
|
66
74
|
multi_json (~> 1.3)
|
|
67
75
|
multi_xml (~> 0.5)
|
|
68
76
|
rack (~> 1.2)
|
|
69
|
-
rack (1.
|
|
70
|
-
rack-
|
|
71
|
-
rack (>= 0.4)
|
|
72
|
-
rack-ssl (1.3.3)
|
|
73
|
-
rack
|
|
74
|
-
rack-test (0.6.2)
|
|
77
|
+
rack (1.6.0)
|
|
78
|
+
rack-test (0.6.3)
|
|
75
79
|
rack (>= 1.0)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
rails-deprecated_sanitizer (1.0.3)
|
|
81
|
+
activesupport (>= 4.2.0.alpha)
|
|
82
|
+
rails-dom-testing (1.0.6)
|
|
83
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
|
84
|
+
nokogiri (~> 1.6.0)
|
|
85
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
|
86
|
+
rails-html-sanitizer (1.0.2)
|
|
87
|
+
loofah (~> 2.0)
|
|
88
|
+
railties (4.2.0)
|
|
89
|
+
actionpack (= 4.2.0)
|
|
90
|
+
activesupport (= 4.2.0)
|
|
80
91
|
rake (>= 0.8.7)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
rspec-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
rspec-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
rack (~> 1.0)
|
|
98
|
-
tilt (~> 1.1, != 1.3.0)
|
|
99
|
-
sqlite3 (1.3.6)
|
|
100
|
-
thor (0.17.0)
|
|
101
|
-
tilt (1.3.6)
|
|
102
|
-
tzinfo (0.3.37)
|
|
92
|
+
thor (>= 0.18.1, < 2.0)
|
|
93
|
+
rake (10.4.2)
|
|
94
|
+
rdoc (4.2.0)
|
|
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.3)
|
|
103
|
+
sqlite3 (1.3.10)
|
|
104
|
+
thor (0.19.1)
|
|
105
|
+
thread_safe (0.3.5)
|
|
106
|
+
tzinfo (1.2.2)
|
|
107
|
+
thread_safe (~> 0.1)
|
|
103
108
|
|
|
104
109
|
PLATFORMS
|
|
105
110
|
ruby
|
|
106
111
|
|
|
107
112
|
DEPENDENCIES
|
|
108
|
-
activerecord (~>
|
|
113
|
+
activerecord (~> 4.2.0)
|
|
109
114
|
jeweler
|
|
110
|
-
railties (~>
|
|
115
|
+
railties (~> 4.2.0)
|
|
111
116
|
rake (~> 10.0)
|
|
112
117
|
rspec (~> 2)
|
|
113
118
|
sqlite3
|
data/README.markdown
CHANGED
|
@@ -2,7 +2,7 @@ Rails migrations in non-Rails (and non Ruby) projects.
|
|
|
2
2
|
|
|
3
3
|
WHAT'S NEW
|
|
4
4
|
==========
|
|
5
|
-
In the
|
|
5
|
+
In the 4.x release we have moved to using Rails 4 migrations instead of maintaining our own migration related code. Just about anything you can do with Rails 4 migrations you can now do with [Standalone Migrations](https://github.com/thuss/standalone-migrations) too!
|
|
6
6
|
|
|
7
7
|
CONTRIBUTE
|
|
8
8
|
==========
|
|
@@ -114,7 +114,7 @@ If you would like to use an external library such as [foreigner](https://github.
|
|
|
114
114
|
```ruby
|
|
115
115
|
require 'foreigner'
|
|
116
116
|
|
|
117
|
-
StandaloneMigrations.
|
|
117
|
+
StandaloneMigrations.on_loaded do
|
|
118
118
|
Foreigner.load
|
|
119
119
|
end
|
|
120
120
|
```
|
|
@@ -247,7 +247,6 @@ Contributors
|
|
|
247
247
|
- [Michael Grosser](http://pragmatig.wordpress.com)
|
|
248
248
|
- [Ricardo Valeriano](http://ricardovaleriano.com/)
|
|
249
249
|
- [Two Bit Labs](http://twobitlabs.com/)
|
|
250
|
-
- [ClassMonkeys](http://www.classmonkeys.com/)
|
|
251
250
|
- [Windandtides](http://windandtides.com/)
|
|
252
251
|
- [Eric Lindvall](http://bitmonkey.net)
|
|
253
252
|
- [Steve Hodgkiss](http://stevehodgkiss.com/)
|
|
@@ -261,5 +260,4 @@ Contributors
|
|
|
261
260
|
- [Parker Moore](http://www.parkermoore.de/)
|
|
262
261
|
- [Marcell Jusztin](http://www.morcmarc.com)
|
|
263
262
|
- [Eric Hayes](http://ejhay.es)
|
|
264
|
-
|
|
265
|
-
This work is originally based on [Lincoln Stoll's blog post](http://lstoll.net/2008/04/stand-alone-activerecord-migrations/) and [David Welton's post](http://journal.dedasys.com/2007/01/28/using-migrations-outside-of-rails).
|
|
263
|
+
- [Yi Wen](https://github.com/ywen)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.0
|
|
@@ -20,7 +20,11 @@ module StandaloneMigrations
|
|
|
20
20
|
class Configurator
|
|
21
21
|
def self.load_configurations
|
|
22
22
|
@standalone_configs ||= Configurator.new.config
|
|
23
|
-
|
|
23
|
+
if url = ENV['DATABASE_URL']
|
|
24
|
+
@environments_config = {url: url}
|
|
25
|
+
else
|
|
26
|
+
@environments_config ||= YAML.load(ERB.new(File.read(@standalone_configs)).result).with_indifferent_access
|
|
27
|
+
end
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def self.environments_config
|
|
@@ -44,6 +44,7 @@ describe 'Standalone migrations' do
|
|
|
44
44
|
$LOAD_PATH.unshift '#{File.expand_path('lib')}'
|
|
45
45
|
begin
|
|
46
46
|
require "standalone_migrations"
|
|
47
|
+
ActiveRecord::Tasks::DatabaseTasks.database_configuration = YAML.load_file('db/config.yml')
|
|
47
48
|
StandaloneMigrations::Tasks.load_tasks
|
|
48
49
|
rescue LoadError => e
|
|
49
50
|
puts "gem install standalone_migrations to get db:migrate:* tasks! (Error: \#{e})"
|
|
@@ -99,7 +100,7 @@ test:
|
|
|
99
100
|
warning = /DEPRECATED.* db\/migrate/
|
|
100
101
|
run("rake db:create").should_not =~ warning
|
|
101
102
|
write('db/migrations/fooo.rb', 'xxx')
|
|
102
|
-
run("rake db:create").should =~ warning
|
|
103
|
+
run("rake db:create --trace").should =~ warning
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
describe 'db:create and drop' do
|
|
@@ -191,8 +192,8 @@ test:
|
|
|
191
192
|
run 'rake db:migrate'
|
|
192
193
|
|
|
193
194
|
result = run("rake db:migrate:down VERSION=#{version}")
|
|
194
|
-
result.should_not =~ /
|
|
195
|
-
result.should =~ /
|
|
195
|
+
result.should_not =~ /Xxx: reverting/
|
|
196
|
+
result.should =~ /Yyy: reverting/
|
|
196
197
|
end
|
|
197
198
|
|
|
198
199
|
it "fails without version" do
|
|
@@ -208,8 +209,8 @@ test:
|
|
|
208
209
|
sleep 1
|
|
209
210
|
version = make_migration('yyy')
|
|
210
211
|
result = run("rake db:migrate:up VERSION=#{version}")
|
|
211
|
-
result.should_not =~ /
|
|
212
|
-
result.should =~ /
|
|
212
|
+
result.should_not =~ /Xxx: migrating/
|
|
213
|
+
result.should =~ /Yyy: migrating/
|
|
213
214
|
end
|
|
214
215
|
|
|
215
216
|
it "fails without version" do
|
|
@@ -2,22 +2,23 @@
|
|
|
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
|
+
# stub: standalone_migrations 4.0.0 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "standalone_migrations"
|
|
9
|
-
s.version = "
|
|
9
|
+
s.version = "4.0.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 = "
|
|
14
|
+
s.date = "2015-03-19"
|
|
15
15
|
s.email = "thuss@gabrito.com"
|
|
16
16
|
s.extra_rdoc_files = [
|
|
17
17
|
"LICENSE",
|
|
18
18
|
"README.markdown"
|
|
19
19
|
]
|
|
20
20
|
s.files = [
|
|
21
|
+
".rspec",
|
|
21
22
|
".travis.yml",
|
|
22
23
|
"Gemfile",
|
|
23
24
|
"Gemfile.lock",
|
|
@@ -59,17 +60,17 @@ Gem::Specification.new do |s|
|
|
|
59
60
|
|
|
60
61
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
61
62
|
s.add_runtime_dependency(%q<rake>, ["~> 10.0"])
|
|
62
|
-
s.add_runtime_dependency(%q<activerecord>, ["~>
|
|
63
|
-
s.add_runtime_dependency(%q<railties>, ["~>
|
|
63
|
+
s.add_runtime_dependency(%q<activerecord>, ["~> 4.2.0"])
|
|
64
|
+
s.add_runtime_dependency(%q<railties>, ["~> 4.2.0"])
|
|
64
65
|
else
|
|
65
66
|
s.add_dependency(%q<rake>, ["~> 10.0"])
|
|
66
|
-
s.add_dependency(%q<activerecord>, ["~>
|
|
67
|
-
s.add_dependency(%q<railties>, ["~>
|
|
67
|
+
s.add_dependency(%q<activerecord>, ["~> 4.2.0"])
|
|
68
|
+
s.add_dependency(%q<railties>, ["~> 4.2.0"])
|
|
68
69
|
end
|
|
69
70
|
else
|
|
70
71
|
s.add_dependency(%q<rake>, ["~> 10.0"])
|
|
71
|
-
s.add_dependency(%q<activerecord>, ["~>
|
|
72
|
-
s.add_dependency(%q<railties>, ["~>
|
|
72
|
+
s.add_dependency(%q<activerecord>, ["~> 4.2.0"])
|
|
73
|
+
s.add_dependency(%q<railties>, ["~> 4.2.0"])
|
|
73
74
|
end
|
|
74
75
|
end
|
|
75
76
|
|
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:
|
|
4
|
+
version: 4.0.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:
|
|
12
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -31,28 +31,28 @@ dependencies:
|
|
|
31
31
|
requirements:
|
|
32
32
|
- - ~>
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version:
|
|
34
|
+
version: 4.2.0
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - ~>
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version:
|
|
41
|
+
version: 4.2.0
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: railties
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
46
|
- - ~>
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version:
|
|
48
|
+
version: 4.2.0
|
|
49
49
|
type: :runtime
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - ~>
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version:
|
|
55
|
+
version: 4.2.0
|
|
56
56
|
description:
|
|
57
57
|
email: thuss@gabrito.com
|
|
58
58
|
executables: []
|
|
@@ -61,6 +61,7 @@ extra_rdoc_files:
|
|
|
61
61
|
- LICENSE
|
|
62
62
|
- README.markdown
|
|
63
63
|
files:
|
|
64
|
+
- .rspec
|
|
64
65
|
- .travis.yml
|
|
65
66
|
- Gemfile
|
|
66
67
|
- Gemfile.lock
|