geminstaller 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -2
- data/Manifest.txt +2 -0
- data/TODO.txt +17 -6
- data/geminstaller.yml +1 -0
- data/lib/geminstaller/arg_parser.rb +2 -0
- data/lib/geminstaller/backward_compatibility.rb +11 -0
- data/lib/geminstaller/dependency_injector.rb +1 -1
- data/lib/geminstaller/exact_match_list_command.rb +2 -2
- data/lib/geminstaller/gem_runner_proxy.rb +2 -3
- data/lib/geminstaller/requires.rb +22 -2
- data/lib/geminstaller/rubygems_extensions.rb +5 -1
- data/lib/geminstaller/rubygems_version_checker.rb +9 -0
- data/lib/geminstaller.rb +1 -1
- data/website/src/code/index.page +1 -1
- data/website/src/documentation/tutorials.page +204 -3
- data/website/src/index.page +6 -2
- metadata +13 -7
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -11,6 +11,7 @@ lib/geminstaller.rb
|
|
11
11
|
lib/geminstaller/application.rb
|
12
12
|
lib/geminstaller/arg_parser.rb
|
13
13
|
lib/geminstaller/autogem.rb
|
14
|
+
lib/geminstaller/backward_compatibility.rb
|
14
15
|
lib/geminstaller/config.rb
|
15
16
|
lib/geminstaller/config_builder.rb
|
16
17
|
lib/geminstaller/dependency_injector.rb
|
@@ -40,6 +41,7 @@ lib/geminstaller/rogue_gem_finder.rb
|
|
40
41
|
lib/geminstaller/ruby_gem.rb
|
41
42
|
lib/geminstaller/rubygems_exit.rb
|
42
43
|
lib/geminstaller/rubygems_extensions.rb
|
44
|
+
lib/geminstaller/rubygems_version_checker.rb
|
43
45
|
lib/geminstaller/unauthorized_dependency_prompt_error.rb
|
44
46
|
lib/geminstaller/unexpected_prompt_error.rb
|
45
47
|
lib/geminstaller/valid_platform_selector.rb
|
data/TODO.txt
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
-
*
|
2
|
-
|
3
|
-
*
|
1
|
+
* Fix broken doc links Jean-Michel reported
|
2
|
+
* Allow array or eval'able string of gems to be passed as --gems arg or instead of args
|
3
|
+
* Add @options[:gems], should be parsed from
|
4
|
+
=============== 0.2.4
|
5
|
+
* Modify environment.rb for rails, not boot.rb. Fix all doc references.
|
6
|
+
* Catch permission errors, and print descriptive instructions on how to handle sudo. "Uh Oh! A gem installation failed because it did not have permission to write to the filesystem. If you want to have automated GemInstaller goodness, you'll have to fix this. Don't worry, it's easy! You have three basic choices: ..."
|
7
|
+
* docs - clean up sudo section. Should be clearer about sudoers entry, and make sure that NOPASSWD is the last entry.
|
8
|
+
* Faq - mention sudo
|
9
|
+
* Faq - mention Zed's questions
|
10
|
+
* design - dependency management is good. Maven got it right, if not for the jelly...
|
11
|
+
* search for config/geminstaller.yml by default
|
12
|
+
================ 0.2.5 release ===================
|
13
|
+
* Rename API: autogem -> gem, run -> install
|
14
|
+
================ 0.3.0 release =====================
|
4
15
|
* update docs with details on how to handle unmet dependencies when -y is not specified
|
5
|
-
* tutorial: rails
|
6
16
|
* tutorial: using common or shared config files, with different configs for different environments - test (rspec) vs. dev (capistrano) vs. demo/staging/prod
|
7
17
|
* tutorial: running via capistrano
|
8
18
|
* crossreference front page, tutorials, and docs
|
9
19
|
* put mongrel/rails startup bug in tracker, add link in "known bugs" section on home page.
|
10
20
|
* links - rspec, rubygems
|
11
|
-
|
21
|
+
* Set up cruise
|
22
|
+
================ 0.3.1 finishing website ===================
|
12
23
|
* make valid_platform_selector use data from tattle
|
13
24
|
* autogem and run args can be passed as string or array
|
14
25
|
* tell rspec not to alphabetize my specs, or figure out how to not run testgemhome in the middle and have it set up test gem home twice
|
15
26
|
* better test coverage for --sudo and --exception options
|
16
|
-
* Verify compatibility with RubyGems trunk - especially Gem::ListCommand vs. Gem::Commands::ListCommand
|
17
27
|
* use rspec context_setup
|
18
28
|
* split out geminstaller_spec into application_spec and geminstaller_spec. Fix reference in docs / design
|
19
29
|
* newlines printed between dots when "updating" message is included in error message
|
@@ -86,3 +96,4 @@
|
|
86
96
|
* Add support, syntax, and options for uninstalling gems - completely, or down to highest specified version.
|
87
97
|
* add feature to automatically warn if there is a more recent version of the gem available and check_for_upgrade == false. Use "gem outdated" command
|
88
98
|
* auto-generate geminstaller.yml files (possibly by parsing source, or based on all gems installed locally)
|
99
|
+
================ 0.later.1 Unprioritized ===================
|
data/geminstaller.yml
CHANGED
@@ -9,7 +9,9 @@ module GemInstaller
|
|
9
9
|
def parse(args = [])
|
10
10
|
raise GemInstaller::GemInstallerError.new("Args must be passed as an array.") unless args.nil? or args.respond_to? :shift
|
11
11
|
args = ARGV if args.nil? || args == []
|
12
|
+
# check to see if args is an array of (nothing but) gems here... if so, set args as [@options[:gems] and return
|
12
13
|
|
14
|
+
raise GemInstaller::GemInstallerError.new("Error: An array of options to be populated must be injected prior to calling GemInstaller::ArgParser.parse") unless @options
|
13
15
|
@options[:exceptions] = false
|
14
16
|
@options[:redirect_stderr_to_stdout] = false
|
15
17
|
@options[:silent] = false
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# this file supports backward compatibility for prior versions of RubyGems
|
2
|
+
RUBYGEMS_VERSION_CHECKER = GemInstaller::RubyGemsVersionChecker.new
|
3
|
+
|
4
|
+
# 0.9.3 reorganized commands to Gem::Commands:: module from Gem::
|
5
|
+
if RUBYGEMS_VERSION_CHECKER.less_than?('0.9.3')
|
6
|
+
LIST_COMMAND_CLASS = Gem::ListCommand
|
7
|
+
QUERY_COMMAND_CLASS = Gem::QueryCommand
|
8
|
+
else
|
9
|
+
LIST_COMMAND_CLASS = Gem::Commands::ListCommand
|
10
|
+
QUERY_COMMAND_CLASS = Gem::Commands::QueryCommand
|
11
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module GemInstaller
|
2
|
-
class ExactMatchListCommand <
|
2
|
+
class ExactMatchListCommand < LIST_COMMAND_CLASS
|
3
3
|
def execute
|
4
4
|
string = get_one_optional_argument || ''
|
5
5
|
# This overrides the default RubyGems ListCommand behavior of doing a wildcard match. This caused problems
|
@@ -8,7 +8,7 @@ module GemInstaller
|
|
8
8
|
options[:name] = /^#{string}$/i
|
9
9
|
# Do a little metaprogramming magic to avoid calling the problematic execute method on the ListCommand
|
10
10
|
# superclass, and instead directly call the method on the QueryCommand grandparent 'supersuperclass'
|
11
|
-
unbound_execute_method =
|
11
|
+
unbound_execute_method = QUERY_COMMAND_CLASS.instance_method(:execute)
|
12
12
|
bound_execute_method = unbound_execute_method.bind(self)
|
13
13
|
bound_execute_method.call
|
14
14
|
end
|
@@ -11,7 +11,7 @@ module GemInstaller
|
|
11
11
|
gem_runner.do_configuration(args)
|
12
12
|
gem_cmd_manager = @gem_cmd_manager_class.instance
|
13
13
|
gem_cmd_manager.ui = @enhanced_stream_ui
|
14
|
-
gem_cmd_manager.
|
14
|
+
gem_cmd_manager.commands[:list] = @exact_match_list_command
|
15
15
|
|
16
16
|
exit_status = nil
|
17
17
|
begin
|
@@ -27,8 +27,7 @@ module GemInstaller
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def create_gem_runner
|
30
|
-
|
31
|
-
if rubygems_version.index('0.8') == 0
|
30
|
+
if Gem::RubyGemsVersion.index('0.8') == 0
|
32
31
|
@gem_runner_class.new()
|
33
32
|
else
|
34
33
|
@gem_runner_class.new(:command_manager => @gem_cmd_manager_class)
|
@@ -1,15 +1,35 @@
|
|
1
1
|
dir = File.dirname(__FILE__)
|
2
2
|
|
3
|
-
|
3
|
+
|
4
|
+
# require for rubygems package
|
4
5
|
require 'rubygems'
|
6
|
+
|
7
|
+
# backward compability and version-checking stuff - must be required before it is used
|
8
|
+
require 'rubygems/rubygems_version'
|
9
|
+
require File.expand_path("#{dir}/rubygems_version_checker")
|
10
|
+
|
11
|
+
# requires for rubygems internal classes
|
5
12
|
require 'rubygems/doc_manager'
|
6
13
|
require 'rubygems/config_file'
|
7
|
-
|
14
|
+
if RUBYGEMS_VERSION_CHECKER.less_than?('0.9.3')
|
15
|
+
require 'rubygems/cmd_manager'
|
16
|
+
else
|
17
|
+
require 'rubygems/command_manager'
|
18
|
+
end
|
8
19
|
require 'rubygems/gem_runner'
|
9
20
|
require 'rubygems/remote_installer'
|
10
21
|
require 'rubygems/installer'
|
11
22
|
require 'rubygems/validator'
|
12
23
|
|
24
|
+
# these are order-dependent. Any better way???
|
25
|
+
unless RUBYGEMS_VERSION_CHECKER.less_than?('0.9.3')
|
26
|
+
require 'rubygems/commands/query_command'
|
27
|
+
require 'rubygems/commands/list_command'
|
28
|
+
end
|
29
|
+
|
30
|
+
# backward compability support for prior rubygems versions
|
31
|
+
require File.expand_path("#{dir}/backward_compatibility")
|
32
|
+
|
13
33
|
# third party libs
|
14
34
|
require 'erb'
|
15
35
|
require 'optparse'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module GemInstaller
|
2
|
+
class RubyGemsVersionChecker
|
3
|
+
def less_than?(compare_version, rubygems_version = Gem::RubyGemsVersion)
|
4
|
+
Gem::Version::Requirement.new(["< #{compare_version}"]).satisfied_by?(Gem::Version.new(rubygems_version))
|
5
|
+
end
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
RUBYGEMS_VERSION_CHECKER = GemInstaller::RubyGemsVersionChecker.new
|
data/lib/geminstaller.rb
CHANGED
data/website/src/code/index.page
CHANGED
@@ -6,7 +6,7 @@ h1. Design Notes
|
|
6
6
|
These are some notes on the underlying design of GemInstaller, and the current state of development:
|
7
7
|
|
8
8
|
* GemInstaller was developed from nothing but a concept, using "Behavior-Driven Development":http://behaviour-driven.org and "Rspec":http://rspec.rubyforge.org/.
|
9
|
-
* GemInstaller uses "Dependency Injection", an architecture which has many benefits, including testability and enabling "loose coupling and high cohesion":http://www.c2.com/cgi/wiki?CouplingAndCohesion. I originally started with "Needle":http://rubyforge.org/projects/needle/, a Ruby Dependency Injection framework, but switched to a simple home-grown approach in
|
9
|
+
* GemInstaller uses "Dependency Injection", an architecture which has many benefits, including testability and enabling "loose coupling and high cohesion":http://www.c2.com/cgi/wiki?CouplingAndCohesion. I originally started with "Needle":http://rubyforge.org/projects/needle/, a Ruby Dependency Injection framework, but switched to a simple home-grown approach in order to not have a dependency on the Needle gem. Read more about Dependency Injection here:
|
10
10
|
** "http://onestepback.org/index.cgi/Tech/Ruby/DependencyInjectionInRuby.rdoc":http://onestepback.org/index.cgi/Tech/Ruby/DependencyInjectionInRuby.rdoc
|
11
11
|
** "http://onestepback.org/articles/depinj/":http://onestepback.org/articles/depinj/
|
12
12
|
** "http://martinfowler.com/bliki/InversionOfControl.html":http://martinfowler.com/bliki/InversionOfControl.html
|
@@ -74,21 +74,222 @@ See also: Docs on "Automatically Requiring Gems with the <code>autogem</code> M
|
|
74
74
|
|
75
75
|
h2(#integrating_geminstaller_into_ruby_on_rails). Integrating GemInstaller into Ruby on Rails
|
76
76
|
|
77
|
-
|
77
|
+
GemInstaller can be configured to automatically install all gems in the config file, and add them to the load path when Rails boots. This means that you can check out and run your application anywhere, without having to worry about manually ensuring that the required dependency gems are installed. This works with Webrick and Mongrel.
|
78
|
+
|
79
|
+
IMPORTANT NOTE: Currently, there is a bug with installing Mongrel and Rails gems on Rails startup. See "Known Bugs":../index.html#known_bugs for details.
|
80
|
+
|
81
|
+
First, you need a Rails app. I'll let you handle this step on your own. See the "Rails documentation":http://www.rubyonrails.org/docs for details.
|
82
|
+
|
83
|
+
Next, you need a *<code>geminstaller.yml</code>* config file. Create this under the Rails <code>config</code> directory. For details, see the documentation on the "config file":documentation.html#config_file and the tutorial on "bootstrapping your GemInstaller config with the <code>--print-rogue-gems</code> option":#bootstrapping_your_geminstaller_config. Here's an example config which contains only entries for Mongrel and Rails, and ruby-doom:
|
84
|
+
|
85
|
+
*RAILS_ROOT/config/geminstaller.yml*:
|
86
|
+
<pre>
|
87
|
+
\---
|
88
|
+
defaults:
|
89
|
+
install_options: --include-dependencies
|
90
|
+
gems:
|
91
|
+
- name: ruby-doom
|
92
|
+
version: '= 0.8'
|
93
|
+
- name: rails
|
94
|
+
version: '= 1.1.6'
|
95
|
+
- name: mongrel
|
96
|
+
version: '= 1.0.1'
|
97
|
+
platform: <%= RUBY_PLATFORM =~ /mswin/ ? 'mswin32' : 'ruby'%>
|
98
|
+
</pre>
|
99
|
+
|
100
|
+
Once you have your *<code>geminstaller.yml</code>* created, the last step is to add calls to <code>GemInstaller.run</code> and <code>GemInstaller.autogem</code> in your boot.rb. They should be placed right after the block which defines the RAILS_ROOT constant, as shown below ("..." indicates omitted lines):
|
101
|
+
|
102
|
+
|
103
|
+
*RAILS_ROOT/config/boot.rb*:
|
104
|
+
<pre>
|
105
|
+
...
|
106
|
+
unless defined?(RAILS_ROOT)
|
107
|
+
...
|
108
|
+
end
|
109
|
+
|
110
|
+
############# Begin GemInstaller config - see http://geminstaller.rubyforge.org
|
111
|
+
require "rubygems"
|
112
|
+
require "geminstaller"
|
113
|
+
|
114
|
+
# Path(s) to your GemInstaller config file(s)
|
115
|
+
config_paths = "#{File.expand_path(RAILS_ROOT)}/config/geminstaller.yml"
|
116
|
+
|
117
|
+
# Arguments which will be passed to GemInstaller (you can add any extra ones)
|
118
|
+
args = "--config #{config_paths}"
|
119
|
+
|
120
|
+
# The 'exceptions' flag determines whether errors encountered while running GemInstaller
|
121
|
+
# should raise exceptions (and abort Rails), or just return a nonzero return code
|
122
|
+
args += " --exceptions"
|
123
|
+
|
124
|
+
# This will use sudo by default on all non-windows platforms, but requires an entry in your
|
125
|
+
# sudoers file to avoid having to type a password. It can be omitted if you don't want to use sudo.
|
126
|
+
# See http://geminstaller.rubyforge.org/documentation/documentation.html#dealing_with_sudo
|
127
|
+
args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
|
128
|
+
|
129
|
+
# The 'install' method will auto-install gems as specified by the args and config
|
130
|
+
GemInstaller.run(args)
|
131
|
+
|
132
|
+
# The 'autogem' method will automatically add all gems in the GemInstaller config to your load path, using the 'gem'
|
133
|
+
# or 'require_gem' command. Note that only the *first* version of any given gem will be loaded.
|
134
|
+
GemInstaller.autogem(args)
|
135
|
+
############# End GemInstaller config
|
136
|
+
|
137
|
+
unless defined?(Rails::Initializer)
|
138
|
+
...
|
139
|
+
</pre>
|
140
|
+
|
141
|
+
This example also has configurable variables which illustrate the common option arguments you can control. The <code>--exceptions</code> argument will cause GemInstaller to raise an exception if errors occur, and thus abort Rails startup. The <code>--sudo</code> argument causes GemInstaller to be run via sudo.
|
142
|
+
|
143
|
+
Now, all you need to do is start Rails. You can use Webrick with <code>ruby script/server</code>, or Mongrel with <code>mongrel_rails start</code>. You should see the message from Geminstaller that the gems are being installed:
|
144
|
+
|
145
|
+
<pre>
|
146
|
+
$ ruby script/server
|
147
|
+
GemInstaller is verifying gem installation: mongrel = 1.0.1, rails = 1.1.6, ruby-doom = 0.8
|
148
|
+
GemInstaller is automatically requiring gems: mongrel = 1.0.1, rails = 1.1.6, ruby-doom = 0.8
|
149
|
+
./script/../config/boot.rb:55:Warning: require_gem is obsolete. Use gem instead.
|
150
|
+
=> Booting WEBrick...
|
151
|
+
GemInstaller is verifying gem installation: mongrel = 1.0.1, rails = 1.1.6, ruby-doom = 0.8
|
152
|
+
GemInstaller is automatically requiring gems: mongrel = 1.0.1, rails = 1.1.6, ruby-doom = 0.8
|
153
|
+
=> Rails application started on http://0.0.0.0:3000
|
154
|
+
=> Ctrl-C to shutdown server; call with --help for options
|
155
|
+
[2007-05-13 22:41:37] INFO WEBrick 1.3.1
|
156
|
+
[2007-05-13 22:41:37] INFO ruby 1.8.5 (2006-08-25) [i686-darwin8.7.1]
|
157
|
+
[2007-05-13 22:41:37] INFO WEBrick::HTTPServer#start: pid=2519 port=3000
|
158
|
+
</pre>
|
159
|
+
|
160
|
+
If that worked, good! If not, carefully read the error message. If it was a RubyGems failure (as opposed to a bug in GemInstaller), the "<code>gem</code>" command that GemInstaller tried to execute should be echoed as part of the error message. Cut and paste this command onto the command line, and see if you get the same error. If you do, then resolve it and the problem should go away under GemInstaller as well.
|
161
|
+
|
162
|
+
For extra credit, we can write a simple Rails controller to verify that the correct gems are getting added to the load path by the <code>autogem</code> command. First, create the Rails app and a controller:
|
163
|
+
|
164
|
+
<pre>
|
165
|
+
$ rails geminstaller_example
|
166
|
+
$ ruby script/generate controller GemInstallerExample
|
167
|
+
</pre>
|
168
|
+
|
169
|
+
Next, create the Rails app. You need...
|
170
|
+
|
171
|
+
...an action:
|
172
|
+
*RAILS_ROOT/app/controllers/gem_installer_example_controller.rb*
|
173
|
+
<pre>
|
174
|
+
class GemInstallerExampleController < ApplicationController
|
175
|
+
def index
|
176
|
+
end
|
177
|
+
end
|
178
|
+
</pre>
|
179
|
+
|
180
|
+
...a sample rhtml page which will show your config and load path:
|
181
|
+
*RAILS_ROOT/app/views/gem_installer/index.rhtml*
|
182
|
+
<pre>
|
183
|
+
<% config = File.open("#{RAILS_ROOT}/config/geminstaller.yml")
|
184
|
+
config_lines = config.read.gsub!("\n","<br/>") %>
|
185
|
+
<hr/>
|
186
|
+
<h2>geminstaller.yml</h2>
|
187
|
+
<h2><%= config_lines %></h2>
|
188
|
+
<hr/>
|
189
|
+
<h2>Load Path: </h2>
|
190
|
+
<h2><%= $:.join("\n") %></h2>
|
191
|
+
<hr/>
|
192
|
+
</pre>
|
193
|
+
|
194
|
+
...a default route to your page:
|
195
|
+
*RAILS_ROOT/config/routes.rb*
|
196
|
+
<pre>
|
197
|
+
...
|
198
|
+
# Put the following line as the first route in the routes.rb file:
|
199
|
+
map.connect '', :controller => "gem_installer_example"
|
200
|
+
...
|
201
|
+
</pre>
|
202
|
+
|
203
|
+
...a GemInstaller config file:
|
204
|
+
*RAILS_ROOT/config/geminstaller.yml*:
|
205
|
+
<pre>
|
206
|
+
\---
|
207
|
+
defaults:
|
208
|
+
install_options: --include-dependencies
|
209
|
+
gems:
|
210
|
+
- name: ruby-doom
|
211
|
+
version: '= 0.8'
|
212
|
+
</pre>
|
213
|
+
|
214
|
+
...the modifications to boot.rb (comments and local variables omitted here for brevity):
|
215
|
+
<pre>
|
216
|
+
...
|
217
|
+
unless defined?(RAILS_ROOT)
|
218
|
+
...
|
219
|
+
end
|
220
|
+
|
221
|
+
############# Begin GemInstaller config - see http://geminstaller.rubyforge.org
|
222
|
+
require "rubygems"
|
223
|
+
require "geminstaller"
|
224
|
+
config_paths = "#{File.expand_path(RAILS_ROOT)}/config/geminstaller.yml"
|
225
|
+
args = "--config #{config_paths}"
|
226
|
+
args += " --exceptions"
|
227
|
+
args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
|
228
|
+
GemInstaller.run(args)
|
229
|
+
GemInstaller.autogem(args)
|
230
|
+
############# End GemInstaller config
|
231
|
+
|
232
|
+
unless defined?(Rails::Initializer)
|
233
|
+
...
|
234
|
+
</pre>
|
235
|
+
|
236
|
+
...and delete the public/index.html file:
|
237
|
+
<pre>
|
238
|
+
$ rm public/index.html
|
239
|
+
</pre>
|
240
|
+
|
241
|
+
Now, you should be able to start the example Rails app and navigate to <code>http://localhost:3000</code> to view your config file and load path with the gems auto-required:
|
242
|
+
|
243
|
+
<pre>
|
244
|
+
$ ... cd to root of your rails app ...
|
245
|
+
$ mongrel_rails start
|
246
|
+
</pre>
|
247
|
+
|
248
|
+
...open http://localhost:3000, and you should see something like this:
|
249
|
+
<pre>
|
250
|
+
_____________________________
|
251
|
+
geminstaller.yml
|
252
|
+
/---
|
253
|
+
defaults:
|
254
|
+
install_options: --include-dependencies
|
255
|
+
gems:
|
256
|
+
- name: ruby-doom
|
257
|
+
version: '= 0.8'
|
258
|
+
_____________________________
|
259
|
+
Load Path:
|
260
|
+
...
|
261
|
+
(lots of load path stuff omitted)
|
262
|
+
...
|
263
|
+
(here's our gem!)
|
264
|
+
/usr/local/lib/ruby/gems/1.8/gems/ruby-doom-0.8/lib /usr/local/lib/ruby/gems/1.8/gems/sources-0.0.1/bin</pre>
|
265
|
+
...
|
266
|
+
(more stuff omitted)
|
267
|
+
...
|
268
|
+
</pre>
|
269
|
+
|
270
|
+
That's about it!
|
78
271
|
|
79
272
|
See also: Docs on "Using GemInstaller with Ruby on Rails or Other Ruby Apps":documentation.html#using_geminstaller_with_ruby_on_rails_or_other_ruby_apps.
|
80
273
|
|
81
274
|
|
82
275
|
h2(#using_common_or_shared_config_files). Using Common or Shared Config Files
|
83
276
|
|
84
|
-
|
277
|
+
GemInstaller supports multiple config files, with the last config files in the list overriding the previous ones. This means you could do any of the following:
|
278
|
+
|
279
|
+
* Have a common config file across all your projects, which is shared via an svn:external, and a custom config file to override or add gems which are not in the common config.
|
280
|
+
* Have a common config file across all development machines, shared on a windows share or NFS mounted drive, with machine- or platform-specific gems listed in local config files.
|
281
|
+
* Have config files that are specific to certain environments such as development and test, which will not be included when GemInstaller is run in a demo or production environment.
|
282
|
+
|
283
|
+
TODO: Finish writing examples of this, for now see docs on the "<code>--config</code>":documentation.html#config_option option.
|
85
284
|
|
86
285
|
See also: Docs on the "<code>--config</code>":documentation.html#config_option option.
|
87
286
|
|
88
287
|
|
89
288
|
h2(#running_geminstaller_from_capistrano). Running GemInstaller from Capistrano
|
90
289
|
|
91
|
-
|
290
|
+
GemInstaller can be hooked in as a capistrano task. This is a way to avoid having the boot.rb hacks run in demo or production, and possibly cause problems with app startup in these environments. It also is a way to avoid the current bug with Rails and Mongrel gems not being loaded correctly if they are upgraded during the app startup process.
|
291
|
+
|
292
|
+
TODO: Finish writing this, for now see docs on "Using GemInstaller from Other Ruby Apps":documentation.html#using_geminstaller_from_other_ruby_apps
|
92
293
|
|
93
294
|
See also: Docs on "Using GemInstaller from Other Ruby Apps":documentation.html#using_geminstaller_from_other_ruby_apps.
|
94
295
|
|
data/website/src/index.page
CHANGED
@@ -18,7 +18,7 @@ GemInstaller provides automated management of RubyGems. It uses a simple YAML c
|
|
18
18
|
|
19
19
|
GemInstaller can be used from the command line, or embedded to run automatically on startup for a Rails app or any other Ruby program.
|
20
20
|
|
21
|
-
It has been tested on all major platforms (mac, linux, windows), and recent versions of RubyGems (0.8.x through 0.9.
|
21
|
+
It has been tested on all major platforms (mac, linux, windows), and recent versions of RubyGems (0.8.x through 0.9.4).
|
22
22
|
|
23
23
|
h2. How do I get it?
|
24
24
|
|
@@ -32,7 +32,11 @@ h2. Who is responsible for GemInstaller?
|
|
32
32
|
|
33
33
|
GemInstaller was created by "Chad Woolley":http://www.thewoolleyweb.com.
|
34
34
|
|
35
|
-
h2. Known Bugs
|
35
|
+
h2(#known_bugs). Known Bugs
|
36
36
|
|
37
37
|
Currently (as of version 0.0.2), the only _major_ known bug is related to auto-installing the Rails or Mongrel gems via boot.rb during startup of Mongrel or Webrick. The simple workaround is to run GemInstaller manually or just restart Rails anytime GemInstaller auto-installs a Rails/Mongrel gem upgrade during app startup. For Rails and other deployable apps, you can also "run GemInstaller from Capistrano":documentation/tutorials.html#running_geminstaller_from_capistrano to avoid this problem in demo/production environments. Researching and fixing this problem is a top priority. I bet there's another bug or twoo, so please "report them if you find them":http://rubyforge.org/tracker/?group_id=1902!
|
38
38
|
|
39
|
+
h2(#history). History
|
40
|
+
|
41
|
+
* 0.2.1 - RubyGems release 0.9.3 had some major refactoring done to the internals, which broke GemInstaller 0.2.0. GemInstaller 0.2.1 is a patch release to fix this. I did limited testing on 0.9.3 and 0.9.0. Please let me know if anything is broken on any version of RubyGems.
|
42
|
+
* 0.2.0 - Initial release. Yay!
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: geminstaller
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2007-06-07 00:00:00 -07:00
|
8
8
|
summary: GemInstaller provides automated management of RubyGems.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- lib/geminstaller/application.rb
|
43
43
|
- lib/geminstaller/arg_parser.rb
|
44
44
|
- lib/geminstaller/autogem.rb
|
45
|
+
- lib/geminstaller/backward_compatibility.rb
|
45
46
|
- lib/geminstaller/config.rb
|
46
47
|
- lib/geminstaller/config_builder.rb
|
47
48
|
- lib/geminstaller/dependency_injector.rb
|
@@ -71,6 +72,7 @@ files:
|
|
71
72
|
- lib/geminstaller/ruby_gem.rb
|
72
73
|
- lib/geminstaller/rubygems_exit.rb
|
73
74
|
- lib/geminstaller/rubygems_extensions.rb
|
75
|
+
- lib/geminstaller/rubygems_version_checker.rb
|
74
76
|
- lib/geminstaller/unauthorized_dependency_prompt_error.rb
|
75
77
|
- lib/geminstaller/unexpected_prompt_error.rb
|
76
78
|
- lib/geminstaller/valid_platform_selector.rb
|
@@ -93,10 +95,14 @@ files:
|
|
93
95
|
- website/src/index.page
|
94
96
|
test_files:
|
95
97
|
- test/test_all.rb
|
96
|
-
rdoc_options:
|
97
|
-
|
98
|
-
|
99
|
-
|
98
|
+
rdoc_options:
|
99
|
+
- --main
|
100
|
+
- README.txt
|
101
|
+
extra_rdoc_files:
|
102
|
+
- History.txt
|
103
|
+
- Manifest.txt
|
104
|
+
- README.txt
|
105
|
+
- TODO.txt
|
100
106
|
executables:
|
101
107
|
- geminstaller
|
102
108
|
extensions: []
|