macournoyer-thin 1.0.1 → 1.1.0
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/CHANGELOG +3 -1
- data/lib/thin/command.rb +4 -3
- data/lib/thin/version.rb +4 -4
- data/spec/command_spec.rb +6 -1
- data/spec/spec_helper.rb +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
== 1.0
|
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 << "--#{
|
40
|
+
TrueClass then args << "--#{option_name}"
|
40
41
|
when FalseClass
|
41
|
-
when Array then value.each { |v| args << "--#{
|
42
|
-
else args << "--#{
|
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 =
|
9
|
-
TINY =
|
8
|
+
MINOR = 1
|
9
|
+
TINY = 0
|
10
10
|
|
11
11
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
12
12
|
|
13
|
-
CODENAME = "
|
13
|
+
CODENAME = "Super Disco Power".freeze
|
14
14
|
|
15
|
-
RACK = [0,
|
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
|
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-
|
12
|
+
date: 2009-02-02 21:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|