mina-infinum 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/lib/mina/infinum/helpers.rb +10 -0
- data/lib/mina/infinum/tasks.rb +12 -2
- data/lib/mina/infinum/version.rb +1 -1
- data/lib/mina/infinum.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 487a801e93aad9760392da5d47f636d5516b7558
|
4
|
+
data.tar.gz: 192045df7f2206f02bf0c32cc6c90b4da1e0aab5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb211d0ab294636ed25a1e7df6c002df021264b94b1afa55d008f80d3cf23ab9b4b1dde2424a6d232f6e86d18e13bd55110cea349985edce1d9295e4bcbfd00
|
7
|
+
data.tar.gz: bef075b2c781a5b0c6c4ffbc07399b9cbafc2d24f501416cf1f11aa1de9aff9a243166a091c1876ff70418b1408ce774e6206f54359b970d87b7f84355de6e6e
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Mina::Infinum
|
2
2
|
|
3
|
+
For `mina 0.3.0` please take a look at [v0.3.0 branch](https://github.com/infinum/mina-infinum/tree/v0.3.0)
|
3
4
|
## Plugins
|
4
5
|
|
5
6
|
``` ruby
|
@@ -11,10 +12,27 @@
|
|
11
12
|
|
12
13
|
Removed mina-delayed_job as we are moving towards delayed_job in processes.
|
13
14
|
|
15
|
+
## Setup
|
16
|
+
|
17
|
+
``` ruby
|
18
|
+
set :application_name # Used in background workers tasks
|
19
|
+
set :background_worker # Used in background workers tasks
|
20
|
+
```
|
21
|
+
|
22
|
+
Background workers name:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
[fetch(:background_worker), fetch(:application_name), fetch(:rails_env)].join('-') # dj-labs-production
|
26
|
+
```
|
27
|
+
|
14
28
|
## Tasks
|
15
29
|
|
16
30
|
``` ruby
|
17
31
|
:restart_application # restart passenger
|
32
|
+
:'background_workers:restart'
|
33
|
+
:'background_workers:start'
|
34
|
+
:'background_workers:stop'
|
35
|
+
:'background_workers:status'
|
18
36
|
```
|
19
37
|
|
20
38
|
## Contributing
|
@@ -0,0 +1,10 @@
|
|
1
|
+
def background_worker(state)
|
2
|
+
ensure!(:background_worker)
|
3
|
+
ensure!(:application_name)
|
4
|
+
comment %(Restarting delayed job)
|
5
|
+
command %(sudo #{state} #{background_worker_name})
|
6
|
+
end
|
7
|
+
|
8
|
+
def background_worker_name
|
9
|
+
[fetch(:background_worker), fetch(:application_name), fetch(:rails_env)].join('-')
|
10
|
+
end
|
data/lib/mina/infinum/tasks.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
+
desc 'Restart application'
|
1
2
|
task :restart_application do
|
2
|
-
|
3
|
-
|
3
|
+
comment %(Restarting application)
|
4
|
+
command %(passenger-config restart-app --ignore-app-not-running #{fetch(:deploy_to)})
|
5
|
+
end
|
6
|
+
|
7
|
+
namespace :background_workers do
|
8
|
+
[:restart, :start, :stop, :status].each do |state|
|
9
|
+
desc "#{state.capitalize}ing background workers"
|
10
|
+
task state do
|
11
|
+
background_worker(state)
|
12
|
+
end
|
13
|
+
end
|
4
14
|
end
|
data/lib/mina/infinum/version.rb
CHANGED
data/lib/mina/infinum.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina-infinum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- bin/console
|
127
127
|
- bin/setup
|
128
128
|
- lib/mina/infinum.rb
|
129
|
+
- lib/mina/infinum/helpers.rb
|
129
130
|
- lib/mina/infinum/tasks.rb
|
130
131
|
- lib/mina/infinum/version.rb
|
131
132
|
- mina-infinum.gemspec
|