guard-migrate 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -0
- data/lib/guard/migrate.rb +2 -1
- data/lib/guard/migrate/version.rb +1 -1
- data/spec/guard/migrate_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7dcf2d42548b6ead49d3a10b74596472441dccf
|
4
|
+
data.tar.gz: 4176895949604d067a062bd147ae63b93dd4bacd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236ebbab76e4a0287b9ec92c88f0a05403bc41186887599c2718064b9bcac213a553458ebc5ec6cde78e07b214bf941974c7a480ba3c95ca7e6d1743c3d871f3
|
7
|
+
data.tar.gz: 10af67692ecda24dd702e2b49ba015db3b4e7105f09254ff35889a795efbefe3733de9ce832cbc311f8c436cdf046201c82a5608eba01f4e24cb5609430d421c
|
data/README.rdoc
CHANGED
@@ -29,6 +29,7 @@ Add guard definition to your Guardfile by running this command:
|
|
29
29
|
Available options:
|
30
30
|
|
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
|
+
* :bundler - this will prefix the command with `bundle exec` if a Gemfile is present. Defaults to `true`
|
32
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
|
33
34
|
* :test_clone - this will run the with the additional `db:test:clone` to update the test database. Defaults to true.
|
34
35
|
* :reset - this will run `rake db:migrate:reset` every time migrate is run. Defaults to false.
|
data/lib/guard/migrate.rb
CHANGED
@@ -10,6 +10,7 @@ module Guard
|
|
10
10
|
def initialize(watchers=[], options={})
|
11
11
|
super
|
12
12
|
|
13
|
+
@bundler = true unless options[:bundler] == false
|
13
14
|
@cmd = options[:cmd].to_s unless options[:cmd].to_s.empty?
|
14
15
|
@reset = true if options[:reset] == true
|
15
16
|
@test_clone = true unless options[:test_clone] == false
|
@@ -19,7 +20,7 @@ module Guard
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def bundler?
|
22
|
-
|
23
|
+
!!@bundler && File.exist?("#{Dir.pwd}/Gemfile")
|
23
24
|
end
|
24
25
|
|
25
26
|
def run_on_start?
|
data/spec/guard/migrate_spec.rb
CHANGED
@@ -22,6 +22,12 @@ describe Guard::Migrate do
|
|
22
22
|
its(:bundler?){should be_true}
|
23
23
|
its(:rake_string){should match(/^bundle exec rake/)}
|
24
24
|
|
25
|
+
context "with bunder set to false" do
|
26
|
+
let(:options){ { :bundler => false }}
|
27
|
+
|
28
|
+
its(:bundler?){should be_false}
|
29
|
+
its(:rake_string){should match(/^rake/)}
|
30
|
+
end
|
25
31
|
end
|
26
32
|
context "with no gemfile found" do
|
27
33
|
before{File.stub!(:exist?).and_return(false)}
|
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
|
+
version: 1.0.3
|
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-03-
|
11
|
+
date: 2014-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: 1.3.6
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project: guard-migrate
|
83
|
-
rubygems_version: 2.2.
|
83
|
+
rubygems_version: 2.2.2
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Guard gem for rails migrations
|