Skip to content

Commit

Permalink
Changed read command's error message to avoid NameError
Browse files Browse the repository at this point in the history
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
lonnon authored and adamsanderson committed Jun 3, 2009
1 parent 6da98b3 commit 0d29abf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion VERSION.yml 100644 → 100755
@@ -1,4 +1,4 @@
---
:minor: 3
:patch: 1
:patch: 2
:major: 1
2 changes: 1 addition & 1 deletion lib/rubygems/commands/read_command.rb 100644 → 100755
Expand Up @@ -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

Expand Down
28 changes: 7 additions & 21 deletions open_gem.gemspec
Expand Up @@ -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
Expand Down

0 comments on commit 0d29abf

Please sign in to comment.