rvm-capistrano 1.5.0.rc1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.5.0 / 2013-09-04
2
+
3
+ * Add rvm:info & rvm:list for easier debugging
4
+
1
5
  ### 1.5.0.rc1 / 2013-08-18
2
6
 
3
7
  * Thanks to @aspiers for the great work:
data/Manifest.yml CHANGED
@@ -10,6 +10,7 @@
10
10
  - lib/rvm/capistrano/empty_gemset.rb
11
11
  - lib/rvm/capistrano/gem_install_uninstall.rb
12
12
  - lib/rvm/capistrano/gemset_import_export.rb
13
+ - lib/rvm/capistrano/info_list.rb
13
14
  - lib/rvm/capistrano/install_pkgs.rb
14
15
  - lib/rvm/capistrano/install_ruby.rb
15
16
  - lib/rvm/capistrano/install_rvm.rb
data/README.md CHANGED
@@ -33,7 +33,8 @@ modules which allow selecting which parts of it should be included.
33
33
  - `base` - minimal code, does not change behaviors, only provides definitions like `:rvm_shell`
34
34
  - `selector` - extends `base` to automatically `set :default_shell`
35
35
  - `selector_mixed` - alternative version of `selector` allowing to select which servers should be RVM aware
36
- - `install_rvm` - adds task `rvm:install_rvm`
36
+ - `info_list` - adds tasks `rvm:info`, `rvm:list` and `rvm:info_list`
37
+ - `install_rvm` - adds task `rvm:install_rvm` - it also updates rvm if already installed
37
38
  - `install_ruby` - adds task `rvm:install_ruby`
38
39
  - `create_gemset` - adds task `rvm:create_gemset`
39
40
  - `empty_gemset` - adds task `rvm:empty_gemset`
@@ -42,7 +43,7 @@ modules which allow selecting which parts of it should be included.
42
43
  - `gemset_import_export` - adds tasks `rvm:import_gemset` / `rvm:export_gemset`
43
44
  - `alias_and_wrapp` - adds tasks `rvm:create_alias` / `rvm:create_wrappers` / `rvm:show_alias_path`
44
45
 
45
- By default `rvm/capistrano` loads: `selector`, `install_rvm`, `install_ruby`, `create_gemset`.
46
+ By default `rvm/capistrano` loads: `selector`, `info_list`, `install_rvm`, `install_ruby`, `create_gemset`.
46
47
 
47
48
  Warning: `selector` and `selector_mixed` are to be used separately they can not be used both at the same time.
48
49
 
@@ -61,7 +62,7 @@ require "rvm/capistrano"
61
62
  set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
62
63
  set :rvm_autolibs_flag, "read-only" # more info: rvm help autolibs
63
64
 
64
- before 'deploy:setup', 'rvm:install_rvm' # install RVM
65
+ before 'deploy:setup', 'rvm:install_rvm' # install/update RVM
65
66
  before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, OR:
66
67
  # before 'deploy:setup', 'rvm:create_gemset' # only create gemset
67
68
  ```
@@ -84,7 +85,7 @@ require "rvm/capistrano"
84
85
 
85
86
  set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
86
87
 
87
- before 'deploy', 'rvm:install_rvm' # update RVM
88
+ before 'deploy', 'rvm:install_rvm' # install/update RVM
88
89
  before 'deploy', 'rvm:install_ruby' # install Ruby and create gemset (both if missing)
89
90
  ```
90
91
 
@@ -163,6 +164,12 @@ task :example do
163
164
  end
164
165
  ```
165
166
 
167
+ ### Show info on remote rvm and list rubies
168
+
169
+ ```bash
170
+ cap rvm:info_list
171
+ ```
172
+
166
173
  ## Options
167
174
 
168
175
  - `:rvm_ruby_string` - which ruby should be loaded
@@ -212,8 +219,11 @@ $ cap -T rvm
212
219
  cap rvm:create_gemset # Create gemset
213
220
  cap rvm:export_gemset # Export the current RVM ruby gemset contents to a file.
214
221
  cap rvm:import_gemset # Import file contents to the current RVM ruby gemset.
222
+ cap rvm:info # Show rvm info
223
+ cap rvm:info_list # Show info and list rubies
224
+ cap rvm:list # List rvm rubies
215
225
  cap rvm:install_ruby # Install RVM ruby to the server, create gemset ...
216
- cap rvm:install_rvm # Install RVM of the given choice to the server.
226
+ cap rvm:install_rvm # Install/update RVM of the given choice to the server.
217
227
  cap rvm:install_pkgs # Install RVM packages to the server.
218
228
  cap rvm:install_gem GEM=my_gem # Install gem {my_gem} on the server using selected ruby.
219
229
  # Use `ENV['GEM'] = "bundler"` in script to specify gems.
data/Rakefile CHANGED
@@ -1,9 +1,11 @@
1
1
  task :default => "spec:run"
2
2
 
3
+ require "rspec/core/rake_task"
4
+
3
5
  namespace :spec do
4
6
  desc "Run the tests."
5
- task :run do
6
- # TODO: Port over the tests.
7
+ RSpec::Core::RakeTask.new(:run) do |spec|
8
+ spec.pattern = "spec/**/*_spec.rb"
7
9
  end
8
10
  end
9
11
 
@@ -1,6 +1,7 @@
1
1
  # Recipes for using RVM on a server with capistrano.
2
2
 
3
3
  require 'rvm/capistrano/selector'
4
+ require 'rvm/capistrano/info_list'
4
5
  require 'rvm/capistrano/install_rvm'
5
6
  require 'rvm/capistrano/install_ruby'
6
7
  require 'rvm/capistrano/create_gemset'
@@ -2,7 +2,7 @@ require 'rvm/capistrano/base'
2
2
 
3
3
  rvm_with_capistrano do
4
4
  def run_silent_curl(command, options={})
5
- run_without_rvm(<<-EOF.gsub(/[\s]+/, ' '), options)
5
+ run_without_rvm(<<-EOF.gsub(/[\s]+/, ' '))
6
6
  __LAST_STATUS=0;
7
7
  export CURL_HOME="${TMPDIR:-${HOME}}/.rvm-curl-config.$$";
8
8
  mkdir ${CURL_HOME}/;
@@ -0,0 +1,23 @@
1
+ require 'rvm/capistrano/base'
2
+ require 'rvm/capistrano/helpers/with_rvm_group'
3
+
4
+ rvm_with_capistrano do
5
+ namespace :rvm do
6
+
7
+ desc "Show rvm info"
8
+ rvm_task :info do
9
+ run_rvm("info")
10
+ end
11
+
12
+ desc "List rvm rubies"
13
+ rvm_task :list do
14
+ run_rvm("list")
15
+ end
16
+
17
+ desc "Show info and list rubies"
18
+ task :info_list do
19
+ info
20
+ list
21
+ end
22
+ end
23
+ end
@@ -9,6 +9,8 @@ rvm_with_capistrano do
9
9
  # Let users set the install type of their choice.
10
10
  _cset(:rvm_install_type, :stable)
11
11
 
12
+ _cset(:rvm_install_url, "https://get.rvm.io")
13
+
12
14
  # By default system installations add deploying user to rvm group. also try :all
13
15
  _cset(:rvm_add_to_group, fetch(:user,"$USER"))
14
16
 
@@ -27,7 +29,7 @@ rvm_with_capistrano do
27
29
  set :rvm_install_shell, :zsh
28
30
  EOF
29
31
  rvm_task :install_rvm do
30
- command_fetch = "curl -L get.rvm.io"
32
+ command_fetch = "curl -L #{rvm_install_url}"
31
33
  command_install = rvm_if_sudo(:subject_class => :rvm)
32
34
  command_install << "#{rvm_install_shell} -s #{rvm_install_type} --path #{rvm_path}"
33
35
  case rvm_type
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.5.0.rc1"
3
+ VERSION="1.5.0"
4
4
  end
5
5
  end
@@ -25,8 +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) \
29
- .with(expected, :subject_class => :rubies)
28
+ @configuration.should_receive(:run_without_rvm).with(expected)
30
29
  @configuration.execute_task @task
31
30
  end
32
31
 
@@ -55,8 +54,7 @@ describe "rvm:install_ruby task" do
55
54
  rm -rf $CURL_HOME;
56
55
  exit ${__LAST_STATUS}
57
56
  EOSHELL
58
- @configuration.should_receive(:run_without_rvm) \
59
- .with(expected, :subject_class => :rubies)
57
+ @configuration.should_receive(:run_without_rvm).with(expected)
60
58
  @configuration.execute_task @task
61
59
  end
62
60
 
@@ -87,8 +85,7 @@ describe "rvm:install_ruby task" do
87
85
  rm -rf $CURL_HOME;
88
86
  exit ${__LAST_STATUS}
89
87
  EOSHELL
90
- @configuration.should_receive(:run_without_rvm) \
91
- .with(expected, :subject_class => :rubies)
88
+ @configuration.should_receive(:run_without_rvm).with(expected)
92
89
  @configuration.execute_task @task
93
90
  end
94
91
  end
@@ -116,8 +113,7 @@ describe "rvm:install_ruby task" do
116
113
  rm -rf $CURL_HOME;
117
114
  exit ${__LAST_STATUS}
118
115
  EOSHELL
119
- @configuration.should_receive(:run_without_rvm) \
120
- .with(expected, :subject_class => :rubies)
116
+ @configuration.should_receive(:run_without_rvm).with(expected)
121
117
  @configuration.execute_task @task
122
118
  end
123
119
  end
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1792655073
5
- prerelease: 6
4
+ hash: 3
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
9
  - 0
10
- - rc
11
- - 1
12
- version: 1.5.0.rc1
10
+ version: 1.5.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - Wayne E. Seguin
@@ -18,7 +16,7 @@ autorequire:
18
16
  bindir: bin
19
17
  cert_chain: []
20
18
 
21
- date: 2013-08-18 00:00:00 Z
19
+ date: 2013-09-04 00:00:00 Z
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
24
22
  name: capistrano
@@ -129,6 +127,7 @@ files:
129
127
  - lib/rvm/capistrano/empty_gemset.rb
130
128
  - lib/rvm/capistrano/gem_install_uninstall.rb
131
129
  - lib/rvm/capistrano/gemset_import_export.rb
130
+ - lib/rvm/capistrano/info_list.rb
132
131
  - lib/rvm/capistrano/install_pkgs.rb
133
132
  - lib/rvm/capistrano/install_ruby.rb
134
133
  - lib/rvm/capistrano/install_rvm.rb
@@ -169,14 +168,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
168
  required_rubygems_version: !ruby/object:Gem::Requirement
170
169
  none: false
171
170
  requirements:
172
- - - ">"
171
+ - - ">="
173
172
  - !ruby/object:Gem::Version
174
- hash: 25
173
+ hash: 3
175
174
  segments:
176
- - 1
177
- - 3
178
- - 1
179
- version: 1.3.1
175
+ - 0
176
+ version: "0"
180
177
  requirements: []
181
178
 
182
179
  rubyforge_project: