capistrano-clockwork 0.0.5 → 0.0.6

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: e9985554dbcb99d43a757c461bb6376b438373c2
4
- data.tar.gz: bfc9d7b1acdda2411d1ddb65e03f3cbb1739ef32
3
+ metadata.gz: 3d4203492c1a4acc6a73d8034b65e2c69bb57feb
4
+ data.tar.gz: e9b1984cc66ac5afb3b1558f317bb3ae5ef9d527
5
5
  SHA512:
6
- metadata.gz: 1beab525475e0fe28150ba61fdeb7a95ac5dc0d1a9fc829ec4e014c9482acdba5fe476eed4b72074136881a9c8ab6a48c6c2bd8693f1fd1422d1fcc7d24e30dc
7
- data.tar.gz: ddee63dd8fd1c0a88d2bbb7d25bbaf23c9f8102a0504955ccbfa91f5a8a87bab17b4c6a4ba322075e7e6ae3e28111fab7156962c7f3ead8f93b21da9904bed72
6
+ metadata.gz: 317cdf53943973de3708994a54b35f1177d17dab5d77d271e606af8d240a92e00819259dd6999212a4ced27ae80bc1dda6aba990fe1bdc7cc37ee4697b12e4b7
7
+ data.tar.gz: 03c9700448eed2108b75638c1a9d7a94535927e7655e12c3fd1816b05fea1fd876a920836bc22df55e7cc2eadc05a65c2920906c4b0bfb35be35bebd868eb611
data/README.md CHANGED
@@ -33,23 +33,32 @@ By default the gem expects a the clockwork script to be present in the lib folde
33
33
 
34
34
  ```ruby
35
35
 
36
- :clockwork_default_hooks = true
36
+ :clockwork_default_hooks = true
37
37
  :clockwork_file = "lib/clockwork.rb"
38
+ :clockwork_role = :app
38
39
  ```
39
40
  To override the defaults just change it in your Capfile
40
41
 
41
42
  ## To Change the clockscript location
42
43
  ```ruby
43
44
 
44
- set :clockwork_file, "clockwork.rb"
45
-
45
+ set :clockwork_file, "clockwork.rb"
46
+
46
47
  ```
47
48
  ## To remove the default hooks
48
49
 
49
50
  By default the clockwork daemon is restarted everytime you deploy to your server
50
51
  ```ruby
51
52
 
52
- set :clockwork_default_hooks, false
53
+ set :clockwork_default_hooks, false
54
+ ```
55
+
56
+ ## To change server role
57
+
58
+ By default the clockwork will be deployed with `:app` role
59
+ ```ruby
60
+
61
+ set :clockwork_role, :app
53
62
  ```
54
63
 
55
64
  ## Other capistrano tasks
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'capistrano-clockwork'
6
- s.version = '0.0.5'
6
+ s.version = '0.0.6'
7
7
  s.date = '2015-05-12'
8
8
  s.summary = "Capistrano plugin to manage clockwork"
9
9
  s.description = "Capistrano plugin to manage clockwork"
@@ -1,7 +1,8 @@
1
1
  namespace :load do
2
2
  task :defaults do
3
- set :clockwork_default_hooks, -> { true }
3
+ set :clockwork_default_hooks, -> { true }
4
4
  set :clockwork_file, -> { "lib/clockwork.rb" }
5
+ set :clockwork_role, -> { :app }
5
6
  end
6
7
  end
7
8
 
@@ -17,7 +18,7 @@ end
17
18
  namespace :clockwork do
18
19
  desc "Stop clockwork"
19
20
  task :stop do
20
- on roles(:app) do
21
+ on roles(fetch(:clockwork_role)) do
21
22
  within release_path do
22
23
  with rails_env: fetch(:rails_env) do
23
24
  execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --dir=. --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log stop"
@@ -28,7 +29,7 @@ namespace :clockwork do
28
29
 
29
30
  desc "Clockwork status"
30
31
  task :status do
31
- on roles(:app) do
32
+ on roles(fetch(:clockwork_role)) do
32
33
  within release_path do
33
34
  with rails_env: fetch(:rails_env) do
34
35
  execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --dir=. --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log status"
@@ -39,7 +40,7 @@ namespace :clockwork do
39
40
 
40
41
  desc "Start clockwork"
41
42
  task :start do
42
- on roles(:app) do
43
+ on roles(fetch(:clockwork_role)) do
43
44
  within release_path do
44
45
  with rails_env: fetch(:rails_env) do
45
46
  execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --dir=. --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log start"
@@ -50,7 +51,7 @@ namespace :clockwork do
50
51
 
51
52
  desc "Restart clockwork"
52
53
  task :restart do
53
- on roles(:app) do
54
+ on roles(fetch(:clockwork_role)) do
54
55
  within release_path do
55
56
  with rails_env: fetch(:rails_env) do
56
57
  execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --dir=. --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log restart"
@@ -73,4 +74,4 @@ namespace :clockwork do
73
74
  task :add_default_hooks do
74
75
  after 'deploy:publishing', 'clockwork:restart'
75
76
  end
76
- end
77
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-clockwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suraj Shirvankar
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: capistrano
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: daemons
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.2'
41
41
  description: Capistrano plugin to manage clockwork
@@ -59,20 +59,20 @@ metadata: {}
59
59
  post_install_message:
60
60
  rdoc_options: []
61
61
  require_paths:
62
- - lib
62
+ - - lib
63
63
  required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - '>='
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ">="
70
+ - - '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 2.4.8
75
+ rubygems_version: 2.0.14
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Capistrano plugin to manage clockwork