standalone_migrations 2.1.5 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWM3OTBhMzM0MDNhYmM1M2ZkZDIzNzQ1YjdjNGU2ZjgzNjQ1Y2M1Zg==
4
+ OWY1ZTQ2MGQyODA4Mzc0NzRjOTBlM2M5Y2JlNzQ0NTNjNmM2Yjk5Ng==
5
5
  data.tar.gz: !binary |-
6
- ZDQwZTMwZjA0NGE3ODg2NWExN2MxZjYyZWZhODY1YTk0NzM3YzcwZQ==
6
+ MWUzYzZkYjk0ZmZmMzM3ZjFkN2MyZWVjMGQ1ZWFlYWM3MGJhYTEyNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDY0YTU2MmI4MDcwMzNkMGUwYTg3YTQwNWUzZGFiZGM4Y2Y5ZDY0NDhmNjM5
10
- MjQ1N2M2MWY4NGU4MWZlMzY0NDNlNmNmOGY5ZjQxMWQ1MzY1NTllZWI3MDMz
11
- MDE2Y2NiNjg0ZDFkOGM2NTIwYjNiNzk3MGVlNmViMGUyODEzNDM=
9
+ NzNlZTY3ZDBkYjVkYjA0ZTcyMDIzMjkxODI0MzRiN2U1ZDIwNmY1MzYwNzg3
10
+ ODdmN2YwNmFkYTQxYzk5ZmFjMDQxODRjMDhmZmFlMjBiNDY2ZTZmMzE0YTcx
11
+ MzBkMjAwYTJkNDk1NzhiMzhkZjAzMTc3ZTBhYzViNjYxZjI5NTU=
12
12
  data.tar.gz: !binary |-
13
- MDgzOTMzODhlY2NiMDlkZWE4YzU5YTY4Y2Y3NzU1NDM4ZjE3ZDljM2FmYzJj
14
- NjhlODFjNzY4NjQ0NjhiYmE0M2UxNGFlMmUxYmY5Y2FiYWYxZDJmZmE2Nzcy
15
- YmY1YWEwNTdhNDdjNmM1OWE3OWFhNjcxMWMzZWRjM2Y4ZTYxMDk=
13
+ NjA0OGU2NTBmYTU3Mzc3NmM3NGQ2ZTY4MjUwNTVkMGM1MzI0NDQxN2QxMDI1
14
+ NzJhN2Y4N2JjYTRlNjQ0MDVhZWIwOWQ4MjA2NjE3OGQwZjZlMDBkYTAzMmU1
15
+ YTFhNGUyYTY0ODEzZGUzZThiMzQyMDc3YTBjM2EzODY3YjlkNzI=
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --profile
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
- - 1.9.2
4
+ - 2.2.0
5
5
  script: bundle exec rake specs:travis
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake', '~> 10.0'
4
- gem 'activerecord', ENV['AR'] || '~> 3.2'
5
- gem 'railties', ENV['AR'] || '~> 3.2'
4
+ gem 'activerecord', ENV['AR'] || '~> 4.2.0'
5
+ gem 'railties', ENV['AR'] || '~> 4.2.0'
6
6
 
7
7
  group :dev do
8
8
  gem 'sqlite3'
data/Gemfile.lock CHANGED
@@ -1,46 +1,53 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionpack (3.2.13)
5
- activemodel (= 3.2.13)
6
- activesupport (= 3.2.13)
7
- builder (~> 3.0.0)
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
- journey (~> 1.0.4)
10
- rack (~> 1.4.5)
11
- rack-cache (~> 1.2)
12
- rack-test (~> 0.6.1)
13
- sprockets (~> 2.2.1)
14
- activemodel (3.2.13)
15
- activesupport (= 3.2.13)
16
- builder (~> 3.0.0)
17
- activerecord (3.2.13)
18
- activemodel (= 3.2.13)
19
- activesupport (= 3.2.13)
20
- arel (~> 3.0.2)
21
- tzinfo (~> 0.3.29)
22
- activesupport (3.2.13)
23
- i18n (= 0.6.1)
24
- multi_json (~> 1.0)
25
- addressable (2.3.6)
26
- arel (3.0.2)
27
- builder (3.0.4)
28
- diff-lcs (1.1.3)
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.8.9)
31
- multipart-post (~> 1.2.0)
32
- git (1.2.6)
33
- github_api (0.10.2)
34
- addressable
35
- faraday (~> 0.8.7)
36
- hashie (>= 1.2)
37
- multi_json (~> 1.4)
38
- nokogiri (~> 1.6.0)
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 (2.1.1)
41
- highline (1.6.21)
42
- hike (1.2.1)
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
- journey (1.0.4)
54
- json (1.7.7)
55
- jwt (0.1.11)
56
- multi_json (>= 1.5)
57
- mini_portile (0.5.3)
58
- multi_json (1.7.1)
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 (1.2.0)
61
- nokogiri (1.6.1)
62
- mini_portile (~> 0.5.0)
63
- oauth2 (0.9.3)
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 (~> 0.1.8)
73
+ jwt (~> 1.0)
66
74
  multi_json (~> 1.3)
67
75
  multi_xml (~> 0.5)
68
76
  rack (~> 1.2)
69
- rack (1.4.5)
70
- rack-cache (1.2)
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
- railties (3.2.13)
77
- actionpack (= 3.2.13)
78
- activesupport (= 3.2.13)
79
- rack-ssl (~> 1.3.2)
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
- rdoc (~> 3.4)
82
- thor (>= 0.14.6, < 2.0)
83
- rake (10.2.2)
84
- rdoc (3.12.2)
85
- json (~> 1.4)
86
- rspec (2.7.0)
87
- rspec-core (~> 2.7.0)
88
- rspec-expectations (~> 2.7.0)
89
- rspec-mocks (~> 2.7.0)
90
- rspec-core (2.7.1)
91
- rspec-expectations (2.7.0)
92
- diff-lcs (~> 1.1.2)
93
- rspec-mocks (2.7.0)
94
- sprockets (2.2.2)
95
- hike (~> 1.2)
96
- multi_json (~> 1.0)
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 (~> 3.2)
113
+ activerecord (~> 4.2.0)
109
114
  jeweler
110
- railties (~> 3.2)
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 2.x release we have moved to using Rails 3 migrations instead of maintaining our own migration related code. Just about anything you can do with Rails 3 migrations you can now do with [Standalone Migrations](https://github.com/thuss/standalone-migrations) too! This removed 95% of the code we have to maintain. Big thanks to [Ricardo Valeriano](http://ricardovaleriano.com/) and [Michael Grosser](http://pragmatig.wordpress.com) for undertaking this major rewrite!
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.on_load do
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
- 2.1.5
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
- @environments_config ||= YAML.load(ERB.new(File.read(@standalone_configs)).result).with_indifferent_access
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 =~ /DOWN-xxx/
195
- result.should =~ /DOWN-yyy/
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 =~ /UP-xxx/
212
- result.should =~ /UP-yyy/
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 2.1.5 ruby lib
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 = "2.1.5"
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 = "2014-08-26"
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>, ["~> 3.2"])
63
- s.add_runtime_dependency(%q<railties>, ["~> 3.2"])
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>, ["~> 3.2"])
67
- s.add_dependency(%q<railties>, ["~> 3.2"])
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>, ["~> 3.2"])
72
- s.add_dependency(%q<railties>, ["~> 3.2"])
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: 2.1.5
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: 2014-08-26 00:00:00.000000000 Z
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: '3.2'
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: '3.2'
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: '3.2'
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: '3.2'
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