mina-infinum 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/mina/infinum/helpers.rb +6 -1
- data/lib/mina/infinum/tasks.rb +8 -1
- data/lib/mina/infinum/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 174416038d9f1cf9bfa5696e73974e403eb7d421965f76dd837703f843261199
|
4
|
+
data.tar.gz: b4ea327876dec29a59f509ef5810494a92ef52a2887df476974e733ec25e03f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 389cf73420a4227d2d56425b4e776f5eac4166b6d012cd1d8df769d3d072c7f584b12395acad2871aeb84a968a0e6090456961ee1436ea424c3e69466c534cec
|
7
|
+
data.tar.gz: b8d520d1664935772603e5fab35ad6a3ab3948f4aa3b2e6b79753c13e768abd1e5121285bcc324fef0c4de155071d4c7e19068fd5225e253f4f28e6a690ca6b1
|
data/README.md
CHANGED
@@ -17,6 +17,7 @@ github
|
|
17
17
|
``` ruby
|
18
18
|
set :application_name, <APP_NAME> # Used in background workers tasks
|
19
19
|
set :background_worker, <WORKER_NAME> # Used in background workers tasks (eg. 'dj')
|
20
|
+
set :service_manager, <SERVICE_MANAGER> # systemd (default), upstart
|
20
21
|
```
|
21
22
|
|
22
23
|
Background workers name:
|
data/lib/mina/infinum/helpers.rb
CHANGED
@@ -2,7 +2,12 @@ def background_worker(state)
|
|
2
2
|
ensure!(:background_worker)
|
3
3
|
ensure!(:application_name)
|
4
4
|
comment %(#{state}ing #{background_worker_name})
|
5
|
-
|
5
|
+
case fetch(:service_manager)
|
6
|
+
when :systemd
|
7
|
+
command %(sudo /bin/systemctl --no-pager #{state} #{background_worker_name})
|
8
|
+
when :upstart
|
9
|
+
command %(sudo #{state} #{background_worker_name})
|
10
|
+
end
|
6
11
|
end
|
7
12
|
|
8
13
|
def background_worker_name
|
data/lib/mina/infinum/tasks.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
set :service_manager, :systemd
|
2
|
+
|
1
3
|
desc 'Restart application'
|
2
4
|
task :restart_application do
|
3
5
|
comment %(Restarting application)
|
@@ -15,6 +17,11 @@ namespace :background_workers do
|
|
15
17
|
desc 'Restarting backgrond workers'
|
16
18
|
task :restart do
|
17
19
|
comment "Restarting #{background_worker_name}"
|
18
|
-
|
20
|
+
case fetch(:service_manager)
|
21
|
+
when :systemd
|
22
|
+
command %(sudo systemctl --no-pager restart #{background_worker_name})
|
23
|
+
when :upstart
|
24
|
+
command %(sudo stop #{background_worker_name} > /dev/null 2>&1; sudo start #{background_worker_name})
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
data/lib/mina/infinum/version.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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.7.
|
168
|
+
rubygems_version: 2.7.6
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Collection of mina plugins we use in infinum
|