capistrano-clockwork 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ffc4dec7b8b7c5d8bf0b765deb90c2d40de67c73
4
+ data.tar.gz: 2e635ff5d110ed242b1de82a19016d21f764804d
5
+ SHA512:
6
+ metadata.gz: d14b12f5a6ed3e95b31321d24ef2f07660eb24584cba5810a984d9c84a17bfb0d8eded0f3be592724f80c1cd280d56e228693001f42c028fda550f07c5d8c977
7
+ data.tar.gz: bf9e6b5dbfe3e96a44ee70c5b892bf109bf0c9011c21a8c223e6bb61deff81c9e4de6299a54fdc2bf16c6873d092b9416537b5b81edf748444eda8f3dfc88286
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-rvm.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ capistrano-clockwork (0.0.2)
5
+ capistrano (~> 3.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ capistrano (3.4.0)
11
+ i18n
12
+ rake (>= 10.0.0)
13
+ sshkit (~> 1.3)
14
+ colorize (0.7.7)
15
+ i18n (0.7.0)
16
+ net-scp (1.2.1)
17
+ net-ssh (>= 2.6.5)
18
+ net-ssh (2.9.2)
19
+ rake (10.4.2)
20
+ sshkit (1.7.1)
21
+ colorize (>= 0.7.0)
22
+ net-scp (>= 1.1.2)
23
+ net-ssh (>= 2.8.0)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ capistrano-clockwork!
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,19 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'capistrano-clockwork'
6
+ s.version = '0.0.2'
7
+ s.date = '2015-05-12'
8
+ s.summary = "Capistrano plugin to manage clockwork"
9
+ s.description = "Capistrano plugin to manage clockwork"
10
+ s.authors = ["Suraj Shirvankar"]
11
+ s.email = 'surajshirvankar@gmail.com'
12
+ s.files = ["lib/capistrano-clockwork.rb"]
13
+ s.homepage = "http://github.com/h0lyalg0rithm/capistrano-clockwork"
14
+ s.license = 'MIT'
15
+
16
+ s.files = `git ls-files`.split($/)
17
+ s.require_path= ["lib"]
18
+ s.add_dependency 'capistrano', '~> 3.1'
19
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/capistrano-clockwork.rake", __FILE__)
@@ -0,0 +1,78 @@
1
+ namespace :load do
2
+ task :defaults do
3
+ set :clockwork_default_hooks, -> { true }
4
+ set :clockwork_file, -> { "lib/clockwork.rb" }
5
+ end
6
+ end
7
+
8
+ namespace :deploy do
9
+ before :starting, :check_sidekiq_hooks do
10
+ invoke 'clockwork:add_default_hooks' if fetch(:clockwork_default_hooks)
11
+ end
12
+ after :publishing, :restart_sidekiq do
13
+ invoke 'clockwork:restart' if fetch(:clockwork_default_hooks)
14
+ end
15
+ end
16
+
17
+ namespace :clockwork do
18
+ desc "Stop clockwork"
19
+ task :stop do
20
+ on roles(:app) do
21
+ within release_path do
22
+ with rails_env: fetch(:rails_env) do
23
+ execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log stop"
24
+ end
25
+ end
26
+ end
27
+ end
28
+
29
+ desc "Clockwork status"
30
+ task :status do
31
+ on roles(:app) do
32
+ within release_path do
33
+ with rails_env: fetch(:rails_env) do
34
+ execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log status"
35
+ end
36
+ end
37
+ end
38
+ end
39
+
40
+ desc "Start clockwork"
41
+ task :start do
42
+ on roles(:app) do
43
+ within release_path do
44
+ with rails_env: fetch(:rails_env) do
45
+ execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log start"
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ desc "Restart clockwork"
52
+ task :restart do
53
+ on roles(:app) do
54
+ within release_path do
55
+ with rails_env: fetch(:rails_env) do
56
+ execute :bundle, :exec, :clockworkd, "-c #{fetch(:clockwork_file)} --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} --log restart"
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+ def cw_log_dir
63
+ "#{shared_path}/log"
64
+ end
65
+ def cw_pid_dir
66
+ "#{shared_path}/tmp/pids"
67
+ end
68
+
69
+ def rails_env
70
+ fetch(:rails_env, false) ? "RAILS_ENV=#{fetch(:rails_env)}" : ''
71
+ end
72
+
73
+ task :add_default_hooks do
74
+ after 'deploy:stop', 'clockwork:stop'
75
+ after 'deploy:start', 'clockwork:start'
76
+ after 'deploy:restart', 'clockwork:restart'
77
+ end
78
+ end
File without changes
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-clockwork
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Suraj Shirvankar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ description: Capistrano plugin to manage clockwork
28
+ email: surajshirvankar@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - Gemfile
34
+ - Gemfile.lock
35
+ - Rakefile
36
+ - capistrano-clockwork.gemspec
37
+ - lib/capistrano-clockwork.rb
38
+ - lib/capistrano/clockwork.rb
39
+ - lib/capistrano/tasks/capistrano-clockwork.rake
40
+ homepage: http://github.com/h0lyalg0rithm/capistrano-clockwork
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.4.6
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Capistrano plugin to manage clockwork
64
+ test_files: []