geminstaller 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.5.5 / 2010-03-25
2
+ * Add source to --bundler-export option. Handle Rubygems errors when parsing gem prerelease versions in older Rubygems versions.
3
+
1
4
  == 0.5.4 / 2009-11-15
2
5
  * Add -b / --bundler-export option to create bundler Gemfile - but make sure you only include direct dependencies, and let bundler handle the rest!
3
6
 
data/README.txt CHANGED
@@ -5,6 +5,15 @@
5
5
  * mailto:"GemInstaller Development" <geminstaller-development@rubyforge.org>
6
6
  * mailto:"Chad Woolley" <thewoolleyman@gmail.com>
7
7
 
8
+
9
+ == UPDATE - READ THIS
10
+
11
+ * GemInstaller is being deprecated in favor of Bundler: http://github.com/carlhuda/bundler
12
+ * There is a --bundler-export option on geminstaller to help GemInstaller users migrate to Bundler.
13
+ * This site is outdated, and will remain that way. I'll try to keep GemInstaller working with new RubyGems releases for as long as I can, but I won't do much else. I've also given up on testing older Rubygems versions and Windows (although they should still work, feel free to open a bug if they don't).
14
+ * Why Bundler instead of (some other tool)? Dependency Management is a hard problem to solve properly. Bundler does the right things.
15
+ * If you think Bundler is too complex, then you probably don't understand the problem, or have never dealt (properly) with long-term or complex dependency management issues in the real world, or just like to be contrary. Bundler resolves your entire Gem dependency graph and freezes it in your app. If your tool of choice doesn't do this, it is inferior. Perhaps very usable (like GemInstaller), but still inferior. If you have problems with Bundler, I'd recommend opening an issue: http://github.com/carlhuda/bundler/issues
16
+
8
17
  == DESCRIPTION:
9
18
 
10
19
  Automated Gem installation, activation, and much more!
data/Rakefile CHANGED
@@ -77,6 +77,9 @@ task :diff_manifest => :clean do
77
77
  next if path =~ /\.\/pkg/
78
78
  next if path =~ /\.\/out/
79
79
  next if path =~ /\.\/website\/out/
80
+ next if path =~ /\.DS_Store/
81
+ next if path =~ /\.rvmrc/
82
+ next if path =~ /Gemfile/
80
83
  files << path[2..-1]
81
84
  end
82
85
  files = files.sort.join "\n"
data/TODO.txt CHANGED
@@ -1,81 +1,35 @@
1
1
  =============== Unfiled =============
2
- * Tagline: "It's not just for installing gems!" - "removes the drudgery of installing, activating, and requiring gems"
3
- * move to Github
4
- * autoupdate of rails trunk
5
- * redirection of links to old svn
6
- * Rename autogem to activate
7
- * add GemInstaller.require
8
- * Replace Tagline / Summary / Readme with "Install, Activate, and Require"
9
- * Big Quick Start Link on homepage
10
- * Update config.gems faq item with link to rails tutorial
2
+ * Pointers to Bundler in Readme, homepage, etc
3
+ * Update config.gems faq item with link to bundler info
11
4
  * rename sample app to rails_fixture_app, update important files with comments pointing to fixture app
12
5
  * examples dir
13
- * geminstaller_merb_example_app
14
6
  * geminstaller_rails_example_app
15
7
  * Update Rails tutorial link with link to example app
16
- ================ 0.6.0 release ===================
8
+ * docs - add example of using environment variable to control gem version without changing code (Rails)
9
+ ================ 0.x.0 release ===================
10
+ * cryptic message if "name:" is left off in yaml
17
11
  * fix smoke tests on CI
18
- * Investigate error when installing and loading gem in same session (like rails preinitializer) - Not reproducible - fixed in >1.1.0???
19
- ================ 0.7.0 release ===================
20
- * If permission error, auto-install under writable_gem_home ~/gems/1.8 (configurable), Gem.clear_paths, set ENV['GEM_HOME'] and ENV['GEM_PATH'] to ENV['HOME']pathsepGem::ConfigMap[:ruby_version], and issue warning (saying in order to prevent warning, a) set gem_home and gem_path: 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".
21
- * For RubyGems >=1.0.1, look at using Gem::SourceInfoCache instead of SourceIndex or --list command
22
- * Move classes which are unused against current RubyGems into Legacy module.
23
- * Speed! What can be done to speed things up?
24
- * performance improvement: first try cache hit without all option, then with if not found.
25
- * 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.
26
- * Merb support. init.rb. See lightning talk.
27
- * 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
28
- * 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.
29
12
  * also look for config file under RAILS_ROOT/config, if RAILS_ROOT is defined (somehow fails under textmate, if working dir is wrong)
30
- ================ 0.x.0 release ===================
31
13
  * Change option handling to accept hashes in addition to strings when invoked programatically
32
14
  * rails_smoketest.rb is not working, always reinstalls existing gems
33
- * add option to use frozen edge rails before rails gem, understand the implications
34
- * add auto-install option if gem version error is detected, update error message saying to set option
35
- * cryptic message if "name:" is left off in yaml
36
- * Add option to auto-update rubygems to specified version. See rubygems mailing list thread for details
37
- * 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. (done but not running under CI yet)
38
- ================ 0.x.x release ===================
39
- * turn smoketest into rake task, with correct return code handling, and hook up to cruise
40
- * look into and explain mongrel/webrick installation errors
41
- * add top-level method for uninstall of gems, and document (requested by Alex Chaffee and others)
42
- * docs - add example of using environment variable to control gem version without changing code (Rails)
43
15
  * 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)
44
- * 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
45
16
  * docs - rename "Documentation" page to "Manual"
46
- * rogue gems config generation - add warning and instructions for cleaning up auto-generated file. For example, deleting rails dependencies
47
17
  * faq - mention 'cannot load error' from load, and why it happens (rubygems can only load one version)
48
18
  * faq - mention tradeoffs of optimistic version requirement (>=) vs pessimistic (=), specifically how mongrel specifies its dependencies
49
19
  * put mongrel/rails startup bug in tracker, add link in "known bugs" section on home page.
50
- * tutorial: running via capistrano
51
20
  * crossreference front page, tutorials, and docs
52
- ================ 0.x.x release ===================
53
21
  * Namespace remaining un-namespaced constants
54
- * Allow array or eval'able string of gems to be passed as --gems arg or instead of args
55
- * 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
56
- * root-owned gems: add automatic re-invoke with sudo option (with warning message) if permission error is caught
57
- * root-owned gems: Dynamically detect posix platform and check if gem repo is completely writeable. Ignorable prompt?
58
22
  * 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)
59
23
  * tutorial: update running via capistrano to reference new sudo docs
60
- ================ 0.x.x release ===================
61
24
  * handle installation of gem from file (requested by Alex Chaffee)
62
- * Investigate gem_plugin. Plugin for mongrel???
63
- * Investigate making a Rails plugin
64
- ================ 0.x.x release ===================
65
25
  * Why does RubyGems reinstall BlueCloth even though it is already installed?!?!? (remove from FAQ after solved)
66
26
  * Figure out how to suppress webrick messages from embedded gem server
67
27
  * add option to warn if any rogue gems are found
68
- ================ 0.x.x release =====================
69
- ================ 0.x.x finishing website ===================
70
28
  * autogem and run args can be passed as string or array
71
- * better test coverage for --sudo and --exception options
72
29
  * use rspec context_setup
73
30
  * split out geminstaller_spec into application_spec and geminstaller_spec. Fix reference in docs / design
74
31
  * newlines printed between dots when "updating" message is included in error message
75
- * Error on activerecord for brand-new rubygems installation - couldn't find gem. Did a gem list --remote activerecord, then it went away (got sudo error), then happened again, then worked when I passed -gall -rall options.
76
- * Fastthread = only shows version 0.6.2 on windows, rubygems 0.9 ???
77
32
  * geminstaller_spec autogem spec must have the GemRunner "initialized" or else the stub gem in test_gem_home won't be found by autogem.
78
- * fix_dependencies=true takes FOREVER on windows
79
33
  * echo stdin, lists presented for debug output levels
80
34
  * Just ignore sudo option on windows, rather than throwing an error
81
35
  * why does windows try to reinstall fxruby 1.6.6 when it is already installed???
@@ -87,7 +41,6 @@
87
41
  * Can GemInstaller handle multiple gem server sources via multiple config files?
88
42
  * Handle default gems that come with ruby/rubygems windows distro.
89
43
  * refactor enhanced_stream_ui.ask_yes_no - does it need to catch the exception? Also review context name (no OutputProxy) and use of StringIO, and exception tests.
90
- * rename enhanced_stream_ui to noninteractive_stream_ug
91
44
  * add multilevel dependency smoketests for autogem (old rails version)
92
45
  * refactor duplication in autogem/rogue_gem_finder using blocks
93
46
  * rubygems stdout - don't print prefix for single dot
@@ -96,19 +49,14 @@
96
49
  * Rails integration doesn't work under mongrel when invoked via executable (e.g, actionmailer gem not recognized after install, only after mongrel restart). Does't occur under webrick, or if geminstaller is invoked programatically via class.
97
50
  * rails example doesn't print any warning if geminstaller is not installed
98
51
  * "Installing gem" messages are duplicated if info message is specified, one from rubygems, one from geminstaller. See todo in install_processor.rb
99
- * boot.rb parsed twice under webrick?
100
52
  * commandecho doesn't print regexps correctly
101
53
  * code coverage for logic paths supporting old rubygems versions
102
54
  * spec_utils - use extend+include ClassAndInstanceMethods approach
103
55
  * clean up registry - third-party first, no dependency next, alphabetized
104
56
  * review/clean up ri/rdoc
105
57
  * Better errors for invalid yaml (unsupported keys)
106
- ========= 0.x.0 release ==============
107
- * patch hoe to install_gem without sudo on windows
108
58
  * understand why '> 1' must be quoted to be a valid yaml value - see yaml_loader_spec.rb
109
- * tests failed when "partially" connected to network? (wireless at office)
110
59
  * tests fail with timeouts intermittently on windows
111
- * add more tests for dependencies to geminstaller_spec
112
60
  * reconcile methods for testing error messages - manually vs proc_should_raise_with_message. Probably should patch rspec.
113
61
  * remove test_gem_home.reset from geminstaller_spec.rb WITHOUT breaking the test suite.
114
62
  * tests fail on windows - seems to be related to test_gem_home running twice. smoketest still passes.
@@ -116,7 +64,6 @@
116
64
  * running binary via ruby out of bin dir will pick up gem first on load path if it is installed
117
65
  * verify that >= version spec works with a specific platform, if that platform is not available for the highest version
118
66
  * Check for write access, and exit with warning to use sudo if there is no write access.
119
- * store rubygems dist as a tar, and untar it on demand
120
67
  * Add spec file name to all contexts (or see if rspec can do it automatically)
121
68
  * Embedded gem_server process doesn't get killed on windows during tests - need to use ruby services, see comment in embedded_gem_server.rb
122
69
  * Embedded gem_server ports aren't handled correctly on linux during tests - port conflict on startup, open ports die off slowly after tests finish
@@ -135,4 +82,3 @@
135
82
  * make verbose option specify --backtrace on all gem commands
136
83
  * Add support, syntax, and options for uninstalling gems - completely, or down to highest specified version.
137
84
  * 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
138
- ================ 0.later.1 Unprioritized ===================
data/bin/geminstaller CHANGED
@@ -3,7 +3,7 @@
3
3
  dir = File.dirname(__FILE__)
4
4
 
5
5
  begin
6
- require ' geminstaller'
6
+ require 'geminstaller'
7
7
  rescue LoadError
8
8
  require 'rubygems'
9
9
  begin
data/geminstaller.yml CHANGED
@@ -31,6 +31,8 @@ gems:
31
31
  version: '>= 0.9.3'
32
32
  - name: webgen
33
33
  version: '= 0.5.5'
34
+ - name: minitest
35
+ version: '1.5.0'
34
36
  # - name: gettalong-webgen
35
37
  # version: '>= 0.5.5.20081001'
36
38
  <% if RUBY_PLATFORM =~ /mswin/ %>
data/lib/geminstaller.rb CHANGED
@@ -34,7 +34,7 @@ module GemInstaller
34
34
  end
35
35
 
36
36
  def self.version
37
- "0.5.4"
37
+ "0.5.5"
38
38
  end
39
39
 
40
40
  def self.create_application(args = [], registry = nil)
@@ -9,7 +9,7 @@ module GemInstaller
9
9
  end
10
10
 
11
11
  def convert(config)
12
- manifest = ""
12
+ manifest = "source :gemcutter\n"
13
13
  config.gems.each do |gem|
14
14
  manifest += %Q{gem "#{gem.name}", "#{gem.version}"\n}
15
15
  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.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}"
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 open a ticket here: http://thewoolleyweb.lighthouseapp.com/projects/11580-geminstaller. Output of remote gem list command: \n#{remote_list}"
27
27
  raise GemInstaller::GemInstallerError.new(error_message)
28
28
  end
29
29
 
@@ -27,7 +27,15 @@ module GemInstaller
27
27
  end
28
28
 
29
29
  def search_greater_than_0_9_4(gem, version_requirement, platform_only = false)
30
- dependency = Gem::Dependency.new(gem.name, version_requirement)
30
+ dependency = nil
31
+ begin
32
+ dependency = Gem::Dependency.new(gem.name, version_requirement)
33
+ rescue => e
34
+ msg = "Rubygems failed to parse gem: name='#{gem.name}', version='#{version_requirement}'. Original Error:\n" +
35
+ " #{e.inspect}\n" +
36
+ "If you are having problems with prerelease gems or non-numeric versions, please upgrade to the latest Rubygems."
37
+ raise GemInstaller::GemInstallerError.new(msg)
38
+ end
31
39
  @gem_source_index_proxy.refresh!
32
40
  @gem_source_index_proxy.search(dependency, platform_only)
33
41
  end
@@ -12,6 +12,7 @@ h2. Table of Contents
12
12
  ** "<code>--redirect-stderr-to-stdout</code> option":#redirect_stderr_to_stdout_option
13
13
  ** "<code>--geminstaller-output</code> option":#geminstaller_output_option
14
14
  ** "<code>--rubygems-output</code> option":#rubygems_output_option
15
+ ** "<code>--bundler-export</code> option":#bundler_export_option
15
16
  ** "<code>--print-rogue-gems</code> option":#print_rogue_gems_option
16
17
  ** "<code>--sudo</code> option":#sudo_option
17
18
  ** "<code>--silent</code> option":#silent_option
@@ -143,6 +144,10 @@ GemInstaller works by automatically invoking RubyGems commands. The <code>--rub
143
144
  * stderr: Prints standard error stream from RubyGems.
144
145
  * all: Prints all messages. This is the same as specifying all of the other types (except 'none')
145
146
 
147
+ h3(#bundler_export_option). <code>--bundler-export</code> option
148
+
149
+ The <code>--bundler-export</code> writes a "Bundler":http://github.com/wycats/bundler ("http://github.com/carlhuda/bundler":http://github.com/carlhuda/bundler) Gemfile based on your Geminstaller config(s). However, be aware that you may have unnecessary entries in your config, because Bundler resolves the entire dependency tree for you. So, make sure you ONLY specify your application's DIRECT dependencies in your Bundler Gemfile.
150
+
146
151
  h3(#print_rogue_gems_option). <code>--print-rogue-gems</code> option
147
152
 
148
153
  The <code>--print-rogue-gems</code> option prints a report of all locally installed gems which are not specified in the active loaded GemInstaller config file(s). GemInstaller, being "Narcissistic Software" (tm), considers these "rogue gems". The output format is in YAML, so it can be cut and pasted or piped directly into a new or existing config file. This allows you to bootstrap a new system, by creating an empty config file with no gems specified, and running geminstaller with the <code>--print-rogue-gems</code> option to identify all gems which are currently installed on the system. It can also be used to identify gems which were manually installed without being entered into a GemInstaller config.
@@ -1,6 +1,14 @@
1
1
  ---
2
2
  title: Overview
3
3
  ---
4
+ h1. UPDATE - READ THIS
5
+
6
+ * GemInstaller is being deprecated in favor of "Bundler":http://github.com/carlhuda/bundler
7
+ * There is a "--bundler-export option":documentation/documentation.html#bundler_export_option on geminstaller to help GemInstaller users migrate to Bundler.
8
+ * This site is outdated, and will remain that way. I'll try to keep GemInstaller working with new RubyGems releases for as long as I can, but I won't do much else. I've also given up on testing older Rubygems versions and Windows (although they should still work, feel free to open a bug if they don't).
9
+ * Why Bundler instead of (some other tool)? Dependency Management is a hard problem to solve properly. Bundler does the right things.
10
+ * If you think Bundler is too complex, then you probably don't understand the problem, or have never dealt (properly) with long-term or complex dependency management issues in the real world, or just like to be contrary. Bundler resolves your entire Gem dependency graph and freezes it in your app. If your tool of choice doesn't do this, it is inferior. Perhaps very usable (like GemInstaller), but still inferior. If you have problems with Bundler, I'd recommend "opening an issue":http://github.com/carlhuda/bundler/issues
11
+
4
12
  h1. Overview
5
13
 
6
14
  h2. What is GemInstaller?
@@ -16,7 +24,6 @@ GemInstaller provides automated installation, loading and activation of RubyGems
16
24
  * 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.
17
25
  * Allow for dynamic selection of gems, versions, and platforms to be used based on environment vars or any other logic.
18
26
  * Avoid the "works on demo, breaks on production" syndrome.
19
- * Find lost socks.
20
27
 
21
28
  GemInstaller can be used from the command line, or embedded to run automatically on startup for a Rails app or any other Ruby program.
22
29
 
@@ -34,10 +41,6 @@ h2. Who is responsible for GemInstaller?
34
41
 
35
42
  GemInstaller was created by "Chad Woolley":http://www.thewoolleyweb.com.
36
43
 
37
- h2. Why not just use Rails' config.gems?
38
-
39
- GemInstaller "has advantages":faq.html#rails_config_gems over Rails' config.gems.
40
-
41
44
  h2(#known_issues). Known Issues
42
45
 
43
46
  I have a "list of high priority bugs and features":http://thewoolleyweb.lighthouseapp.com/projects/11580-geminstaller/tickets?q=tagged%3Ahigh_priority that need to be addressed before a 1.0 release.
@@ -46,8 +49,10 @@ Please "report any others that you find":http://thewoolleyweb.lighthouseapp.com/
46
49
 
47
50
  h2(#history). History
48
51
 
52
+ * 0.5.5
53
+ ** Add source to --bundler-export option. Handle Rubygems errors when parsing gem prerelease versions in older Rubygems versions.
49
54
  * 0.5.4
50
- ** Add -b / --bundler-export option to create bundler Gemfile - but make sure you only include direct dependencies, and let bundler handle the rest!
55
+ ** Add -b / "--bundler-export option":documentation/documentation.html#bundler_export_option to create bundler Gemfile - but make sure you only include direct dependencies, and let bundler handle the rest!
51
56
  * 0.5.3
52
57
  ** Many long overdue bugfixes and patches, see http://tinyurl.com/geminstaller-0-5-3-release for details.
53
58
  ** Thanks to Greg Fitzgerald, Britt Crawford, John Trupiano, Gabriel Gironda, and Eric Hodel for patches and assistance.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 4
9
- version: 0.5.4
8
+ - 5
9
+ version: 0.5.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Chad Woolley
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2009-11-15 00:00:00 -07:00
17
+ date: 2010-03-25 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements: []
136
136
 
137
137
  rubyforge_project: geminstaller
138
- rubygems_version: 1.3.5.1
138
+ rubygems_version: 1.3.6.1
139
139
  signing_key:
140
140
  specification_version: 3
141
141
  summary: See http://geminstaller.rubyforge.org