capistrano-opscomplete 0.3.0 → 0.4.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 +5 -5
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/capistrano/dsl/opscomplete.rb +4 -4
- data/lib/capistrano/opscomplete/tasks.rake +7 -4
- data/lib/capistrano/opscomplete/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0743d3bbb02bac9362a1729bf5821a4d4a0bd59e
|
4
|
+
data.tar.gz: b045d4e90dd46e866c4b4647ebefff9a74e69d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 287c4b000c0de702f2055bd29cf94a37d4578ea730cf2676c8f2f42b12dd77be6edcee232b33b0a0fc2f5716c36e3b4393199d444ea49898f2b526db91e7f93b
|
7
|
+
data.tar.gz: 823a06e3d2f3f533e3a9d70f1ee84eea7719d10a8eb90dcd89fa86156776dee71d265809ae50ac15ab8b97645d6c281966c8b2dc03373cd0155e0465eca5ea70
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.4.0] - 2019-09-23
|
2
|
+
### Added
|
3
|
+
- ruby-build now honors the :tmp_dir setting
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
- Allow using --force when installing a gem e.g. overwrite binaries
|
7
|
+
- Quote some shell arguments
|
8
|
+
|
9
|
+
|
1
10
|
## [0.3.0] - 2019-04-05
|
2
11
|
### Added
|
3
12
|
- You can now specify the rubygems and bundler version to be installed. (#4)
|
@@ -26,5 +35,6 @@
|
|
26
35
|
### Added
|
27
36
|
- Initial release.
|
28
37
|
|
38
|
+
[0.4.0]: https://github.com/makandra/capistrano-opscomplete/compare/v0.3.0...v0.4.0
|
29
39
|
[0.3.0]: https://github.com/makandra/capistrano-opscomplete/compare/v0.2.0...v0.3.0
|
30
40
|
[0.2.0]: https://github.com/makandra/capistrano-opscomplete/compare/v0.1.0...v0.2.0
|
data/README.md
CHANGED
@@ -92,7 +92,7 @@ set :rbenv_roles, :web
|
|
92
92
|
set :rbenv_roles, [:web, :worker]
|
93
93
|
```
|
94
94
|
|
95
|
-
**Optional:**
|
95
|
+
**Optional:** If you want a specific bundler version available for your release, set it in your `deploy.rb`, e.g '~>2' if you need bundler version 2.x:
|
96
96
|
|
97
97
|
```ruby
|
98
98
|
set :bundler_version, '<VERSION>'
|
@@ -69,22 +69,22 @@ module Capistrano
|
|
69
69
|
|
70
70
|
def gem_installed?(name, version = nil)
|
71
71
|
if version
|
72
|
-
test(:rbenv, :exec, "gem query --quiet --installed --version #{version} --name-matches ^#{name}$")
|
72
|
+
test(:rbenv, :exec, "gem query --quiet --installed --version '#{version}' --name-matches '^#{name}$'")
|
73
73
|
else
|
74
74
|
test(:rbenv, :exec, :gem, :query, "--quiet --installed --name-matches ^#{name}$")
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
def gem_install(name, version = nil)
|
78
|
+
def gem_install(name, version = nil, force = false)
|
79
79
|
if version
|
80
|
-
rbenv_exec('gem install', name, '--no-document', '--version', version)
|
80
|
+
rbenv_exec('gem install', name, '--no-document', '--version', "'#{version}'", force ? '--force' : '')
|
81
81
|
else
|
82
82
|
rbenv_exec('gem install', name, '--no-document')
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
86
|
def rubygems_install(version)
|
87
|
-
rbenv_exec(
|
87
|
+
rbenv_exec("gem update --no-document --system '#{version}'")
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -53,7 +53,8 @@ namespace :opscomplete do
|
|
53
53
|
task :install_bundler do
|
54
54
|
on roles fetch(:rbenv_roles, :all) do
|
55
55
|
if fetch(:bundler_version, false)
|
56
|
-
|
56
|
+
# We have to set force = true to overwrite the binary
|
57
|
+
gem_install('bundler', fetch(:bundler_version), true) unless gem_installed?('bundler', fetch(:bundler_version))
|
57
58
|
else
|
58
59
|
gem_install('bundler') unless gem_installed?('bundler')
|
59
60
|
end
|
@@ -77,7 +78,7 @@ namespace :opscomplete do
|
|
77
78
|
info("Ensuring requested RubyGems version #{fetch(:rubygems_version)}")
|
78
79
|
next if current_rubygems_version == fetch(:rubygems_version)
|
79
80
|
info("Previously installed RubyGems version was #{current_rubygems_version}")
|
80
|
-
rbenv_exec(:gem, :update, '--no-document', '--system', fetch(:rubygems_version))
|
81
|
+
rbenv_exec(:gem, :update, '--no-document', '--system', "'#{fetch(:rubygems_version)}'")
|
81
82
|
set :rbenv_needs_rehash, true
|
82
83
|
end
|
83
84
|
end
|
@@ -94,13 +95,15 @@ namespace :opscomplete do
|
|
94
95
|
info("#{host}: Required ruby version '#{app_ruby_version}' is installed.")
|
95
96
|
elsif rbenv_installable_rubies.include?(app_ruby_version)
|
96
97
|
info("#{host}: Required ruby version is not installed, but available for installation.")
|
97
|
-
|
98
|
+
with tmpdir: fetch(:tmp_dir) do
|
99
|
+
execute(:rbenv, :install, "'#{app_ruby_version}'")
|
100
|
+
end
|
98
101
|
set :rbenv_needs_rehash, true
|
99
102
|
else
|
100
103
|
raise Capistrano::ValidationError,
|
101
104
|
"#{host}: Ruby version required by application is neither installed nor installable using ruby-install."
|
102
105
|
end
|
103
|
-
execute(:rbenv, :global, app_ruby_version) unless capture(:rbenv, :global) == app_ruby_version
|
106
|
+
execute(:rbenv, :global, "'#{app_ruby_version}'") unless capture(:rbenv, :global) == app_ruby_version
|
104
107
|
end
|
105
108
|
invoke('opscomplete:ruby:install_rubygems')
|
106
109
|
invoke('opscomplete:ruby:install_bundler')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-opscomplete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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: 2019-
|
11
|
+
date: 2019-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: makandra-rubocop
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: 2.0.1
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.6.13
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Capistrano tasks for easy deployment to a makandra opscomplete environment.
|