guard-migrate 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/migrate/version.rb +1 -1
- data/spec/guard/migrate/template_spec.rb +50 -0
- data/spec/spec_helper.rb +9 -0
- metadata +9 -7
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'guard/guardfile'
|
3
|
+
require 'files'
|
4
|
+
|
5
|
+
@current_dir = Dir.pwd
|
6
|
+
GUARDFILE_TEMPLATE = "#{File.dirname(__FILE__)}/../../../Guardfile"
|
7
|
+
GUARD_MIGRATE_GUARDFILE_TEMPLATE =
|
8
|
+
"#{File.dirname(__FILE__)}/../../../lib/guard/migrate/templates/Guardfile"
|
9
|
+
|
10
|
+
include Files
|
11
|
+
working = nil
|
12
|
+
files_dir = Files do
|
13
|
+
working = dir 'working'
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'templates' do
|
17
|
+
|
18
|
+
before(:each) do
|
19
|
+
FileUtils.cd(working)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe 'sample guardfile' do
|
23
|
+
|
24
|
+
specify { File.exists?(GUARDFILE_TEMPLATE).should be_true }
|
25
|
+
|
26
|
+
it 'is a sample Guardfile' do
|
27
|
+
expect { Guard::Guardfile.create_guardfile }.to_not raise_error
|
28
|
+
guardfile_contents = IO.read('Guardfile')
|
29
|
+
guardfile_contents.should include('sample Guardfile')
|
30
|
+
guardfile_contents.should_not include('db/migrate')
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'Guard::Migrate guardfile template' do
|
36
|
+
|
37
|
+
specify { File.exists?(GUARD_MIGRATE_GUARDFILE_TEMPLATE).should be_true }
|
38
|
+
|
39
|
+
it 'successfully initializes a Guard::Migrate guard' do
|
40
|
+
expect { Guard::Guardfile.initialize_template('migrate') }.to_not raise_error
|
41
|
+
guardfile_contents = IO.read('Guardfile')
|
42
|
+
guardfile_contents.should include('sample Guardfile')
|
43
|
+
guardfile_contents.should include('db/migrate')
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
FileUtils.cd(@current_dir)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.3.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rspec
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.2.
|
53
|
+
version: 1.2.1
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.2.
|
61
|
+
version: 1.2.1
|
62
62
|
description: Guard::Migrate automatically runs your database migrations when needed
|
63
63
|
email:
|
64
64
|
- geofflanotte@gmail.com
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- LICENSE.txt
|
73
73
|
- README.rdoc
|
74
74
|
- spec/guard/migrate/notifier_spec.rb
|
75
|
+
- spec/guard/migrate/template_spec.rb
|
75
76
|
- spec/guard/migrate_spec.rb
|
76
77
|
- spec/spec_helper.rb
|
77
78
|
homepage: http://rubygems.org/gems/guard-migrate
|
@@ -91,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
92
|
version: '0'
|
92
93
|
segments:
|
93
94
|
- 0
|
94
|
-
hash:
|
95
|
+
hash: -1088046273963210886
|
95
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
97
|
none: false
|
97
98
|
requirements:
|
@@ -106,5 +107,6 @@ specification_version: 3
|
|
106
107
|
summary: Guard gem for rails migrations
|
107
108
|
test_files:
|
108
109
|
- spec/guard/migrate/notifier_spec.rb
|
110
|
+
- spec/guard/migrate/template_spec.rb
|
109
111
|
- spec/guard/migrate_spec.rb
|
110
112
|
- spec/spec_helper.rb
|