mina-infinum 1.4.0 → 1.8.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
- SHA256:
3
- metadata.gz: 174416038d9f1cf9bfa5696e73974e403eb7d421965f76dd837703f843261199
4
- data.tar.gz: b4ea327876dec29a59f509ef5810494a92ef52a2887df476974e733ec25e03f9
2
+ SHA1:
3
+ metadata.gz: 74698f34c63fba89a8c26cd2c6075cb74d94828b
4
+ data.tar.gz: cd509d3519cfc3c950661ac24d1cc1bb498d5ade
5
5
  SHA512:
6
- metadata.gz: 389cf73420a4227d2d56425b4e776f5eac4166b6d012cd1d8df769d3d072c7f584b12395acad2871aeb84a968a0e6090456961ee1436ea424c3e69466c534cec
7
- data.tar.gz: b8d520d1664935772603e5fab35ad6a3ab3948f4aa3b2e6b79753c13e768abd1e5121285bcc324fef0c4de155071d4c7e19068fd5225e253f4f28e6a690ca6b1
6
+ metadata.gz: d64723884fae5f27570716f1eb1d8e520596d31d0ae31a566c195c2b70373ef8568b42bacdf5fde33a055282ee2a8c484239c4d34a010cf36f48511ccea41839
7
+ data.tar.gz: e2ce960c7afa2ab000ec5c57d94965f89e4cdc33c870d66610b8a565c877cae66beb4123a5ae5054cf641e5144e9a783d7e1562fab87cf916a7a9e7684fa300b
data/README.md CHANGED
@@ -3,11 +3,11 @@
3
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)
4
4
  ## Plugins
5
5
 
6
- * [mina](https://github.com/mina-deploy/mina), '~> 1.0.0'
7
- * [mina-data_sync](https://github.com/d4be4st/mina-data_sync), '~> 1.0.0'
8
- * [mina-dox](https://github.com/infinum/mina-dox), '~> 0.1'
9
- * [mina-secrets](https://github.com/infinum/mina-secrets), '~> 1.0.0'
10
- * [mina-whenever](https://github.com/mina-deploy/mina-whenever), '~> 1.0.0'
6
+ * [mina](https://github.com/mina-deploy/mina), '> 1.0'
7
+ * [mina-data_sync](https://github.com/d4be4st/mina-data_sync)
8
+ * [mina-dox](https://github.com/infinum/mina-dox)
9
+ * [mina-secrets](https://github.com/infinum/mina-secrets)
10
+ * [mina-whenever](https://github.com/mina-deploy/mina-whenever)
11
11
 
12
12
  Removed mina-delayed_job as we are moving towards delayed_job in processes.
13
13
  github
@@ -15,9 +15,10 @@ github
15
15
  ## Setup
16
16
 
17
17
  ``` ruby
18
- set :application_name, <APP_NAME> # Used in background workers tasks
19
- set :background_worker, <WORKER_NAME> # Used in background workers tasks (eg. 'dj')
20
- set :service_manager, <SERVICE_MANAGER> # systemd (default), upstart
18
+ set :application_name, <APP_NAME> # Used in background workers tasks
19
+ set :background_worker, <WORKER_NAME> # Used in background workers tasks (eg. 'dj')
20
+ set :service_manager, <SERVICE_MANAGER> # systemd, upstart (default)
21
+ set :sidekiq_web_namespace, <SIDEKIQ_WEB_MOUNT> # Used for creating symlink to Sidekiq assets in public/
21
22
  ```
22
23
 
23
24
  Background workers name:
@@ -34,6 +35,7 @@ Background workers name:
34
35
  :'background_workers:start'
35
36
  :'background_workers:stop'
36
37
  :'background_workers:status'
38
+ :link_sidekiq_assets
37
39
  ```
38
40
 
39
41
  ## Contributing
@@ -1,12 +1,28 @@
1
1
  def background_worker(state)
2
2
  ensure!(:background_worker)
3
3
  ensure!(:application_name)
4
+ ensure!(:service_manager)
4
5
  comment %(#{state}ing #{background_worker_name})
5
- case fetch(:service_manager)
6
+ service_manager = fetch(:service_manager).to_sym
7
+
8
+ case service_manager
6
9
  when :systemd
7
- command %(sudo /bin/systemctl --no-pager #{state} #{background_worker_name})
10
+ case state
11
+ when :status
12
+ command %(/bin/systemctl --no-pager #{state} #{background_worker_name})
13
+ else
14
+ command %(sudo /bin/systemctl #{state} #{background_worker_name})
15
+ end
16
+
8
17
  when :upstart
9
- command %(sudo #{state} #{background_worker_name})
18
+ case state
19
+ when :restart
20
+ command %(sudo stop #{background_worker_name} > /dev/null 2>&1; sudo start #{background_worker_name})
21
+ else
22
+ command %(sudo #{state} #{background_worker_name})
23
+ end
24
+ else
25
+ raise StandardError.new "Invalid service_manager: #{service_manager}.\nSupported service managers: systemd, upstart."
10
26
  end
11
27
  end
12
28
 
@@ -1,4 +1,5 @@
1
- set :service_manager, :systemd
1
+ set :service_manager, :upstart
2
+ set :sidekiq_web_namespace, nil
2
3
 
3
4
  desc 'Restart application'
4
5
  task :restart_application do
@@ -7,21 +8,18 @@ task :restart_application do
7
8
  end
8
9
 
9
10
  namespace :background_workers do
10
- [:start, :stop, :status].each do |state|
11
+ [:start, :stop, :status, :restart].each do |state|
11
12
  desc "#{state.capitalize}ing background workers"
12
13
  task state do
13
14
  background_worker(state)
14
15
  end
15
16
  end
17
+ end
16
18
 
17
- desc 'Restarting backgrond workers'
18
- task :restart do
19
- comment "Restarting #{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
26
- end
19
+ task :link_sidekiq_assets do
20
+ custom_assets_path = File.join('./', 'public', fetch(:sidekiq_web_namespace).to_s)
21
+
22
+ command "bundle_path=\"$(RAILS_ENV=#{fetch(:rails_env)} #{fetch(:bundle_bin)} show sidekiq)\""
23
+ command "mkdir -p #{custom_assets_path}"
24
+ command "ln -nfs $bundle_path/web/assets #{custom_assets_path}/sidekiq"
27
25
  end
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Infinum
3
- VERSION = '1.4.0'.freeze
3
+ VERSION = '1.8.0'.freeze
4
4
  end
5
5
  end
@@ -26,12 +26,12 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ['lib']
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.12'
30
- spec.add_development_dependency 'rake', '~> 10.0'
31
- spec.add_development_dependency 'rspec', '~> 3.0'
32
- spec.add_dependency 'mina', '~> 1.0'
33
- spec.add_dependency 'mina-data_sync', '~> 1.0'
34
- spec.add_dependency 'mina-dox', '~> 0.1'
35
- spec.add_dependency 'mina-secrets', '~> 1.2'
36
- spec.add_dependency 'mina-whenever', '~> 1.0'
29
+ spec.add_development_dependency 'bundler'
30
+ spec.add_development_dependency 'rake'
31
+ spec.add_development_dependency 'rspec'
32
+ spec.add_dependency 'mina', '> 1.0'
33
+ spec.add_dependency 'mina-data_sync'
34
+ spec.add_dependency 'mina-dox'
35
+ spec.add_dependency 'mina-secrets'
36
+ spec.add_dependency 'mina-whenever'
37
37
  end
metadata CHANGED
@@ -1,127 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-infinum
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.8.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: 2019-06-07 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.12'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.12'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mina
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mina-data_sync
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mina-dox
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0.1'
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.1'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: mina-secrets
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '1.2'
103
+ version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '1.2'
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: mina-whenever
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '1.0'
117
+ version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '1.0'
124
+ version: '0'
125
125
  description: Collection of mina plugins we use in infinum
126
126
  email:
127
127
  - d4be4st@gmail.com
@@ -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.6
168
+ rubygems_version: 2.6.11
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Collection of mina plugins we use in infinum