mina-clockwork 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +39 -0
- data/LICENSE.txt +22 -0
- data/README.md +57 -0
- data/Rakefile +2 -0
- data/lib/mina/clockwork/tasks.rb +34 -0
- data/lib/mina/clockwork/version.rb +5 -0
- data/lib/mina/clockwork.rb +2 -0
- data/mina-clockwork.gemspec +28 -0
- metadata +124 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dfe4ee82dba9083b92eada773cca7ff75fe20127
|
4
|
+
data.tar.gz: c1a9248cc2976c7832ae4e0b9425e6028c1c26ec
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 772dcb61763399c3e01384c6aeb03063bd18347dc3b48854c52cbf5a8834a7a532a719c35dcdb33b2b5adb5f54211d9cb2e1f59e34f71bda5e318f57e27e73d3
|
7
|
+
data.tar.gz: 47e5aeedaece98940ce917145fbdc20d7a41181ad04f945998af9e0d417cc8ebaaa938bb73dbc76516ed48783014c17ff8356ca6c82ed9fe88d6f5d99aecb823
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mina-clockwork (0.0.2)
|
5
|
+
clockwork
|
6
|
+
daemons
|
7
|
+
puma
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (4.1.4)
|
13
|
+
i18n (~> 0.6, >= 0.6.9)
|
14
|
+
json (~> 1.7, >= 1.7.7)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
thread_safe (~> 0.1)
|
17
|
+
tzinfo (~> 1.1)
|
18
|
+
clockwork (0.7.7)
|
19
|
+
activesupport
|
20
|
+
tzinfo
|
21
|
+
daemons (1.1.9)
|
22
|
+
i18n (0.6.11)
|
23
|
+
json (1.8.1)
|
24
|
+
minitest (5.4.0)
|
25
|
+
puma (2.9.0)
|
26
|
+
rack (>= 1.1, < 2.0)
|
27
|
+
rack (1.5.2)
|
28
|
+
rake (10.3.2)
|
29
|
+
thread_safe (0.3.4)
|
30
|
+
tzinfo (1.2.1)
|
31
|
+
thread_safe (~> 0.1)
|
32
|
+
|
33
|
+
PLATFORMS
|
34
|
+
ruby
|
35
|
+
|
36
|
+
DEPENDENCIES
|
37
|
+
bundler (~> 1.6)
|
38
|
+
mina-clockwork!
|
39
|
+
rake
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Alexey Chernenkov
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Mina Clockwork
|
2
|
+
|
3
|
+
Clockwork deployment scenario for mina. It uses `clockworkd` to start clockwork daemon.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Via Bundler:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
# Gemfile
|
11
|
+
gem 'mina-clockwork', require: false
|
12
|
+
```
|
13
|
+
|
14
|
+
## Usage example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
# config/deploy.rb
|
18
|
+
|
19
|
+
require 'mina/clockwork'
|
20
|
+
|
21
|
+
set :clockwork_file, -> { "#{deploy_to}/#{current_path}/app/clockwork.rb" }
|
22
|
+
set :clockwork_identifier, -> { rails_env }
|
23
|
+
... other options
|
24
|
+
|
25
|
+
task deploy: :environment do
|
26
|
+
deploy do
|
27
|
+
invoke 'clockwork:stop'
|
28
|
+
invoke 'git:clone'
|
29
|
+
...
|
30
|
+
|
31
|
+
to :launch do
|
32
|
+
...
|
33
|
+
invoke 'clockwork:start'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
## Tasks
|
40
|
+
|
41
|
+
```
|
42
|
+
mina clockwork:restart # Restart clockworkd
|
43
|
+
mina clockwork:start # Start clockworkd
|
44
|
+
mina clockwork:stop # Stop clockworkd
|
45
|
+
```
|
46
|
+
|
47
|
+
## Configuration
|
48
|
+
|
49
|
+
* `clockwork_dir` - Working dir (Default: current deployment path)
|
50
|
+
* `clockwork_file` - Clock file (Default: [current deployment path]/clock.rb)
|
51
|
+
* `clockwork_identifier` - Identifier for clockworkd process (Default: name of clock file)
|
52
|
+
* `clockwork_pid_dir` - Dir for pid file (Default: [shared path]/tmp/pids)
|
53
|
+
* `clockwork_log_dir` - Dir for log files (Default: [shared path]/log)
|
54
|
+
|
55
|
+
## Contributing
|
56
|
+
|
57
|
+
Feel free to contribute!
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'mina/bundler'
|
2
|
+
|
3
|
+
namespace :clockwork do
|
4
|
+
set_default :clockwork_dir, -> { "#{deploy_to}/#{current_path}" }
|
5
|
+
set_default :clockwork_file, -> { "#{deploy_to}/#{current_path}/clock.rb" }
|
6
|
+
set_default :clockwork_identifier, -> { File.basename(clockwork_file, '.rb') }
|
7
|
+
set_default :clockwork_pid_dir, -> { "#{deploy_to}/#{shared_path}/tmp/pids" }
|
8
|
+
set_default :clockwork_log_dir, -> { "#{deploy_to}/#{shared_path}/log" }
|
9
|
+
set_default :clockworkd_cmd, -> { "#{bundle_prefix} clockworkd" }
|
10
|
+
set_default :clockworkd_full_cmd, -> { %[cd #{deploy_to}/#{current_path} && #{clockworkd_cmd} \\
|
11
|
+
-c '#{clockwork_file}' \\
|
12
|
+
-i '#{clockwork_identifier}' \\
|
13
|
+
-d '#{clockwork_dir}' \\
|
14
|
+
--pid-dir '#{clockwork_pid_dir}' \\
|
15
|
+
--log --log-dir '#{clockwork_log_dir}'] }
|
16
|
+
|
17
|
+
desc 'Start clockworkd'
|
18
|
+
task start: :environment do
|
19
|
+
queue %[echo '-----> Start clockwork']
|
20
|
+
queue! "#{clockworkd_full_cmd} start"
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Stop clockworkd'
|
24
|
+
task stop: :environment do
|
25
|
+
queue %[echo '-----> Stop clockwork']
|
26
|
+
queue! "#{clockworkd_full_cmd} stop"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Restart clockworkd'
|
30
|
+
task restart: :environment do
|
31
|
+
queue %[echo '-----> Restart clockwork']
|
32
|
+
queue! "#{clockworkd_full_cmd} restart"
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'mina/clockwork/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'mina-clockwork'
|
9
|
+
spec.version = Mina::Clockwork::VERSION
|
10
|
+
spec.authors = ['Alexey Chernenkov']
|
11
|
+
spec.email = ['laise@pisem.net']
|
12
|
+
spec.summary = 'Clockwork deployment scenario for mina.'
|
13
|
+
spec.description = ''
|
14
|
+
spec.homepage = 'https://github.com/907th/mina-clockwork'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
|
25
|
+
spec.add_dependency 'puma'
|
26
|
+
spec.add_dependency 'clockwork'
|
27
|
+
spec.add_dependency 'daemons'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mina-clockwork
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexey Chernenkov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: puma
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: clockwork
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: daemons
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: ''
|
84
|
+
email:
|
85
|
+
- laise@pisem.net
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- Gemfile
|
92
|
+
- Gemfile.lock
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- lib/mina/clockwork.rb
|
97
|
+
- lib/mina/clockwork/tasks.rb
|
98
|
+
- lib/mina/clockwork/version.rb
|
99
|
+
- mina-clockwork.gemspec
|
100
|
+
homepage: https://github.com/907th/mina-clockwork
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
metadata: {}
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 2.2.2
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: Clockwork deployment scenario for mina.
|
124
|
+
test_files: []
|