rconf 0.9.18 → 0.9.19
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +77 -22
- data/Rakefile +4 -4
- data/bin/rconf +2 -2
- data/lib/rconf/command.rb +5 -5
- data/lib/rconf/configurator_registry.rb +1 -1
- data/lib/rconf/configurators/build_configurator.rb +2 -2
- data/lib/rconf/configurators/bundler_configurator.rb +3 -3
- data/lib/rconf/configurators/cassandra_configurator.rb +4 -4
- data/lib/rconf/configurators/execute_configurator.rb +1 -1
- data/lib/rconf/configurators/git_repo_configurator.rb +4 -4
- data/lib/rconf/configurators/mercurial_configurator.rb +2 -2
- data/lib/rconf/configurators/packages_configurator.rb +1 -1
- data/lib/rconf/configurators/passenger_configurator.rb +26 -26
- data/lib/rconf/configurators/ruby_configurator.rb +1 -1
- data/lib/rconf/language.rb +2 -2
- data/lib/rconf/platform.rb +3 -3
- data/lib/rconf/platforms/darwin.rb +0 -1
- data/lib/rconf/platforms/linux.rb +1 -1
- data/lib/rconf/platforms/windows.rb +1 -1
- data/lib/rconf/profile.rb +3 -3
- data/lib/rconf/progress_reporter.rb +2 -2
- data/lib/rconf/progress_reporters/base_reporter.rb +2 -2
- data/lib/rconf/progress_reporters/file_reporter.rb +1 -1
- data/lib/rconf/progress_reporters/stdout_reporter.rb +1 -1
- data/lib/rconf/ruby_extensions.rb +3 -3
- data/lib/rconf/support/brew_installer.rb +3 -3
- data/lib/rconf/support/environment_updater.rb +2 -2
- data/lib/rconf/support/package_installer.rb +6 -6
- data/lib/rconf/trollop.rb +4 -4
- data/lib/rconf/version.rb +2 -2
- data/lib/rconf.rb +1 -1
- data/rconf.rconf +2 -2
- data/spec/command_spec.rb +2 -3
- data/spec/configurator_spec.rb +2 -4
- data/spec/configurators/build_configurator_spec.rb +1 -1
- data/spec/configurators/bundler_configurator_spec.rb +2 -3
- data/spec/configurators/git_repo_configurator_spec.rb +1 -2
- data/spec/configurators/packages_configurator_spec.rb +2 -2
- data/spec/configurators/passenger_configurator_spec.rb +1 -1
- data/spec/configurators/ruby_configurator_spec.rb +1 -1
- data/spec/language_spec.rb +1 -2
- data/spec/progress_reporters/base_reporter_spec.rb +2 -1
- data/spec/progress_reporters/file_reporter_spec.rb +1 -2
- data/spec/progress_reporters/stdout_reporter_spec.rb +1 -1
- data/spec/ruby_extensions_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -3
- data/spec/support/package_installer_spec.rb +2 -2
- metadata +22 -13
data/README.rdoc
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
= rconf
|
3
|
+
|
2
4
|
|
3
5
|
== INTRODUCTION
|
4
6
|
|
@@ -11,9 +13,9 @@ application to another for development in particular is quickly becoming
|
|
11
13
|
close to impossible.
|
12
14
|
|
13
15
|
rconf aims at addressing some of these difficulties by providing a uniform
|
14
|
-
and consistent mechanism for applications developed at RightScale to
|
16
|
+
and consistent mechanism for applications developed at RightScale to
|
15
17
|
declaratively specify the tools they depend on various platforms (linux, darwin
|
16
|
-
and potentially windows).
|
18
|
+
and potentially windows).
|
17
19
|
|
18
20
|
rconf uses a DSL close to Chef recipes for defining an application configuration.
|
19
21
|
Each application must be equipped with a definition that must reside at the top
|
@@ -21,37 +23,76 @@ level directory of the application and use the '.rconf' file extension. When run
|
|
21
23
|
for the first time rconf sets up a .rvmrc file which gets invoked and sets up
|
22
24
|
the environment each time the application directory gets 'cd-ed' into.
|
23
25
|
|
24
|
-
Internally rconf relies on 'configurators' to configure the machine
|
26
|
+
Internally rconf relies on 'configurators' to configure the machine
|
25
27
|
appropriately. There is one configurator per tool that needs configuration.
|
26
28
|
Each configurator is dynamically instantiated by rconf as it reads the
|
27
29
|
application configuration file. This makes for an extensible system where new
|
28
|
-
configurator may be added to configure new tools that new applications may
|
30
|
+
configurator may be added to configure new tools that new applications may
|
29
31
|
rely on.
|
30
32
|
|
31
|
-
== REQUIREMENTS
|
32
33
|
|
33
|
-
|
34
|
+
== REQUIREMENTS
|
34
35
|
|
35
|
-
|
36
|
+
=== Linux and Mac OS X
|
36
37
|
|
37
38
|
- ruby >= 1.8.6
|
38
39
|
- curl
|
39
40
|
- tar
|
40
41
|
|
41
|
-
|
42
|
+
=== Windows
|
42
43
|
|
43
44
|
- ruby >= 1.8.6
|
44
45
|
- Win32API gem
|
45
46
|
|
46
|
-
=== Unit testing
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
== INSTALLING
|
49
|
+
|
50
|
+
There are two installation cases
|
51
|
+
|
52
|
+
a) you've already got a working install of RVM
|
53
|
+
b) blank system
|
54
|
+
|
55
|
+
=== a) Installing when RVM is already present
|
56
|
+
|
57
|
+
It should be as simple as:
|
58
|
+
|
59
|
+
gem install rconf
|
60
|
+
|
61
|
+
and then moving to your repository and running:
|
62
|
+
|
63
|
+
rconf
|
64
|
+
|
65
|
+
to let rconf prepare your environment for the repository.
|
66
|
+
|
67
|
+
=== b) Installing on a blank system
|
68
|
+
|
69
|
+
If your system fits the requirements listed above, installing rconf will
|
70
|
+
require you to make a system install of rconf:
|
71
|
+
|
72
|
+
sudo gem install rconf
|
73
|
+
|
74
|
+
then you can go to your repository and run
|
75
|
+
|
76
|
+
rconf
|
77
|
+
|
78
|
+
If you do not have a x.rconf equipped directory and you want rconf to install rvm for
|
79
|
+
you, you can create a file named dummy.rconf containing:
|
80
|
+
|
81
|
+
ruby do
|
82
|
+
version 'ruby-1.9.2-p290'
|
83
|
+
rubygems '1.8.10'
|
84
|
+
end
|
85
|
+
|
86
|
+
and then run rconf against it:
|
87
|
+
|
88
|
+
rconf dummy.rconf
|
89
|
+
|
90
|
+
=== rconf and existing .rvmrc files
|
91
|
+
|
92
|
+
If you have pre-existing .rvmrc files and they don't play well with your
|
93
|
+
.rconf configuration file, don't hesitate to delete them and run rconf.
|
94
|
+
rconf will create a new, working, .rvmrc.
|
51
95
|
|
52
|
-
Then the build can be tested with
|
53
|
-
|
54
|
-
rake spec
|
55
96
|
|
56
97
|
== WRITING RCONF CONFIGURATION FILES
|
57
98
|
|
@@ -70,9 +111,23 @@ executed in order. For a complete list of available configurators run:
|
|
70
111
|
|
71
112
|
The same configurator can appear multiple times in a configuration file.
|
72
113
|
|
73
|
-
== EXTENDING RCONF WITH NEW CONFIGURATORS
|
74
114
|
|
75
|
-
|
115
|
+
== DEVELOPING RCONF AND FOR RCONF
|
116
|
+
|
117
|
+
=== Requirements
|
118
|
+
|
119
|
+
Install the following gems for testing:
|
120
|
+
- rspec >= 2.0
|
121
|
+
- flexmock
|
122
|
+
|
123
|
+
Then the build can be tested with
|
124
|
+
|
125
|
+
rake spec
|
126
|
+
|
127
|
+
|
128
|
+
=== Extending rconf with new configurators
|
129
|
+
|
130
|
+
Writing a configurator consists of writing a ruby class which includes the
|
76
131
|
+RightConf::Configurator+ module and uses the class methods define there to
|
77
132
|
register, provide a description and list its settings.
|
78
133
|
|
@@ -83,7 +138,7 @@ The exact methods are:
|
|
83
138
|
- +settings+: The value should be a hash where the keys are the settings names (ruby symbols) and the value is the setting description.
|
84
139
|
- +validate_has_settings+: An array of settings names (symbols) for all settings that must be set for a configuration to be valid when using that configurator.
|
85
140
|
|
86
|
-
The configurator class then needs to implement the +run+ method which gets
|
141
|
+
The configurator class then needs to implement the +run+ method which gets
|
87
142
|
called whenever rconf executes a configuration section using the configurator.
|
88
143
|
|
89
144
|
Alternatively the configurator class may implement +run_<platform>+ where
|
@@ -91,12 +146,12 @@ Alternatively the configurator class may implement +run_<platform>+ where
|
|
91
146
|
implementation needs to be platform specific.
|
92
147
|
|
93
148
|
The configurator can also provide distribution specific implementations by
|
94
|
-
implementing +run_<platform>_<flavor>+ where +<flavor>+ depends on the
|
149
|
+
implementing +run_<platform>_<flavor>+ where +<flavor>+ depends on the
|
95
150
|
platform and can take the values 'ubuntu', 'centos' etc. (linux).
|
96
151
|
|
97
|
-
Finally the +run+ method can also be implemented using the full specification
|
152
|
+
Finally the +run+ method can also be implemented using the full specification
|
98
153
|
for a platform including the release number (e.g. +run_linux_ubuntu_10_10+). In
|
99
|
-
each case rconf will use the most specific implementation (so if both
|
154
|
+
each case rconf will use the most specific implementation (so if both
|
100
155
|
+run_linux+ and +run_linux_ubuntu+ are provided and the configurator is
|
101
156
|
running on Ubuntu then rconf will call the +run_linux_ubuntu+ implementation).
|
102
157
|
|
data/Rakefile
CHANGED
@@ -30,15 +30,15 @@ end
|
|
30
30
|
|
31
31
|
namespace :spec do
|
32
32
|
desc "Run unit tests with RCov"
|
33
|
-
RSpec::Core::RakeTask.new(:rcov) do |t|
|
33
|
+
RSpec::Core::RakeTask.new(:rcov) do |t|
|
34
34
|
t.rcov = true
|
35
35
|
t.rcov_opts = %q[--exclude "spec"]
|
36
|
-
end
|
36
|
+
end
|
37
37
|
|
38
38
|
desc "Print Specdoc for unit tests"
|
39
|
-
RSpec::Core::RakeTask.new(:doc) do |t|
|
39
|
+
RSpec::Core::RakeTask.new(:doc) do |t|
|
40
40
|
t.rspec_opts = ["--format", "documentation"]
|
41
|
-
end
|
41
|
+
end
|
42
42
|
end
|
43
43
|
|
44
44
|
# == Gem == #
|
data/bin/rconf
CHANGED
@@ -178,7 +178,7 @@ where [options] are:
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
end
|
181
|
-
|
181
|
+
|
182
182
|
# Remove rconf from all rubies/gemsets
|
183
183
|
#
|
184
184
|
# === Return
|
@@ -194,7 +194,7 @@ where [options] are:
|
|
194
194
|
end
|
195
195
|
end
|
196
196
|
end
|
197
|
-
|
197
|
+
|
198
198
|
# Actually configure environment
|
199
199
|
#
|
200
200
|
# === Parameters
|
data/lib/rconf/command.rb
CHANGED
@@ -25,7 +25,7 @@ module RightConf
|
|
25
25
|
# args(Array):: Command arguments
|
26
26
|
#
|
27
27
|
# === Options
|
28
|
-
# abort_on_failure(bool):: Whether to raise an exception in case command
|
28
|
+
# abort_on_failure(bool):: Whether to raise an exception in case command
|
29
29
|
# returns an error (false by default)
|
30
30
|
# env:: Hash of environment variables keyed by name
|
31
31
|
#
|
@@ -60,7 +60,7 @@ module RightConf
|
|
60
60
|
# args(Array):: Command arguments
|
61
61
|
#
|
62
62
|
# === Options
|
63
|
-
# abort_on_failure(bool):: Whether to raise an exception in case command
|
63
|
+
# abort_on_failure(bool):: Whether to raise an exception in case command
|
64
64
|
# returns an error (false by default)
|
65
65
|
# env:: Hash of environment variables keyed by name
|
66
66
|
#
|
@@ -82,7 +82,7 @@ module RightConf
|
|
82
82
|
# args(Array):: Command arguments
|
83
83
|
#
|
84
84
|
# === Options
|
85
|
-
# abort_on_failure(bool):: Whether to raise an exception in case command
|
85
|
+
# abort_on_failure(bool):: Whether to raise an exception in case command
|
86
86
|
# returns an error (false by default)
|
87
87
|
# env:: Hash of environment variables keyed by name
|
88
88
|
#
|
@@ -110,7 +110,7 @@ module RightConf
|
|
110
110
|
end
|
111
111
|
|
112
112
|
# Execute given command on *nix systems
|
113
|
-
#
|
113
|
+
#
|
114
114
|
# === Parameters
|
115
115
|
# command(String):: Command name
|
116
116
|
# env(Hash):: Hash of environment variables keyed by name
|
@@ -129,7 +129,7 @@ module RightConf
|
|
129
129
|
alias :execute_darwin :execute_linux
|
130
130
|
|
131
131
|
# Execute given command on Windows systems
|
132
|
-
#
|
132
|
+
#
|
133
133
|
# === Parameters
|
134
134
|
# command(String):: Command name
|
135
135
|
# env(Hash):: Hash of environment variables keyed by name
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -53,7 +53,7 @@ module RightConf
|
|
53
53
|
Dir.chdir(path) do
|
54
54
|
filename = File.basename(tarball_url)
|
55
55
|
unless File.exists?(File.join(Dir.pwd, filename))
|
56
|
-
Command.execute('curl', '-O', '-f', tarball_url, :abort_on_failure => "Failed to curl #{tarball_url}")
|
56
|
+
Command.execute('curl', '-O', '-f', tarball_url, :abort_on_failure => "Failed to curl #{tarball_url}")
|
57
57
|
end
|
58
58
|
abf = { :abort_on_failure => "Failed to uncompress #{filename}" }
|
59
59
|
case filename
|
@@ -25,7 +25,7 @@ module RightConf
|
|
25
25
|
:exclusions => 'Comma separated list of gem groups to be excluded when installing bundle',
|
26
26
|
:bundle_path => 'Path where bundle should be installed',
|
27
27
|
:gem_path => 'Path to bundler gem, e.g. "vendor/system_gems/cache"'
|
28
|
-
|
28
|
+
|
29
29
|
validate_has_settings :version
|
30
30
|
|
31
31
|
# Check whether bundler is already installed
|
@@ -55,7 +55,7 @@ module RightConf
|
|
55
55
|
# === Return
|
56
56
|
# true:: Always return true
|
57
57
|
def run_linux
|
58
|
-
install_bundler
|
58
|
+
install_bundler
|
59
59
|
report_check('Installing gems')
|
60
60
|
options = [ "_#{version}_", 'install' ]
|
61
61
|
options << "--without=#{exclusions.delete(' ')}" unless exclusions.nil?
|
@@ -93,7 +93,7 @@ module RightConf
|
|
93
93
|
report_success
|
94
94
|
end
|
95
95
|
report_check("Installing bundler #{version}")
|
96
|
-
if gem_path
|
96
|
+
if gem_path
|
97
97
|
bundler_file = [ File.join(gem_path, "bundler-#{version}.gem") ]
|
98
98
|
report_fatal("Missing bundler gem at #{bundler_file}") unless File.exist?(bundler_file)
|
99
99
|
else
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -13,7 +13,7 @@ module RightConf
|
|
13
13
|
|
14
14
|
class CassandraConfigurator
|
15
15
|
|
16
|
-
SOURCE_BASE_URL = 'http://
|
16
|
+
SOURCE_BASE_URL = 'http://archive.apache.org/dist/cassandra/VERSION/apache-cassandra-VERSION-bin.tar.gz'
|
17
17
|
DEFAULT_CASSANDRA_INSTALL = ['/opt/cassandra', File.join(ENV['HOME'], 'cassandra')]
|
18
18
|
|
19
19
|
include Configurator
|
@@ -28,7 +28,7 @@ module RightConf
|
|
28
28
|
:abort_on_failure => 'Whether to abort if Cassandra failed to install (false by default)'
|
29
29
|
|
30
30
|
validate_has_settings :version
|
31
|
-
|
31
|
+
|
32
32
|
# Check whether Cassandra is installed
|
33
33
|
#
|
34
34
|
# === Return
|
@@ -36,7 +36,7 @@ module RightConf
|
|
36
36
|
# false:: Otherwise
|
37
37
|
def check_linux
|
38
38
|
report_check('Checking for Cassandra')
|
39
|
-
installed = Command.execute('cassandra', '-h').success?
|
39
|
+
installed = Command.execute('cassandra', '-h').success?
|
40
40
|
report_result(installed)
|
41
41
|
installed
|
42
42
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -35,18 +35,18 @@ module RightConf
|
|
35
35
|
end
|
36
36
|
alias :check_darwin :check_linux
|
37
37
|
alias :check_windows :check_linux
|
38
|
-
|
38
|
+
|
39
39
|
# Clone git repo and run build commands if given
|
40
40
|
#
|
41
41
|
# === Return
|
42
42
|
# true:: Always return true
|
43
43
|
def run_linux
|
44
44
|
if File.exist?(path)
|
45
|
-
FileUtils.mv(path, "#{path}_old")
|
45
|
+
FileUtils.mv(path, "#{path}_old")
|
46
46
|
post_note "Had to move #{path} to #{path}_old"
|
47
47
|
end
|
48
48
|
report_check("Cloning #{repo} into #{path}")
|
49
|
-
Command.execute('git', 'clone', repo, path,
|
49
|
+
Command.execute('git', 'clone', repo, path,
|
50
50
|
:abort_on_failure => "Failed to clone #{repo} into #{path}")
|
51
51
|
report_success
|
52
52
|
if tag
|
@@ -33,7 +33,7 @@ module RightConf
|
|
33
33
|
# false:: Otherwise
|
34
34
|
def check_linux
|
35
35
|
report_check("Checking for Mercurial")
|
36
|
-
installed = Command.execute('hg', '--version').success?
|
36
|
+
installed = Command.execute('hg', '--version').success?
|
37
37
|
report_result(installed)
|
38
38
|
installed
|
39
39
|
end
|
@@ -49,7 +49,7 @@ module RightConf
|
|
49
49
|
PackageInstaller.install('mercurial', opts)
|
50
50
|
end
|
51
51
|
|
52
|
-
# Brew does not have a package for mercurial :(
|
52
|
+
# Brew does not have a package for mercurial :(
|
53
53
|
#
|
54
54
|
# === Return
|
55
55
|
# true:: Always return true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -32,7 +32,7 @@ module RightConf
|
|
32
32
|
:gem_version => "Passenger gem version #{PASSENGER_GEM_VERSION} by default",
|
33
33
|
:install_path => 'Path to nginx installation directory, uses /opt/nginx if it ' +
|
34
34
|
'is writable by the current user or ~/nginx otherwise by default'
|
35
|
-
|
35
|
+
|
36
36
|
# Check that passenger gem is installed and that passenger+nginx is installed
|
37
37
|
#
|
38
38
|
# === Return
|
@@ -75,7 +75,7 @@ module RightConf
|
|
75
75
|
end
|
76
76
|
alias :run_darwin :run_linux
|
77
77
|
|
78
|
-
# Not implemented on windows
|
78
|
+
# Not implemented on windows
|
79
79
|
#
|
80
80
|
# === Raise
|
81
81
|
# (Exception):: Always raise
|
@@ -141,7 +141,7 @@ module RightConf
|
|
141
141
|
|
142
142
|
# Install passenger+nginx
|
143
143
|
#
|
144
|
-
# === Return
|
144
|
+
# === Return
|
145
145
|
# true:: Always return true
|
146
146
|
def install_passenger
|
147
147
|
report_check('Installing passenger+nginx')
|
@@ -184,7 +184,7 @@ module RightConf
|
|
184
184
|
def log_path
|
185
185
|
File.join(install_path, 'logs', 'nginx-error.log')
|
186
186
|
end
|
187
|
-
|
187
|
+
|
188
188
|
# Nginx pid file path
|
189
189
|
def pid_path
|
190
190
|
File.join(install_path, 'logs', 'nginx.pid')
|
@@ -232,7 +232,7 @@ http {
|
|
232
232
|
gzip_disable "MSIE [1-6]\.";
|
233
233
|
gzip_proxied any;
|
234
234
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
235
|
-
|
235
|
+
|
236
236
|
server {
|
237
237
|
ssi on;
|
238
238
|
listen 3000;
|
@@ -240,59 +240,59 @@ http {
|
|
240
240
|
root #{File.join(right_site_src_path, 'public')};
|
241
241
|
passenger_enabled on;
|
242
242
|
rails_env development;
|
243
|
-
|
243
|
+
|
244
244
|
# POST and AJAX requests need to proxied directly to the library app
|
245
245
|
#####################################################################
|
246
246
|
set $is_library_direct "";
|
247
|
-
|
247
|
+
|
248
248
|
# provisioning routes to the library
|
249
249
|
if ($request_uri ~ ^/provisioning)
|
250
250
|
{
|
251
251
|
rewrite ^/provisioning(.*)$ /direct_library/provisioning$1 last;
|
252
252
|
}
|
253
|
-
|
253
|
+
|
254
254
|
if ($request_uri ~ ^/aria_provisioning_callbacks)
|
255
255
|
{
|
256
256
|
rewrite ^/aria_provisioning_callbacks(.*)$ /direct_library/aria_provisioning_callbacks$1 last;
|
257
257
|
}
|
258
|
-
|
259
|
-
# request is for a library related action
|
258
|
+
|
259
|
+
# request is for a library related action
|
260
260
|
if ($request_uri ~ ^/library/)
|
261
261
|
{
|
262
262
|
set $is_library_direct L;
|
263
263
|
}
|
264
|
-
|
264
|
+
|
265
265
|
# request is a POST
|
266
266
|
if ($request_method = POST)
|
267
267
|
{
|
268
|
-
set $is_library_direct "${is_library_direct}P";
|
268
|
+
set $is_library_direct "${is_library_direct}P";
|
269
269
|
}
|
270
|
-
|
270
|
+
|
271
271
|
# request is an AJAX
|
272
272
|
if ($http_x_requested_with = XMLHttpRequest)
|
273
|
-
{
|
273
|
+
{
|
274
274
|
set $is_library_direct "${is_library_direct}A";
|
275
275
|
}
|
276
|
-
|
276
|
+
|
277
277
|
# library post request should be directly proxied
|
278
278
|
if ($is_library_direct = LP)
|
279
279
|
{
|
280
280
|
rewrite ^/library/(.*)$ /direct_library/$1 last;
|
281
281
|
}
|
282
|
-
|
282
|
+
|
283
283
|
# library post ajax request should be directly proxied
|
284
284
|
if ($is_library_direct = LPA)
|
285
285
|
{
|
286
286
|
rewrite ^/library/(.*)$ /direct_library/$1 last;
|
287
287
|
}
|
288
|
-
|
288
|
+
|
289
289
|
# library ajax request should be directly proxied
|
290
290
|
if ($is_library_direct = LA)
|
291
291
|
{
|
292
292
|
rewrite ^/library/(.*)$ /direct_library/$1 last;
|
293
293
|
}
|
294
294
|
#####################################################################
|
295
|
-
|
295
|
+
|
296
296
|
location /direct_library/
|
297
297
|
{
|
298
298
|
proxy_pass http://library.rightscale.local:3001/;
|
@@ -300,27 +300,27 @@ http {
|
|
300
300
|
proxy_set_header X-Embedded on;
|
301
301
|
proxy_set_header X-Core-Site-Domain right-site.rightscale.local;
|
302
302
|
}
|
303
|
-
|
303
|
+
|
304
304
|
location ~ ^/library/users/(.+)/openid_consume
|
305
305
|
{
|
306
306
|
proxy_pass http://library.rightscale.local:3001/users/$1/openid_consume?$args;
|
307
307
|
proxy_set_header X-Relative-Root library;
|
308
308
|
proxy_set_header X-Embedded on;
|
309
309
|
}
|
310
|
-
|
311
|
-
|
310
|
+
|
311
|
+
|
312
312
|
location ~ ^/library/(.*).(css|js)
|
313
313
|
{
|
314
|
-
# library assets get proxied directly to the library app
|
314
|
+
# library assets get proxied directly to the library app
|
315
315
|
proxy_pass http://library.rightscale.local:3001/$1.$2;
|
316
316
|
}
|
317
|
-
|
317
|
+
|
318
318
|
location /library_images/
|
319
319
|
{
|
320
320
|
proxy_pass http://library.rightscale.local:3001/library_images/;
|
321
321
|
}
|
322
|
-
|
323
|
-
|
322
|
+
|
323
|
+
|
324
324
|
location /library_rest/
|
325
325
|
{
|
326
326
|
proxy_pass http://127.0.0.1:3001/;
|
data/lib/rconf/language.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -74,7 +74,7 @@ module RightConf
|
|
74
74
|
# === Return
|
75
75
|
# true:: Always return true
|
76
76
|
def method_missing(meth, *args, &blk)
|
77
|
-
if blk
|
77
|
+
if blk
|
78
78
|
klass = ConfiguratorRegistry[meth]
|
79
79
|
if klass
|
80
80
|
configurator = klass.new(@configurators.size)
|
data/lib/rconf/platform.rb
CHANGED
@@ -63,14 +63,14 @@ module RightConf
|
|
63
63
|
# Platform.dispatch(2) { :echo }
|
64
64
|
#
|
65
65
|
# will result in 'echo_linux(2)' being executed in self if running on linux,
|
66
|
-
# 'echo_windows(2)' if running on Windows and 'echo_darwin(2)' if on
|
66
|
+
# 'echo_windows(2)' if running on Windows and 'echo_darwin(2)' if on
|
67
67
|
# Mac OS X. Note that the method is run in the instance of the caller.
|
68
68
|
#
|
69
69
|
# === Parameters
|
70
70
|
# args:: Pass-through arguments
|
71
71
|
#
|
72
72
|
# === Block
|
73
|
-
# Given block should not take any argument and return a symbol for the
|
73
|
+
# Given block should not take any argument and return a symbol for the
|
74
74
|
# method that should be called
|
75
75
|
#
|
76
76
|
# === Return
|
@@ -82,7 +82,7 @@ module RightConf
|
|
82
82
|
target = dispatch_candidates(meth).detect do |candidate|
|
83
83
|
binding.respond_to?(candidate)
|
84
84
|
end
|
85
|
-
raise "No platform dispatch target found in #{binding.class} for " +
|
85
|
+
raise "No platform dispatch target found in #{binding.class} for " +
|
86
86
|
"'#{meth.inspect}', tried " + dispatch_candidates(meth).join(', ') unless target
|
87
87
|
binding.__send__(target, *args)
|
88
88
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
2
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
3
3
|
#
|
4
4
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
5
5
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
data/lib/rconf/profile.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -56,7 +56,7 @@ module RightConf
|
|
56
56
|
|
57
57
|
# Delete profile from disk
|
58
58
|
#
|
59
|
-
# === Return
|
59
|
+
# === Return
|
60
60
|
# true:: Always return true
|
61
61
|
def reset
|
62
62
|
File.delete(profile_path) if File.file?(profile_path)
|
@@ -90,7 +90,7 @@ module RightConf
|
|
90
90
|
res = @force_check || false
|
91
91
|
end
|
92
92
|
|
93
|
-
# Bypass checks and always reconfigure
|
93
|
+
# Bypass checks and always reconfigure
|
94
94
|
#
|
95
95
|
# === Return
|
96
96
|
# true:: Always return true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -21,7 +21,7 @@ module RightConf
|
|
21
21
|
# base(Object):: Object including this module
|
22
22
|
def self.included(base)
|
23
23
|
@@reporters ||= []
|
24
|
-
[ :report_section, :report, :report_check, :report_success,
|
24
|
+
[ :report_section, :report, :report_check, :report_success,
|
25
25
|
:report_failure, :report_error, :report_fatal, :report_result ].each do |meth|
|
26
26
|
meta_def(meth) { |*args| @@reporters.each { |r| r.__send__(meth, *args) } }
|
27
27
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -25,7 +25,7 @@ module RightConf
|
|
25
25
|
# - report_failure:: Report check failure
|
26
26
|
# - report_result:: Report check success or failure depending on argument
|
27
27
|
#
|
28
|
-
# Alternatively reporters can override any associated formatting method
|
28
|
+
# Alternatively reporters can override any associated formatting method
|
29
29
|
# (:format_message, :format_section, etc.) and/or the :write method used to
|
30
30
|
# write the progress report.
|
31
31
|
class BaseReporter
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -46,9 +46,9 @@ class String
|
|
46
46
|
def purple; colorize("\e[35m"); end
|
47
47
|
def cyan; colorize("\e[36m"); end
|
48
48
|
def white; colorize("\e[37m"); end
|
49
|
-
def colorize(color_code)
|
49
|
+
def colorize(color_code)
|
50
50
|
# Doesn't work with the Windows prompt...
|
51
|
-
(RightConf::Platform.windows? || !$stdout.isatty) ? to_s : "#{color_code}#{to_s}\e[0m"
|
51
|
+
(RightConf::Platform.windows? || !$stdout.isatty) ? to_s : "#{color_code}#{to_s}\e[0m"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -20,7 +20,7 @@ module RightConf
|
|
20
20
|
# === Return
|
21
21
|
# true:: Always return true
|
22
22
|
def self.check_and_install
|
23
|
-
installed = Command.execute('brew', '--version').success?
|
23
|
+
installed = Command.execute('brew', '--version').success?
|
24
24
|
return true if installed
|
25
25
|
new.install
|
26
26
|
end
|
@@ -66,7 +66,7 @@ module RightConf
|
|
66
66
|
report("The following directories had their group set to staff: #{chgrps.join(', ')}")
|
67
67
|
end
|
68
68
|
unless ENV['PATH'].split(':').include? '/usr/local/bin'
|
69
|
-
report('/usr/local/bin is not in your PATH.')
|
69
|
+
report('/usr/local/bin is not in your PATH.')
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -54,7 +54,7 @@ module RightConf
|
|
54
54
|
updated = false
|
55
55
|
if bashrc_path
|
56
56
|
content = IO.read(bashrc_path)
|
57
|
-
unless content.include?(code)
|
57
|
+
unless content.include?(code)
|
58
58
|
i = dependencies.inject(nil) do |m, d|
|
59
59
|
index = content.index(/^\s*#{d}=/)
|
60
60
|
m = if m.nil?
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -27,7 +27,7 @@ module RightConf
|
|
27
27
|
# === Block
|
28
28
|
# If a block is given it will get called with no argument prior to the
|
29
29
|
# packages being installed. If the block returns true then installation
|
30
|
-
# will proceed otherwise it won't. Use the block to check whether
|
30
|
+
# will proceed otherwise it won't. Use the block to check whether
|
31
31
|
# installation is required or whether the packages are already installed.
|
32
32
|
# If no block is given then installation will always occur.
|
33
33
|
#
|
@@ -58,8 +58,8 @@ module RightConf
|
|
58
58
|
# === Return
|
59
59
|
# true:: Always return true
|
60
60
|
def install_linux_ubuntu(packages, opts)
|
61
|
-
return if packages.nil?
|
62
|
-
args = packages.dup
|
61
|
+
return if packages.nil?
|
62
|
+
args = packages.dup
|
63
63
|
args << opts if opts
|
64
64
|
Command.sudo('apt-get', 'install', '-y', *args)
|
65
65
|
end
|
@@ -71,7 +71,7 @@ module RightConf
|
|
71
71
|
# true:: Always return true
|
72
72
|
def install_linux_centos(packages, opts)
|
73
73
|
return if packages.nil?
|
74
|
-
args = packages.dup
|
74
|
+
args = packages.dup
|
75
75
|
args << opts if opts
|
76
76
|
Command.sudo('yum', 'install', '-y', *args)
|
77
77
|
end
|
@@ -92,7 +92,7 @@ module RightConf
|
|
92
92
|
Command.sudo('brew', 'link', p) if installed
|
93
93
|
end
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
# Install Windows software
|
97
97
|
#
|
98
98
|
# === Return
|
data/lib/rconf/trollop.rb
CHANGED
@@ -12,7 +12,7 @@ VERSION = "1.16.2"
|
|
12
12
|
## Thrown by Parser in the event of a commandline error. Not needed if
|
13
13
|
## you're using the Trollop::options entry.
|
14
14
|
class CommandlineError < StandardError; end
|
15
|
-
|
15
|
+
|
16
16
|
## Thrown by Parser if the user passes in '-h' or '--help'. Handled
|
17
17
|
## automatically by Trollop#options.
|
18
18
|
class HelpNeeded < StandardError; end
|
@@ -250,7 +250,7 @@ class Parser
|
|
250
250
|
syms.each { |sym| raise ArgumentError, "unknown option '#{sym}'" unless @specs[sym] }
|
251
251
|
@constraints << [:depends, syms]
|
252
252
|
end
|
253
|
-
|
253
|
+
|
254
254
|
## Marks two (or more!) options as conflicting.
|
255
255
|
def conflicts *syms
|
256
256
|
syms.each { |sym| raise ArgumentError, "unknown option '#{sym}'" unless @specs[sym] }
|
@@ -426,7 +426,7 @@ class Parser
|
|
426
426
|
# call this unless the cursor's at the beginning of a line.
|
427
427
|
|
428
428
|
left = {}
|
429
|
-
@specs.each do |name, spec|
|
429
|
+
@specs.each do |name, spec|
|
430
430
|
left[name] = "--#{spec[:long]}" +
|
431
431
|
(spec[:short] && spec[:short] != :none ? ", -#{spec[:short]}" : "") +
|
432
432
|
case spec[:type]
|
@@ -647,7 +647,7 @@ private
|
|
647
647
|
start = 0
|
648
648
|
ret = []
|
649
649
|
until start > str.length
|
650
|
-
nextt =
|
650
|
+
nextt =
|
651
651
|
if start + width >= str.length
|
652
652
|
str.length
|
653
653
|
else
|
data/lib/rconf/version.rb
CHANGED
@@ -13,7 +13,7 @@ module RightConf
|
|
13
13
|
|
14
14
|
MAJOR = 0
|
15
15
|
MINOR = 9
|
16
|
-
BUILD =
|
16
|
+
BUILD = 19
|
17
17
|
|
18
18
|
VERSION = [MAJOR, MINOR, BUILD].map(&:to_s).join('.')
|
19
19
|
|
@@ -23,7 +23,7 @@ the content of an application configuration file and installs and/or
|
|
23
23
|
configures the required tools for running or developing the corresponding
|
24
24
|
application. rconf can easily be extended to configure new tools and makes
|
25
25
|
it easy to support multiple platforms.
|
26
|
-
Consult the README.rdoc file for information on how to write rconf
|
26
|
+
Consult the README.rdoc file for information on how to write rconf
|
27
27
|
configuration files.
|
28
28
|
EOS
|
29
29
|
|
data/lib/rconf.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
data/rconf.rconf
CHANGED
data/spec/command_spec.rb
CHANGED
@@ -27,12 +27,12 @@ describe RightConf::Command do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should report fatal errors when required to' do
|
30
|
-
flexmock(RightConf::Platform.instance).should_receive(:dispatch).with('test', nil, '42',
|
30
|
+
flexmock(RightConf::Platform.instance).should_receive(:dispatch).with('test', nil, '42',
|
31
31
|
Proc).once.and_return(failed_result)
|
32
32
|
flexmock(RightConf::Command.instance).should_receive(:report_fatal).once.with("FAILED: 'test 42' returned\n1")
|
33
33
|
RightConf::Command.execute('test', '42', :abort_on_failure => 'FAILED')
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
it 'should setup environment variables' do
|
37
37
|
ENV['THIS_IS_A_TEST_ENV_VALUE'].should be_nil
|
38
38
|
res = RightConf::Command.execute('env', :env => { 'THIS_IS_A_TEST_ENV_VALUE' => '42' })
|
@@ -42,4 +42,3 @@ describe RightConf::Command do
|
|
42
42
|
|
43
43
|
end
|
44
44
|
|
45
|
-
|
data/spec/configurator_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -37,7 +37,7 @@ describe RightConf::Configurator do
|
|
37
37
|
before(:each) do
|
38
38
|
@configurator = TestConfigurator.new(1)
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
it 'should register configurators' do
|
42
42
|
RightConf::ConfiguratorRegistry[:test].should == TestConfigurator
|
43
43
|
RightConf::ConfiguratorRegistry[:another].should == AnotherConfigurator
|
@@ -88,5 +88,3 @@ describe RightConf::Configurator do
|
|
88
88
|
|
89
89
|
end
|
90
90
|
|
91
|
-
|
92
|
-
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -33,7 +33,7 @@ describe RightConf::BundlerConfigurator do
|
|
33
33
|
|
34
34
|
it 'should install bundler if needed' do
|
35
35
|
should_execute_in_ruby('bundle', '--version').once.and_return(success_result('1'))
|
36
|
-
should_execute_in_ruby('bundle','_0_', 'install',
|
36
|
+
should_execute_in_ruby('bundle','_0_', 'install',
|
37
37
|
{:abort_on_failure=>"Failed to install gems"}).once.and_return(success_result)
|
38
38
|
should_execute_in_ruby('gem', 'uninstall', 'bundler', '-a', '-x').once.and_return(success_result)
|
39
39
|
should_execute_in_ruby('gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc',
|
@@ -41,5 +41,4 @@ describe RightConf::BundlerConfigurator do
|
|
41
41
|
@configurator.run_linux
|
42
42
|
end
|
43
43
|
|
44
|
-
|
45
44
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -52,4 +52,3 @@ describe RightConf::GitRepoConfigurator do
|
|
52
52
|
|
53
53
|
end
|
54
54
|
|
55
|
-
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -37,4 +37,4 @@ describe RightConf::PackagesConfigurator do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
40
|
-
|
40
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -36,7 +36,7 @@ describe RightConf::RubyConfigurator do
|
|
36
36
|
it 'should install rvm if needed' do
|
37
37
|
rvm_tar = "rvm-#{RVM_VERSION}.tar.gz"
|
38
38
|
should_execute('rvm', '--version').once.and_return(success_result("rvm"))
|
39
|
-
should_execute('curl', '-O', '-f', "https://rvm.
|
39
|
+
should_execute('curl', '-O', '-f', "https://rvm.io/releases/#{rvm_tar}",
|
40
40
|
{:abort_on_failure=>"Failed to download rvm #{RVM_VERSION}"}).once.and_return(success_result)
|
41
41
|
should_execute('tar', 'zxf', rvm_tar,
|
42
42
|
{:abort_on_failure=>"Failed to extract rvm tgz from #{File.expand_path(File.join(File.dirname(__FILE__), '..', '..', "rvm-#{RVM_VERSION}.tar.gz"))}"}).once.and_return(success_result)
|
data/spec/language_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -55,6 +55,5 @@ describe RightConf::Language do
|
|
55
55
|
{ :version => '3' }
|
56
56
|
end
|
57
57
|
|
58
|
-
|
59
58
|
end
|
60
59
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -82,3 +82,4 @@ describe RightConf::BaseReporter do
|
|
82
82
|
end
|
83
83
|
|
84
84
|
end
|
85
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -28,4 +28,3 @@ describe RightConf::FileReporter do
|
|
28
28
|
|
29
29
|
end
|
30
30
|
|
31
|
-
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -15,7 +15,7 @@ require "flexmock"
|
|
15
15
|
|
16
16
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'rconf')
|
17
17
|
|
18
|
-
RSpec.configure do |c|
|
18
|
+
RSpec.configure do |c|
|
19
19
|
c.mock_with(:flexmock)
|
20
20
|
end
|
21
21
|
|
@@ -35,7 +35,7 @@ def create_configurator(code, opts={})
|
|
35
35
|
end
|
36
36
|
flexmock(configurator).should_receive(:report_fatal).and_return { |*args| raise args.join(' ') }
|
37
37
|
flexmock(File).should_receive(:exist?).with(File.join(ENV['HOME'], '.rconf')).and_return(false)
|
38
|
-
flexmock(RightConf::EnvironmentUpdater).should_receive(:update) unless opts[:enable_updater]
|
38
|
+
flexmock(RightConf::EnvironmentUpdater).should_receive(:update) unless opts[:enable_updater]
|
39
39
|
configurator
|
40
40
|
end
|
41
41
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
|
1
|
+
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
|
2
2
|
#
|
3
3
|
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
4
|
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
@@ -48,4 +48,4 @@ describe RightConf::PackageInstaller do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
end
|
51
|
-
|
51
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rconf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-04 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70217314208600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.5'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70217314208600
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: flexmock
|
27
|
-
requirement: &
|
27
|
+
requirement: &70217314204080 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,13 +32,22 @@ dependencies:
|
|
32
32
|
version: '0.9'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
description: !
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
version_requirements: *70217314204080
|
36
|
+
description: ! 'rconf configures the environment for a given application. rconf reads
|
37
|
+
|
38
|
+
the content of an application configuration file and installs and/or
|
39
|
+
|
40
|
+
configures the required tools for running or developing the corresponding
|
41
|
+
|
42
|
+
application. rconf can easily be extended to configure new tools and makes
|
43
|
+
|
44
|
+
it easy to support multiple platforms.
|
45
|
+
|
46
|
+
Consult the README.rdoc file for information on how to write rconf
|
47
|
+
|
48
|
+
configuration files.
|
49
|
+
|
50
|
+
'
|
42
51
|
email:
|
43
52
|
- raphael@rightscale.com
|
44
53
|
executables:
|
@@ -121,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
130
|
version: '0'
|
122
131
|
requirements: []
|
123
132
|
rubyforge_project: rconf
|
124
|
-
rubygems_version: 1.8.
|
133
|
+
rubygems_version: 1.8.11
|
125
134
|
signing_key:
|
126
135
|
specification_version: 3
|
127
136
|
summary: Cross platform environment configuration
|