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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ae256ebf86551896c2f8623e4cafbb19de71156322afb7f103fa43c63733be1
4
- data.tar.gz: c4f0d456ceb597c541d2bfb8b316f7c1b3a58e591753b112e94b65bb21f7054f
3
+ metadata.gz: 174416038d9f1cf9bfa5696e73974e403eb7d421965f76dd837703f843261199
4
+ data.tar.gz: b4ea327876dec29a59f509ef5810494a92ef52a2887df476974e733ec25e03f9
5
5
  SHA512:
6
- metadata.gz: d211f7b48726bd5a21380b9c1c2b4257485097ae95d97473fd130e1935d2febd9c4d78088066958da421227bcc4f222c770f4f52f1f10dbce0443afb663cf72e
7
- data.tar.gz: d346e39fa550525db65204d6c3e7e3e7516b2c7a8f633bc602f029582a9a4d5b39372fa1790dfe6fe35f3cfe989998d886cecb96c7408737934222f29d777f6e
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:
@@ -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
- command %(sudo #{state} #{background_worker_name})
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
@@ -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
- command %(sudo stop #{background_worker_name} > /dev/null 2>&1; sudo start #{background_worker_name})
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
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Infinum
3
- VERSION = '1.3.0'.freeze
3
+ VERSION = '1.4.0'.freeze
4
4
  end
5
5
  end
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.3.0
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: 2018-02-02 00:00:00.000000000 Z
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.3
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