adamsanderson-open_gem 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/rubygems/commands/open_command.rb +8 -1
- data/test/open_command_test.rb +0 -1
- metadata +2 -2
data/VERSION.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
|
1
3
|
require 'rubygems/command'
|
2
4
|
require 'rubygems/dependency'
|
3
5
|
require 'rubygems/version_option'
|
@@ -60,7 +62,12 @@ class Gem::Commands::OpenCommand < Gem::Command
|
|
60
62
|
if !editor
|
61
63
|
say "Either set $EDITOR, or use -c <command_name>"
|
62
64
|
else
|
63
|
-
|
65
|
+
command_parts = Shellwords.shellwords(editor)
|
66
|
+
command_parts << path
|
67
|
+
success = system(*command_parts)
|
68
|
+
if !success
|
69
|
+
raise Gem::CommandLineError, "Could not run '#{editor} #{path}', exit code: #{$?.exitstatus}"
|
70
|
+
end
|
64
71
|
end
|
65
72
|
end
|
66
73
|
end
|
data/test/open_command_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adamsanderson-open_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Sanderson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-02 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|