gorp 0.18.3 → 0.18.4
Sign up to get free protection for your applications and to get access to all the features.
- data/gorp.gemspec +1 -1
- data/lib/gorp/rails.rb +5 -3
- data/lib/gorp/test.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
data/gorp.gemspec
CHANGED
data/lib/gorp/rails.rb
CHANGED
@@ -33,11 +33,13 @@ if $?.success?
|
|
33
33
|
# setup vendored environment
|
34
34
|
FileUtils.mkdir_p File.join($WORK, 'vendor', 'gems')
|
35
35
|
FileUtils.rm_f File.join($WORK, 'vendor', 'rails')
|
36
|
-
|
36
|
+
if $rails =~ /^rails( |$)/
|
37
|
+
FileUtils.rm_f File.join($WORK, 'vendor', 'gems', 'environment.rb')
|
38
|
+
else
|
37
39
|
FileUtils.ln_s $rails, File.join($WORK, 'vendor', 'rails')
|
40
|
+
FileUtils.cp File.join(File.dirname(__FILE__), 'rails.env'),
|
41
|
+
File.join($WORK, 'vendor', 'gems', 'environment.rb')
|
38
42
|
end
|
39
|
-
FileUtils.cp File.join(File.dirname(__FILE__), 'rails.env'),
|
40
|
-
File.join($WORK, 'vendor', 'gems', 'environment.rb')
|
41
43
|
else
|
42
44
|
puts "Install rails or specify path to git clone of rails as the " +
|
43
45
|
"first argument."
|
data/lib/gorp/test.rb
CHANGED
@@ -270,7 +270,7 @@ end
|
|
270
270
|
|
271
271
|
# Produce output for standalone scripts
|
272
272
|
at_exit do
|
273
|
-
next if caller.empty? or $output
|
273
|
+
next if !caller or caller.empty? or $output
|
274
274
|
source = File.basename(caller.first.split(/:/).first)
|
275
275
|
name = source.sub(Regexp.new(Regexp.escape(File.extname(source))+'$'), '')
|
276
276
|
$output = name
|
data/lib/version.rb
CHANGED