capsum 0.8.7 → 0.8.8

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: bcb953f31c9338fabe681ad6bb42e8f96019a399
4
- data.tar.gz: f8bd3d284ed4b1085093b8a75c136c2c6c3e6f27
3
+ metadata.gz: 474181d7fcc90d4c85d4f958e6f0280693dc9497
4
+ data.tar.gz: 7e7873cfafb18e5d9179368225b5074ea8ab1306
5
5
  SHA512:
6
- metadata.gz: 434a3d0793ed4b32ea29f384dbe5ff2216c8435d0b142d37e2f8b7e65518567ed68dfb7d0be92350a56c38b2052cebe3ce50c3720f453ab18b851310ac4c93c1
7
- data.tar.gz: cf40498323d546cd8f5371e47cf0c9ebeb7d881cc72bdc7ecdbba243ee3c4b1704d2623d4e90616aa49c626a7f1c32b6884e94bbe76828bacb992a2f6a130ad3
6
+ metadata.gz: 618c907205af578f7532c3063d297be84bf180b96608258610ef86ae8f9cd32fca3b10609768b776c20921832446e8010865f1561deeb52c16223ac40341d8b6
7
+ data.tar.gz: 909ed7705e5b31604b8b9801170941f3df025224b02ee3803cbff59c8f2160a0f4eb31f012c63c2d6e751b32c0c49e093d1317377ac08219dd50fd8ef89b1416
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.7
1
+ 0.8.8
data/lib/capsum.rb CHANGED
@@ -4,7 +4,7 @@ module Capsum
4
4
  VERSION = open(File.expand_path("../../VERSION", __FILE__)).read.chomp
5
5
  end
6
6
 
7
- Capistrano::Configuration.instance.load do
7
+ Capistrano::Configuration.instance(true).load do
8
8
 
9
9
  def self.unbefore(task_name, name)
10
10
  options = { :only => [ task_name ] }
@@ -4,5 +4,6 @@ require "bundler/capistrano"
4
4
  Capistrano::Configuration.instance(true).load do
5
5
  set :bundle_dir, nil
6
6
  set :bundle_flags, "--quiet"
7
- end
8
7
 
8
+ set :use_bundle, true
9
+ end
@@ -13,7 +13,7 @@ Capistrano::Configuration.instance(true).load do
13
13
  variables = whenever_settings.map{ |key, value| "#{key}=#{value}" }.join("&")
14
14
  end
15
15
 
16
- command = "if [ -e #{current_path}/config/schedule.rb ]; then cd #{current_path}; RAILS_ENV=#{rails_env} whenever --update-crontab #{identifier} --set \"environment=#{rails_env}&%s\"; fi"
16
+ command = "if [ -e #{current_path}/config/schedule.rb ]; then cd #{current_path}; RAILS_ENV=#{rails_env} #{whenever_bin} --update-crontab #{identifier} --set \"environment=#{rails_env}&%s\"; fi"
17
17
  run (command % variables), :hosts => server.host
18
18
  end
19
19
  end
@@ -22,7 +22,15 @@ Capistrano::Configuration.instance(true).load do
22
22
  desc 'Cleanup the crontab'
23
23
  task :cleanup, :roles => :app do
24
24
  identifier = fetch(:whenever_identifier, deploy_to)
25
- run "if [ -e #{current_path}/config/schedule.rb ]; then cd #{current_path}; RAILS_ENV=#{rails_env} whenever --update-crontab #{identifier} --load-file /dev/null; fi"
25
+ run "if [ -e #{current_path}/config/schedule.rb ]; then cd #{current_path}; RAILS_ENV=#{rails_env} #{whenever_bin} --update-crontab #{identifier} --load-file /dev/null; fi"
26
+ end
27
+
28
+ def whenever_bin
29
+ if fetch(:use_bundle, false)
30
+ "bundle exec whenever"
31
+ else
32
+ "whenever"
33
+ end
26
34
  end
27
35
  end
28
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunteya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-28 00:00:00.000000000 Z
11
+ date: 2013-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano