guard-migrate 1.0.4 → 1.1.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: 3978c547f56536dc0f65401d70e8f11b2736f66a
4
- data.tar.gz: 31200b8768ef823b1479bf16ffa0e1cbe94ea78b
3
+ metadata.gz: 01e51995bff8759625b0385ba4bfe5d41bece453
4
+ data.tar.gz: 53de8f5bef5d0f3aeb8791031bd102b70a98be45
5
5
  SHA512:
6
- metadata.gz: 542cac950167cbb5e950118f72d32bdad76b6016be0a5ab5bc8c9b61e52c3f4b88b74bdfc96791f0ce1856a126487a5e66c55e29c20567270aba72cd4cb8150b
7
- data.tar.gz: 31cadc7674043cf7512b776baf4332726cf55803a33e0e64e3b8666d94ad52251afe489bf9a349615a7fa358051e5f82d72deea329f61c7ed92fd020eabb0d89
6
+ metadata.gz: 8f05fbd7f42707a767b3eb018287d95305191fd9eacd0d913570027c9d05f940c736557f71e89957aab5068d5f680e77b75401792af284e580f0163f3f7f14ee
7
+ data.tar.gz: d1239ae0e988afbd345002876836315b6a4baecd6e7d38c71d29313fa728bc457d1e073140a82c4d4b70261e35693975ce37eb08a63fbb20e3710942ca06c279
data/README.rdoc CHANGED
@@ -31,7 +31,7 @@ Available options:
31
31
  * :cmd - this will specify a custom command to run, you can use it to speed up migrations if you use `zeus`, `spring` or simillar in your project. Defaults to `rake`
32
32
  * :bundler - this will prefix the command with `bundle exec` if a Gemfile is present. Defaults to `true`
33
33
  * :run_on_start - this will run the migration task when you start, reload or run all. Defaults to false. If reset is set to true with this, then it will run a reset on the start, reload, run all instead of just a regular migrate
34
- * :test_clone - this will run the with the additional `db:test:clone` to update the test database. Defaults to true.
34
+ * :test_clone - this will run the with the additional `db:test:clone` to update the test database. Defaults to false.
35
35
  * :reset - this will run `rake db:migrate:reset` every time migrate is run. Defaults to false.
36
36
  * :rails_env - passing this will add "RAILS_ENV=" together with the environment.
37
37
  * :seed - setting this option to true will run seed after migrations. This will also run after test:clone if that is set to run. Defaults to false.
data/lib/guard/migrate.rb CHANGED
@@ -13,7 +13,7 @@ module Guard
13
13
  @bundler = true unless options[:bundler] == false
14
14
  @cmd = options[:cmd].to_s unless options[:cmd].to_s.empty?
15
15
  @reset = true if options[:reset] == true
16
- @test_clone = true unless options[:test_clone] == false
16
+ @test_clone = options[:test_clone]
17
17
  @run_on_start = true if options[:run_on_start] == true
18
18
  @rails_env = options[:rails_env]
19
19
  @seed = options[:seed]
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module MigrateVersion
3
- VERSION = "1.0.4"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ describe Guard::Migrate do
18
18
  describe "options" do
19
19
  context "bundler" do
20
20
  context "with a gemfile found" do
21
- before{File.stub!(:exist?).and_return(true) }
21
+ before{File.stub(:exist?).and_return(true) }
22
22
  its(:bundler?){should be_true}
23
23
  its(:rake_string){should match(/^bundle exec rake/)}
24
24
 
@@ -30,7 +30,7 @@ describe Guard::Migrate do
30
30
  end
31
31
  end
32
32
  context "with no gemfile found" do
33
- before{File.stub!(:exist?).and_return(false)}
33
+ before{File.stub(:exist?).and_return(false)}
34
34
  its(:bundler?){should_not be_true}
35
35
  its(:rake_string){should match(/^rake/)}
36
36
  end
@@ -88,16 +88,24 @@ describe Guard::Migrate do
88
88
 
89
89
  context "test clone" do
90
90
  context "with no options passed" do
91
- its(:test_clone?){should be_true}
92
- its(:rake_string){should match(/db:test:clone/)}
91
+ its(:test_clone?){should be_false}
92
+ its(:rake_string){should match(/rake db:migrate/)}
93
+ its(:rake_string){should_not match(/db:test:clone/)}
93
94
  end
94
95
 
95
96
  context "when passed false" do
96
97
  let(:options){ {:test_clone => false} }
97
- its(:test_clone?){should_not be_true}
98
+ its(:test_clone?){should be_false}
98
99
  its(:rake_string){should match(/rake db:migrate/)}
99
100
  its(:rake_string){should_not match(/db:test:clone/)}
100
101
  end
102
+
103
+ context "when passed true" do
104
+ let(:options){ {:test_clone => true} }
105
+ its(:test_clone?){should be_true}
106
+ its(:rake_string){should match(/rake db:migrate/)}
107
+ its(:rake_string){should match(/db:test:clone/)}
108
+ end
101
109
  end
102
110
 
103
111
  context "reset" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-migrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Lanotte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-30 00:00:00.000000000 Z
11
+ date: 2014-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.3.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: activerecord
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 4.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 4.1.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement