geminstaller 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +0 -2
- data/lib/geminstaller.rb +3 -2
- data/lib/geminstaller/gem_list_checker.rb +2 -2
- data/lib/geminstaller_rails_preinitializer.rb +3 -2
- data/website/src/documentation/documentation.page +37 -11
- data/website/src/documentation/index.page +20 -53
- data/website/src/faq.page +10 -2
- data/website/src/index.page +5 -2
- metadata +4 -7
- data/ci/README_CI.txt +0 -22
- data/ci/cruise +0 -51
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.5.1 / yyyy-mm-dd
|
2
|
+
* Print a very verbose and helpful error message if gem cannot be found on remote server. Attempts to help http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/5-sometimes-installing-fails
|
3
|
+
* Fix bug with stderr being swallowed silently when '--sudo' option is used.
|
4
|
+
|
1
5
|
== 0.5.0 / 2009-02-03
|
2
6
|
* change default processing order of gems from alpha-version-platform to be order found in file (last config file wins). Fixes http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/15-provide-a-way-to-specify-gem-processing-order . Thanks to Brian Jenkins for helping!
|
3
7
|
|
data/Manifest.txt
CHANGED
data/lib/geminstaller.rb
CHANGED
@@ -34,7 +34,7 @@ module GemInstaller
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.version
|
37
|
-
"0.5.
|
37
|
+
"0.5.1"
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.create_application(args = [], registry = nil)
|
@@ -91,7 +91,8 @@ module GemInstaller
|
|
91
91
|
$stderr_backup = $stderr.dup
|
92
92
|
$stderr.reopen("/dev/null", "w")
|
93
93
|
io = IO.popen(cmd)
|
94
|
-
$stderr
|
94
|
+
$stderr.reopen($stderr_backup)
|
95
|
+
STDERR.reopen($stderr_backup) # Why are these not the same? It is an old question: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/47596
|
95
96
|
output = io.read
|
96
97
|
next unless output =~ /#{path_key}/
|
97
98
|
path = output.sub(path_key,'')
|
@@ -15,7 +15,7 @@ module GemInstaller
|
|
15
15
|
end
|
16
16
|
|
17
17
|
if matched_lines.size > 1
|
18
|
-
error_message = "Error: more than one remote gem matches (this should not happen and is probably a bug in geminstaller). Gem name = '#{gem.name}', install options = '#{gem.install_options}'. Matching remote gems: \n"
|
18
|
+
error_message = "Error: more than one remote gem matches (this should not happen and is probably a bug in geminstaller). Gem name = '#{gem.name}', install options = '#{gem.install_options.join(' ')}'. Matching remote gems: \n"
|
19
19
|
matched_lines.each do |line|
|
20
20
|
error_message += line + "\n"
|
21
21
|
end
|
@@ -23,7 +23,7 @@ module GemInstaller
|
|
23
23
|
end
|
24
24
|
|
25
25
|
if matched_lines.size == 0
|
26
|
-
error_message = "Error: Could not find remote gem to install. Gem name = '#{gem.name}', Gem version = '#{gem.version}', install options = '#{gem.install_options}'"
|
26
|
+
error_message = "Error: Could not find remote gem to install. Gem name = '#{gem.name}', Gem version = '#{gem.version}', install options = '#{gem.install_options.join(' ')}'. Your remote gem server may be having problems. You should try to list the remote gem yourself: 'gem list -r -v '#{gem.version}' #{common_args.join(' ')} #{gem.name}'. If it exists on the server, try running geminstaller again and report your experience here: http://thewoolleyweb.lighthouseapp.com/projects/11580-geminstaller/tickets/5-sometimes-installing-fails. Output of remote gem list command: \n#{remote_list}"
|
27
27
|
raise GemInstaller::GemInstallerError.new(error_message)
|
28
28
|
end
|
29
29
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# or required in config/boot.rb before initialization for Rails < 2.0. For example:
|
5
5
|
# require 'geminstaller_rails_preinitializer'
|
6
6
|
#
|
7
|
-
# If you require
|
7
|
+
# If you require different geminstaller command options, copy this file into your Rails app,
|
8
8
|
# modify it, and require your customized version. For example:
|
9
9
|
# require "#{File.expand_path(RAILS_ROOT)}/config/custom_geminstaller_rails_preinitializer.rb"
|
10
10
|
|
@@ -17,7 +17,7 @@ module GemInstallerRailsPreinitializer
|
|
17
17
|
args = ''
|
18
18
|
|
19
19
|
# Specify --geminstaller-output=all and --rubygems-output=all for maximum debug logging
|
20
|
-
args += ' --geminstaller-output=all --rubygems-output=all'
|
20
|
+
# args += ' --geminstaller-output=all --rubygems-output=all'
|
21
21
|
|
22
22
|
# The 'exceptions' flag determines whether errors encountered while running GemInstaller
|
23
23
|
# should raise exceptions (and abort Rails), or just return a nonzero return code
|
@@ -30,6 +30,7 @@ module GemInstallerRailsPreinitializer
|
|
30
30
|
#args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
|
31
31
|
|
32
32
|
# The 'install' method will auto-install gems as specified by the args and config
|
33
|
+
# IMPORTANT NOTE: Under recent RubyGems versions, this will install to ~/.gem
|
33
34
|
GemInstaller.install(args)
|
34
35
|
|
35
36
|
# The 'autogem' method will automatically add all gems in the GemInstaller config to your load path,
|
@@ -29,6 +29,7 @@ h2. Table of Contents
|
|
29
29
|
** "<code>include_config</code> directive":#include_config
|
30
30
|
* "Using GemInstaller with Ruby on Rails or Other Ruby Apps":#using_geminstaller_with_ruby_on_rails_or_other_ruby_apps
|
31
31
|
** "Invoking <code>GemInstaller</code> from Rails":#invoking_geminstaller_from_rails
|
32
|
+
** "DEPRECATED Invoking <code>GemInstaller</code> from Rails 1.0":#invoking_geminstaller_from_rails_10
|
32
33
|
** "Bootstrapping Rails with GemInstaller":#bootstrapping_rails_with_geminstaller
|
33
34
|
** "Using GemInstaller from Other Ruby Apps":#using_geminstaller_from_other_ruby_apps
|
34
35
|
* "Using <code>erb</code> in config files":#using_erb_in_config_files
|
@@ -268,7 +269,7 @@ gems:
|
|
268
269
|
|
269
270
|
h2(#using_geminstaller_with_ruby_on_rails_or_other_ruby_apps). Using GemInstaller with Ruby on Rails or Other Ruby Apps
|
270
271
|
|
271
|
-
GemInstaller can also be embedded in another application, such as a Rails app. This is done by invoking the GemInstaller class or the geminstaller executable directly from Ruby.
|
272
|
+
GemInstaller can also be embedded in another application, such as a Rails app. This is done by invoking the GemInstaller class or the geminstaller executable directly from Ruby. Also see the tutorial on "Using GemInstaller with Ruby on Rails":index.html#using_geminstaller_with_ruby_on_rails .
|
272
273
|
|
273
274
|
IMPORTANT NOTE: You need to know whether you run on unix and need root/sudo access to install gems and/or gem executables. See "Dealing with sudo and root-owned RubyGem installations":#dealing_with_sudo section for more details.
|
274
275
|
|
@@ -276,7 +277,7 @@ First, you need to create <code>geminstaller.yml</code> in the <code>RAILS_ROOT/
|
|
276
277
|
|
277
278
|
<pre><code>---
|
278
279
|
defaults:
|
279
|
-
install_options: --
|
280
|
+
install_options: --no-ri --no-rdoc
|
280
281
|
gems:
|
281
282
|
- name: rails
|
282
283
|
version: '= 1.1.6'
|
@@ -287,9 +288,36 @@ gems:
|
|
287
288
|
|
288
289
|
h3(#invoking_geminstaller_from_rails). Invoking <code>GemInstaller</code> from Rails
|
289
290
|
|
290
|
-
|
291
|
+
* Install the GemInstaller gem and create your *<code>config/geminstaller.yml</code>* config file.
|
291
292
|
|
292
|
-
*
|
293
|
+
* Determine whether you run on unix and need root/sudo access to install gems. If you do, edit your <code>sudoers</code> file to allow the current user to run the <code>'gem'</code> command via sudo without a password. See the documentation on the GemInstaller "<code>--sudo</code> option":documentation.html#dealing_with_sudo for more details.
|
294
|
+
|
295
|
+
* Create a <code>config/preinitializer.rb</code> file to invoke GemInstaller on your Rails app startup:
|
296
|
+
|
297
|
+
*RAILS_ROOT/config/preinitializer.rb*:
|
298
|
+
<pre><code> require 'rubygems'
|
299
|
+
require 'geminstaller'
|
300
|
+
# You can use the geminstaller_rails_preinitializer out of the GemInstaller gem:
|
301
|
+
require 'geminstaller_rails_preinitializer'
|
302
|
+
# If you require different geminstaller command options, copy the geminstaller_rails_preinitializer.rb
|
303
|
+
# file into from the GemInstaller source into your Rails app, modify it, and require your customized
|
304
|
+
# version. For example:
|
305
|
+
# require "#{File.expand_path(RAILS_ROOT)}/config/custom_geminstaller_rails_preinitializer.rb"
|
306
|
+
</code></pre>
|
307
|
+
|
308
|
+
* Start your app: <code>ruby script/server</code>. You should see (depending on verbosity level) messages indicating the gems (and dependency gems) are being installed and auto-required.
|
309
|
+
* Stop the app, and verify the gems are installed: <code>gem list [some gem in your geminstaller.yml]</code>
|
310
|
+
* For an example, check out the "Sample Rails App":http://geminstaller.rubyforge.org/svn/trunk/spec/fixture/sample_rails_app/ in the GemInstaller source.
|
311
|
+
|
312
|
+
The default <code>geminstaller_rails_preinitializer.rb</code> in the GemInstaller source contains several comments which are hopefully self-explanatory. See the "Command Line Options Summary":#command_line_options_summary, especially the "<code>--config</code>":#config_option, "<code>--exceptions</code>":#exceptions_option, and "<code>--sudo</code>":#sudo_option options for more details, as well as the "Integrating GemInstaller into Ruby on Rails":#integrating_geminstaller_into_ruby_on_rails tutorial.
|
313
|
+
|
314
|
+
h3(#invoking_geminstaller_from_rails_10). DEPRECATED - Invoking <code>GemInstaller</code> from Rails 1.0
|
315
|
+
|
316
|
+
This section describes how to use GemInstaller with Rails 1.0 (which doesn't support config/preinitializer.rb). If you are using Rails 2.0 or above, use "these instructions":#invoking_geminstaller_from_rails
|
317
|
+
|
318
|
+
Once you have your *<code>geminstaller.yml</code>* created, invoke GemInstaller on Rails 1.0 startup in your boot.rb. It should be placed right after the block which defines the RAILS_ROOT constant, as shown below ("..." indicates omitted lines):
|
319
|
+
|
320
|
+
*RAILS_1.0_ROOT/config/boot.rb*:
|
293
321
|
<pre><code> ...
|
294
322
|
unless defined?(RAILS_ROOT)
|
295
323
|
...
|
@@ -326,11 +354,9 @@ Once you have your *<code>geminstaller.yml</code>* created, invoke the GemInstal
|
|
326
354
|
...
|
327
355
|
</code></pre>
|
328
356
|
|
329
|
-
As you can see, this example contains several comments which are hopefully self-explanatory. See the "Command Line Options Summary":#command_line_options_summary, especially the "<code>--config</code>":#config_option, "<code>--exceptions</code>":#exceptions_option, and "<code>--sudo</code>":#sudo_option options for more details, as well as the "Integrating GemInstaller into Ruby on Rails":#integrating_geminstaller_into_ruby_on_rails tutorial.
|
330
|
-
|
331
357
|
h3(#bootstrapping_rails_with_geminstaller). Bootstrapping Rails with GemInstaller
|
332
358
|
|
333
|
-
If you don't already have Rails or Mongrel installed (you've just checked your app out or deployed onto a new machine), you obviously can't use the above
|
359
|
+
If you don't already have Rails or Mongrel installed (you've just checked your app out or deployed onto a new machine), you obviously can't use the above methods to run GemInstaller. In this case, you just need to run GemInstaller from the command line once to "bootstrap" and install the Rails/Mongrel gems. This assumes you already have your <code>geminstaller.yml</code> config file in the Rails <code>config</code> dir:
|
334
360
|
|
335
361
|
<pre><code>
|
336
362
|
$ cd [RAILS_APP_ROOT]/config
|
@@ -339,7 +365,7 @@ $ geminstaller --sudo # only use the -sudo option if necessary
|
|
339
365
|
|
340
366
|
h3(#using_geminstaller_from_other_ruby_apps). Using GemInstaller from Other Ruby Apps
|
341
367
|
|
342
|
-
If you want to automatically invoke GemInstaller from some other Ruby application, the approach will be very similar to the Rails approach "shown above":#invoking_geminstaller_from_rails. Instead of
|
368
|
+
If you want to automatically invoke GemInstaller from some other Ruby application, the approach will be very similar to the Rails approach "shown above":#invoking_geminstaller_from_rails. Instead of preinitializer.rb, put the GemInstaller invocation into the class or script which is the very first one run when your application starts up. To use it in build scripts such as <code>rake</code>, include it in a task. GemInstaller (obviously) must run before any gems are loaded or referenced.
|
343
369
|
|
344
370
|
h2(#using_erb_in_config_files). Using <code>erb</code> in config files
|
345
371
|
|
@@ -371,9 +397,9 @@ If you only run geminstaller on Windows, you don't have to worry about this sect
|
|
371
397
|
|
372
398
|
<strong>UPDATE:</strong>
|
373
399
|
|
374
|
-
|
400
|
+
Probably the best way to "deal with sudo" is to never use it at all, and recent releases of RubyGems will automatically install gems to ~/.gem if you run gem install commands as a non-root user. However, the RubyGems developers (Eric Hodel) have indicated that this feature may not remain, since it causes issues under Ruby 1.9. I have a "feature":http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/1-automatically-create-use-and-manage-writeable-gem-home-if-system-gem-home-is-not-writeable to track the progress of this issue.
|
375
401
|
|
376
|
-
<strong>FOR NOW, THOUGH:</strong>
|
402
|
+
<strong>FOR NOW, THOUGH, HERE'S HOW TO USE SUDO WITH GEMINSTALLER:</strong>
|
377
403
|
|
378
404
|
<strong>Important Note:</strong> For security, the sudo command does NOT pass most environment variables. See the faq item on "Environment Variables and sudo":../faq.html#environment_vars_and_sudo for more info.
|
379
405
|
|
@@ -391,7 +417,7 @@ $ geminstaller -s
|
|
391
417
|
$ geminstaller --sudo
|
392
418
|
</code></pre>
|
393
419
|
|
394
|
-
h3(#option_2). Option 2 - Run <code>sudo</code> or log in as root yourself
|
420
|
+
h3(#option_2). Option 2 - Run <code>sudo</code> or log in as root yourself. If you are running from a deploy script (Capistrano), this is probably the best option.
|
395
421
|
|
396
422
|
Example of using sudo:
|
397
423
|
<pre><code>
|
@@ -17,69 +17,36 @@ h2. Basic Usage - "Hello Doom"
|
|
17
17
|
* Run GemInstaller from the directory containing geminstaller.yml: <code>geminstaller</code>. You should see a message indicating that the gem is being installed.
|
18
18
|
* Verify that the ruby-doom gem was installed: <code>gem list ruby-doom</code>
|
19
19
|
|
20
|
-
h2. Using GemInstaller with Ruby on Rails
|
20
|
+
h2(#using_geminstaller_with_ruby_on_rails). Using GemInstaller with Ruby on Rails
|
21
21
|
|
22
|
-
<strong>RAILS 2.0
|
22
|
+
<strong>RAILS 2.0 INSTRUCTIONS:</strong>
|
23
23
|
|
24
|
-
|
24
|
+
* Follow the Basic Usage instructions above to install the GemInstaller gem and create a <code>config/geminstaller.yml</code> file in your Rails app's config directory
|
25
25
|
|
26
|
-
<
|
26
|
+
* Determine whether you run on unix and need root/sudo access to install gems. If you do, edit your <code>sudoers</code> file to allow the current user to run the <code>'gem'</code> command via sudo without a password. See the documentation on the GemInstaller "<code>--sudo</code> option":documentation.html#dealing_with_sudo for more details.
|
27
27
|
|
28
|
-
* Create
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
* Create a <code>config/preinitializer.rb</code> file to invoke GemInstaller on your Rails app startup:
|
29
|
+
|
30
|
+
*RAILS_ROOT/config/preinitializer.rb*:
|
31
|
+
<pre><code> require 'rubygems'
|
32
|
+
require 'geminstaller'
|
33
|
+
# You can use the geminstaller_rails_preinitializer out of the GemInstaller gem:
|
34
|
+
require 'geminstaller_rails_preinitializer'
|
35
|
+
# If you require different geminstaller command options, copy the geminstaller_rails_preinitializer.rb
|
36
|
+
# file into from the GemInstaller source into your Rails app, modify it, and require your customized
|
37
|
+
# version. For example:
|
38
|
+
# require "#{File.expand_path(RAILS_ROOT)}/config/custom_geminstaller_rails_preinitializer.rb"
|
36
39
|
</code></pre>
|
37
40
|
|
41
|
+
* Start your app: <code>ruby script/server</code>. You should see (depending on verbosity level) messages indicating the gems (and dependency gems) are being installed and auto-required.
|
38
42
|
|
43
|
+
* Stop the app, and verify the gems are installed: <code>gem list [some gem in your geminstaller.yml]</code>
|
39
44
|
|
40
|
-
*
|
45
|
+
* For an example, check out the "Sample Rails App":http://geminstaller.rubyforge.org/svn/trunk/spec/fixture/sample_rails_app/ in the GemInstaller source.
|
41
46
|
|
42
|
-
|
43
|
-
<pre><code> ---
|
44
|
-
RAILS_ROOT/config/boot.rb:
|
45
|
-
...
|
46
|
-
unless defined?(RAILS_ROOT)
|
47
|
-
...
|
48
|
-
end
|
49
|
-
|
50
|
-
############# Begin GemInstaller config - see http://geminstaller.rubyforge.org
|
51
|
-
require "rubygems"
|
52
|
-
require "geminstaller"
|
53
|
-
|
54
|
-
# Path(s) to your GemInstaller config file(s)
|
55
|
-
config_paths = "#{File.expand_path(RAILS_ROOT)}/config/geminstaller.yml"
|
56
|
-
|
57
|
-
# Arguments which will be passed to GemInstaller
|
58
|
-
args = "--config #{config_paths}"
|
59
|
-
|
60
|
-
# The 'exceptions' flag determines whether errors encountered while running GemInstaller
|
61
|
-
# should raise exceptions (and abort Rails), or just return a nonzero return code
|
62
|
-
args += " --exceptions"
|
63
|
-
|
64
|
-
# This will use sudo by default on all non-windows platforms, but requires an entry in your
|
65
|
-
# sudoers file to avoid having to type a password. It can be omitted if you don't want to use sudo.
|
66
|
-
# See http://geminstaller.rubyforge.org/documentation/documentation.html#dealing_with_sudo
|
67
|
-
args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
|
68
|
-
|
69
|
-
# The 'install' method will auto-install gems as specified by the args and config
|
70
|
-
GemInstaller.install(args)
|
71
|
-
|
72
|
-
# The 'autogem' method will automatically add all gems in the GemInstaller config to your load path, using the 'gem'
|
73
|
-
# or 'require_gem' command. Note that only the *first* version of any given gem will be loaded.
|
74
|
-
GemInstaller.autogem(args)
|
75
|
-
############# End GemInstaller config
|
76
|
-
|
77
|
-
unless defined?(Rails::Initializer)
|
78
|
-
...
|
79
|
-
</code></pre>
|
47
|
+
<strong>OLD RAILS 1.0 INSTRUCTIONS:</strong>
|
80
48
|
|
81
|
-
*
|
82
|
-
* Stop the app, and verify the gems are installed: <code>gem list rails</code>
|
49
|
+
* See "Section on invoking GemInstaller from Rails 1.0":documentation.html#invoking_geminstaller_from_rails_10):
|
83
50
|
|
84
51
|
h2. Where to go next
|
85
52
|
|
data/website/src/faq.page
CHANGED
@@ -3,9 +3,17 @@ title: FAQ
|
|
3
3
|
---
|
4
4
|
h1. Frequently Asked Questions
|
5
5
|
|
6
|
+
<span id="source_index_cannot_be_created_from_disk"/>
|
7
|
+
Q: I got an error "source index cannot be created from disk"<br/>
|
8
|
+
A: This is an incompatibility introduced in recent versions of RubyGems. Upgrade to the latest version of GemInstaller.
|
9
|
+
|
10
|
+
<span id="geminstaller_is_slow"/>
|
11
|
+
Q: GemInstaller is taking FOREVER to run!<br/>
|
12
|
+
A: First, run with the '-gall -rall' options to see all verbose output. It is probably the underlying RubyGems command that is slow. If you are on a version of RubyGems which is earlier than 1.2.0, there are know cache performance problems, and you should upgrade. "This little script may help":http://gist.github.com/13223
|
13
|
+
|
6
14
|
<span id="rails_config_gems"/>
|
7
15
|
Q: Why not just use Rails' config.gems and rake tasks instead of GemInstaller?<br/>
|
8
|
-
A:
|
16
|
+
A: A few reasons: 1) There are known issues with config.gems, since it attempts to load dependencies while the Rails environment is initializing, resulting in the possibility of "circular dependencies":http://groups.google.com/group/rubyonrails-core/browse_thread/thread/cffe26aaf784acf9/2480c6d27da36bd2. GemInstaller does not have these issues when run from config/preinitializer.rb. 2) Rails itself cannot manage the Rails gems - but GemInstaller can via preinitializer.rb. 3) GemInstaller has more features that config.gems. 4) GemInstaller runs for any app or environment that needs to manage RubyGems, not just Rails. See more discussion on "this rails core list thread":http://groups.google.com/group/rubyonrails-core/browse_thread/thread/cffe26aaf784acf9/2480c6d27da36bd2 or "this rails ticket":http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/59
|
9
17
|
|
10
18
|
<span id="environment_vars_and_sudo"/>
|
11
19
|
Q: Why can't I use environment variables via ERB in geminstaller.yml when using sudo?<br/>
|
@@ -15,7 +23,7 @@ Q: Why do some gems (like BlueCloth) always get reinstalled, even though they ar
|
|
15
23
|
A: Dunno, this is either a bug in the gem or in RubyGems. It isn't a problem with GemInstaller AFAIK, it happens even if you install manually via 'gem install'. Haven't had time to debug, let me know if you figure it out.
|
16
24
|
|
17
25
|
Q: What about gems like RMagick that have platform-specific binary dependencies?<br/>
|
18
|
-
A: You are on your own, this is outside of the scope of GemInstaller. The geminstaller.yml file is parsed with ERB, so you can put whatever hooks you want to perform necessary system setup and/or prereq validation. You can also google or check the RMagick home page: "http://rmagick.rubyforge.org/":http://rmagick.rubyforge.org/
|
26
|
+
A: You are on your own, this is outside of the scope of GemInstaller. The geminstaller.yml file is parsed with ERB, so you can put whatever hooks you want to perform necessary system setup and/or prereq validation. You can also google or check the RMagick home page: "http://rmagick.rubyforge.org/":http://rmagick.rubyforge.org/. For Debian systems, check out the "AptInstaller":http://github.com/ngauthier/aptinstaller tool.
|
19
27
|
|
20
28
|
Q: Why don't the tests/specs run on Windows?<br/>
|
21
29
|
A: This has been improved with GemInstaller 0.3.0. Using RubyGems 1.0.1 on Windows, install_smoketest.rb, autogem_smoketest.rb, and ruby test/test_all.rb all work. See references to 'windows' on the "Code Page":code/index.html for more details.
|
data/website/src/index.page
CHANGED
@@ -24,7 +24,7 @@ It has been tested on all major platforms (mac, linux, windows), and has an "ext
|
|
24
24
|
|
25
25
|
h2. How do I get it?
|
26
26
|
|
27
|
-
GemInstaller can be "downloaded":http://rubyforge.org/frs/?group_id=1902 from RubyForge.
|
27
|
+
GemInstaller can be installed with 'gem install geminstaller' or "downloaded":http://rubyforge.org/frs/?group_id=1902 from RubyForge.
|
28
28
|
|
29
29
|
h2. How do I use it?
|
30
30
|
|
@@ -36,7 +36,7 @@ GemInstaller was created by "Chad Woolley":http://www.thewoolleyweb.com.
|
|
36
36
|
|
37
37
|
h2. Why not just use Rails' config.gems?
|
38
38
|
|
39
|
-
GemInstaller "has
|
39
|
+
GemInstaller "has advantages":faq.html#rails_config_gems over Rails' config.gems.
|
40
40
|
|
41
41
|
h2(#known_issues). Known Issues
|
42
42
|
|
@@ -46,6 +46,9 @@ Please "report any others that you find":http://thewoolleyweb.lighthouseapp.com/
|
|
46
46
|
|
47
47
|
h2(#history). History
|
48
48
|
|
49
|
+
* 0.5.1
|
50
|
+
** Print a very verbose and helpful error message if gem cannot be found on remote server. Attempts to help "http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/5-sometimes-installing-fails":http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/5-sometimes-installing-fails
|
51
|
+
** Fix bug with stderr being swallowed silently when '--sudo' option is used.
|
49
52
|
* 0.5.0
|
50
53
|
** change default processing order of gems from alpha-version-platform to be order found in file (last config file wins)
|
51
54
|
* 0.4.5
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminstaller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Woolley
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-23 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -24,7 +24,6 @@ extra_rdoc_files:
|
|
24
24
|
- Manifest.txt
|
25
25
|
- README.txt
|
26
26
|
- TODO.txt
|
27
|
-
- ci/README_CI.txt
|
28
27
|
files:
|
29
28
|
- .loadpath
|
30
29
|
- COPYING
|
@@ -35,8 +34,6 @@ files:
|
|
35
34
|
- Rakefile
|
36
35
|
- TODO.txt
|
37
36
|
- bin/geminstaller
|
38
|
-
- ci/README_CI.txt
|
39
|
-
- ci/cruise
|
40
37
|
- cruise_config.rb
|
41
38
|
- focused_spec.sh
|
42
39
|
- focused_spec_debug.sh
|
@@ -129,9 +126,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
126
|
requirements: []
|
130
127
|
|
131
128
|
rubyforge_project: geminstaller
|
132
|
-
rubygems_version: 1.
|
129
|
+
rubygems_version: 1.4.0
|
133
130
|
signing_key:
|
134
|
-
specification_version:
|
131
|
+
specification_version: 3
|
135
132
|
summary: Automated Gem installation, activation, and much more!
|
136
133
|
test_files:
|
137
134
|
- test/test_all.rb
|
data/ci/README_CI.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Use these steps to run GemInstaller under CruiseControl.rb:
|
2
|
-
|
3
|
-
* Create project with name 'geminstaller_using_rubygems_x-y-z', where 'x-y-z' is the version of RubyGems to test against.
|
4
|
-
|
5
|
-
* symlink geminstaller/ci/cruise to /etc/init.d/cruise and follow instructions it contains to hook up init script and update-rc.d.
|
6
|
-
|
7
|
-
* gem install mongrel and daemons (TODO: add these to geminstaller config)
|
8
|
-
|
9
|
-
* Edit ~/.cruise/site_config.rb to have the following entries:
|
10
|
-
|
11
|
-
# builds must run in serial for now, to prevent conflicts
|
12
|
-
Configuration.serialize_builds = true
|
13
|
-
|
14
|
-
# use dedicated gmail account for mailing
|
15
|
-
ActionMailer::Base.smtp_settings = {
|
16
|
-
:address => "smtp.gmail.com",
|
17
|
-
:port => 587,
|
18
|
-
:domain => "thewoolleyweb.com",
|
19
|
-
:authentication => :plain,
|
20
|
-
:user_name => "thewoolleyweb.smtp",
|
21
|
-
:password => "????"
|
22
|
-
}
|
data/ci/cruise
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
#!/usr/local/bin/ruby
|
2
|
-
|
3
|
-
ENV['PATH']="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
|
4
|
-
|
5
|
-
# in order to make cruise run as daemon, you need:
|
6
|
-
# 1. cp $CCRB_HOME/daemon/cruise.sample $CCRB_HOME/daemon/cruise
|
7
|
-
# 2. specify your cruise_path to $CCRB_HOME in $CCRB_HOME/daemon/cruise file
|
8
|
-
# 3. ln -s $CCRB_HOME/daemon/cruise /etc/init.d/cruise (you may need to 'sudo' this)
|
9
|
-
# 4. update-rc.d cruise (you may want to choose options by yourself, and you may need to 'sudo' this)
|
10
|
-
# 5. it's done :>
|
11
|
-
|
12
|
-
require "fileutils"
|
13
|
-
include FileUtils
|
14
|
-
|
15
|
-
require "rubygems"
|
16
|
-
|
17
|
-
begin
|
18
|
-
gem 'mongrel'
|
19
|
-
rescue => e
|
20
|
-
puts "Error: daemon mode of CC.rb requires mongrel installed"
|
21
|
-
exit 1
|
22
|
-
end
|
23
|
-
|
24
|
-
def cruise_path
|
25
|
-
"/home/woolley/workspace/cruisecontrolrb"
|
26
|
-
end
|
27
|
-
|
28
|
-
def cruise_user
|
29
|
-
"woolley"
|
30
|
-
end
|
31
|
-
|
32
|
-
command = ARGV.shift
|
33
|
-
|
34
|
-
case command
|
35
|
-
when 'start'
|
36
|
-
#cd cruise_path
|
37
|
-
system "su - woolley -c 'cd #{cruise_path} && ./cruise start -d'"
|
38
|
-
exit 0
|
39
|
-
when 'stop'
|
40
|
-
system "mongrel_rails stop -P #{cruise_path}/tmp/pids/mongrel.pid"
|
41
|
-
Dir["#{cruise_path}/tmp/pids/builders/*.pid"].each do |pid_file|
|
42
|
-
pid = File.open(pid_file){|f| f.read }
|
43
|
-
puts "Killing builder at file #{pid_file}, pid=#{pid}"
|
44
|
-
system "kill -9 #{pid}"
|
45
|
-
rm pid_file
|
46
|
-
end
|
47
|
-
exit 0
|
48
|
-
else
|
49
|
-
p "Usage: /etc/init.d/cruise start|stop"
|
50
|
-
exit 1
|
51
|
-
end
|