recap 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recap/tasks/rails.rb +1 -1
- data/lib/recap/version.rb +1 -1
- data/spec/tasks/rails_spec.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dab100b1be2a9693fbbc281263b0475fbf3be0ec
|
4
|
+
data.tar.gz: dbca9c5b1a3c213a248b78ea2216b4f56d763159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6abf3ea7bf67d0f3f2f2f317cae2b4b31d2701b46593b7b49d688dafd576fab01c2d001e8f88b73bbd93822287b54f05a3b83d7f3dd51f37e3944172a6c542f
|
7
|
+
data.tar.gz: 837fec779d750fbfbce49248cd5e011c38b434cf14e0270be5def57340d1df2d4bc5b0e167b27beace1e21e5fd5b3a0335adfce0676336623ecd2811ada08ee8
|
data/lib/recap/tasks/rails.rb
CHANGED
data/lib/recap/version.rb
CHANGED
data/spec/tasks/rails_spec.rb
CHANGED
@@ -16,6 +16,7 @@ describe Recap::Tasks::Rails do
|
|
16
16
|
|
17
17
|
before do
|
18
18
|
config.set :deploy_to, deploy_to
|
19
|
+
config.set :force_full_deploy, to: false
|
19
20
|
config.stubs(:set_default_env)
|
20
21
|
Recap::Tasks::Rails.load_into(config)
|
21
22
|
end
|
@@ -47,16 +48,23 @@ describe Recap::Tasks::Rails do
|
|
47
48
|
end
|
48
49
|
|
49
50
|
describe 'rails:db:migrate' do
|
51
|
+
it 'runs migrations if schema.rb has changed' do
|
52
|
+
namespace.stubs(:deployed_file_exists?).with('db/schema.rb').returns(true)
|
53
|
+
namespace.stubs(:changed_files).returns(["db/schema.rb"])
|
54
|
+
namespace.expects(:as_app).with('./bin/rake db:migrate')
|
55
|
+
config.find_and_execute_task('rails:db:migrate')
|
56
|
+
end
|
57
|
+
|
50
58
|
it 'runs migrations if migrations have changed' do
|
51
59
|
namespace.stubs(:deployed_file_exists?).with('db/schema.rb').returns(true)
|
52
|
-
namespace.stubs(:
|
60
|
+
namespace.stubs(:changed_files).returns(["db/migrate/12345_migration.rb"])
|
53
61
|
namespace.expects(:as_app).with('./bin/rake db:migrate')
|
54
62
|
config.find_and_execute_task('rails:db:migrate')
|
55
63
|
end
|
56
64
|
|
57
65
|
it 'does nothing if the migrations have not changed' do
|
58
66
|
namespace.stubs(:deployed_file_exists?).with('db/schema.rb').returns(true)
|
59
|
-
namespace.stubs(:trigger_update?).with('db/
|
67
|
+
namespace.stubs(:trigger_update?).with('db/').returns(false)
|
60
68
|
namespace.expects(:as_app).never
|
61
69
|
config.find_and_execute_task('rails:db:migrate')
|
62
70
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Ward
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|