capistrano-opscomplete 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1cf4271a72e12d2b60d9cbd229b58d64701e1b3958c7d795910f05165a2be98
4
- data.tar.gz: edec14befbf173cc3e5bcfa16c6ee54feabf28eba6b8f44cdd59b0f54bbbbbf5
3
+ metadata.gz: 1dc8672500d3727450f6cd8c1f9c5147075eaca449a70d98c80bd9e62d4d2d6c
4
+ data.tar.gz: 169c87773b79febd6c15ab73a0273684f415827d44ebe5316abc4dd42b5f8971
5
5
  SHA512:
6
- metadata.gz: 5237d339e6abe4060590948891b34809abbbe13c6b24fad22f9bd7292a24d6c220c6f81931388d61c2cffdd3731afcd8197b611b87b5bb7227781782d633b9e7
7
- data.tar.gz: b368b6403f897168a4c1d257e6b0caebfad7fa87eae9cf7369c62584fa8e45e61b91a0bbbf8010e6c8db8214f05f4460084b36afb50ed2a0253d41b9506ada63
6
+ metadata.gz: d70ce60b0bfd31c95d8fa145a1c7c9a9e00f96be9757eb8b8c025a7fc86a5dff79eefa0a1e79aafbc1bca106239d0c1e94f869d7091e80343f5b55f2ba893de1
7
+ data.tar.gz: 8d8d31c2445212faf6bdc05b83a299bbb3bf7eec9ab3360f0b6abad77c7628cbbb1773e31eddff3baa5e5a6f823bab9b9cd6d57740e6ea4e30f835adf29c738a
@@ -0,0 +1,28 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [master, workflow]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-20.04
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ ruby-version: ['2.6.6', '3.1.2']
16
+ # steps:
17
+ # - name: Rubocop checks
18
+ # uses: gimenete/rubocop-action@1.0
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby-version }}
26
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27
+ - name: Run tests
28
+ run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.2.0] - 2024-08-23
2
+ ### Changed
3
+ - Added a feature to restart Puma
4
+
5
+ ## [1.1.0] - 2024-08-23
6
+ ### Changed
7
+ - Added a feature to reload the puma systemd user service.
8
+
9
+ ## [1.0.2] - 2022-07-29
10
+ ### Changed
11
+ - Improve error message for missing Node.js version
12
+
1
13
  ## [1.0.1] - 2021-03-16
2
14
 
3
15
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,37 +1,40 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-opscomplete (1.0.1)
4
+ capistrano-opscomplete (1.2.0)
5
5
  capistrano (>= 3.0, < 4.0.0)
6
6
  rake
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- airbrussh (1.4.0)
11
+ airbrussh (1.5.2)
12
12
  sshkit (>= 1.6.1, != 1.7.0)
13
13
  ast (2.4.2)
14
- capistrano (3.16.0)
14
+ base64 (0.2.0)
15
+ capistrano (3.19.1)
15
16
  airbrussh (>= 1.0.0)
16
17
  i18n
17
18
  rake (>= 10.0.0)
18
19
  sshkit (>= 1.9.0)
19
- concurrent-ruby (1.1.9)
20
- i18n (1.8.10)
20
+ concurrent-ruby (1.3.4)
21
+ i18n (1.14.5)
21
22
  concurrent-ruby (~> 1.0)
22
23
  jaro_winkler (1.5.4)
23
24
  makandra-rubocop (4.4.0)
24
25
  rubocop (~> 0.76.0)
25
26
  rubocop-rails (~> 2.3.2)
26
- net-scp (3.0.0)
27
- net-ssh (>= 2.6.5, < 7.0.0)
28
- net-ssh (6.1.0)
27
+ net-scp (4.0.0)
28
+ net-ssh (>= 2.6.5, < 8.0.0)
29
+ net-sftp (4.0.0)
30
+ net-ssh (>= 5.0.0, < 8.0.0)
31
+ net-ssh (7.2.3)
29
32
  parallel (1.20.1)
30
33
  parser (3.0.1.1)
31
34
  ast (~> 2.4.1)
32
- rack (2.2.3)
35
+ rack (3.0.9.1)
33
36
  rainbow (3.0.0)
34
- rake (13.0.3)
37
+ rake (13.0.6)
35
38
  rubocop (0.76.0)
36
39
  jaro_winkler (~> 1.5.1)
37
40
  parallel (~> 1.10)
@@ -43,8 +46,10 @@ GEM
43
46
  rack (>= 1.1)
44
47
  rubocop (>= 0.72.0)
45
48
  ruby-progressbar (1.11.0)
46
- sshkit (1.21.2)
49
+ sshkit (1.23.0)
50
+ base64
47
51
  net-scp (>= 1.1.2)
52
+ net-sftp (>= 2.1.2)
48
53
  net-ssh (>= 2.8.0)
49
54
  unicode-display_width (1.6.1)
50
55
 
@@ -55,6 +60,7 @@ DEPENDENCIES
55
60
  bundler (~> 2)
56
61
  capistrano-opscomplete!
57
62
  makandra-rubocop (~> 4)
63
+ rake (~> 13)
58
64
 
59
65
  BUNDLED WITH
60
- 2.1.4
66
+ 2.3.10
data/README.md CHANGED
@@ -7,7 +7,7 @@ This gem provides capistrano tasks for convenient deployment to a makandra [OpsC
7
7
  Include the gem in your applications Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'capistrano-opscomplete'
10
+ gem 'capistrano-opscomplete', require: false
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -159,7 +159,7 @@ after 'deploy:updating', 'opscomplete:ruby:ensure'
159
159
 
160
160
  ## Managing your nodejs version with `capistrano-opscomplete`
161
161
 
162
- You can manage NodeJS also with `capistrano-opscomplete`. It will check the `.nvmrc`, `.node-version` and `.tool-versions` in the release direcotry (in this order) or you can configure it with `:opscomplete_nodejs_version` in your capistrano configuration.
162
+ You can manage NodeJS also with `capistrano-opscomplete`. It will check the `.nvmrc`, `.node-version` and `.tool-versions` in the release directory (in this order) or you can configure it with `:opscomplete_nodejs_version` in your capistrano configuration.
163
163
 
164
164
  Include the gem in your applications Gemfile:
165
165
 
@@ -173,8 +173,12 @@ An example configuration could look like this:
173
173
  ```ruby
174
174
  # After unpacking your release, before bundling, compiling assets, ...
175
175
  after 'deploy:updating', 'opscomplete:nodejs:ensure'
176
+ # reload puma
177
+ after 'deploy:published', 'opscomplete:puma:reload'
176
178
  ```
177
179
 
180
+ The version for the NodeJS installation has to be a specific version and not a floating version like, e.g. lts/gallium.
181
+
178
182
  ## Contributing
179
183
 
180
184
  Bug reports and pull requests are welcome. Don't hesitate to [open a new issue](https://github.com/makandra/capistrano-opscomplete/issues/new).
data/Rakefile CHANGED
@@ -1,2 +1,10 @@
1
+ require 'rubocop/rake_task'
1
2
  require 'bundler/gem_tasks'
2
- task default: :spec
3
+
4
+ RuboCop::RakeTask.new(:rubocop) do |task|
5
+ # task.requires << 'rubocop-rake'
6
+ task.patterns = ['lib/**/*.rb']
7
+ # task.formatters = ['files']
8
+ end
9
+
10
+ task default: [:rubocop]
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.required_rubygems_version = '>=2.0.1'
38
38
 
39
+ spec.add_development_dependency 'rake', '~> 13'
39
40
  spec.add_development_dependency 'makandra-rubocop', '~> 4'
40
41
  spec.add_development_dependency 'bundler', '~> 2'
41
42
 
data/gem_graph.png ADDED
Binary file
@@ -42,9 +42,11 @@ namespace :opscomplete do
42
42
  execute(:nodejs_install_version, "'#{app_nodejs_version}'")
43
43
  end
44
44
  else
45
- info("#{host}: Check if the configured Node.js version is part of the installable versions")
46
- execute :nodejs_installable_versions
47
- validation_error!("#{host}: Configured Node.js version is neither installed nor installable.")
45
+ error("#{host}: Check if the configured Node.js version: #{app_nodejs_version} is not an installable version")
46
+ info("These are the ten latest versions:")
47
+ info(nodejs_installable_versions.slice(-10,10).join(', '))
48
+
49
+ validation_error!("#{host}: Configured Node.js version: #{app_nodejs_version} is not installable.")
48
50
  end
49
51
  execute(:nodejs_set_version, "'#{app_nodejs_version}'")
50
52
  end
@@ -0,0 +1,20 @@
1
+ # vim: filetype=ruby
2
+ namespace :opscomplete do
3
+ namespace :puma do
4
+
5
+ desc 'Reload puma'
6
+ task :reload do
7
+ on roles fetch(:puma_roles, :all) do # by default only the puma role, but if not available on all systems
8
+ execute :puma_reload
9
+ end
10
+ end
11
+
12
+ desc 'Restart puma'
13
+ task :restart do
14
+ on roles fetch(:puma_roles, :all) do # by default only the puma role, but if not available on all systems
15
+ execute :puma_restart
16
+ end
17
+ end
18
+
19
+ end
20
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Opscomplete
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.2.0'.freeze
4
4
  end
5
5
  end
@@ -6,4 +6,5 @@ require 'rake'
6
6
  load File.expand_path('opscomplete/ruby.rake', __dir__)
7
7
  load File.expand_path('opscomplete/nodejs.rake', __dir__)
8
8
  load File.expand_path('opscomplete/supervisor.rake', __dir__)
9
+ load File.expand_path('opscomplete/puma.rake', __dir__)
9
10
  load File.expand_path('opscomplete/hooks.rb', __dir__)
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-opscomplete
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makandra Operations
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '13'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: makandra-rubocop
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -79,6 +93,7 @@ executables: []
79
93
  extensions: []
80
94
  extra_rdoc_files: []
81
95
  files:
96
+ - ".github/workflows/tests.yml"
82
97
  - ".ruby-version"
83
98
  - CHANGELOG.md
84
99
  - Gemfile
@@ -89,11 +104,13 @@ files:
89
104
  - bin/console
90
105
  - bin/setup
91
106
  - capistrano-opscomplete.gemspec
107
+ - gem_graph.png
92
108
  - lib/capistrano-opscomplete.rb
93
109
  - lib/capistrano/dsl/opscomplete.rb
94
110
  - lib/capistrano/opscomplete.rb
95
111
  - lib/capistrano/opscomplete/hooks.rb
96
112
  - lib/capistrano/opscomplete/nodejs.rake
113
+ - lib/capistrano/opscomplete/puma.rake
97
114
  - lib/capistrano/opscomplete/ruby.rake
98
115
  - lib/capistrano/opscomplete/supervisor.rake
99
116
  - lib/capistrano/opscomplete/version.rb
@@ -120,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
137
  - !ruby/object:Gem::Version
121
138
  version: 2.0.1
122
139
  requirements: []
123
- rubygems_version: 3.0.3
140
+ rubygems_version: 3.4.6
124
141
  signing_key:
125
142
  specification_version: 4
126
143
  summary: Capistrano tasks for easy deployment to a makandra opscomplete environment.