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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7725e63c0610e3cf0ae3c53d3b59fd5e1477272b
4
- data.tar.gz: 8af4f97d82ca7d2ab19f8f6b7fd728386d712c1a
3
+ metadata.gz: dab100b1be2a9693fbbc281263b0475fbf3be0ec
4
+ data.tar.gz: dbca9c5b1a3c213a248b78ea2216b4f56d763159
5
5
  SHA512:
6
- metadata.gz: 13cf736a6a86b8ae1d73f645af5771b17ae0d9d130c9cd159d23fce6799e60b44d6aebb3fa00febc5be4a4504aec644d6108e3bef9dc8845e5793671db80e43c
7
- data.tar.gz: 3fd1259eff8a43848ecf4bcbb481220b69b3c03f8ba0f3b685f889fcb827484ff94a4b11dc0d7e3cbfc567df0bd1e341dd92cbf99fc0a65ffd1e83642b96f4cb
6
+ metadata.gz: b6abf3ea7bf67d0f3f2f2f317cae2b4b31d2701b46593b7b49d688dafd576fab01c2d001e8f88b73bbd93822287b54f05a3b83d7f3dd51f37e3944172a6c542f
7
+ data.tar.gz: 837fec779d750fbfbce49248cd5e011c38b434cf14e0270be5def57340d1df2d4bc5b0e167b27beace1e21e5fd5b3a0335adfce0676336623ecd2811ada08ee8
@@ -30,7 +30,7 @@ module Recap::Tasks::Rails
30
30
  end
31
31
 
32
32
  task :migrate do
33
- if deployed_file_exists?("db/schema.rb") && trigger_update?("db/migrations/")
33
+ if deployed_file_exists?("db/schema.rb") && trigger_update?("db/")
34
34
  as_app './bin/rake db:migrate'
35
35
  end
36
36
  end
data/lib/recap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Recap
2
- VERSION = '1.0.10'
2
+ VERSION = '1.0.11'
3
3
  end
@@ -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(:trigger_update?).with('db/migrations/').returns(true)
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/migrations/').returns(false)
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.10
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-21 00:00:00.000000000 Z
11
+ date: 2013-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano