lib/skylight/cli.rb in skylight-0.3.19 vs lib/skylight/cli.rb in skylight-0.3.20
- old
+ new
@@ -67,10 +67,11 @@
# Get the name in a process so that we don't pollute our environment here
# This is especially important since users may have things like WebMock that
# will prevent us from communicating with the Skylight API
begin
namefile = Tempfile.new('skylight-app-name')
- `rails runner 'File.open(\"#{namefile.path}\", \"w\") {|f| f.write(Rails.application.class.name) }'`
+ # Windows appears to need double quotes for `rails runner`
+ `rails runner "File.open('#{namefile.path}', 'w') {|f| f.write(Rails.application.class.name) }"`
name = namefile.read.split("::").first.underscore.titleize
ensure
namefile.close
namefile.unlink
end