File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ def self.detect?
2121 def before_configure
2222 @spec_file = Dir [ '*.gemspec' ] . first
2323 require 'yaml'
24- @spec = File . open ( @spec_file ) { |f | Gem ::Specification . from_yaml ( f ) } rescue Gem ::Specification . load ( @spec_file )
25- @spec . runtime_dependencies . each { |g | config . gems << g }
24+ @spec = File . open ( @spec_file ) { |f | Gem ::Specification . from_yaml ( f ) } rescue Gem ::Specification . load ( @spec_file )
25+ @spec . runtime_dependencies . each { |g | config . gems << g }
2626 config . dirs = [ ]
2727 config . compiled_ruby_files = @spec . files . select { |f | f =~ /\. rb$/ }
2828 end
@@ -54,11 +54,11 @@ def update_archive(jar)
5454 end
5555
5656 def default_executable
57- if !@spec . executables . empty?
57+ if ! @spec . executables . empty?
5858 bundler_version =
5959 Gem . loaded_specs . include? ( "bundler" ) ?
6060 Gem . loaded_specs [ "bundler" ] . version :
61- Gem ::Version . create ( "0.0.0" )
61+ Gem ::Version . create ( "0.0.0" )
6262 if ( bundler_version <=> Gem ::Version . create ( "1.8.0" ) ) < 0
6363 "bin/#{ @spec . executables . first } "
6464 else
Original file line number Diff line number Diff line change @@ -35,11 +35,9 @@ def update_archive(jar)
3535
3636 def default_executable
3737 exes = Dir [ 'bin/*' ] . sort
38- unless ( exe = exes . grep ( /#{ config . jar_name } / ) . first )
38+ unless exe = exes . grep ( /#{ config . jar_name } / ) . first
3939 exe = exes . first
40- if exe
41- warn "No executable matching config.jar_name found, using #{ exe } "
42- end
40+ warn "No executable matching config.jar_name found, using #{ exe } " if exe
4341 end
4442 raise "No executable script found" unless exe
4543 exe
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ def use_test_webserver
167167
168168 module InstanceMethods
169169
170- def generate_gem ( gem_name , gem_dir = Dir . mktmpdir ( "#{ gem_name } -#{ Time . now . to_i } " ) )
170+ def generate_gem ( gem_name , gem_dir = Dir . mktmpdir ( "#{ gem_name } -#{ Time . now . to_f } " ) )
171171 Dir . chdir ( gem_dir ) do
172172
173173 # create the gemspec and Gemfile
You can’t perform that action at this time.
0 commit comments