geminstaller 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,14 @@
1
- == 0.x.y / yyyy-mm-dd
1
+ == 0.4.0 / 2008-04-10
2
+ * Fix multiplatform bug on windows where ruby platform requiring compile was selected over native mswin platform.
3
+ * deprecate support of rubygems 0.9.5, 1.0.0, and 1.1.0.
4
+ * Change handling of platforms on rubygems on Rubygems > 0.9.5, let RubyGems handle default.
5
+ * rename GemInstaller.run method to GemInstaller.install, keep run as an alias for install
6
+ * add‍warning‍if‍a‍gem‍version‍error‍is‍detected,‍with instructions‍to‍run‍geminstaller‍to‍install‍the‍missing‍version
7
+ * Rubygems‍1.x‍compatibility
8
+ * better internal support for uninstall options
9
+ * use‍new,‍correct‍x86-mswin32‍format‍for‍mswin32‍platform‍gems
10
+ * update‍warning‍message‍for‍older‍rubygems‍versions
11
+ * made tests run on Mac OS X Leopard w/RubyGems 1.0.1
2
12
 
3
13
  == 0.3.0 / 2008-01-01
4
14
  * Changes to work with RubyGems >= 0.9.5 and take advantage of new platform and auto-install features. See notes at http://geminstaller.rubyforge.org/code/index.html#rubygems_compatibility
data/Manifest.txt CHANGED
@@ -20,7 +20,6 @@ lib/geminstaller/autogem.rb
20
20
  lib/geminstaller/backward_compatibility.rb
21
21
  lib/geminstaller/config.rb
22
22
  lib/geminstaller/config_builder.rb
23
- lib/geminstaller/dependency_injector.rb
24
23
  lib/geminstaller/enhanced_stream_ui.rb
25
24
  lib/geminstaller/exact_match_list_command.rb
26
25
  lib/geminstaller/file_reader.rb
@@ -42,6 +41,7 @@ lib/geminstaller/output_filter.rb
42
41
  lib/geminstaller/output_listener.rb
43
42
  lib/geminstaller/output_observer.rb
44
43
  lib/geminstaller/output_proxy.rb
44
+ lib/geminstaller/registry.rb
45
45
  lib/geminstaller/requires.rb
46
46
  lib/geminstaller/rogue_gem_finder.rb
47
47
  lib/geminstaller/ruby_gem.rb
@@ -54,8 +54,10 @@ lib/geminstaller/unexpected_prompt_error.rb
54
54
  lib/geminstaller/valid_platform_selector.rb
55
55
  lib/geminstaller/version_specifier.rb
56
56
  lib/geminstaller/yaml_loader.rb
57
+ lib/geminstaller_rails_preinitializer.rb
57
58
  start_local_gem_server.sh
58
59
  test/test_all.rb
60
+ test/test_all_smoketests.rb
59
61
  website/config.yaml
60
62
  website/metainfo.yaml
61
63
  website/src/analytics.page
data/Rakefile CHANGED
@@ -16,6 +16,7 @@ require './lib/geminstaller/hoe_extensions.rb'
16
16
 
17
17
  IndependentHoe.new('geminstaller', GemInstaller.version) do |p|
18
18
  p.author = 'Chad Woolley'
19
+ p.email = 'thewoolleyman@gmail.com'
19
20
  p.rubyforge_name = 'geminstaller'
20
21
  p.summary = p.paragraphs_of('README.txt', 1).first.split(/\n/)[2]
21
22
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
@@ -26,6 +27,12 @@ IndependentHoe.new('geminstaller', GemInstaller.version) do |p|
26
27
  p.extra_deps = []
27
28
  end
28
29
 
30
+ def run_smoketest(path_to_smoketest)
31
+ cmd = "#{Hoe::RUBY_FLAGS} #{path_to_smoketest} #{Hoe::FILTER}"
32
+ result = send :ruby, cmd
33
+ raise "#{path_to_smoketest} Smoketest failed" unless result == 0 || result == true
34
+ end
35
+
29
36
  desc "Run all metrics"
30
37
  task :metrics do
31
38
  Rake::Task[:coverage].invoke
@@ -48,6 +55,7 @@ task :diff_manifest => :clean do
48
55
  next unless File.file? path
49
56
  next if path =~ /\.svn|tmp$|CVS/
50
57
  next if path =~ /\.iml|\.ipr|\.iws|\.kpf|\.tmproj|\.project/
58
+ next if path =~ /\.\/nbproject/
51
59
  next if path =~ /\.\/spec/
52
60
  next if path =~ /\.\/pkg/
53
61
  next if path =~ /\.\/output/
@@ -89,4 +97,30 @@ task :publish_website => [:clean, :website] do
89
97
  local_dir = 'website/output'
90
98
  sh %{rsync -av --delete --exclude=statsvn #{local_dir}/ #{host}:#{remote_dir}}
91
99
  end
100
+
101
+ desc 'Run All Smoketests'
102
+ task :smoketest => [:clean] do
103
+ run_smoketest 'test/test_all_smoketests.rb'
104
+ end
105
+
106
+ desc 'Run Install Smoketest'
107
+ task :install_smoketest => [:clean] do
108
+ run_smoketest 'spec/smoketest/install_smoketest.rb'
109
+ end
110
+
111
+ desc 'Run AutoGem Smoketest'
112
+ task :autogem_smoketest => [:clean] do
113
+ run_smoketest 'spec/smoketest/autogem_smoketest.rb'
114
+ end
115
+
116
+ desc 'Run Rails Smoketest'
117
+ task :rails_smoketest => [:clean] do
118
+ run_smoketest 'spec/smoketest/rails_smoketest.rb'
119
+ end
120
+
121
+ desc 'Run Debug Smoketest'
122
+ task :debug_smoketest => [:clean] do
123
+ run_smoketest 'spec/smoketest/debug_smoketest.rb'
124
+ end
125
+
92
126
  # vim: syntax=Ruby
data/TODO.txt CHANGED
@@ -1,12 +1,30 @@
1
-
2
1
  =============== Unfiled =============
3
- * release with support for rubygems >= 0.9.5
4
- ================ 0.3.0 release ===================
2
+ ================ 0.4.0 release ===================
3
+ * fix smoke tests on CI
4
+ * Investigate error when installing and loading gem in same session (like rails preinitializer) - Not reproducible - fixed in >1.1.0???
5
+ ================ 0.5.0 release ===================
6
+ * If permission error, auto-install under writable_gem_home ~/gems/1.8 (configurable), Gem.clear_paths, set ENV['GEM_HOME'] to ENV['HOME']pathsepGem::ConfigMap[:ruby_version], and issue warning (saying in order to prevent warning, a) set gem_home: in ~/.gemrc, b) invoke via sudo (only if command line), c) make (and keep) current Gem.dir writeable, or d) add geminstaller (and ruby?) to sudoers file (security hole). Properties: "[no_]use_writable_gem_home" and "writable_gem_home".
7
+ * For RubyGems >=1.0.1, look at using Gem::SourceInfoCache instead of SourceIndex or --list command
8
+ * Move classes which are unused against current RubyGems into Legacy module.
9
+ * Speed! What can be done to speed things up?
10
+ * performance improvement: first try cache hit without all option, then with if not found.
11
+ * add command line tool to automatically generate files - default file, rake task (geminstaller:run, geminstaller:install, geminstaller:autogem), and preinit hook. Auto-detect rails vs. non-rails project and generate stuff accordingly. --setup, --setup-rails. Check for new-style boot.rb, fail if missing, check for RAILS_GEM_VERSION in environment.rb, warn if present.
12
+ * Merb support. Does merb have preinitializer.rb equivalent?
13
+ * Change 'run' to automatically automatically calls both 'install' and 'autogem', add 'no-install' and 'no-autogem' option (only applicable when invoked programatically) to suppress if desired
14
+ * auto-install on app startup should not be the default unless use_writable_gem_home is implemented, because of sudo/rake doublerun/speed issues. Update autogem missing gem error message accordingly.
15
+ * also look for config file under RAILS_ROOT/config, if RAILS_ROOT is defined (somehow fails under textmate, if working dir is wrong)
16
+ ================ 0.x.0 release ===================
17
+ * Change option handling to accept hashes in addition to strings when invoked programatically
18
+ * rails_smoketest.rb is not working, always reinstalls existing gems
19
+ * add option to use frozen edge rails before rails gem, understand the implications
20
+ * add auto-install option if gem version error is detected, update error message saying to set option
21
+ * cryptic message if "name:" is left off in yaml
22
+ * Add option to auto-update rubygems to specified version. See rubygems mailing list thread for details
23
+ * set up sample rails project with geminstaller hook and sample test under CI. Have cruise_config uninstall a dummy gem before rails tests, then have rails test ensure it was installed and loaded.
24
+ ================ 0.x.x release ===================
5
25
  * turn smoketest into rake task, with correct return code handling, and hook up to cruise
6
26
  * look into and explain mongrel/webrick installation errors
7
27
  * add top-level method for uninstall of gems, and document (requested by Alex Chaffee and others)
8
- * Rename API: deprecate 'autogem' and rename to 'load'; change current 'run' to 'install'; add new 'run' which automatically calls both 'install' and 'load', add 'no-load' option (only applicable when invoked programatically) to supress automatic 'load'
9
-
10
28
  * docs - add example of using environment variable to control gem version without changing code (Rails)
11
29
  * docs - document and add sample file for preinitializer boot hook. Explain why it can't be in environment.rb vs boot.rb or prinitializer (bottom line: env is not processed before Initializer, so can't be used to load rails gems)
12
30
  * tutorial: using common or shared config files, with different configs for different environments - test (rspec) vs. dev (capistrano) vs. demo/staging/prod, mention include_config option and pros/cons of different approaches
@@ -17,7 +35,7 @@
17
35
  * put mongrel/rails startup bug in tracker, add link in "known bugs" section on home page.
18
36
  * tutorial: running via capistrano
19
37
  * crossreference front page, tutorials, and docs
20
- ================ 0.3.1 release ===================
38
+ ================ 0.x.x release ===================
21
39
  * Namespace remaining un-namespaced constants
22
40
  * Allow array or eval'able string of gems to be passed as --gems arg or instead of args
23
41
  * Add @options[:gems], should be parsed from command line* root-owned gems: add -S | --sudo-only-if-allowed option, will only invoke sudo if GEMINSTALLER_ALLOW(S)_SUDO env var is set
@@ -25,16 +43,16 @@
25
43
  * root-owned gems: Dynamically detect posix platform and check if gem repo is completely writeable. Ignorable prompt?
26
44
  * docs - clean up sudo section. Should be clearer about sudoers entry, and make sure that NOPASSWD is the last entry. Rename from #dealing_with_sudo to #dealing_with_root_owned_gems, rewrite to reflect new best practices (different GEM_PATH or auto-sudo via capistrano)
27
45
  * tutorial: update running via capistrano to reference new sudo docs
28
- ================ 0.3.2 release ===================
46
+ ================ 0.x.x release ===================
29
47
  * handle installation of gem from file (requested by Alex Chaffee)
30
48
  * Investigate gem_plugin. Plugin for mongrel???
31
49
  * Investigate making a Rails plugin
32
- ================ 0.3.3 release ===================
50
+ ================ 0.x.x release ===================
33
51
  * Why does RubyGems reinstall BlueCloth even though it is already installed?!?!? (remove from FAQ after solved)
34
52
  * Figure out how to suppress webrick messages from embedded gem server
35
53
  * add option to warn if any rogue gems are found
36
- ================ 0.3.4 release =====================
37
- ================ 0.3.5 finishing website ===================
54
+ ================ 0.x.x release =====================
55
+ ================ 0.x.x finishing website ===================
38
56
  * autogem and run args can be passed as string or array
39
57
  * better test coverage for --sudo and --exception options
40
58
  * use rspec context_setup
@@ -71,7 +89,7 @@
71
89
  * clean up registry - third-party first, no dependency next, alphabetized
72
90
  * review/clean up ri/rdoc
73
91
  * Better errors for invalid yaml (unsupported keys)
74
- ========= 0.3.0 release ==============
92
+ ========= 0.x.0 release ==============
75
93
  * patch hoe to install_gem without sudo on windows
76
94
  * understand why '> 1' must be quoted to be a valid yaml value - see yaml_loader_spec.rb
77
95
  * tests failed when "partially" connected to network? (wireless at office)
data/bin/geminstaller CHANGED
@@ -27,4 +27,4 @@ if ARGV.include?('--geminstaller-exec-path')
27
27
  exit 0
28
28
  end
29
29
 
30
- exit GemInstaller.run(ARGV, geminstaller_executable)
30
+ exit GemInstaller.install(ARGV, geminstaller_executable)
data/ci/cruise CHANGED
@@ -40,6 +40,7 @@ when 'stop'
40
40
  system "mongrel_rails stop -P #{cruise_path}/tmp/pids/mongrel.pid"
41
41
  Dir["#{cruise_path}/tmp/pids/builders/*.pid"].each do |pid_file|
42
42
  pid = File.open(pid_file){|f| f.read }
43
+ puts "Killing builder at file #{pid_file}, pid=#{pid}"
43
44
  system "kill -9 #{pid}"
44
45
  rm pid_file
45
46
  end
data/cruise_config.rb CHANGED
@@ -8,4 +8,9 @@ Project.configure do |project|
8
8
  rubygems_version.gsub!('-','.')
9
9
  ENV['RUBYGEMS_VERSION'] = rubygems_version
10
10
  end
11
+ if project.name =~ /debug_smoketest/i # debug smoketest project
12
+ project.rake_task = 'debug_smoketest'
13
+ elsif project.name =~ /smoketest/i # smoketest project
14
+ project.rake_task = 'smoketest'
15
+ end
11
16
  end
data/focused_spec.sh CHANGED
File without changes
@@ -1,2 +1,2 @@
1
1
  # warning - experimental
2
- rdebug -I spec/fixture/rubygems_dist/rubygems-1.0.0/lib/ /usr/local/bin/spec -- $1 --line=$2
2
+ ruby -I spec/lib/ruby-debug-0.10.0/cli:spec/lib/ruby-debug-0.10.0/bin:spec/lib/ruby-debug-base-0.10.0/lib:spec/lib/ruby-debug-0.10.0/bin/rdebug:spec/lib/rspec-1.1.1/lib spec/lib/ruby-debug-0.10.0/bin/rdebug spec/lib/rspec-1.1.1/bin/spec -- $1 --line=$2
@@ -8,7 +8,7 @@ module GemInstaller
8
8
  @args = nil
9
9
  end
10
10
 
11
- def run
11
+ def install
12
12
  begin
13
13
  exit_flag_and_return_code = handle_args
14
14
  if exit_flag_and_return_code[0]
@@ -12,9 +12,18 @@ module GemInstaller
12
12
  end
13
13
 
14
14
  def process_gem(gem)
15
- unless @completed_names.index(gem.name) or gem.no_autogem
16
- invoke_require_gem_command(gem.name, gem.version)
17
- @completed_names << gem.name
15
+ name = gem.name
16
+ version = gem.version
17
+ unless @completed_names.index(name) or gem.no_autogem
18
+ begin
19
+ invoke_require_gem_command(name, version)
20
+ rescue Gem::LoadError => load_error
21
+ load_error_message = load_error.message
22
+ load_error_message.strip!
23
+ error_message = "Error: GemInstaller attempted to load gem '#{name}', version '#{version}', but that version is not installed. Use GemInstaller to install the gem. Original Gem::LoadError was: '#{load_error_message}'"
24
+ raise GemInstaller::GemInstallerError.new(error_message)
25
+ end
26
+ @completed_names << name
18
27
  @completed_gems << gem
19
28
  end
20
29
  end
@@ -23,8 +32,8 @@ module GemInstaller
23
32
  if GemInstaller::RubyGemsVersionChecker.matches?('< 0.9')
24
33
  require_gem(name, version)
25
34
  else
26
- # TODO: should we check true/false result of gem method?
27
- gem(name, version)
35
+ # TODO: check true/false result of gem method, print debug message if false (already loaded)
36
+ result = gem(name, version)
28
37
  end
29
38
  end
30
39
  end
@@ -1,6 +1,7 @@
1
1
  module GemInstaller
2
2
  class EnhancedStreamUI < Gem::StreamUI
3
- attr_writer :gem_interaction_handler, :outs, :errs
3
+ attr_writer :outs, :errs
4
+ attr_writer :gem_interaction_handler if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
4
5
 
5
6
  def initialize()
6
7
  # override default constructor to have no args
@@ -35,6 +36,8 @@ module GemInstaller
35
36
  end
36
37
  end
37
38
 
39
+ if GemInstaller::RubyGemsVersionChecker.matches?('<=1.0.1')
40
+ # explicit exit in terminate_interation was removed after 1.0.1
38
41
  def terminate_interaction!(status=-1)
39
42
  raise_error(status)
40
43
  end
@@ -43,6 +46,7 @@ module GemInstaller
43
46
  raise_error(status) unless status == 0
44
47
  raise GemInstaller::RubyGemsExit.new(status)
45
48
  end
49
+ end
46
50
 
47
51
  def alert_error(statement, question=nil)
48
52
  # if alert_error got called due to a GemInstaller::UnexpectedPromptError, re-throw it
@@ -1,25 +1,31 @@
1
1
  module GemInstaller
2
2
  class GemCommandManager
3
- attr_writer :gem_spec_manager, :gem_runner_proxy, :gem_interaction_handler
3
+ attr_writer :gem_spec_manager, :gem_runner_proxy
4
+ attr_writer :gem_interaction_handler if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
4
5
 
5
6
  def list_remote_gem(gem, additional_options)
6
7
  run_args = ["list",gem.name,"--remote","--details"]
8
+ run_args << "--all" if GemInstaller::RubyGemsVersionChecker.matches?('>1.0.1')
7
9
  run_args += additional_options
8
10
  @gem_runner_proxy.run(run_args)
9
11
  end
10
12
 
11
13
  def uninstall_gem(gem)
12
14
  return if !@gem_spec_manager.is_gem_installed?(gem)
13
- @gem_interaction_handler.dependent_gem = gem
15
+ init_gem_interaction_handler(gem)
14
16
  run_gem_command('uninstall', gem, gem.uninstall_options)
15
17
  end
16
18
 
17
19
  def install_gem(gem, force_reinstall = false)
18
20
  return [] if @gem_spec_manager.is_gem_installed?(gem) && !force_reinstall
19
- @gem_interaction_handler.dependent_gem = gem
21
+ init_gem_interaction_handler(gem)
20
22
  run_gem_command('install', gem, gem.install_options)
21
23
  end
22
24
 
25
+ def init_gem_interaction_handler(gem)
26
+ @gem_interaction_handler.dependent_gem = gem if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
27
+ end
28
+
23
29
  def dependency(name, version, additional_options = [])
24
30
  # rubygems has bug up to 0.9.4 where the pipe options uses 'puts', instead of 'say', so we can't capture it
25
31
  # with enhanced_stream_ui. Patched: http://rubyforge.org/tracker/index.php?func=detail&aid=9020&group_id=126&atid=577
@@ -51,7 +57,7 @@ module GemInstaller
51
57
  def run_gem_command(gem_command, gem, options)
52
58
  run_args = [gem_command,gem.name,"--version", "#{gem.version}"]
53
59
  if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
54
- run_args += ['--platform', "#{gem.platform}"]
60
+ run_args += ['--platform', "#{gem.platform}"] if gem.platform && !gem.platform.empty?
55
61
  end
56
62
  run_args += options
57
63
  @gem_runner_proxy.run(run_args)
@@ -3,11 +3,11 @@ module GemInstaller
3
3
  attr_writer :dependent_gem, :noninteractive_chooser_class, :valid_platform_selector
4
4
  DEPENDENCY_PROMPT = 'Install required dependency'
5
5
 
6
+ def initialize
7
+ check_rubygems_version
8
+ end
9
+
6
10
  def handle_ask_yes_no(question)
7
- if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
8
- # gem_interaction_handler is not used for RubyGems >= 0.9.5
9
- raise RuntimeError.new("Internal GemInstaller Error: GemInteractionHandler should not be used for RubyGems >= 0.9.5")
10
- end
11
11
  return unless question.index(DEPENDENCY_PROMPT)
12
12
  message = "Error: RubyGems is prompting to install a required dependency, and you have not " +
13
13
  "specified the '--install-dependencies' option for the current gem. You must modify your " +
@@ -17,10 +17,6 @@ module GemInstaller
17
17
  end
18
18
 
19
19
  def handle_choose_from_list(question, list, noninteractive_chooser = nil)
20
- if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
21
- # gem_interaction_handler is not used for RubyGems >= 0.9.5
22
- raise RuntimeError.new("Internal GemInstaller Error: GemInteractionHandler should not be used for RubyGems >= 0.9.5")
23
- end
24
20
  noninteractive_chooser ||= @noninteractive_chooser_class.new
25
21
  valid_platforms = nil
26
22
  if dependent_gem_with_platform_specified?(list, noninteractive_chooser) or noninteractive_chooser.uninstall_list_type?(question)
@@ -34,5 +30,12 @@ module GemInstaller
34
30
  def dependent_gem_with_platform_specified?(list, noninteractive_chooser)
35
31
  noninteractive_chooser.dependent_gem?(@dependent_gem.name, list) and @dependent_gem.platform
36
32
  end
33
+
34
+ def check_rubygems_version
35
+ if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
36
+ # gem_interaction_handler is not used for RubyGems >= 0.9.5
37
+ raise RuntimeError.new("Internal GemInstaller Error: GemInteractionHandler should not be used for RubyGems >= 0.9.5")
38
+ end
39
+ end
37
40
  end
38
41
  end
File without changes
@@ -16,6 +16,13 @@ module GemInstaller
16
16
  exit_status = nil
17
17
  begin
18
18
  gem_runner.run(args)
19
+ rescue SystemExit => system_exit
20
+ if GemInstaller::RubyGemsVersionChecker.matches?('>1.0.1')
21
+ raise system_exit unless system_exit.is_a? Gem::SystemExitException
22
+ exit_status = system_exit.message
23
+ else
24
+ raise system_exit
25
+ end
19
26
  rescue GemInstaller::RubyGemsExit => normal_exit
20
27
  exit_status = normal_exit.message
21
28
  rescue GemInstaller::GemInstallerError => exit_error
@@ -27,8 +27,8 @@ module GemInstaller
27
27
  else
28
28
  # TODO: this is a hack because source_index#search doesn't allow specification of platform
29
29
  if exact_platform_match
30
- found_gem_specs = found_gem_specs.delete_if do |spec|
31
- !spec_platform_matches?(spec, gem.platform)
30
+ found_gem_specs = found_gem_specs.select do |spec|
31
+ spec_platform_matches?(spec, gem.platform)
32
32
  end
33
33
  end
34
34
  end
@@ -39,11 +39,10 @@ module GemInstaller
39
39
  end
40
40
 
41
41
  def spec_platform_matches?(spec, platform)
42
- spec_platform = Gem::Platform.new(spec.platform)
43
- if spec_platform.is_a?(String)
44
- return spec_platform == platform
42
+ if GemInstaller::RubyGemsVersionChecker.matches?('>0.9.5')
43
+ return Gem::Platform.new(spec.platform) == Gem::Platform.new(platform)
45
44
  end
46
- return spec_platform =~ platform
45
+ return spec.platform == platform
47
46
  end
48
47
  end
49
48
  end
@@ -3,6 +3,7 @@ module GemInstaller
3
3
  # Format for "uninstall" prompt list: "#{spec.name}-#{spec.version}" for ruby, "#{spec.name}-#{spec.version}-#{spec.platform}" (gem.full_name) for binary
4
4
  class NoninteractiveChooser
5
5
  def initialize
6
+ check_rubygems_version
6
7
  @question = nil
7
8
  end
8
9
 
@@ -102,6 +103,12 @@ module GemInstaller
102
103
  install_format_exact_name_match_regexp = /^#{dependent_gem_name}\s.*/
103
104
  install_list_type? and list[0] =~ install_format_exact_name_match_regexp
104
105
  end
105
-
106
+
107
+ def check_rubygems_version
108
+ if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
109
+ # noninteractive_chooser is not used for RubyGems >= 0.9.5
110
+ raise RuntimeError.new("Internal GemInstaller Error: NoninteractiveChooser should not be used for RubyGems >= 0.9.5")
111
+ end
112
+ end
106
113
  end
107
114
  end
@@ -1,21 +1,14 @@
1
1
  module GemInstaller
2
- class DependencyInjector
3
- def registry
4
- @registry ||= create_registry
5
- end
6
-
7
- def create_registry
8
- # define the service registry
9
- @registry = GemInstaller::Registry.new
10
- end
11
- end
12
-
13
2
  class Registry
14
3
  attr_accessor :file_reader, :yaml_loader, :output_proxy, :config_builder, :gem_source_index, :gem_runner_proxy
15
- attr_accessor :gem_runner, :gem_command_manager, :gem_list_checker, :app, :arg_parser, :options, :noninteractive_chooser
16
- attr_accessor :gem_interaction_handler, :install_processor, :missing_dependency_finder, :valid_platform_selector
4
+ attr_accessor :gem_runner, :gem_command_manager, :gem_list_checker, :app, :arg_parser, :options
5
+ attr_accessor :install_processor, :missing_dependency_finder, :valid_platform_selector
17
6
  attr_accessor :output_listener, :outs_output_observer, :errs_output_observer, :output_filter, :autogem, :rogue_gem_finder
18
7
  attr_accessor :gem_spec_manager, :source_index_search_adapter
8
+
9
+ if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
10
+ attr_accessor :gem_interaction_handler, :noninteractive_chooser
11
+ end
19
12
 
20
13
  def initialize
21
14
  @options = {}
@@ -52,11 +45,6 @@ module GemInstaller
52
45
  @source_index_search_adapter = GemInstaller::SourceIndexSearchAdapter.new
53
46
  @source_index_search_adapter.gem_source_index_proxy = @gem_source_index_proxy
54
47
 
55
- @gem_interaction_handler = GemInstaller::GemInteractionHandler.new
56
- @noninteractive_chooser_class = GemInstaller::NoninteractiveChooser
57
- @gem_interaction_handler.noninteractive_chooser_class = @noninteractive_chooser_class
58
- @gem_interaction_handler.valid_platform_selector = @valid_platform_selector
59
-
60
48
  @outs_output_observer = GemInstaller::OutputObserver.new
61
49
  @outs_output_observer.stream = :stdout
62
50
  @outs_output_observer.register(@output_listener)
@@ -67,7 +55,6 @@ module GemInstaller
67
55
  @enhanced_stream_ui = GemInstaller::EnhancedStreamUI.new
68
56
  @enhanced_stream_ui.outs = @outs_output_observer
69
57
  @enhanced_stream_ui.errs = @errs_output_observer
70
- @enhanced_stream_ui.gem_interaction_handler = @gem_interaction_handler
71
58
 
72
59
  @gem_runner_class = Gem::GemRunner
73
60
  @gem_cmd_manager_class = Gem::CommandManager
@@ -89,7 +76,6 @@ module GemInstaller
89
76
  @gem_command_manager = GemInstaller::GemCommandManager.new
90
77
  @gem_command_manager.gem_spec_manager = @gem_spec_manager
91
78
  @gem_command_manager.gem_runner_proxy = @gem_runner_proxy
92
- @gem_command_manager.gem_interaction_handler = @gem_interaction_handler
93
79
 
94
80
  @rogue_gem_finder = GemInstaller::RogueGemFinder.new
95
81
  @rogue_gem_finder.gem_command_manager = @gem_command_manager
@@ -118,6 +104,15 @@ module GemInstaller
118
104
  @install_processor.gem_spec_manager = @gem_spec_manager
119
105
  @install_processor.missing_dependency_finder = @missing_dependency_finder
120
106
  @install_processor.output_filter = @output_filter
107
+
108
+ if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
109
+ @gem_interaction_handler = GemInstaller::GemInteractionHandler.new
110
+ @noninteractive_chooser_class = GemInstaller::NoninteractiveChooser
111
+ @gem_interaction_handler.noninteractive_chooser_class = @noninteractive_chooser_class
112
+ @gem_interaction_handler.valid_platform_selector = @valid_platform_selector
113
+ @gem_command_manager.gem_interaction_handler = @gem_interaction_handler
114
+ @enhanced_stream_ui.gem_interaction_handler = @gem_interaction_handler
115
+ end
121
116
 
122
117
  @app = GemInstaller::Application.new
123
118
  @app.autogem = @autogem
@@ -16,6 +16,18 @@ unless defined? ALLOW_UNSUPPORTED_RUBYGEMS_VERSION or GemInstaller::RubyGemsVers
16
16
  "----------------------------------------------------------------\n\n"
17
17
  end
18
18
 
19
+
20
+ if !(defined? ALLOW_UNSUPPORTED_RUBYGEMS_VERSION) or
21
+ GemInstaller::RubyGemsVersionChecker.matches?('=0.9.5') or
22
+ GemInstaller::RubyGemsVersionChecker.matches?('=1.1.0')
23
+ print "\n\n----------------------------------------------------------------\n" +
24
+ "WARNING: You are using RubyGems version #{Gem::RubyGemsVersion}.\n" +
25
+ "This version is known to have bugs and/or compatibility issues\n" +
26
+ "with GemInstaller. Update RubyGems, or continue at your risk.\n" +
27
+ "To update rubygems (recommended), use 'gem update --system'.\n" +
28
+ "----------------------------------------------------------------\n\n"
29
+ end
30
+
19
31
  # requires for rubygems internal classes
20
32
  require 'rubygems/doc_manager'
21
33
  require 'rubygems/config_file'
@@ -45,7 +57,6 @@ require 'erb'
45
57
  require 'optparse'
46
58
  require 'yaml'
47
59
  require 'fileutils'
48
- require 'tempfile'
49
60
 
50
61
  # third party lib extensions
51
62
  require File.expand_path("#{dir}/rubygems_extensions")
@@ -57,7 +68,7 @@ require File.expand_path("#{dir}/arg_parser")
57
68
  require File.expand_path("#{dir}/autogem")
58
69
  require File.expand_path("#{dir}/config")
59
70
  require File.expand_path("#{dir}/config_builder")
60
- require File.expand_path("#{dir}/dependency_injector")
71
+ require File.expand_path("#{dir}/registry")
61
72
  require File.expand_path("#{dir}/enhanced_stream_ui")
62
73
  require File.expand_path("#{dir}/exact_match_list_command")
63
74
  require File.expand_path("#{dir}/file_reader")
@@ -10,7 +10,9 @@ module GemInstaller
10
10
  if opts[:version] != "" && opts[:version] != nil
11
11
  @version = opts[:version]
12
12
  end
13
- @platform = 'ruby'
13
+ if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.5')
14
+ @platform = 'ruby'
15
+ end
14
16
  if opts[:platform] != "" && opts[:platform] != nil
15
17
  @platform = opts[:platform]
16
18
  end
@@ -31,14 +33,21 @@ module GemInstaller
31
33
  end
32
34
 
33
35
  def self.default_platform
34
- Gem::Platform::RUBY
35
- end
36
+ if GemInstaller::RubyGemsVersionChecker.matches?('>0.9.5')
37
+ Gem::Platform::CURRENT
38
+ else
39
+ # Not sure if this is actually required for RubyGems <=0.9.5, but it
40
+ # was the original value in GemInstaller <=0.3.0, and makes the tests pass
41
+ 'ruby'
42
+ end
43
+ end
36
44
 
37
45
  def <=>(other)
38
46
  compare = @name <=> other.name
39
47
  return compare if compare != 0
40
48
  compare = @version <=> other.version
41
49
  return compare if compare != 0
50
+ return 0 if (@platform == nil && other.platform == nil)
42
51
  return @platform <=> other.platform
43
52
  end
44
53
 
File without changes
data/lib/geminstaller.rb CHANGED
@@ -2,7 +2,7 @@ dir = File.dirname(__FILE__)
2
2
  require File.expand_path("#{dir}/geminstaller/requires.rb")
3
3
 
4
4
  module GemInstaller
5
- def self.run(args = [], geminstaller_executable = nil)
5
+ def self.install(args = [], geminstaller_executable = nil)
6
6
  args_copy = args.dup
7
7
  args_copy = args_copy.split(' ') unless args.respond_to? :join
8
8
  # recursively call script with sudo, if --sudo option is specified
@@ -15,9 +15,14 @@ module GemInstaller
15
15
  return result
16
16
  else
17
17
  app = create_application(args_copy)
18
- app.run
18
+ app.install
19
19
  end
20
- end
20
+ end
21
+
22
+ def self.run(args = [], geminstaller_executable = nil)
23
+ # run is now an alias for install
24
+ install(args, geminstaller_executable)
25
+ end
21
26
 
22
27
  def self.autogem(args = [])
23
28
  args_copy = args.dup
@@ -29,7 +34,7 @@ module GemInstaller
29
34
  end
30
35
 
31
36
  def self.version
32
- "0.3.0"
37
+ "0.4.0"
33
38
  end
34
39
 
35
40
  def self.create_application(args = [], registry = nil)
@@ -40,8 +45,7 @@ module GemInstaller
40
45
  end
41
46
 
42
47
  def self.create_registry
43
- dependency_injector = GemInstaller::DependencyInjector.new
44
- dependency_injector.registry
48
+ GemInstaller::Registry.new
45
49
  end
46
50
 
47
51
  def self.parse_config_paths(config_paths)
@@ -56,18 +60,14 @@ module GemInstaller
56
60
  end
57
61
 
58
62
  def self.reinvoke_with_sudo(args, geminstaller_executable)
59
- # TODO: this sudo support seems like a hack, but I don't have a better idea right now. Ideally, we would
60
- # invoke rubygems from the command line inside geminstaller. However, we can't do that because rubygems
61
- # currently doesn't provide a way to specify platform from the command line - it always pops up the list
62
- # for multi-platform gems, and we have to extend/hack rubygems to manage that.
63
- # Feel free to comment or improve it, this seems to work for now...
63
+ # Sudo support is a hack, better to use other alternatives.
64
64
  geminstaller_executable ||= find_geminstaller_executable
65
65
  args_without_sudo = strip_sudo(args)
66
66
  args_without_sudo << '--redirect-stderr-to-stdout'
67
67
  cmd = "sudo ruby #{geminstaller_executable} #{args_without_sudo.join(' ')}"
68
68
  # TODO: this eats any output. There currently is no standard way to get a return code AND stdin AND stdout.
69
69
  # Some non-standard packages like Open4 handle this, but not synchronously. The Simplest Thing That Could
70
- # Possibly Work s to have a command line option which will cause all stderr output to be redirected to stdout.
70
+ # Possibly Work is to have a command line option which will cause all stderr output to be redirected to stdout.
71
71
  result = system(cmd)
72
72
  return 1 unless result
73
73
  return $?.exitstatus
@@ -0,0 +1,45 @@
1
+ ############# GemInstaller Rails Preinitializer - see http://geminstaller.rubyforge.org
2
+
3
+ # This file should be required in your Rails config/preinitializer.rb for Rails >= 2.0,
4
+ # or required in config/boot.rb before initialization for Rails < 2.0. For example:
5
+ # require 'geminstaller_rails_preinitializer'
6
+ #
7
+ # If you require a different geminstaller configuration, copy this file into your Rails app,
8
+ # modify it, and require your customized version. For example:
9
+ # require "#{File.expand_path(RAILS_ROOT)}/config/custom_geminstaller_rails_preinitializer.rb"
10
+
11
+ require "rubygems"
12
+ require "geminstaller"
13
+
14
+ module GemInstallerRailsPreinitializer
15
+ class << self
16
+ def preinitialize
17
+ args = ''
18
+
19
+ # Specify --geminstaller-output=all and --rubygems-output=all for maximum debug logging
20
+ args += ' --geminstaller-output=all --rubygems-output=all'
21
+
22
+ # The 'exceptions' flag determines whether errors encountered while running GemInstaller
23
+ # should raise exceptions (and abort Rails), or just return a nonzero return code
24
+ args += " --exceptions"
25
+
26
+ # This will use sudo by default on all non-windows platforms, but requires an entry in your
27
+ # sudoers file to avoid having to type a password. It can be omitted if you don't want to use sudo.
28
+ # See http://geminstaller.rubyforge.org/documentation/documentation.html#dealing_with_sudo
29
+ # Note that environment variables will NOT be passed via sudo!
30
+ #args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
31
+
32
+ # The 'install' method will auto-install gems as specified by the args and config
33
+ GemInstaller.install(args)
34
+
35
+ # The 'autogem' method will automatically add all gems in the GemInstaller config to your load path,
36
+ # using the rubygems 'gem' method. Note that only the *first* version of any given gem will be loaded.
37
+ GemInstaller.autogem(args)
38
+ end
39
+ end
40
+ end
41
+
42
+ # Attempt to prevent GemInstaller from running twice, but won't work if it is executed
43
+ # in a separate interpreter (like rake tests)
44
+ GemInstallerRailsPreinitializer.preinitialize unless $geminstaller_initialized
45
+ $geminstaller_initialized = true
File without changes
@@ -0,0 +1,21 @@
1
+ print "\nRunning all GemInstaller SmokeTests, ENV['RUBYGEMS_VERSION'] == '#{ENV['RUBYGEMS_VERSION']}'\n\n"
2
+
3
+ dir = File.dirname(__FILE__)
4
+ smoketest_dir = File.expand_path("#{dir}/../spec/smoketest")
5
+
6
+ test_files = Dir.glob("#{smoketest_dir}/**/*_smoketest.rb")
7
+
8
+ test_files.each do |test_file|
9
+ raise "#{test_file} failed" unless system("ruby #{test_file}")
10
+ end
11
+ #
12
+ # class SmokeTestSuite
13
+ # def self.suite
14
+ # suite = Test::Unit::TestSuite.new
15
+ # suite << GemInstaller::AutoGemSmokeTest.suite
16
+ # # suite << GemInstaller::InstallSmokeTest.suite
17
+ # # suite << GemInstaller::RailsSmokeTest.suite
18
+ # return suite
19
+ # end
20
+ # end
21
+ # Test::Unit::UI::Console::TestRunner.run(SmokeTestSuite)
@@ -20,10 +20,10 @@ These are some notes on the underlying design of GemInstaller, and the current s
20
20
  ** Unit vs. Functional: Many classes have two identically-named spec files associated with them, under unit and functional.
21
21
  *** Unit Specs: The Unit specs for the most part test only a single class in isolation, usually using mock objects, so they run very fast. Many of them are vestiges of my initial BDD approach when I started from nothing. I incur a little bit of overhead cost to maintain them as the app evolves, but I don't mind that as much as some people :). They also come in very handy when I want to BDD some new behavior and don't want to have the high "Test Gem Home" fixture creation overhead that the functional specs have.
22
22
  *** Functional Specs: These also have a one-to-one relationship with classes for the most part - geminstaller_spec is an exception. Most of these test how groups of classes interact together at various levels. Most of them use the "Test Gem Home" fixture approach. This is effective, but adds several seconds to the startup of each run. There is also overlap between some of them, especially at high levels of the API, which adds some maintenance overhead, but is worth it to me since it helps catch integration bugs.
23
- *** Smoke Tests: There are some tests under /spec/smoketests which I run manually. These are really coarse grained scripts, and don't use Rspec or Test::Unit. They hit the live rubygems.org gem repository, and install/uninstall actual gems. They are used as a periodic check to ensure that my "Test Gem Home" fixture approach is not masking any real-life bugs.
23
+ *** Smoke Tests: There are some tests under /spec/smoketests which are not part of the main spec suite. These are really coarse grained scripts. They hit the live rubygems.org gem repository, and install/uninstall actual gems, and exercise my sample rails app which uses GemInstaller. They are used as a check to ensure that my "Test Gem Home" fixture approach is not masking any real-life bugs.
24
24
  * I'm a proponent of high code coverage. I check periodically to ensure I maintain close to 100% code coverage, not counting platform- and version-specific code blocks (and I'll get around to those some day). Also, the sudo recursive invocation stuff still needs some tests, but that's a bit tricky to automate.
25
25
  * The tests are "harder" on Windows (but run fine on mac/linux). The app should work fine, but testing is pretty tricky. I have all tests working against the latest rubygems (1.0.1). Here's what does and doesn't work with tests against latest rubygems on windows:
26
- * smoketest.rb and autogem_test.rb work
26
+ * install_smoketest.rb and autogem_smoketest.rb work
27
27
  * ruby test/test_all.rb works
28
28
  * rake default test task does not work (this seems to be a problem with hoe on windows)
29
29
  * Sometimes test suite still hangs after a while, this is probably some orphaned EmbeddedGemServer process somewhere. A reboot should fix it - this is windows, after all!
@@ -56,9 +56,9 @@ Yeah, it's too manual. Notes for improvement below.
56
56
  * Update version in geminstaller.rb
57
57
  * rake update_manifest
58
58
  * Run tests:
59
- * CI should be green for all versions
60
- * smoketest.rb and autogem_test.rb should pass for all RubyGems versions on mac/linux
61
- * test_all, smoketest.rb and autogem_test.rb should pass for latest RubyGems version on windows
59
+ ** CI should be green for all versions
60
+ ** install_smoketest.rb and autogem_smoketest.rb should pass for all RubyGems versions on mac/linux
61
+ ** test_all, install_smoketest.rb and autogem_smoketest.rb should pass for latest RubyGems version on windows
62
62
  * Make sure everything is checked in
63
63
  * Make a tag in svn
64
64
  * rake clean package
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
  </div>
38
38
 
39
- <div id="footer">&copy; 2007 Chad Woolley | Generated by <a href="http://webgen.rubyforge.org">webgen</a></div>
39
+ <div id="footer">&copy; 2008 Chad Woolley | Generated by <a href="http://webgen.rubyforge.org">webgen</a></div>
40
40
  {includeFile: {filename: analytics.page, escapeHTML: false, processOutput: false}}
41
41
 
42
42
  </body>
@@ -113,7 +113,7 @@ geminstaller --config=../common-config/geminstaller-common-across-projects.yml,g
113
113
 
114
114
  h3(#exceptions_option). <code>--exceptions</code> option
115
115
 
116
- By default, GemInstaller will not throw exceptions for errors when invoked via <code>GemInstaller.run</code> or <code>GemInstaller.autogem</code>. This is so that any GemInstaller errors will not abort startup of Rails or any other app other apps. However, if you do want errors to abort startup of Rails or your app, you can set this option.
116
+ By default, GemInstaller will not throw exceptions for errors when invoked via <code>GemInstaller.install</code> or <code>GemInstaller.autogem</code>. This is so that any GemInstaller errors will not abort startup of Rails or any other app other apps. However, if you do want errors to abort startup of Rails or your app, you can set this option.
117
117
 
118
118
  h3(#redirect_stderr_to_stdout_option). <code>--redirect-stderr-to-stdout</code> option
119
119
 
@@ -322,7 +322,7 @@ args += " --exceptions"
322
322
  args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
323
323
 
324
324
  # The 'install' method will auto-install gems as specified by the args and config
325
- GemInstaller.run(args)
325
+ GemInstaller.install(args)
326
326
 
327
327
  # The 'autogem' method will automatically add all gems in the GemInstaller config to your load path, using the 'gem'
328
328
  # or 'require_gem' command. Note that only the *first* version of any given gem will be loaded.
@@ -67,7 +67,7 @@ args += " --exceptions"
67
67
  args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
68
68
 
69
69
  # The 'install' method will auto-install gems as specified by the args and config
70
- GemInstaller.run(args)
70
+ GemInstaller.install(args)
71
71
 
72
72
  # The 'autogem' method will automatically add all gems in the GemInstaller config to your load path, using the 'gem'
73
73
  # or 'require_gem' command. Note that only the *first* version of any given gem will be loaded.
@@ -97,7 +97,7 @@ gems:
97
97
  platform: <%= RUBY_PLATFORM =~ /mswin/ ? 'mswin32' : 'ruby'%>
98
98
  </pre>
99
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):
100
+ Once you have your *<code>geminstaller.yml</code>* created, the last step is to add calls to <code>GemInstaller.install</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
101
 
102
102
 
103
103
  *RAILS_ROOT/config/boot.rb*:
@@ -127,7 +127,7 @@ args += " --exceptions"
127
127
  args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
128
128
 
129
129
  # The 'install' method will auto-install gems as specified by the args and config
130
- GemInstaller.run(args)
130
+ GemInstaller.install(args)
131
131
 
132
132
  # The 'autogem' method will automatically add all gems in the GemInstaller config to your load path, using the 'gem'
133
133
  # or 'require_gem' command. Note that only the *first* version of any given gem will be loaded.
@@ -225,7 +225,7 @@ config_paths = "#{File.expand_path(RAILS_ROOT)}/config/geminstaller.yml"
225
225
  args = "--config #{config_paths}"
226
226
  args += " --exceptions"
227
227
  args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
228
- GemInstaller.run(args)
228
+ GemInstaller.install(args)
229
229
  GemInstaller.autogem(args)
230
230
  ############# End GemInstaller config
231
231
 
data/website/src/faq.page CHANGED
@@ -15,7 +15,7 @@ Q: What about gems like RMagick that have platform-specific binary dependencies?
15
15
  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/
16
16
 
17
17
  Q: Why don't the tests/specs run on Windows?<br/>
18
- A: Dunno, something with the process handling on windows for TestGemHome and EmbeddedGemServer. The manual application tests under spec/smoketest/ work on windows, though.
18
+ 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.
19
19
 
20
20
 
21
21
  <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>This space intentionally left blank.<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
@@ -35,7 +35,7 @@ GemInstaller was created by "Chad Woolley":http://www.thewoolleyweb.com.
35
35
 
36
36
  h2(#news). News
37
37
 
38
- Version 0.3.0 of GemInstaller is released. This is tested and working against latest RubyGems 1.0.1.
38
+ Version 0.4.0 of GemInstaller is released. This is tested and working against RubyGems 1.1.1.
39
39
 
40
40
  h2(#known_issues). Known Issues
41
41
 
@@ -47,6 +47,17 @@ I bet there's another bug or twoo, so please "report them if you find them":http
47
47
 
48
48
  h2(#history). History
49
49
 
50
+ * 0.4.0
51
+ ** Fix multiplatform bug on windows where ruby platform requiring compile was selected over native mswin platform.
52
+ ** deprecate support of rubygems 0.9.5, 1.0.0, and 1.1.0.
53
+ ** Change handling of platforms on rubygems on Rubygems > 0.9.5, let RubyGems handle default.
54
+ ** rename GemInstaller.run method to GemInstaller.install, keep run as an alias for install
55
+ ** add‍warning‍if‍a‍gem‍version‍error‍is‍detected,‍with instructions‍to‍run‍geminstaller‍to‍install‍the‍missing‍version
56
+ ** Rubygems‍1.x‍compatibility
57
+ ** better internal support for uninstall options
58
+ ** use‍new,‍correct‍x86-mswin32‍format‍for‍mswin32‍platform‍gems
59
+ ** update‍warning‍message‍for‍older‍rubygems‍versions
60
+ ** made tests run on Mac OS X Leopard w/RubyGems 1.0.1
50
61
  * 0.3.0
51
62
  ** Changes to work with RubyGems >= 0.9.5 and take advantage of new platform and auto-install features. See "notes on RubyGems version compatibility":code/index.html#rubygems_compatibility
52
63
  ** On Linux/Mac, you can now specify a RUBYGEMS_VERSION environment var to test against a specific version of RubyGems.
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.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Woolley
@@ -9,12 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-01 00:00:00 -07:00
12
+ date: 2008-04-10 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: "== FEATURES: GemInstaller provides automated management of RubyGems. It uses a simple YAML config file to: * Automatically install the correct versions of all required gems wherever your app runs. * Automatically ensure installed gems and versions are consistent across multiple applications, machines, platforms, and environments * Automatically add correct versions of gems to the ruby load path when your app runs ('require_gem'/'gem') * Automatically reinstall missing dependency gems (built in to RubyGems > 1.0) * Automatically detect correct platform to install for multi-platform gems (built in to RubyGems > 1.0) * Print YAML for \"rogue gems\" which are not specified in the current config, to easily bootstrap your config file, or find gems that were manually installed without GemInstaller. * Allow for common configs to be reused across projects or environments by supporting multiple config files, including common config file snippets, and defaults with overrides. * Allow for dynamic selection of gems, versions, and platforms to be used based on environment vars or any other logic. * Avoid the \"works on demo, breaks on production\" syndrome == SYNOPSYS: GemInstaller provides automated management of RubyGems."
17
- email: ryand-ruby@zenspider.com
17
+ email: thewoolleyman@gmail.com
18
18
  executables:
19
19
  - geminstaller
20
20
  extensions: []
@@ -48,7 +48,6 @@ files:
48
48
  - lib/geminstaller/backward_compatibility.rb
49
49
  - lib/geminstaller/config.rb
50
50
  - lib/geminstaller/config_builder.rb
51
- - lib/geminstaller/dependency_injector.rb
52
51
  - lib/geminstaller/enhanced_stream_ui.rb
53
52
  - lib/geminstaller/exact_match_list_command.rb
54
53
  - lib/geminstaller/file_reader.rb
@@ -70,6 +69,7 @@ files:
70
69
  - lib/geminstaller/output_listener.rb
71
70
  - lib/geminstaller/output_observer.rb
72
71
  - lib/geminstaller/output_proxy.rb
72
+ - lib/geminstaller/registry.rb
73
73
  - lib/geminstaller/requires.rb
74
74
  - lib/geminstaller/rogue_gem_finder.rb
75
75
  - lib/geminstaller/ruby_gem.rb
@@ -82,8 +82,10 @@ files:
82
82
  - lib/geminstaller/valid_platform_selector.rb
83
83
  - lib/geminstaller/version_specifier.rb
84
84
  - lib/geminstaller/yaml_loader.rb
85
+ - lib/geminstaller_rails_preinitializer.rb
85
86
  - start_local_gem_server.sh
86
87
  - test/test_all.rb
88
+ - test/test_all_smoketests.rb
87
89
  - website/config.yaml
88
90
  - website/metainfo.yaml
89
91
  - website/src/analytics.page
@@ -121,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  requirements: []
122
124
 
123
125
  rubyforge_project: geminstaller
124
- rubygems_version: 1.0.1
126
+ rubygems_version: 1.1.0
125
127
  signing_key:
126
128
  specification_version: 2
127
129
  summary: GemInstaller provides automated management of RubyGems.