mina-infinum 1.4.1 → 1.9.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 +10 -8
- data/lib/mina/infinum/helpers.rb +4 -1
- data/lib/mina/infinum/tasks.rb +19 -1
- data/lib/mina/infinum/version.rb +1 -1
- data/mina-infinum.gemspec +8 -8
- metadata +36 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd98ea2a3468c54d1c4098a8c2d51625172296cdc2096f0487a9e949739c74d6
|
4
|
+
data.tar.gz: 7fb28f4e8d43b5d84159df037afebb52ec86bfece6bcc74524ef9d6db996a2d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7167f83ec9b85b7aaffe69613104752a2049ff164af56a10c820af5722578fb3265a1fff63342c3e6dd24967b110f5719f15f2d5ff7ce8dd9af9154c21559116
|
7
|
+
data.tar.gz: 8918418d8ac3e1b69eba2f37ed1074fdb9ba3035279edc40d46b648eb3eaac2f14ec5807c5b369be0ef998e34aa807dddfff26ec62f9eb9bd3e8fb1ddffcb1e7
|
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), '
|
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)
|
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>
|
19
|
-
set :background_worker, <WORKER_NAME>
|
20
|
-
set :service_manager, <SERVICE_MANAGER>
|
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
|
data/lib/mina/infinum/helpers.rb
CHANGED
@@ -3,8 +3,9 @@ def background_worker(state)
|
|
3
3
|
ensure!(:application_name)
|
4
4
|
ensure!(:service_manager)
|
5
5
|
comment %(#{state}ing #{background_worker_name})
|
6
|
+
service_manager = fetch(:service_manager).to_sym
|
6
7
|
|
7
|
-
case
|
8
|
+
case service_manager
|
8
9
|
when :systemd
|
9
10
|
case state
|
10
11
|
when :status
|
@@ -20,6 +21,8 @@ def background_worker(state)
|
|
20
21
|
else
|
21
22
|
command %(sudo #{state} #{background_worker_name})
|
22
23
|
end
|
24
|
+
else
|
25
|
+
raise StandardError.new "Invalid service_manager: #{service_manager}.\nSupported service managers: systemd, upstart."
|
23
26
|
end
|
24
27
|
end
|
25
28
|
|
data/lib/mina/infinum/tasks.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
set :service_manager, :
|
1
|
+
set :service_manager, :upstart
|
2
|
+
set :sidekiq_web_namespace, nil
|
2
3
|
|
3
4
|
desc 'Restart application'
|
4
5
|
task :restart_application do
|
@@ -14,3 +15,20 @@ namespace :background_workers do
|
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
18
|
+
|
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"
|
25
|
+
end
|
26
|
+
|
27
|
+
namespace :bundle do
|
28
|
+
desc 'Install bundler'
|
29
|
+
task :install_gem do
|
30
|
+
comment 'Installing bundler'
|
31
|
+
command 'bundler_version=`tail -n 1 Gemfile.lock | xargs`'
|
32
|
+
command 'gem install bundler:$bundler_version --no-document'
|
33
|
+
end
|
34
|
+
end
|
data/lib/mina/infinum/version.rb
CHANGED
data/mina-infinum.gemspec
CHANGED
@@ -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'
|
30
|
-
spec.add_development_dependency 'rake'
|
31
|
-
spec.add_development_dependency 'rspec'
|
32
|
-
spec.add_dependency 'mina', '
|
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'
|
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
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-13 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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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
|
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
|
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: '
|
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: '
|
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: '
|
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: '
|
124
|
+
version: '0'
|
125
125
|
description: Collection of mina plugins we use in infinum
|
126
126
|
email:
|
127
127
|
- d4be4st@gmail.com
|
@@ -149,7 +149,7 @@ licenses:
|
|
149
149
|
- MIT
|
150
150
|
metadata:
|
151
151
|
allowed_push_host: https://rubygems.org
|
152
|
-
post_install_message:
|
152
|
+
post_install_message:
|
153
153
|
rdoc_options: []
|
154
154
|
require_paths:
|
155
155
|
- lib
|
@@ -164,9 +164,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
|
-
|
168
|
-
|
169
|
-
signing_key:
|
167
|
+
rubygems_version: 3.0.3
|
168
|
+
signing_key:
|
170
169
|
specification_version: 4
|
171
170
|
summary: Collection of mina plugins we use in infinum
|
172
171
|
test_files: []
|