Permalink
Browse files

Changed read command's error message to avoid NameError

read_gem still had some cut and paste from open_gem when raising
Gem::CommandLineError, which resulted in the following error:

ERROR:  While executing gem ... (NameError)
  undefined local variable or method `editor' for
  #<Gem::Commands::ReadCommand :0x7fe50b6c>

I substituted #{rdoc_reader} for #{editor} in the error message, and
now it works as it should.

Also: bumped patch version up by 1.

Signed-off-by: Adam Sanderson <netghost@gmail.com>
  • Loading branch information...
1 parent 6da98b3 commit 0d29abff2d20af0fbe62e5162f895096564ca435 @lonnon lonnon committed with Jun 3, 2009
Showing with 9 additions and 23 deletions.
  1. +1 −1 VERSION.yml
  2. +1 −1 lib/rubygems/commands/read_command.rb
  3. +7 −21 open_gem.gemspec
View
2 VERSION.yml 100644 → 100755
@@ -1,4 +1,4 @@
---
:minor: 3
-:patch: 1
+:patch: 2
:major: 1
View
@@ -53,7 +53,7 @@ def read_gem(path)
command_parts << path
success = system(*command_parts)
if !success
- raise Gem::CommandLineError, "Could not run '#{editor} #{path}', exit code: #{$?.exitstatus}"
+ raise Gem::CommandLineError, "Could not run '#{rdoc_reader} #{path}', exit code: #{$?.exitstatus}"
end
end
View
@@ -2,36 +2,22 @@
Gem::Specification.new do |s|
s.name = %q{open_gem}
- s.version = "1.3.1"
+ s.version = "1.3.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Adam Sanderson"]
- s.date = %q{2009-06-02}
+ s.date = %q{2009-06-03}
s.description = %q{ Open a gem's source directory with either the default editor, or a specified command.
}
s.email = %q{netghost@gmail.com}
- s.extra_rdoc_files = [
- "README.markdown"
- ]
- s.files = [
- "CHANGELOG.markdown",
- "README.markdown",
- "Rakefile",
- "VERSION.yml",
- "lib/open_gem/common_options.rb",
- "lib/rubygems/commands/open_command.rb",
- "lib/rubygems/commands/read_command.rb",
- "lib/rubygems_plugin.rb",
- "test/open_command_test.rb"
- ]
+ s.extra_rdoc_files = ["README.markdown"]
+ s.files = ["CHANGELOG.markdown", "Rakefile", "README.markdown", "VERSION.yml", "lib/open_gem", "lib/open_gem/common_options.rb", "lib/rubygems", "lib/rubygems/commands", "lib/rubygems/commands/open_command.rb", "lib/rubygems/commands/read_command.rb", "lib/rubygems_plugin.rb", "test/open_command_test.rb"]
s.homepage = %q{http://github.com/adamsanderson/open_gem}
- s.rdoc_options = ["--charset=UTF-8"]
+ s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.2}
+ s.rubygems_version = %q{1.3.4}
s.summary = %q{Gem Command to easily open a ruby gem with the editor of your choice.}
- s.test_files = [
- "test/open_command_test.rb"
- ]
+ s.test_files = ["test/open_command_test.rb"]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION

0 comments on commit 0d29abf

Please sign in to comment.