webmachine 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +13 -11
  5. data/README.md +85 -89
  6. data/Rakefile +0 -1
  7. data/documentation/adapters.md +39 -0
  8. data/documentation/authentication-and-authorization.md +37 -0
  9. data/documentation/configurator.md +19 -0
  10. data/documentation/error-handling.md +86 -0
  11. data/documentation/examples.md +215 -0
  12. data/documentation/how-it-works.md +76 -0
  13. data/documentation/routes.md +97 -0
  14. data/documentation/validation.md +159 -0
  15. data/documentation/versioning-apis.md +74 -0
  16. data/documentation/visual-debugger.md +38 -0
  17. data/examples/application.rb +2 -2
  18. data/examples/debugger.rb +1 -1
  19. data/lib/webmachine.rb +3 -1
  20. data/lib/webmachine/adapter.rb +7 -13
  21. data/lib/webmachine/adapters.rb +1 -2
  22. data/lib/webmachine/adapters/httpkit.rb +74 -0
  23. data/lib/webmachine/adapters/lazy_request_body.rb +1 -2
  24. data/lib/webmachine/adapters/rack.rb +37 -21
  25. data/lib/webmachine/adapters/reel.rb +21 -23
  26. data/lib/webmachine/adapters/webrick.rb +16 -16
  27. data/lib/webmachine/application.rb +2 -2
  28. data/lib/webmachine/chunked_body.rb +3 -4
  29. data/lib/webmachine/constants.rb +75 -0
  30. data/lib/webmachine/decision/conneg.rb +12 -10
  31. data/lib/webmachine/decision/flow.rb +31 -21
  32. data/lib/webmachine/decision/fsm.rb +10 -18
  33. data/lib/webmachine/decision/helpers.rb +9 -37
  34. data/lib/webmachine/dispatcher.rb +13 -10
  35. data/lib/webmachine/dispatcher/route.rb +18 -8
  36. data/lib/webmachine/errors.rb +7 -1
  37. data/lib/webmachine/header_negotiation.rb +25 -0
  38. data/lib/webmachine/headers.rb +7 -2
  39. data/lib/webmachine/locale/en.yml +7 -5
  40. data/lib/webmachine/media_type.rb +10 -8
  41. data/lib/webmachine/request.rb +44 -15
  42. data/lib/webmachine/resource.rb +1 -1
  43. data/lib/webmachine/resource/callbacks.rb +6 -4
  44. data/lib/webmachine/spec/IO_response.body +1 -0
  45. data/lib/webmachine/spec/adapter_lint.rb +70 -36
  46. data/lib/webmachine/spec/test_resource.rb +10 -4
  47. data/lib/webmachine/streaming/fiber_encoder.rb +1 -5
  48. data/lib/webmachine/streaming/io_encoder.rb +6 -0
  49. data/lib/webmachine/trace.rb +1 -0
  50. data/lib/webmachine/trace/fsm.rb +20 -10
  51. data/lib/webmachine/trace/resource_proxy.rb +2 -0
  52. data/lib/webmachine/translation.rb +2 -1
  53. data/lib/webmachine/version.rb +3 -3
  54. data/memory_test.rb +37 -0
  55. data/spec/spec_helper.rb +9 -9
  56. data/spec/webmachine/adapter_spec.rb +14 -15
  57. data/spec/webmachine/adapters/httpkit_spec.rb +10 -0
  58. data/spec/webmachine/adapters/rack_spec.rb +6 -6
  59. data/spec/webmachine/adapters/reel_spec.rb +15 -11
  60. data/spec/webmachine/adapters/webrick_spec.rb +2 -2
  61. data/spec/webmachine/application_spec.rb +18 -17
  62. data/spec/webmachine/chunked_body_spec.rb +3 -3
  63. data/spec/webmachine/configuration_spec.rb +5 -5
  64. data/spec/webmachine/cookie_spec.rb +13 -13
  65. data/spec/webmachine/decision/conneg_spec.rb +48 -42
  66. data/spec/webmachine/decision/falsey_spec.rb +4 -4
  67. data/spec/webmachine/decision/flow_spec.rb +194 -144
  68. data/spec/webmachine/decision/fsm_spec.rb +17 -17
  69. data/spec/webmachine/decision/helpers_spec.rb +20 -20
  70. data/spec/webmachine/dispatcher/route_spec.rb +73 -27
  71. data/spec/webmachine/dispatcher_spec.rb +34 -24
  72. data/spec/webmachine/errors_spec.rb +1 -1
  73. data/spec/webmachine/etags_spec.rb +19 -19
  74. data/spec/webmachine/events_spec.rb +6 -6
  75. data/spec/webmachine/headers_spec.rb +14 -14
  76. data/spec/webmachine/media_type_spec.rb +36 -36
  77. data/spec/webmachine/request_spec.rb +33 -33
  78. data/spec/webmachine/resource/authentication_spec.rb +6 -6
  79. data/spec/webmachine/response_spec.rb +12 -12
  80. data/spec/webmachine/trace/fsm_spec.rb +8 -8
  81. data/spec/webmachine/trace/resource_proxy_spec.rb +9 -9
  82. data/spec/webmachine/trace/trace_store_spec.rb +5 -5
  83. data/spec/webmachine/trace_spec.rb +3 -3
  84. data/webmachine.gemspec +2 -6
  85. metadata +48 -206
  86. data/lib/webmachine/adapters/hatetepe.rb +0 -108
  87. data/lib/webmachine/adapters/mongrel.rb +0 -127
  88. data/lib/webmachine/dispatcher/not_found_resource.rb +0 -5
  89. data/lib/webmachine/fiber18.rb +0 -88
  90. data/spec/webmachine/adapters/hatetepe_spec.rb +0 -60
  91. data/spec/webmachine/adapters/mongrel_spec.rb +0 -16
@@ -31,14 +31,14 @@ describe Webmachine::Resource::Authentication do
31
31
  context "when no authorization is sent by the client" do
32
32
  it "should reply with a 401 Unauthorized and a WWW-Authenticate header using Basic" do
33
33
  subject.run
34
- response.code.should == 401
35
- response.headers['WWW-Authenticate'].should == 'Basic realm="Webmachine"'
34
+ expect(response.code).to eq(401)
35
+ expect(response.headers['WWW-Authenticate']).to eq('Basic realm="Webmachine"')
36
36
  end
37
37
 
38
38
  it "should use the specified realm in the WWW-Authenticate header" do
39
39
  resource.realm = "My App"
40
40
  subject.run
41
- response.headers['WWW-Authenticate'].should == 'Basic realm="My App"'
41
+ expect(response.headers['WWW-Authenticate']).to eq('Basic realm="My App"')
42
42
  end
43
43
  end
44
44
 
@@ -49,8 +49,8 @@ describe Webmachine::Resource::Authentication do
49
49
 
50
50
  it "should reply with a 401 Unauthorized and a WWW-Authenticate header using Basic" do
51
51
  subject.run
52
- response.code.should == 401
53
- response.headers['WWW-Authenticate'].should == 'Basic realm="Webmachine"'
52
+ expect(response.code).to eq(401)
53
+ expect(response.headers['WWW-Authenticate']).to eq('Basic realm="Webmachine"')
54
54
  end
55
55
  end
56
56
 
@@ -61,7 +61,7 @@ describe Webmachine::Resource::Authentication do
61
61
 
62
62
  it "should not reply with 401 Unauthorized" do
63
63
  subject.run
64
- response.code.should_not == 401
64
+ expect(response.code).not_to eq(401)
65
65
  end
66
66
  end
67
67
  end
@@ -3,20 +3,20 @@ require 'spec_helper'
3
3
  describe Webmachine::Response do
4
4
 
5
5
  it "should have sane default values" do
6
- subject.code.should == 200
7
- subject.is_redirect?.should be_false
8
- subject.headers.should be_empty
6
+ expect(subject.code).to eq(200)
7
+ expect(subject.is_redirect?).to be(false)
8
+ expect(subject.headers).to be_empty
9
9
  end
10
10
 
11
11
  describe "a redirected response" do
12
12
  let(:redirect_url) { "/" }
13
13
 
14
- before(:all) { subject.redirect_to redirect_url }
14
+ before(:each) { subject.redirect_to redirect_url }
15
15
 
16
- its(:is_redirect?) { should be_true }
16
+ its(:is_redirect?) { should be(true) }
17
17
 
18
18
  it "should have a proper Location header" do
19
- subject.headers["Location"].should == redirect_url
19
+ expect(subject.headers["Location"]).to eq(redirect_url)
20
20
  end
21
21
  end
22
22
 
@@ -24,21 +24,21 @@ describe Webmachine::Response do
24
24
  let(:cookie) { "monster" }
25
25
  let(:cookie_value) { "mash" }
26
26
 
27
- before(:all) { subject.set_cookie(cookie, cookie_value) }
27
+ before(:each) { subject.set_cookie(cookie, cookie_value) }
28
28
 
29
29
  it "should have a proper Set-Cookie header" do
30
- subject.headers["Set-Cookie"].should include "monster=mash";
30
+ expect(subject.headers["Set-Cookie"]).to include "monster=mash"
31
31
  end
32
32
 
33
33
  describe "setting multiple cookies" do
34
34
  let(:cookie2) { "rodeo" }
35
35
  let(:cookie2_value) { "clown" }
36
- before(:all) { subject.set_cookie(cookie2, cookie2_value) }
36
+ before(:each) { subject.set_cookie(cookie2, cookie2_value) }
37
37
 
38
38
  it "should have a proper Set-Cookie header" do
39
- subject.headers["Set-Cookie"].should be_a Array
40
- subject.headers["Set-Cookie"].should include "rodeo=clown"
41
- subject.headers["Set-Cookie"].should include "monster=mash"
39
+ expect(subject.headers["Set-Cookie"]).to be_a Array
40
+ expect(subject.headers["Set-Cookie"]).to include "rodeo=clown"
41
+ expect(subject.headers["Set-Cookie"]).to include "monster=mash"
42
42
  end
43
43
  end
44
44
  end
@@ -7,31 +7,31 @@ describe Webmachine::Trace::FSM do
7
7
  before { Webmachine::Trace.trace_store = :memory }
8
8
 
9
9
  context "when tracing is enabled" do
10
- before { Webmachine::Trace.stub!(:trace?).and_return(true) }
10
+ before { allow(Webmachine::Trace).to receive(:trace?).and_return(true) }
11
11
 
12
12
  it "proxies the resource" do
13
- subject.resource.should be_kind_of(Webmachine::Trace::ResourceProxy)
13
+ expect(subject.resource).to be_kind_of(Webmachine::Trace::ResourceProxy)
14
14
  end
15
15
 
16
16
  it "records a trace" do
17
17
  subject.run
18
- response.trace.should_not be_empty
19
- Webmachine::Trace.traces.should have(1).item
18
+ expect(response.trace).to_not be_empty
19
+ expect(Webmachine::Trace.traces.size).to eq(1)
20
20
  end
21
21
 
22
22
  it "commits the trace to separate storage when the request has finished processing" do
23
- Webmachine::Trace.should_receive(:record).with(subject.resource.object_id.to_s, response.trace).and_return(true)
23
+ expect(Webmachine::Trace).to receive(:record).with(subject.resource.object_id.to_s, response.trace).and_return(true)
24
24
  subject.run
25
25
  end
26
26
  end
27
27
 
28
28
  context "when tracing is disabled" do
29
- before { Webmachine::Trace.stub!(:trace?).and_return(false) }
29
+ before { allow(Webmachine::Trace).to receive(:trace?).and_return(false) }
30
30
 
31
31
  it "leaves no trace" do
32
32
  subject.run
33
- response.trace.should be_empty
34
- Webmachine::Trace.traces.should be_empty
33
+ expect(response.trace).to be_empty
34
+ expect(Webmachine::Trace.traces).to be_empty
35
35
  end
36
36
  end
37
37
  end
@@ -7,28 +7,28 @@ describe Webmachine::Trace::ResourceProxy do
7
7
 
8
8
  it "duck-types all callback methods" do
9
9
  Webmachine::Resource::Callbacks.instance_methods(false).each do |m|
10
- subject.should respond_to(m)
10
+ expect(subject).to respond_to(m)
11
11
  end
12
12
  end
13
13
 
14
14
  it "logs invocations of callbacks" do
15
15
  subject.generate_etag
16
- response.trace.should == [{:type => :attempt, :name => "(default)#generate_etag"},
17
- {:type => :result, :value => nil}]
16
+ expect(response.trace).to eq([{:type => :attempt, :name => "(default)#generate_etag"},
17
+ {:type => :result, :value => nil}])
18
18
 
19
19
  end
20
20
 
21
21
  it "logs invocations of body-producing methods" do
22
- subject.content_types_provided.should == [["text/html", :to_html]]
22
+ expect(subject.content_types_provided).to eq([["text/html", :to_html]])
23
23
  subject.to_html
24
- response.trace[-2][:type].should == :attempt
25
- response.trace[-2][:name].should =~ /to_html$/
26
- response.trace[-2][:source].should include("spec_helper.rb") if response.trace[-2][:source]
27
- response.trace[-1].should == {:type => :result, :value => "<html><body>Hello, world!</body></html>"}
24
+ expect(response.trace[-2][:type]).to eq(:attempt)
25
+ expect(response.trace[-2][:name]).to match(/to_html$/)
26
+ expect(response.trace[-2][:source]).to include("spec_helper.rb") if response.trace[-2][:source]
27
+ expect(response.trace[-1]).to eq({:type => :result, :value => "<html><body>Hello, world!</body></html>"})
28
28
  end
29
29
 
30
30
  it "sets the trace id header when the request has finished processing" do
31
31
  subject.finish_request
32
- response.headers["X-Webmachine-Trace-Id"].should == subject.object_id.to_s
32
+ expect(response.headers["X-Webmachine-Trace-Id"]).to eq(subject.object_id.to_s)
33
33
  end
34
34
  end
@@ -2,18 +2,18 @@ require 'spec_helper'
2
2
  require 'fileutils'
3
3
 
4
4
  shared_examples_for "trace storage" do
5
- it { should respond_to(:[]=) }
6
- it { should respond_to(:keys) }
7
- it { should respond_to(:fetch) }
5
+ it { is_expected.to respond_to(:[]=) }
6
+ it { is_expected.to respond_to(:keys) }
7
+ it { is_expected.to respond_to(:fetch) }
8
8
 
9
9
  it "stores a trace" do
10
10
  subject["foo"] = [:bar]
11
- subject.fetch("foo").should == [:bar]
11
+ expect(subject.fetch("foo")).to eq([:bar])
12
12
  end
13
13
 
14
14
  it "lists a stored trace in the keys" do
15
15
  subject["foo"] = [:bar]
16
- subject.keys.should == ["foo"]
16
+ expect(subject.keys).to eq(["foo"])
17
17
  end
18
18
  end
19
19
 
@@ -6,12 +6,12 @@ describe Webmachine::Trace do
6
6
  context "determining whether the resource should be traced" do
7
7
  include_context "default resource"
8
8
  it "does not trace by default" do
9
- subject.trace?(resource).should be_false
9
+ expect(subject.trace?(resource)).to be(false)
10
10
  end
11
11
 
12
12
  it "traces when the resource enables tracing" do
13
- resource.should_receive(:trace?).and_return(true)
14
- subject.trace?(resource).should be_true
13
+ expect(resource).to receive(:trace?).and_return(true)
14
+ expect(subject.trace?(resource)).to be(true)
15
15
  end
16
16
  end
17
17
  end
data/webmachine.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- $:.push File.expand_path("../lib", __FILE__)
1
+ $:.push File.expand_path("../lib", __FILE__)
2
2
  require 'webmachine/version'
3
3
 
4
4
  Gem::Specification.new do |gem|
@@ -13,15 +13,11 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "http://github.com/seancribbs/webmachine-ruby"
14
14
  gem.authors = ["Sean Cribbs"]
15
15
  gem.email = ["sean@basho.com"]
16
- gem.license = "Apache 2.0"
16
+ gem.license = "Apache-2.0"
17
17
 
18
18
  gem.add_runtime_dependency(%q<i18n>, [">= 0.4.0"])
19
19
  gem.add_runtime_dependency(%q<multi_json>)
20
20
  gem.add_runtime_dependency(%q<as-notifications>, ["~> 1.0"])
21
- gem.add_development_dependency(%q<rspec>, ["~> 2.12.0"])
22
- gem.add_development_dependency(%q<yard>, ["~> 0.7.3"])
23
- gem.add_development_dependency(%q<rake>)
24
- gem.add_development_dependency(%q<rack>)
25
21
 
26
22
  ignores = File.read(".gitignore").split(/\r?\n/).reject{ |f| f =~ /^(#.+|\s*)$/ }.map {|f| Dir[f] }.flatten
27
23
  gem.files = (Dir['**/*','.gitignore'] - ignores).reject {|f| !File.file?(f) }
metadata CHANGED
@@ -1,286 +1,136 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
5
- prerelease:
4
+ version: 1.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sean Cribbs
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-08 00:00:00.000000000 Z
11
+ date: 2015-01-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: i18n
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.4.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.4.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: multi_json
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: as-notifications
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '1.0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '1.0'
62
- - !ruby/object:Gem::Dependency
63
- name: rspec
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 2.12.0
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 2.12.0
78
- - !ruby/object:Gem::Dependency
79
- name: yard
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 0.7.3
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 0.7.3
94
- - !ruby/object:Gem::Dependency
95
- name: rake
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: rack
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- description: ! ' webmachine is a toolkit for building HTTP applications in a declarative
55
+ description: " webmachine is a toolkit for building HTTP applications in a declarative
127
56
  fashion, that avoids the confusion of going through a CGI-style interface like Rack.
128
57
  It is strongly influenced by the original Erlang project of the same name and shares
129
- its opinionated nature about HTTP. '
58
+ its opinionated nature about HTTP. "
130
59
  email:
131
60
  - sean@basho.com
132
61
  executables: []
133
62
  extensions: []
134
63
  extra_rdoc_files: []
135
64
  files:
136
- - bin/autospec
137
- - bin/coderay
138
- - bin/gpgen
139
- - bin/guard
140
- - bin/hatetepe
141
- - bin/htmldiff
142
- - bin/ldiff
143
- - bin/mongrel_rails
144
- - bin/pry
145
- - bin/rackup
146
- - bin/rake
147
- - bin/redcarpet
148
- - bin/reel
149
- - bin/rspec
150
- - bin/thor
151
- - bin/yard
152
- - bin/yardoc
153
- - bin/yri
65
+ - ".gitignore"
154
66
  - CHANGELOG.md
155
- - doc/_index.html
156
- - doc/class_list.html
157
- - doc/css/common.css
158
- - doc/css/full_list.css
159
- - doc/css/style.css
160
- - doc/file.README.html
161
- - doc/file_list.html
162
- - doc/frames.html
163
- - doc/index.html
164
- - doc/js/app.js
165
- - doc/js/full_list.js
166
- - doc/js/jquery.js
167
- - doc/method_list.html
168
- - doc/top-level-namespace.html
169
- - doc/Webmachine/Adapter.html
170
- - doc/Webmachine/Adapters/Hatetepe/Body.html
171
- - doc/Webmachine/Adapters/Hatetepe.html
172
- - doc/Webmachine/Adapters/LazyRequestBody.html
173
- - doc/Webmachine/Adapters/Mongrel/Handler.html
174
- - doc/Webmachine/Adapters/Mongrel/RequestBody.html
175
- - doc/Webmachine/Adapters/Mongrel.html
176
- - doc/Webmachine/Adapters/Rack/RequestBody.html
177
- - doc/Webmachine/Adapters/Rack.html
178
- - doc/Webmachine/Adapters/Reel.html
179
- - doc/Webmachine/Adapters/WEBrick/RequestBody.html
180
- - doc/Webmachine/Adapters/WEBrick/Server.html
181
- - doc/Webmachine/Adapters/WEBrick.html
182
- - doc/Webmachine/Adapters.html
183
- - doc/Webmachine/Application.html
184
- - doc/Webmachine/CallableEncoder.html
185
- - doc/Webmachine/ChunkedBody.html
186
- - doc/Webmachine/Configuration.html
187
- - doc/Webmachine/Cookie.html
188
- - doc/Webmachine/Decision/Conneg/MediaTypeList.html
189
- - doc/Webmachine/Decision/Conneg/PriorityList.html
190
- - doc/Webmachine/Decision/Conneg.html
191
- - doc/Webmachine/Decision/Flow.html
192
- - doc/Webmachine/Decision/FSM.html
193
- - doc/Webmachine/Decision/Helpers.html
194
- - doc/Webmachine/Decision.html
195
- - doc/Webmachine/Dispatcher/Route.html
196
- - doc/Webmachine/Dispatcher.html
197
- - doc/Webmachine/EnumerableEncoder.html
198
- - doc/Webmachine/Error.html
199
- - doc/Webmachine/ETag.html
200
- - doc/Webmachine/FiberEncoder.html
201
- - doc/Webmachine/Headers.html
202
- - doc/Webmachine/InvalidResource.html
203
- - doc/Webmachine/MalformedRequest.html
204
- - doc/Webmachine/MediaType.html
205
- - doc/Webmachine/QuotedString.html
206
- - doc/Webmachine/Request.html
207
- - doc/Webmachine/Resource/Authentication.html
208
- - doc/Webmachine/Resource/Callbacks.html
209
- - doc/Webmachine/Resource/Encodings.html
210
- - doc/Webmachine/Resource/EntityTags.html
211
- - doc/Webmachine/Resource/Tracing.html
212
- - doc/Webmachine/Resource.html
213
- - doc/Webmachine/Response/HeaderHash.html
214
- - doc/Webmachine/Response.html
215
- - doc/Webmachine/Streaming/CallableEncoder.html
216
- - doc/Webmachine/Streaming/Encoder.html
217
- - doc/Webmachine/Streaming/EnumerableEncoder.html
218
- - doc/Webmachine/Streaming/FiberEncoder.html
219
- - doc/Webmachine/Streaming/IOEncoder.html
220
- - doc/Webmachine/Streaming.html
221
- - doc/Webmachine/StreamingEncoder.html
222
- - doc/Webmachine/Trace/Call.html
223
- - doc/Webmachine/Trace/FSM.html
224
- - doc/Webmachine/Trace/PStoreTraceStore.html
225
- - doc/Webmachine/Trace/ResourceProxy.html
226
- - doc/Webmachine/Trace/TraceResource.html
227
- - doc/Webmachine/Trace/Wrapper.html
228
- - doc/Webmachine/Trace.html
229
- - doc/Webmachine/Translation.html
230
- - doc/Webmachine/WeakETag.html
231
- - doc/Webmachine.html
67
+ - Gemfile
68
+ - Guardfile
69
+ - LICENSE
70
+ - README.md
71
+ - Rakefile
72
+ - documentation/adapters.md
73
+ - documentation/authentication-and-authorization.md
74
+ - documentation/configurator.md
75
+ - documentation/error-handling.md
76
+ - documentation/examples.md
77
+ - documentation/how-it-works.md
78
+ - documentation/routes.md
79
+ - documentation/validation.md
80
+ - documentation/versioning-apis.md
81
+ - documentation/visual-debugger.md
232
82
  - examples/application.rb
233
83
  - examples/debugger.rb
234
84
  - examples/logging.rb
235
85
  - examples/webrick.rb
236
- - Gemfile
237
- - Guardfile
86
+ - lib/webmachine.rb
238
87
  - lib/webmachine/adapter.rb
239
- - lib/webmachine/adapters/hatetepe.rb
88
+ - lib/webmachine/adapters.rb
89
+ - lib/webmachine/adapters/httpkit.rb
240
90
  - lib/webmachine/adapters/lazy_request_body.rb
241
- - lib/webmachine/adapters/mongrel.rb
242
91
  - lib/webmachine/adapters/rack.rb
243
92
  - lib/webmachine/adapters/reel.rb
244
93
  - lib/webmachine/adapters/webrick.rb
245
- - lib/webmachine/adapters.rb
246
94
  - lib/webmachine/application.rb
247
95
  - lib/webmachine/chunked_body.rb
248
96
  - lib/webmachine/configuration.rb
97
+ - lib/webmachine/constants.rb
249
98
  - lib/webmachine/cookie.rb
99
+ - lib/webmachine/decision.rb
250
100
  - lib/webmachine/decision/conneg.rb
251
101
  - lib/webmachine/decision/falsey.rb
252
102
  - lib/webmachine/decision/flow.rb
253
103
  - lib/webmachine/decision/fsm.rb
254
104
  - lib/webmachine/decision/helpers.rb
255
- - lib/webmachine/decision.rb
256
- - lib/webmachine/dispatcher/not_found_resource.rb
257
- - lib/webmachine/dispatcher/route.rb
258
105
  - lib/webmachine/dispatcher.rb
106
+ - lib/webmachine/dispatcher/route.rb
259
107
  - lib/webmachine/errors.rb
260
108
  - lib/webmachine/etags.rb
261
- - lib/webmachine/events/instrumented_event.rb
262
109
  - lib/webmachine/events.rb
263
- - lib/webmachine/fiber18.rb
110
+ - lib/webmachine/events/instrumented_event.rb
111
+ - lib/webmachine/header_negotiation.rb
264
112
  - lib/webmachine/headers.rb
265
113
  - lib/webmachine/locale/en.yml
266
114
  - lib/webmachine/media_type.rb
267
115
  - lib/webmachine/quoted_string.rb
268
116
  - lib/webmachine/request.rb
117
+ - lib/webmachine/resource.rb
269
118
  - lib/webmachine/resource/authentication.rb
270
119
  - lib/webmachine/resource/callbacks.rb
271
120
  - lib/webmachine/resource/encodings.rb
272
121
  - lib/webmachine/resource/entity_tags.rb
273
122
  - lib/webmachine/resource/tracing.rb
274
- - lib/webmachine/resource.rb
275
123
  - lib/webmachine/response.rb
124
+ - lib/webmachine/spec/IO_response.body
276
125
  - lib/webmachine/spec/adapter_lint.rb
277
126
  - lib/webmachine/spec/test_resource.rb
127
+ - lib/webmachine/streaming.rb
278
128
  - lib/webmachine/streaming/callable_encoder.rb
279
129
  - lib/webmachine/streaming/encoder.rb
280
130
  - lib/webmachine/streaming/enumerable_encoder.rb
281
131
  - lib/webmachine/streaming/fiber_encoder.rb
282
132
  - lib/webmachine/streaming/io_encoder.rb
283
- - lib/webmachine/streaming.rb
133
+ - lib/webmachine/trace.rb
284
134
  - lib/webmachine/trace/fsm.rb
285
135
  - lib/webmachine/trace/listener.rb
286
136
  - lib/webmachine/trace/pstore_trace_store.rb
@@ -291,17 +141,12 @@ files:
291
141
  - lib/webmachine/trace/static/wmtrace.css
292
142
  - lib/webmachine/trace/static/wmtrace.js
293
143
  - lib/webmachine/trace/trace_resource.rb
294
- - lib/webmachine/trace.rb
295
144
  - lib/webmachine/translation.rb
296
145
  - lib/webmachine/version.rb
297
- - lib/webmachine.rb
298
- - LICENSE
299
- - Rakefile
300
- - README.md
146
+ - memory_test.rb
301
147
  - spec/spec_helper.rb
302
148
  - spec/webmachine/adapter_spec.rb
303
- - spec/webmachine/adapters/hatetepe_spec.rb
304
- - spec/webmachine/adapters/mongrel_spec.rb
149
+ - spec/webmachine/adapters/httpkit_spec.rb
305
150
  - spec/webmachine/adapters/rack_spec.rb
306
151
  - spec/webmachine/adapters/reel_spec.rb
307
152
  - spec/webmachine/adapters/webrick_spec.rb
@@ -329,37 +174,34 @@ files:
329
174
  - spec/webmachine/trace/trace_store_spec.rb
330
175
  - spec/webmachine/trace_spec.rb
331
176
  - webmachine.gemspec
332
- - .gitignore
333
177
  homepage: http://github.com/seancribbs/webmachine-ruby
334
178
  licenses:
335
- - Apache 2.0
179
+ - Apache-2.0
180
+ metadata: {}
336
181
  post_install_message:
337
182
  rdoc_options: []
338
183
  require_paths:
339
184
  - lib
340
185
  required_ruby_version: !ruby/object:Gem::Requirement
341
- none: false
342
186
  requirements:
343
- - - ! '>='
187
+ - - ">="
344
188
  - !ruby/object:Gem::Version
345
189
  version: '0'
346
190
  required_rubygems_version: !ruby/object:Gem::Requirement
347
- none: false
348
191
  requirements:
349
- - - ! '>='
192
+ - - ">="
350
193
  - !ruby/object:Gem::Version
351
194
  version: '0'
352
195
  requirements: []
353
196
  rubyforge_project:
354
- rubygems_version: 1.8.23
197
+ rubygems_version: 2.4.2
355
198
  signing_key:
356
- specification_version: 3
199
+ specification_version: 4
357
200
  summary: webmachine is a toolkit for building HTTP applications,
358
201
  test_files:
359
202
  - spec/spec_helper.rb
360
203
  - spec/webmachine/adapter_spec.rb
361
- - spec/webmachine/adapters/hatetepe_spec.rb
362
- - spec/webmachine/adapters/mongrel_spec.rb
204
+ - spec/webmachine/adapters/httpkit_spec.rb
363
205
  - spec/webmachine/adapters/rack_spec.rb
364
206
  - spec/webmachine/adapters/reel_spec.rb
365
207
  - spec/webmachine/adapters/webrick_spec.rb
@@ -386,4 +228,4 @@ test_files:
386
228
  - spec/webmachine/trace/resource_proxy_spec.rb
387
229
  - spec/webmachine/trace/trace_store_spec.rb
388
230
  - spec/webmachine/trace_spec.rb
389
- - .gitignore
231
+ - ".gitignore"