remy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/remy/bootstrap.rb +12 -3
- data/lib/remy/remy.rb +1 -1
- data/lib/remy/version.rb +1 -1
- metadata +4 -4
data/lib/remy/bootstrap.rb
CHANGED
@@ -35,15 +35,24 @@ module Remy
|
|
35
35
|
|
36
36
|
def install_rvm
|
37
37
|
remote_execute rvm_multi_user_install
|
38
|
+
add_root_user_to_rvm_group
|
38
39
|
apt_get_rvm_packages
|
39
|
-
remote_execute "
|
40
|
-
remote_execute "
|
40
|
+
remote_execute "#{source_rvm_sh} && rvm install #{ruby_version}"
|
41
|
+
remote_execute "#{source_rvm_sh} && rvm use #{ruby_version} --default"
|
41
42
|
end
|
42
43
|
|
43
44
|
def rvm_multi_user_install
|
44
45
|
'curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o rvm-installer ; chmod +x rvm-installer ; sudo -s ./rvm-installer --version latest'
|
45
46
|
end
|
46
47
|
|
48
|
+
def source_rvm_sh
|
49
|
+
"source /etc/profile.d/rvm.sh"
|
50
|
+
end
|
51
|
+
|
52
|
+
def add_root_user_to_rvm_group
|
53
|
+
remote_execute "usermod -a -G rvm root"
|
54
|
+
end
|
55
|
+
|
47
56
|
def is_ssh_copy_id_installed_locally?
|
48
57
|
`which ssh-copy-id`.length > 0
|
49
58
|
end
|
@@ -68,7 +77,7 @@ module Remy
|
|
68
77
|
raise ArgumentError.new unless version.match(/^\d[.\d]+\d/)
|
69
78
|
version_info = "-v #{version}"
|
70
79
|
end
|
71
|
-
remote_execute "
|
80
|
+
remote_execute "#{source_rvm_sh} && gem install #{gem_name} #{version_info} --no-rdoc --no-ri"
|
72
81
|
end
|
73
82
|
|
74
83
|
def remote_apt_get(package_name)
|
data/lib/remy/remy.rb
CHANGED
@@ -48,7 +48,7 @@ module Remy
|
|
48
48
|
begin
|
49
49
|
configuration.deep_merge!(YAML.load(ERB.new(File.read(filename)).result) || {})
|
50
50
|
rescue SystemCallError, IOError
|
51
|
-
|
51
|
+
# do nothing if the chef.yml file could not be read (it's not needed for every usage of remy, just certain ones)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
data/lib/remy/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Greg Woodward & Ryan Dy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-12-
|
18
|
+
date: 2011-12-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bourne
|