macournoyer-thin 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
- == 1.0.1 ? release
1
+ == 1.1.0 Super Disco Power release
2
+ * Fix Rack protocol version to 0.1 in environment hash.
3
+ * Fix error when passing no_epoll option to a cluster.
2
4
  * Omit parsing #defined strings [Jérémy Zurcher]
3
5
  * Defaults SERVER_NAME to localhost like webrick does [#87 state:resolved]
4
6
  * Namespace parser to prevent error when mongrel is required [cliffmoon]
data/lib/thin/command.rb CHANGED
@@ -34,12 +34,13 @@ module Thin
34
34
  # Turn into a runnable shell command
35
35
  def shellify
36
36
  shellified_options = @options.inject([]) do |args, (name, value)|
37
+ option_name = name.to_s.tr("_", "-")
37
38
  case value
38
39
  when NilClass,
39
- TrueClass then args << "--#{name}"
40
+ TrueClass then args << "--#{option_name}"
40
41
  when FalseClass
41
- when Array then value.each { |v| args << "--#{name}=#{v.inspect}" }
42
- else args << "--#{name.to_s.tr('_', '-')}=#{value.inspect}"
42
+ when Array then value.each { |v| args << "--#{option_name}=#{v.inspect}" }
43
+ else args << "--#{option_name}=#{value.inspect}"
43
44
  end
44
45
  args
45
46
  end
data/lib/thin/version.rb CHANGED
@@ -5,14 +5,14 @@ module Thin
5
5
 
6
6
  module VERSION #:nodoc:
7
7
  MAJOR = 1
8
- MINOR = 0
9
- TINY = 1
8
+ MINOR = 1
9
+ TINY = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, TINY].join('.')
12
12
 
13
- CODENAME = "?".freeze
13
+ CODENAME = "Super Disco Power".freeze
14
14
 
15
- RACK = [0, 3].freeze # Latest Rack version that was tested
15
+ RACK = [0, 1].freeze # Rack protocol version that was tested
16
16
  end
17
17
 
18
18
  NAME = 'thin'.freeze
data/spec/command_spec.rb CHANGED
@@ -4,7 +4,7 @@ describe Command do
4
4
  before do
5
5
  Command.script = 'thin'
6
6
  @command = Command.new(:start, :port => 3000, :daemonize => true, :log => 'hi.log',
7
- :require => %w(rubygems thin))
7
+ :require => %w(rubygems thin), :no_epoll => true)
8
8
  end
9
9
 
10
10
  it 'should shellify command' do
@@ -17,4 +17,9 @@ describe Command do
17
17
  out = @command.shellify
18
18
  out.should include('--require="rubygems"', '--require="thin"')
19
19
  end
20
+
21
+ it 'should convert _ to - in option name' do
22
+ out = @command.shellify
23
+ out.should include('--no-epoll')
24
+ end
20
25
  end
data/spec/spec_helper.rb CHANGED
@@ -63,7 +63,7 @@ module Matchers
63
63
  class ValidateWithLint
64
64
  def matches?(request)
65
65
  @request = request
66
- Rack::Lint.new(proc{[200, {'Content-Type' => 'text/html'}, []]}).call(@request.env)
66
+ Rack::Lint.new(proc{[200, {'Content-Type' => 'text/html', 'Content-Length' => '0'}, []]}).call(@request.env)
67
67
  true
68
68
  rescue Rack::Lint::LintError => e
69
69
  @message = e.message
@@ -71,7 +71,7 @@ module Matchers
71
71
  end
72
72
 
73
73
  def failure_message(negation=nil)
74
- "should#{negation} validate with Rack Lint"
74
+ "should#{negation} validate with Rack Lint: #{@message}"
75
75
  end
76
76
 
77
77
  def negative_failure_message
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macournoyer-thin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-Andre Cournoyer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-09 21:00:00 -08:00
12
+ date: 2009-02-02 21:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency