zero 0.1.0 → 0.1.2

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/.travis.yml CHANGED
@@ -6,3 +6,4 @@ rvm:
6
6
  - rbx-18mode
7
7
  - rbx-19mode
8
8
  - 1.8.7
9
+ script: thor spec
data/Gemfile CHANGED
@@ -2,10 +2,12 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group :guard do
5
+ group :development do
6
6
  gem 'guard'
7
7
  gem 'guard-bundler'
8
8
  gem 'guard-rspec'
9
+ gem 'yard'
10
+ gem 'redcarpet'
9
11
  end
10
12
 
11
13
  group :test do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zero (0.0.1)
4
+ zero (0.1.0)
5
5
  tilt
6
6
 
7
7
  GEM
@@ -17,23 +17,24 @@ GEM
17
17
  guard-bundler (1.0.0)
18
18
  bundler (~> 1.0)
19
19
  guard (~> 1.1)
20
- guard-rspec (2.3.0)
20
+ guard-rspec (2.3.1)
21
21
  guard (>= 1.1)
22
22
  rspec (~> 2.11)
23
23
  listen (0.6.0)
24
24
  lumberjack (1.0.2)
25
25
  method_source (0.8.1)
26
- multi_json (1.3.7)
26
+ multi_json (1.5.0)
27
27
  pry (0.9.10)
28
28
  coderay (~> 1.0.5)
29
29
  method_source (~> 0.8)
30
30
  slop (~> 3.3.1)
31
31
  rack (1.4.1)
32
+ redcarpet (2.2.2)
32
33
  rspec (2.12.0)
33
34
  rspec-core (~> 2.12.0)
34
35
  rspec-expectations (~> 2.12.0)
35
36
  rspec-mocks (~> 2.12.0)
36
- rspec-core (2.12.0)
37
+ rspec-core (2.12.1)
37
38
  rspec-expectations (2.12.0)
38
39
  diff-lcs (~> 1.1.3)
39
40
  rspec-mocks (2.12.0)
@@ -44,6 +45,7 @@ GEM
44
45
  slop (3.3.3)
45
46
  thor (0.16.0)
46
47
  tilt (1.3.3)
48
+ yard (0.8.3)
47
49
 
48
50
  PLATFORMS
49
51
  ruby
@@ -53,7 +55,9 @@ DEPENDENCIES
53
55
  guard-bundler
54
56
  guard-rspec
55
57
  rack
58
+ redcarpet
56
59
  rspec
57
60
  simplecov
58
61
  thor
62
+ yard
59
63
  zero!
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2012, Stefan Radomski & Rebecca Dietrich
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the libzero nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL Stefan Radomski or Rebecca Dietrich BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -7,7 +7,27 @@ module Zero
7
7
  class Controller
8
8
  # initialize a new instance of the controller and call response on it
9
9
  def self.call(env)
10
- new(Zero::Request.create(env)).response
10
+ new(env).response
11
+ end
12
+
13
+ # set the class to use for responses
14
+ def self.response=(response_class)
15
+ @@response = response_class
16
+ end
17
+
18
+ # return the set response class
19
+ def self.response
20
+ @@response ||= Zero::Response
21
+ end
22
+
23
+ # set a class to use for requests
24
+ def self.request=(request_class)
25
+ @@request = request_class
26
+ end
27
+
28
+ # return the set request class
29
+ def self.request
30
+ @@request ||= Zero::Request
11
31
  end
12
32
 
13
33
  # set the renderer to use in the controller
@@ -20,16 +40,18 @@ module Zero
20
40
  @@renderer
21
41
  end
22
42
 
23
- # a small helper to get the actual renderer
24
- def renderer
25
- self.class.renderer
26
- end
43
+ # the renderer which can be used to render templates
44
+ attr_reader :renderer
27
45
 
28
46
  # initialize the controller
29
- # @param request [Request] a request object
30
- def initialize(request)
31
- @request = request
32
- @response = Zero::Response.new
47
+ #
48
+ # This creates a new controller instance using the defined classes of
49
+ # renderer, request and response.
50
+ # @param env [Hash] a rack compatible environment
51
+ def initialize(env)
52
+ @request = self.class.request.new(env)
53
+ @response = self.class.response.new
54
+ @renderer = self.class.renderer
33
55
  end
34
56
 
35
57
  # build the response and return it
data/lib/zero/request.rb CHANGED
@@ -6,9 +6,16 @@ require_relative 'request/server'
6
6
  module Zero
7
7
  # This class wraps around a rack environment for easier access to all data.
8
8
  class Request
9
- def self.create(environment)
10
- return environment['zero.request'] if environment.has_key?('zero.request')
11
- new(environment)
9
+ class << self
10
+ # replace #new with a function to reuse an already defined request
11
+ alias_method :__new__, :new
12
+
13
+ # reuse an already defined request in the environment or create a new one
14
+ # @param environment [Hash] a rack compatible request environment
15
+ def new(environment)
16
+ return environment['zero.request'] if environment.has_key?('zero.request')
17
+ __new__(environment)
18
+ end
12
19
  end
13
20
 
14
21
  # create a new request object
@@ -59,7 +59,7 @@ module Zero
59
59
  # *Beware, that this may lead to security holes!*
60
60
  #
61
61
  # @param key [String] a key to look for
62
- # @returns [String] the value of the key
62
+ # @return [String] the value of the key
63
63
  def [](key)
64
64
  @custom[key] || @payload[key] || @query[key]
65
65
  end
data/lib/zero/router.rb CHANGED
@@ -47,7 +47,7 @@ module Zero
47
47
  # @param env [Hash] a rack environment
48
48
  # @return [Array] a rack compatible response
49
49
  def call(env)
50
- request = Zero::Request.create(env)
50
+ request = Zero::Request.new(env)
51
51
  @routes.each do |route, target|
52
52
  match = route.match(request.path)
53
53
  if match
data/lib/zero/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zero
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
@@ -1,9 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Zero::Controller, '.call' do
4
- subject { SpecController.call(env) }
4
+ subject { controller.call(env) }
5
+ let(:controller) { SpecController }
5
6
  let(:env) { EnvGenerator.get('/foo') }
6
7
 
8
+ before :each do
9
+ controller.renderer = Object.new
10
+ end
11
+
7
12
  it "returns a response" do
8
13
  subject.should be_respond_to(:to_a)
9
14
  end
@@ -16,7 +21,21 @@ describe Zero::Controller, '.call' do
16
21
  r = Zero::Request.new(env)
17
22
  r.params['foo'] = 'bar'
18
23
  subject
19
- r = Zero::Request.create(env)
24
+ r = Zero::Request.new(env)
20
25
  expect(r.params['foo']).to eq('bar')
21
26
  end
27
+
28
+ context "with the response" do
29
+ let(:response_class) { mock }
30
+ before :each do
31
+ Zero::Controller.response = response_class
32
+ response_class.should_receive(:new)
33
+ end
34
+
35
+ after :each do
36
+ Zero::Controller.response = nil
37
+ end
38
+
39
+ it { subject }
40
+ end
22
41
  end
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe Zero::Controller, '#renderer' do
4
4
  subject { Zero::Controller }
5
5
  let(:renderer) { Object.new }
6
-
6
+
7
7
  it 'returns the set renderer' do
8
8
  subject.renderer = renderer
9
- expect(subject.new(Object.new).renderer).to be(renderer)
9
+ expect(subject.new({}).renderer).to be(renderer)
10
10
  end
11
11
  end
@@ -1,12 +1,12 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Zero::Request, '.create' do
3
+ describe Zero::Request, '.new' do
4
4
  subject { Zero::Request.new(env) }
5
5
 
6
6
  context "with a fresh environment" do
7
7
  let(:env) { EnvGenerator.get('/foo') }
8
8
  it "creates an instance of Zero::Request" do
9
- Zero::Request.create(env).should be_an_instance_of(Zero::Request)
9
+ Zero::Request.new(env).should be_an_instance_of(Zero::Request)
10
10
  end
11
11
  end
12
12
 
@@ -15,7 +15,7 @@ describe Zero::Request, '.create' do
15
15
  let(:new_env) { subject.env }
16
16
 
17
17
  it "returns an already build request" do
18
- Zero::Request.create(new_env).should be(subject)
18
+ Zero::Request.new(new_env).should be(subject)
19
19
  end
20
20
  end
21
21
  end
@@ -45,7 +45,7 @@ describe Zero::Router, '#call' do
45
45
  let(:env) { EnvGenerator.get('/foo/bar') }
46
46
  let(:app) do
47
47
  lambda do |env|
48
- [200, {}, [Zero::Request.create(env).params['id']]]
48
+ [200, {}, [Zero::Request.new(env).params['id']]]
49
49
  end
50
50
  end
51
51
  let(:result) { ['bar'] }
data/zero.gemspec CHANGED
@@ -7,9 +7,10 @@ Gem::Specification.new do |s|
7
7
 
8
8
  s.authors = ['Gibheer', 'Stormwind']
9
9
  s.email = 'gibheer@gmail.com'
10
+ s.license = '3-clause BSD'
10
11
  s.summary = 'a toolkit for building web services'
11
12
  s.description = 'The focus of this project is to provide small helpers for building web services without the need of learning a complete new web stack from the bottom to the top.'
12
- s.homepage = 'http://github.com/gibheer/zero'
13
+ s.homepage = 'http://github.com/libzero/zero'
13
14
 
14
15
  s.files = `git ls-files`.split("\n")
15
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,88 +10,88 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-01 00:00:00.000000000 Z
13
+ date: 2012-12-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- type: :runtime
17
- version_requirements: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- none: false
23
16
  name: tilt
24
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
25
19
  requirements:
26
20
  - - ! '>='
27
21
  - !ruby/object:Gem::Version
28
22
  version: '0'
29
- none: false
23
+ type: :runtime
30
24
  prerelease: false
31
- - !ruby/object:Gem::Dependency
32
- type: :development
33
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
34
27
  requirements:
35
28
  - - ! '>='
36
29
  - !ruby/object:Gem::Version
37
30
  version: '0'
38
- none: false
31
+ - !ruby/object:Gem::Dependency
39
32
  name: thor
40
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
41
35
  requirements:
42
36
  - - ! '>='
43
37
  - !ruby/object:Gem::Version
44
38
  version: '0'
45
- none: false
46
- prerelease: false
47
- - !ruby/object:Gem::Dependency
48
39
  type: :development
40
+ prerelease: false
49
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
50
43
  requirements:
51
44
  - - ! '>='
52
45
  - !ruby/object:Gem::Version
53
46
  version: '0'
54
- none: false
47
+ - !ruby/object:Gem::Dependency
55
48
  name: rack
56
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
57
51
  requirements:
58
52
  - - ! '>='
59
53
  - !ruby/object:Gem::Version
60
54
  version: '0'
61
- none: false
62
- prerelease: false
63
- - !ruby/object:Gem::Dependency
64
55
  type: :development
56
+ prerelease: false
65
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
66
59
  requirements:
67
60
  - - ! '>='
68
61
  - !ruby/object:Gem::Version
69
62
  version: '0'
70
- none: false
63
+ - !ruby/object:Gem::Dependency
71
64
  name: rspec
72
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
73
67
  requirements:
74
68
  - - ! '>='
75
69
  - !ruby/object:Gem::Version
76
70
  version: '0'
77
- none: false
78
- prerelease: false
79
- - !ruby/object:Gem::Dependency
80
71
  type: :development
72
+ prerelease: false
81
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
82
75
  requirements:
83
76
  - - ! '>='
84
77
  - !ruby/object:Gem::Version
85
78
  version: '0'
86
- none: false
79
+ - !ruby/object:Gem::Dependency
87
80
  name: simplecov
88
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
89
83
  requirements:
90
84
  - - ! '>='
91
85
  - !ruby/object:Gem::Version
92
86
  version: '0'
93
- none: false
87
+ type: :development
94
88
  prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
95
  description: The focus of this project is to provide small helpers for building web
96
96
  services without the need of learning a complete new web stack from the bottom to
97
97
  the top.
@@ -101,245 +101,136 @@ extensions: []
101
101
  extra_rdoc_files:
102
102
  - README.md
103
103
  files:
104
- - !binary |-
105
- LmdpdGlnbm9yZQ==
106
- - !binary |-
107
- LnJzcGVj
108
- - !binary |-
109
- LnRyYXZpcy55bWw=
110
- - !binary |-
111
- R2VtZmlsZQ==
112
- - !binary |-
113
- R2VtZmlsZS5sb2Nr
114
- - !binary |-
115
- R3VhcmRmaWxl
116
- - !binary |-
117
- UkVBRE1FLm1k
118
- - !binary |-
119
- VGhvcmZpbGU=
120
- - !binary |-
121
- bGliL3plcm8ucmI=
122
- - !binary |-
123
- bGliL3plcm8vY29udHJvbGxlci5yYg==
124
- - !binary |-
125
- bGliL3plcm8vcmFja19yZXF1ZXN0LnJi
126
- - !binary |-
127
- bGliL3plcm8vcmVuZGVyZXIucmI=
128
- - !binary |-
129
- bGliL3plcm8vcmVxdWVzdC5yYg==
130
- - !binary |-
131
- bGliL3plcm8vcmVxdWVzdC9hY2NlcHQucmI=
132
- - !binary |-
133
- bGliL3plcm8vcmVxdWVzdC9hY2NlcHRfdHlwZS5yYg==
134
- - !binary |-
135
- bGliL3plcm8vcmVxdWVzdC9jbGllbnQucmI=
136
- - !binary |-
137
- bGliL3plcm8vcmVxdWVzdC9wYXJhbWV0ZXIucmI=
138
- - !binary |-
139
- bGliL3plcm8vcmVxdWVzdC9zZXJ2ZXIucmI=
140
- - !binary |-
141
- bGliL3plcm8vcmVzcG9uc2UucmI=
142
- - !binary |-
143
- bGliL3plcm8vcm91dGVyLnJi
144
- - !binary |-
145
- bGliL3plcm8vdmVyc2lvbi5yYg==
146
- - !binary |-
147
- c3BlYy9maXh0dXJlcy90ZW1wbGF0ZXMvaW5kZXguaHRtbC5lcmI=
148
- - !binary |-
149
- c3BlYy9maXh0dXJlcy90ZW1wbGF0ZXMvaW5kZXguanNvbi5lcmI=
150
- - !binary |-
151
- c3BlYy9zcGVjX2hlbHBlci5yYg==
152
- - !binary |-
153
- c3BlYy91bml0L2NvbnRyb2xsZXIvY2FsbF9zcGVjLnJi
154
- - !binary |-
155
- c3BlYy91bml0L2NvbnRyb2xsZXIvcmVuZGVyZXJfc3BlYy5yYg==
156
- - !binary |-
157
- c3BlYy91bml0L3JlbmRlcmVyL3JlYWRfdGVtcGxhdGVfcGF0aF9zcGVjLnJi
158
- - !binary |-
159
- c3BlYy91bml0L3JlbmRlcmVyL3JlbmRlcl9zcGVjLnJi
160
- - !binary |-
161
- c3BlYy91bml0L3JlbmRlcmVyL3RlbXBsYXRlX3BhdGgucmI=
162
- - !binary |-
163
- c3BlYy91bml0L3JlbmRlcmVyL3R5cGVfbWFwX3NwZWMucmI=
164
- - !binary |-
165
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L2VuY29kaW5nX3NwZWMucmI=
166
- - !binary |-
167
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L2xhbmd1YWdlX3NwZWMucmI=
168
- - !binary |-
169
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L3R5cGVzX3NwZWMucmI=
170
- - !binary |-
171
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0X3NwZWMucmI=
172
- - !binary |-
173
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0dHlwZS9lYWNoX3NwZWMucmI=
174
- - !binary |-
175
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0dHlwZS9wcmVmZXJyZWRfc3BlYy5y
176
- Yg==
177
- - !binary |-
178
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L2FkZHJlc3Nfc3BlYy5yYg==
179
- - !binary |-
180
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L2hvc3RuYW1lX3NwZWMucmI=
181
- - !binary |-
182
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L3VzZXJfYWdlbnRfc3BlYy5yYg==
183
- - !binary |-
184
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50X3NwZWMucmI=
185
- - !binary |-
186
- c3BlYy91bml0L3JlcXVlc3QvY29udGVudF90eXBlX3NwZWMucmI=
187
- - !binary |-
188
- c3BlYy91bml0L3JlcXVlc3QvY3JlYXRlX3NwZWMucmI=
189
- - !binary |-
190
- c3BlYy91bml0L3JlcXVlc3QvZGVsZXRlX3NwZWMucmI=
191
- - !binary |-
192
- c3BlYy91bml0L3JlcXVlc3QvZ2V0X3NwZWMucmI=
193
- - !binary |-
194
- c3BlYy91bml0L3JlcXVlc3QvaGVhZF9zcGVjLnJi
195
- - !binary |-
196
- c3BlYy91bml0L3JlcXVlc3QvbWV0aG9kX3NwZWMucmI=
197
- - !binary |-
198
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL1tdX3NwZWMucmI=
199
- - !binary |-
200
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL2N1c3RvbV9zcGVjLnJi
201
- - !binary |-
202
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL2luaXRpYWxpemVfc3BlYy5y
203
- Yg==
204
- - !binary |-
205
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL3BheWxvYWRfc3BlYy5yYg==
206
- - !binary |-
207
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL3F1ZXJ5X3NwZWMucmI=
208
- - !binary |-
209
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1zX3NwZWMucmI=
210
- - !binary |-
211
- c3BlYy91bml0L3JlcXVlc3QvcGF0Y2hfc3BlYy5yYg==
212
- - !binary |-
213
- c3BlYy91bml0L3JlcXVlc3QvcGF0aF9zcGVjLnJi
214
- - !binary |-
215
- c3BlYy91bml0L3JlcXVlc3QvcG9zdF9zcGVjLnJi
216
- - !binary |-
217
- c3BlYy91bml0L3JlcXVlc3QvcHV0X3NwZWMucmI=
218
- - !binary |-
219
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL2hvc3RuYW1lX3NwZWMucmI=
220
- - !binary |-
221
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3BvcnRfc3BlYy5yYg==
222
- - !binary |-
223
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3Byb3RvY29sX3NwZWMucmI=
224
- - !binary |-
225
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3NvZnR3YXJlX3NwZWMucmI=
226
- - !binary |-
227
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyX3NwZWMucmI=
228
- - !binary |-
229
- c3BlYy91bml0L3Jlc3BvbnNlL3Jlc3BvbnNlX3NwZWMucmI=
230
- - !binary |-
231
- c3BlYy91bml0L3JvdXRlci9jYWxsX3NwZWMucmI=
232
- - !binary |-
233
- emVyby5nZW1zcGVj
234
- homepage: http://github.com/gibheer/zero
235
- licenses: []
104
+ - .gitignore
105
+ - .rspec
106
+ - .travis.yml
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - Guardfile
110
+ - LICENSE
111
+ - README.md
112
+ - Thorfile
113
+ - lib/zero.rb
114
+ - lib/zero/controller.rb
115
+ - lib/zero/rack_request.rb
116
+ - lib/zero/renderer.rb
117
+ - lib/zero/request.rb
118
+ - lib/zero/request/accept.rb
119
+ - lib/zero/request/accept_type.rb
120
+ - lib/zero/request/client.rb
121
+ - lib/zero/request/parameter.rb
122
+ - lib/zero/request/server.rb
123
+ - lib/zero/response.rb
124
+ - lib/zero/router.rb
125
+ - lib/zero/version.rb
126
+ - spec/fixtures/templates/index.html.erb
127
+ - spec/fixtures/templates/index.json.erb
128
+ - spec/spec_helper.rb
129
+ - spec/unit/controller/call_spec.rb
130
+ - spec/unit/controller/renderer_spec.rb
131
+ - spec/unit/renderer/read_template_path_spec.rb
132
+ - spec/unit/renderer/render_spec.rb
133
+ - spec/unit/renderer/template_path.rb
134
+ - spec/unit/renderer/type_map_spec.rb
135
+ - spec/unit/request/accept/encoding_spec.rb
136
+ - spec/unit/request/accept/language_spec.rb
137
+ - spec/unit/request/accept/types_spec.rb
138
+ - spec/unit/request/accept_spec.rb
139
+ - spec/unit/request/accepttype/each_spec.rb
140
+ - spec/unit/request/accepttype/preferred_spec.rb
141
+ - spec/unit/request/client/address_spec.rb
142
+ - spec/unit/request/client/hostname_spec.rb
143
+ - spec/unit/request/client/user_agent_spec.rb
144
+ - spec/unit/request/client_spec.rb
145
+ - spec/unit/request/content_type_spec.rb
146
+ - spec/unit/request/delete_spec.rb
147
+ - spec/unit/request/get_spec.rb
148
+ - spec/unit/request/head_spec.rb
149
+ - spec/unit/request/method_spec.rb
150
+ - spec/unit/request/new_spec.rb
151
+ - spec/unit/request/parameter/[]_spec.rb
152
+ - spec/unit/request/parameter/custom_spec.rb
153
+ - spec/unit/request/parameter/initialize_spec.rb
154
+ - spec/unit/request/parameter/payload_spec.rb
155
+ - spec/unit/request/parameter/query_spec.rb
156
+ - spec/unit/request/params_spec.rb
157
+ - spec/unit/request/patch_spec.rb
158
+ - spec/unit/request/path_spec.rb
159
+ - spec/unit/request/post_spec.rb
160
+ - spec/unit/request/put_spec.rb
161
+ - spec/unit/request/server/hostname_spec.rb
162
+ - spec/unit/request/server/port_spec.rb
163
+ - spec/unit/request/server/protocol_spec.rb
164
+ - spec/unit/request/server/software_spec.rb
165
+ - spec/unit/request/server_spec.rb
166
+ - spec/unit/response/response_spec.rb
167
+ - spec/unit/router/call_spec.rb
168
+ - zero.gemspec
169
+ homepage: http://github.com/libzero/zero
170
+ licenses:
171
+ - 3-clause BSD
236
172
  post_install_message:
237
173
  rdoc_options: []
238
174
  require_paths:
239
175
  - lib
240
176
  required_ruby_version: !ruby/object:Gem::Requirement
177
+ none: false
241
178
  requirements:
242
179
  - - ! '>='
243
180
  - !ruby/object:Gem::Version
244
181
  version: '0'
245
- none: false
246
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
+ none: false
247
184
  requirements:
248
185
  - - ! '>='
249
186
  - !ruby/object:Gem::Version
250
187
  version: '0'
251
- none: false
252
188
  requirements: []
253
189
  rubyforge_project:
254
- rubygems_version: 1.8.24
190
+ rubygems_version: 1.8.23
255
191
  signing_key:
256
192
  specification_version: 3
257
193
  summary: a toolkit for building web services
258
194
  test_files:
259
- - !binary |-
260
- c3BlYy9maXh0dXJlcy90ZW1wbGF0ZXMvaW5kZXguaHRtbC5lcmI=
261
- - !binary |-
262
- c3BlYy9maXh0dXJlcy90ZW1wbGF0ZXMvaW5kZXguanNvbi5lcmI=
263
- - !binary |-
264
- c3BlYy9zcGVjX2hlbHBlci5yYg==
265
- - !binary |-
266
- c3BlYy91bml0L2NvbnRyb2xsZXIvY2FsbF9zcGVjLnJi
267
- - !binary |-
268
- c3BlYy91bml0L2NvbnRyb2xsZXIvcmVuZGVyZXJfc3BlYy5yYg==
269
- - !binary |-
270
- c3BlYy91bml0L3JlbmRlcmVyL3JlYWRfdGVtcGxhdGVfcGF0aF9zcGVjLnJi
271
- - !binary |-
272
- c3BlYy91bml0L3JlbmRlcmVyL3JlbmRlcl9zcGVjLnJi
273
- - !binary |-
274
- c3BlYy91bml0L3JlbmRlcmVyL3RlbXBsYXRlX3BhdGgucmI=
275
- - !binary |-
276
- c3BlYy91bml0L3JlbmRlcmVyL3R5cGVfbWFwX3NwZWMucmI=
277
- - !binary |-
278
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L2VuY29kaW5nX3NwZWMucmI=
279
- - !binary |-
280
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L2xhbmd1YWdlX3NwZWMucmI=
281
- - !binary |-
282
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0L3R5cGVzX3NwZWMucmI=
283
- - !binary |-
284
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0X3NwZWMucmI=
285
- - !binary |-
286
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0dHlwZS9lYWNoX3NwZWMucmI=
287
- - !binary |-
288
- c3BlYy91bml0L3JlcXVlc3QvYWNjZXB0dHlwZS9wcmVmZXJyZWRfc3BlYy5y
289
- Yg==
290
- - !binary |-
291
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L2FkZHJlc3Nfc3BlYy5yYg==
292
- - !binary |-
293
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L2hvc3RuYW1lX3NwZWMucmI=
294
- - !binary |-
295
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50L3VzZXJfYWdlbnRfc3BlYy5yYg==
296
- - !binary |-
297
- c3BlYy91bml0L3JlcXVlc3QvY2xpZW50X3NwZWMucmI=
298
- - !binary |-
299
- c3BlYy91bml0L3JlcXVlc3QvY29udGVudF90eXBlX3NwZWMucmI=
300
- - !binary |-
301
- c3BlYy91bml0L3JlcXVlc3QvY3JlYXRlX3NwZWMucmI=
302
- - !binary |-
303
- c3BlYy91bml0L3JlcXVlc3QvZGVsZXRlX3NwZWMucmI=
304
- - !binary |-
305
- c3BlYy91bml0L3JlcXVlc3QvZ2V0X3NwZWMucmI=
306
- - !binary |-
307
- c3BlYy91bml0L3JlcXVlc3QvaGVhZF9zcGVjLnJi
308
- - !binary |-
309
- c3BlYy91bml0L3JlcXVlc3QvbWV0aG9kX3NwZWMucmI=
310
- - !binary |-
311
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL1tdX3NwZWMucmI=
312
- - !binary |-
313
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL2N1c3RvbV9zcGVjLnJi
314
- - !binary |-
315
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL2luaXRpYWxpemVfc3BlYy5y
316
- Yg==
317
- - !binary |-
318
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL3BheWxvYWRfc3BlYy5yYg==
319
- - !binary |-
320
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1ldGVyL3F1ZXJ5X3NwZWMucmI=
321
- - !binary |-
322
- c3BlYy91bml0L3JlcXVlc3QvcGFyYW1zX3NwZWMucmI=
323
- - !binary |-
324
- c3BlYy91bml0L3JlcXVlc3QvcGF0Y2hfc3BlYy5yYg==
325
- - !binary |-
326
- c3BlYy91bml0L3JlcXVlc3QvcGF0aF9zcGVjLnJi
327
- - !binary |-
328
- c3BlYy91bml0L3JlcXVlc3QvcG9zdF9zcGVjLnJi
329
- - !binary |-
330
- c3BlYy91bml0L3JlcXVlc3QvcHV0X3NwZWMucmI=
331
- - !binary |-
332
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL2hvc3RuYW1lX3NwZWMucmI=
333
- - !binary |-
334
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3BvcnRfc3BlYy5yYg==
335
- - !binary |-
336
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3Byb3RvY29sX3NwZWMucmI=
337
- - !binary |-
338
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyL3NvZnR3YXJlX3NwZWMucmI=
339
- - !binary |-
340
- c3BlYy91bml0L3JlcXVlc3Qvc2VydmVyX3NwZWMucmI=
341
- - !binary |-
342
- c3BlYy91bml0L3Jlc3BvbnNlL3Jlc3BvbnNlX3NwZWMucmI=
343
- - !binary |-
344
- c3BlYy91bml0L3JvdXRlci9jYWxsX3NwZWMucmI=
345
- has_rdoc:
195
+ - spec/fixtures/templates/index.html.erb
196
+ - spec/fixtures/templates/index.json.erb
197
+ - spec/spec_helper.rb
198
+ - spec/unit/controller/call_spec.rb
199
+ - spec/unit/controller/renderer_spec.rb
200
+ - spec/unit/renderer/read_template_path_spec.rb
201
+ - spec/unit/renderer/render_spec.rb
202
+ - spec/unit/renderer/template_path.rb
203
+ - spec/unit/renderer/type_map_spec.rb
204
+ - spec/unit/request/accept/encoding_spec.rb
205
+ - spec/unit/request/accept/language_spec.rb
206
+ - spec/unit/request/accept/types_spec.rb
207
+ - spec/unit/request/accept_spec.rb
208
+ - spec/unit/request/accepttype/each_spec.rb
209
+ - spec/unit/request/accepttype/preferred_spec.rb
210
+ - spec/unit/request/client/address_spec.rb
211
+ - spec/unit/request/client/hostname_spec.rb
212
+ - spec/unit/request/client/user_agent_spec.rb
213
+ - spec/unit/request/client_spec.rb
214
+ - spec/unit/request/content_type_spec.rb
215
+ - spec/unit/request/delete_spec.rb
216
+ - spec/unit/request/get_spec.rb
217
+ - spec/unit/request/head_spec.rb
218
+ - spec/unit/request/method_spec.rb
219
+ - spec/unit/request/new_spec.rb
220
+ - spec/unit/request/parameter/[]_spec.rb
221
+ - spec/unit/request/parameter/custom_spec.rb
222
+ - spec/unit/request/parameter/initialize_spec.rb
223
+ - spec/unit/request/parameter/payload_spec.rb
224
+ - spec/unit/request/parameter/query_spec.rb
225
+ - spec/unit/request/params_spec.rb
226
+ - spec/unit/request/patch_spec.rb
227
+ - spec/unit/request/path_spec.rb
228
+ - spec/unit/request/post_spec.rb
229
+ - spec/unit/request/put_spec.rb
230
+ - spec/unit/request/server/hostname_spec.rb
231
+ - spec/unit/request/server/port_spec.rb
232
+ - spec/unit/request/server/protocol_spec.rb
233
+ - spec/unit/request/server/software_spec.rb
234
+ - spec/unit/request/server_spec.rb
235
+ - spec/unit/response/response_spec.rb
236
+ - spec/unit/router/call_spec.rb