sauce 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.11.1
@@ -5,7 +5,7 @@ class SauceGenerator < Rails::Generator::Base
5
5
  def initialize(runtime_args, runtime_options = {})
6
6
  config = Sauce::Config.new
7
7
  if config.username.nil? || config.access_key.nil?
8
- if runtime_args.size < 2
8
+ if runtime_args.size != 2
9
9
  raise "Usage: #{$0} sauce <USERNAME> <ACCESS_KEY>"
10
10
  else
11
11
  system("sauce config #{runtime_args[0]} #{runtime_args[1]}")
@@ -28,15 +28,7 @@ module Sauce
28
28
 
29
29
  def with_rails_server
30
30
  STDERR.puts "Starting Rails server on port 3001..."
31
- server = IO.popen("script/server RAILS_ENV=test --port 3001 2>&1")
32
- pid = nil
33
- Thread.new do
34
- while (line = server.gets)
35
- if line =~ /pid=(.*) /
36
- pid = $1.to_i
37
- end
38
- end
39
- end
31
+ server = IO.popen("ruby script/server RAILS_ENV=test --port 3001 --daemon")
40
32
 
41
33
  silence_stream(STDOUT) do
42
34
  TCPSocket.wait_for_service(:host => "127.0.0.1", :port => 3001)
@@ -45,7 +37,12 @@ module Sauce
45
37
  begin
46
38
  yield
47
39
  ensure
48
- Process.kill("INT", pid)
40
+ begin
41
+ pid = IO.read(File.join('tmp', 'pids', 'server.pid')).to_i
42
+ Process.kill("INT", pid)
43
+ rescue
44
+ STDERR.puts "Rails server could not be killed. Is the pid in #{File.join('tmp', 'pids', 'server.pid')}?"
45
+ end
49
46
  end
50
47
  end
51
48
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
- - 0
10
- version: 0.11.0
9
+ - 1
10
+ version: 0.11.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Grove
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-02 00:00:00 -07:00
19
+ date: 2010-11-19 00:00:00 -08:00
20
20
  default_executable: sauce
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency