migration_tools 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/migration_tools/tasks.rb +10 -2
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 186b818e893c384f8783b66f2f981e8bda5b9c67
4
- data.tar.gz: 3f011c99b2d4956199b22220bb7b95245126b663
3
+ metadata.gz: 89a69b8e5e0dcc567f3f1c14f7342028e6285a3a
4
+ data.tar.gz: 64fe35e50f73698266eeb47543594205664d64bb
5
5
  SHA512:
6
- metadata.gz: 2879fa1ff51d4c2bd8202040b29b67ec0787d1d0add8c4d69b9ef720bc0fc94cba4ccf131deb34ca95dff44baf9a41d7881a0c35688fc4c729e1a547d95ff4b2
7
- data.tar.gz: a262efb9138e997f9502650d88542ad80ca9c6549d7eec13747098404c78c32fe52e80c27c6e97d8fb1688a29ed1765054cc67da5517cc404150b6b01f0da5fc
6
+ metadata.gz: 73ad48eab61b0aa13104a898f061c9b9ea85987ebfa074d4ecb7ebfe3519b4fbf89d0de93c5872b1239f6f1d72e789a22fad06a6f392ae4bd839d42eb67363d9
7
+ data.tar.gz: 61b9fd6b06721f65207759ea63b86773f4afa2f7763f5964ec74572c71ddb158864c14d21c808653492d5841a830ce1463b685be116feee179541b06e79b7f17
@@ -23,8 +23,16 @@ module MigrationTools
23
23
  ENV['GROUP'] = group
24
24
  end
25
25
 
26
+ def migrations_paths
27
+ if ActiveRecord::Migrator.respond_to?(:migrations_paths)
28
+ ActiveRecord::Migrator.migrations_paths
29
+ else
30
+ 'db/migrate'
31
+ end
32
+ end
33
+
26
34
  def migrator
27
- @migrator ||= ActiveRecord::Migrator.new(:up, 'db/migrate')
35
+ @migrator ||= ActiveRecord::Migrator.new(:up, migrations_paths)
28
36
  end
29
37
 
30
38
  def pending_migrations
@@ -64,7 +72,7 @@ module MigrationTools
64
72
  notify "Your database schema is up to date"
65
73
  else
66
74
  pending_migrations.each do |migration|
67
- ActiveRecord::Migrator.run(:up, 'db/migrate', migration.version)
75
+ ActiveRecord::Migrator.run(:up, migrations_paths, migration.version)
68
76
  end
69
77
 
70
78
  Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migration_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Primdahl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-02 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Rake tasks for Rails that add groups to migrations
@@ -43,17 +43,17 @@ require_paths:
43
43
  - lib
44
44
  required_ruby_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 2.0.3
56
+ rubygems_version: 2.2.2
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: Encourage migrations that do not require downtime