rvm-capistrano 1.5.1 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c5481c544e68713327cb9876595473ca73acc555
4
+ data.tar.gz: 81b564c17658ea1d4bf279401603fc1e62261ae0
5
+ SHA512:
6
+ metadata.gz: 61cb7d4bb5ef3d81efa23b13a24ab726b7c148761d93f07c827042f7a3b60dbc186df1470ce79f35858ad7b6ce5c4dd5a9d8368f7adf33b61a97d91781c748f1
7
+ data.tar.gz: cd4b6a1d7610263303bcdc34f3d7b13ccd560077b6367637b128d34e7069dde24ca11bb4cbd94f7274faeb16353014db1a2a943da314bf98047153bc50158293
data/History.md CHANGED
@@ -1,3 +1,24 @@
1
+ ### 1.5.6 / 2015-01-26
2
+
3
+ * Fix setting of RVM autolibs flag so that 'packages' and 'enable' options work
4
+
5
+ ### 1.5.4 / 2014-09-09
6
+
7
+ * Revert "Using environment variable RUBY_VERSION if it exists, and failing back to GEM_HOME.", fix #100, update #99
8
+
9
+ ### 1.5.3 / 2014-06-27
10
+
11
+ * Fix defined? check on ENV, merged #101 by @themilkman
12
+
13
+ ### 1.5.2 / 2014-05-31
14
+
15
+ * Documentation updates #96, #98
16
+ * Use RUBY_VERSION when available for autodetecting the version, merged #99 by @naemono
17
+
18
+ ### 1.5.1 / 2013-10-08
19
+
20
+ * Fix curl silencing #91 by @aspiers
21
+
1
22
  ### 1.5.0 / 2013-09-04
2
23
 
3
24
  * Add rvm:info & rvm:list for easier debugging
data/README.md CHANGED
@@ -6,7 +6,8 @@ RVM / Capistrano Integration Gem
6
6
 
7
7
  ## Compatibility
8
8
 
9
- `rvm-capistrano` `1.3.0` with Autolibs requires at least RVM `1.19.0`.
9
+ - `rvm-capistrano` `1.3.0` with Autolibs requires at least RVM `1.19.0`.
10
+ - `capistrano` `3.0.0` is a rewrite and does not work with this gem, use [`rvm1/capistrano3`](https://github.com/rvm/rvm1-capistrano3#readme) it will be extended to match this gem functionality.
10
11
 
11
12
  ## Installation
12
13
 
@@ -16,7 +17,7 @@ RVM / Capistrano integration is available as a separate gem
16
17
  $ gem install rvm-capistrano
17
18
  ```
18
19
 
19
- Or, if the **capistrano** gem is aleady in your `Gemfile`, then add **rvm-capistrano**:
20
+ Or, if the **capistrano** gem is already in your `Gemfile`, then add **rvm-capistrano**:
20
21
 
21
22
  ```bash
22
23
  $ echo "gem 'rvm-capistrano'" >> Gemfile
@@ -47,6 +48,16 @@ By default `rvm/capistrano` loads: `selector`, `info_list`, `install_rvm`, `inst
47
48
 
48
49
  Warning: `selector` and `selector_mixed` are to be used separately they can not be used both at the same time.
49
50
 
51
+ ## Requiring
52
+
53
+ Minimal code to load this gem is:
54
+
55
+ ```ruby
56
+ require "rvm/capistrano"
57
+ ```
58
+
59
+ Usually it's placed in `config/deploy.rb`.
60
+
50
61
  ## Example
51
62
 
52
63
  The following code will:
@@ -116,7 +127,7 @@ This will allow to use clean scripts where proper RVM settings are automatically
116
127
  from the aliased wrappers. For example configuring
117
128
  [PassengerRuby](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby)
118
129
  with `/home/ad/.rvm//wrappers/ad/ruby`, this way there is no need for changing scripts
119
- when the application ruby changes. In the seem spirit you can use wrapper for `bundle`
130
+ when the application ruby changes. In the same spirit you can use wrapper for `bundle`
120
131
  in **cron** or **init.d** scripts with `/home/ad/.rvm//wrappers/ad/bundle exec [command]` -
121
132
  it will automatically load proper configuration for the application, no need for any tricks.
122
133
 
@@ -77,7 +77,12 @@ rvm_with_capistrano do
77
77
  set :rvm_ruby_string_evaluated do
78
78
  value = fetch(:rvm_ruby_string, :default)
79
79
  if value.to_sym == :local
80
- value = ENV['GEM_HOME'].gsub(/.*\//,"")
80
+ if ENV['RBENV_VERSION']
81
+ gem_set = ENV['GEM_HOME'].to_s.match(/(?:\/gemsets\/(.*))$/).to_a[1]
82
+ value = [ENV['RBENV_VERSION'], gem_set].compact.join("@")
83
+ else
84
+ value = ENV['GEM_HOME'].gsub(/.*\//,"")
85
+ end
81
86
  end
82
87
  value.to_s
83
88
  end
@@ -48,7 +48,6 @@ ruby can not be installed when using :rvm_ruby_string => :#{ruby}
48
48
  1 read read-only
49
49
  2 fail read-fail
50
50
  ).include?( autolibs_flag )
51
- autolibs_flag = "1" unless autolibs_flag_no_requirements
52
51
 
53
52
  install_ruby_threads = fetch(:rvm_install_ruby_threads,nil).nil? ? '' : "-j #{rvm_install_ruby_threads}"
54
53
  unless autolibs_flag_no_requirements
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.5.1"
3
+ VERSION="1.5.6"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ describe "rvm:create_gemset task" do
12
12
  it "should create a gemset in $HOME" do
13
13
  @configuration.trigger :load
14
14
  expected = "$HOME/.rvm/bin/rvm 2.0.0 do rvm gemset create #{@gemset}"
15
- @task.namespace.should_receive(:run_without_rvm).with(expected)
15
+ expect(@task.namespace).to receive(:run_without_rvm).with(expected)
16
16
  @configuration.execute_task @task
17
17
  end
18
18
 
@@ -25,7 +25,7 @@ describe "rvm:create_gemset task" do
25
25
  else sudo -p 'sudo password: ' sg rvm -c '/usr/local/rvm/bin/rvm 2.0.0 do rvm gemset create #{@gemset}' ;
26
26
  fi
27
27
  EOSHELL
28
- @task.namespace.should_receive(:run_without_rvm).with(expected)
28
+ expect(@task.namespace).to receive(:run_without_rvm).with(expected)
29
29
  @configuration.execute_task @task
30
30
  end
31
31
 
@@ -38,7 +38,7 @@ describe "rvm:create_gemset task" do
38
38
  expected = \
39
39
  "/usr/local/rvm/bin/rvm 2.0.0 do rvm user gemsets ; " +
40
40
  "/usr/local/rvm/bin/rvm 2.0.0 do rvm gemset create #{@gemset}"
41
- task.namespace.should_receive(:run_without_rvm).with(expected)
41
+ expect(task.namespace).to receive(:run_without_rvm).with(expected)
42
42
  @configuration.execute_task task
43
43
  end
44
44
  end
@@ -13,7 +13,7 @@ describe "rvm:create_gemset task" do
13
13
  it "should empty a gemset in $HOME" do
14
14
  @configuration.trigger :load
15
15
  expected = "$HOME/.rvm/bin/rvm 2.0.0 do rvm --force gemset empty #{@gemset}"
16
- @task.namespace.should_receive(:run_without_rvm).with(expected)
16
+ expect(@task.namespace).to receive(:run_without_rvm).with(expected)
17
17
  @configuration.execute_task @task
18
18
  end
19
19
 
@@ -26,7 +26,7 @@ describe "rvm:create_gemset task" do
26
26
  else sudo -p 'sudo password: ' sg rvm -c '/usr/local/rvm/bin/rvm 2.0.0 do rvm --force gemset empty #{@gemset}' ;
27
27
  fi
28
28
  EOSHELL
29
- @task.namespace.should_receive(:run_without_rvm).with(expected)
29
+ expect(@task.namespace).to receive(:run_without_rvm).with(expected)
30
30
  @configuration.execute_task @task
31
31
  end
32
32
  end
@@ -25,7 +25,7 @@ describe "rvm:install_ruby task" do
25
25
  rm -rf $CURL_HOME;
26
26
  exit ${__LAST_STATUS}
27
27
  EOSHELL
28
- @configuration.should_receive(:run_without_rvm).with(expected)
28
+ expect(@configuration).to receive(:run_without_rvm).with(expected)
29
29
  @configuration.execute_task @task
30
30
  end
31
31
 
@@ -54,7 +54,7 @@ describe "rvm:install_ruby task" do
54
54
  rm -rf $CURL_HOME;
55
55
  exit ${__LAST_STATUS}
56
56
  EOSHELL
57
- @configuration.should_receive(:run_without_rvm).with(expected)
57
+ expect(@configuration).to receive(:run_without_rvm).with(expected)
58
58
  @configuration.execute_task @task
59
59
  end
60
60
 
@@ -85,7 +85,7 @@ describe "rvm:install_ruby task" do
85
85
  rm -rf $CURL_HOME;
86
86
  exit ${__LAST_STATUS}
87
87
  EOSHELL
88
- @configuration.should_receive(:run_without_rvm).with(expected)
88
+ expect(@configuration).to receive(:run_without_rvm).with(expected)
89
89
  @configuration.execute_task @task
90
90
  end
91
91
  end
@@ -113,7 +113,7 @@ describe "rvm:install_ruby task" do
113
113
  rm -rf $CURL_HOME;
114
114
  exit ${__LAST_STATUS}
115
115
  EOSHELL
116
- @configuration.should_receive(:run_without_rvm).with(expected)
116
+ expect(@configuration).to receive(:run_without_rvm).with(expected)
117
117
  @configuration.execute_task @task
118
118
  end
119
119
  end
@@ -7,27 +7,27 @@ describe "rvm paths" do
7
7
  before { @configuration.trigger(:load) }
8
8
 
9
9
  it "should return default system path" do
10
- @configuration.fetch(:rvm_system_path).should == '/usr/local/rvm'
10
+ expect(@configuration.fetch(:rvm_system_path)).to eq('/usr/local/rvm')
11
11
  end
12
12
 
13
13
  it "should return default user path" do
14
- @configuration.fetch(:rvm_user_path).should == '$HOME/.rvm'
14
+ expect(@configuration.fetch(:rvm_user_path)).to eq('$HOME/.rvm')
15
15
  end
16
16
 
17
17
  it "should return default installation mode" do
18
- @configuration.fetch(:rvm_type).should == :user
18
+ expect(@configuration.fetch(:rvm_type)).to eq(:user)
19
19
  end
20
20
 
21
21
  it "should return default path" do
22
- @configuration.fetch(:rvm_path).should == '$HOME/.rvm'
22
+ expect(@configuration.fetch(:rvm_path)).to eq('$HOME/.rvm')
23
23
  end
24
24
 
25
25
  it "should return default bin path" do
26
- @configuration.fetch(:rvm_bin_path).should == '$HOME/.rvm/bin'
26
+ expect(@configuration.fetch(:rvm_bin_path)).to eq('$HOME/.rvm/bin')
27
27
  end
28
28
 
29
29
  it "should return default gemset path" do
30
- @configuration.fetch(:rvm_gemset_path).should == '$HOME/.rvm/gemsets'
30
+ expect(@configuration.fetch(:rvm_gemset_path)).to eq('$HOME/.rvm/gemsets')
31
31
  end
32
32
  end
33
33
 
@@ -38,15 +38,15 @@ describe "rvm paths" do
38
38
  end
39
39
 
40
40
  it "should return default path" do
41
- @configuration.fetch(:rvm_path).should == '/usr/local/rvm'
41
+ expect(@configuration.fetch(:rvm_path)).to eq('/usr/local/rvm')
42
42
  end
43
43
 
44
44
  it "should return system bin path" do
45
- @configuration.fetch(:rvm_bin_path).should == '/usr/local/rvm/bin'
45
+ expect(@configuration.fetch(:rvm_bin_path)).to eq('/usr/local/rvm/bin')
46
46
  end
47
47
 
48
48
  it "should return system gemset path" do
49
- @configuration.fetch(:rvm_gemset_path).should == '/usr/local/rvm/gemsets'
49
+ expect(@configuration.fetch(:rvm_gemset_path)).to eq('/usr/local/rvm/gemsets')
50
50
  end
51
51
  end
52
52
 
@@ -56,38 +56,38 @@ describe "rvm paths" do
56
56
 
57
57
  it "should abort if rvm_type is :mixed and rvm_user empty" do
58
58
  expect { @configuration.trigger(:load) }.to \
59
- abort_with_error(/When rvm_type is :mixed, you must also set rvm_user/)
59
+ raise_error(/When rvm_type is :mixed, you must also set rvm_user/)
60
60
  end
61
61
 
62
62
  it "should abort if rvm_user isn't an Array" do
63
63
  @configuration.set(:rvm_user, "a string")
64
64
  expect { @configuration.trigger(:load) }.to \
65
- abort_with_error(/rvm_user must be an Array/)
65
+ raise_error(/rvm_user must be an Array/)
66
66
  end
67
67
 
68
68
  it "should abort if rvm_user contains an invalid value" do
69
69
  @configuration.set(:rvm_user, [ :invalid_value ])
70
70
  expect { @configuration.trigger(:load) }.to \
71
- abort_with_error(/Invalid value\(s\) in rvm_user: invalid_value/)
71
+ raise_error(/Invalid value\(s\) in rvm_user: invalid_value/)
72
72
  end
73
73
 
74
74
  it "should abort if rvm_user mixes :none with other values" do
75
75
  @configuration.set(:rvm_user, [ :none, :gemsets ])
76
76
  expect { @configuration.trigger(:load) }.to \
77
- abort_with_error(/rvm_user cannot mix :none with other values/)
77
+ raise_error(/rvm_user cannot mix :none with other values/)
78
78
  end
79
79
 
80
80
  it "should abort if rvm_user mixes :all with other values" do
81
81
  @configuration.set(:rvm_user, [ :gemsets, :all ])
82
82
  expect { @configuration.trigger(:load) }.to \
83
- abort_with_error(/rvm_user cannot mix :all with other values/)
83
+ raise_error(/rvm_user cannot mix :all with other values/)
84
84
  end
85
85
  end
86
86
 
87
87
  it "should abort if rvm_user is set and rvm_type isn't :mixed" do
88
88
  @configuration.set(:rvm_user, [ :gemsets ])
89
89
  expect { @configuration.trigger(:load) }.to \
90
- abort_with_error(/rvm_user must not be set unless rvm_type is :mixed/)
90
+ raise_error(/rvm_user must not be set unless rvm_type is :mixed/)
91
91
  end
92
92
  end
93
93
  end
metadata CHANGED
@@ -1,120 +1,108 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
- version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease:
6
- segments:
7
- - 1
8
- - 5
9
- - 1
10
- version: 1.5.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.6
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Wayne E. Seguin
14
8
  - Michal Papis
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2013-10-08 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2015-01-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: capistrano
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 59
30
- segments:
31
- - 2
32
- - 15
33
- - 4
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
34
20
  version: 2.15.4
35
21
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rake
39
22
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 2.15.4
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
43
32
  - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
49
35
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rspec
53
36
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
57
39
  - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.0'
63
49
  type: :development
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: capistrano-spec
67
50
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: capistrano-spec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
71
60
  - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
77
63
  type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: guard-rspec
81
64
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: guard-rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
85
74
  - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
91
77
  type: :development
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: guard-bundler
95
78
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: guard-bundler
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
99
88
  - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
105
91
  type: :development
106
- version_requirements: *id006
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
107
98
  description: RVM / Capistrano Integration Gem
108
- email:
99
+ email:
109
100
  - wayneeseguin@gmail.com
110
101
  - mpapis@gmail.com
111
102
  executables: []
112
-
113
103
  extensions: []
114
-
115
104
  extra_rdoc_files: []
116
-
117
- files:
105
+ files:
118
106
  - History.md
119
107
  - Manifest.yml
120
108
  - README.md
@@ -141,51 +129,43 @@ files:
141
129
  - lib/rvm/capistrano/helpers/rvm_if_sudo.rb
142
130
  - lib/rvm/capistrano/helpers/rvm_methods.rb
143
131
  - lib/rvm/capistrano/helpers/with_rvm_group.rb
132
+ - spec/support/abort_matcher.rb
133
+ - spec/support/capistrano.rb
144
134
  - spec/spec_helper.rb
145
135
  - spec/create_gemset_spec.rb
146
- - spec/install_ruby_spec.rb
147
136
  - spec/empty_gemset_spec.rb
148
- - spec/support/capistrano.rb
149
- - spec/support/abort_matcher.rb
137
+ - spec/install_ruby_spec.rb
150
138
  - spec/rvm_paths_spec.rb
151
139
  homepage: https://github.com/wayneeseguin/rvm-capistrano
152
- licenses:
140
+ licenses:
153
141
  - MIT
142
+ metadata: {}
154
143
  post_install_message:
155
144
  rdoc_options: []
156
-
157
- require_paths:
145
+ require_paths:
158
146
  - lib
159
- required_ruby_version: !ruby/object:Gem::Requirement
160
- none: false
161
- requirements:
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
162
149
  - - ">="
163
- - !ruby/object:Gem::Version
164
- hash: 3
165
- segments:
166
- - 0
167
- version: "0"
168
- required_rubygems_version: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
171
154
  - - ">="
172
- - !ruby/object:Gem::Version
173
- hash: 3
174
- segments:
175
- - 0
176
- version: "0"
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
177
157
  requirements: []
178
-
179
158
  rubyforge_project:
180
- rubygems_version: 1.8.27
159
+ rubygems_version: 2.0.15
181
160
  signing_key:
182
- specification_version: 3
161
+ specification_version: 4
183
162
  summary: RVM / Capistrano Integration Gem
184
- test_files:
163
+ test_files:
164
+ - spec/support/abort_matcher.rb
165
+ - spec/support/capistrano.rb
185
166
  - spec/spec_helper.rb
186
167
  - spec/create_gemset_spec.rb
187
- - spec/install_ruby_spec.rb
188
168
  - spec/empty_gemset_spec.rb
189
- - spec/support/capistrano.rb
190
- - spec/support/abort_matcher.rb
169
+ - spec/install_ruby_spec.rb
191
170
  - spec/rvm_paths_spec.rb
171
+ has_rdoc: