cuba 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +11 -0
- data/CONTRIBUTING +19 -0
- data/LICENSE +1 -1
- data/README.md +48 -13
- data/cuba.gemspec +2 -2
- data/lib/cuba.rb +35 -20
- data/test/composition.rb +48 -0
- data/test/helper.rb +1 -2
- data/test/param.rb +22 -0
- data/test/render.rb +7 -7
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dbfe63b93f0fad52b2a691726c05a656630bc59
|
4
|
+
data.tar.gz: 6d390f4273a38f8e2f88c927909a9eed36b6b29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f85d1c11cd06092a300765ec9a86fd8572aa768505f788d4675f57ecaddf8e7d3b925e58ef316bd6abe10eda5b071b4e8836fc03ada14c165bbe70b9e0f6ce95
|
7
|
+
data.tar.gz: 1af18ce865a90bb8fba27d8d160d7cabb8f53e687c5d12d8a109b8518513a0bebdadff8f70474fa4095bfb02d37a865a3ba6c14fcbf4bbdddddb3ba102c1df53
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
3.5.0
|
2
|
+
|
3
|
+
* Add `not_found` hook for customizing the 404 error.
|
4
|
+
|
5
|
+
* Remove undocumented `header` matcher.
|
6
|
+
|
7
|
+
* Depend explicitly on Rack 1.6.x.
|
8
|
+
|
9
|
+
* Experimental feature: `param` now accepts a second parameter
|
10
|
+
with a default value.
|
11
|
+
|
1
12
|
3.4.0
|
2
13
|
|
3
14
|
* Add `Cuba::Safe` plugin. This plugin contains security related
|
data/CONTRIBUTING
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
This code tries to solve a particular problem with a very simple
|
2
|
+
implementation. We try to keep the code to a minimum while making
|
3
|
+
it as clear as possible. The design is very likely finished, and
|
4
|
+
if some feature is missing it is possible that it was left out on
|
5
|
+
purpose. That said, new usage patterns may arise, and when that
|
6
|
+
happens we are ready to adapt if necessary.
|
7
|
+
|
8
|
+
A good first step for contributing is to meet us on IRC and discuss
|
9
|
+
ideas. We spend a lot of time on #lesscode at freenode, always ready
|
10
|
+
to talk about code and simplicity. If connecting to IRC is not an
|
11
|
+
option, you can create an issue explaining the proposed change and
|
12
|
+
a use case. We pay a lot of attention to use cases, because our
|
13
|
+
goal is to keep the code base simple. Usually the result of a
|
14
|
+
conversation is the creation of a different tool.
|
15
|
+
|
16
|
+
Please don't start the conversation with a pull request. The code
|
17
|
+
should come at last, and even though it may help to convey an idea,
|
18
|
+
more often than not it draws the attention to a particular
|
19
|
+
implementation.
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -24,7 +24,7 @@ It integrates many templates via [Tilt][tilt], and testing via
|
|
24
24
|
[Cutest][cutest] and [Capybara][capybara].
|
25
25
|
|
26
26
|
[rum]: http://github.com/chneukirchen/rum
|
27
|
-
[rack]: http://github.com/
|
27
|
+
[rack]: http://github.com/rack/rack
|
28
28
|
[tilt]: http://github.com/rtomayko/tilt
|
29
29
|
[cutest]: http://github.com/djanowski/cutest
|
30
30
|
[capybara]: http://github.com/jnicklas/capybara
|
@@ -55,10 +55,11 @@ Here's a simple application:
|
|
55
55
|
``` ruby
|
56
56
|
# cat hello_world.rb
|
57
57
|
require "cuba"
|
58
|
-
require "
|
58
|
+
require "cuba/safe"
|
59
59
|
|
60
60
|
Cuba.use Rack::Session::Cookie, :secret => "__a_very_long_string__"
|
61
|
-
|
61
|
+
|
62
|
+
Cuba.plugin Cuba::Safe
|
62
63
|
|
63
64
|
Cuba.define do
|
64
65
|
on get do
|
@@ -109,10 +110,11 @@ Here's an example showcasing how different matchers work:
|
|
109
110
|
|
110
111
|
``` ruby
|
111
112
|
require "cuba"
|
112
|
-
require "
|
113
|
+
require "cuba/safe"
|
113
114
|
|
114
115
|
Cuba.use Rack::Session::Cookie, :secret => "__a_very_long_string__"
|
115
|
-
|
116
|
+
|
117
|
+
Cuba.plugin Cuba::Safe
|
116
118
|
|
117
119
|
Cuba.define do
|
118
120
|
|
@@ -186,7 +188,9 @@ Status codes
|
|
186
188
|
------------
|
187
189
|
|
188
190
|
If you don't assign a status code and you don't write to the `res`
|
189
|
-
object, the status will be set as `404`.
|
191
|
+
object, the status will be set as `404`. The method `not_found` is
|
192
|
+
in charge of setting the proper status code, and you can redefine
|
193
|
+
it if you want to render a template or configure custom headers.
|
190
194
|
|
191
195
|
For example:
|
192
196
|
|
@@ -289,7 +293,9 @@ when designing an API).
|
|
289
293
|
Here's how to include it:
|
290
294
|
|
291
295
|
```ruby
|
292
|
-
|
296
|
+
require "cuba/safe"
|
297
|
+
|
298
|
+
Cuba.plugin Cuba::Safe
|
293
299
|
```
|
294
300
|
|
295
301
|
You should also always set a session secret to some undisclosed
|
@@ -304,6 +310,7 @@ In the end, your application should look like this:
|
|
304
310
|
|
305
311
|
```ruby
|
306
312
|
require "cuba"
|
313
|
+
require "cuba/safe"
|
307
314
|
|
308
315
|
Cuba.use Rack::Session::Cookie, :secret => "__a_very_long_string__"
|
309
316
|
|
@@ -349,7 +356,12 @@ following methods:
|
|
349
356
|
Here's an example of how to use it:
|
350
357
|
|
351
358
|
```ruby
|
352
|
-
|
359
|
+
require "cuba"
|
360
|
+
require "cuba/safe"
|
361
|
+
|
362
|
+
Cuba.use Rack::Session::Cookie, :secret => "__a_very_long_string__"
|
363
|
+
|
364
|
+
Cuba.plugin Cuba::Safe
|
353
365
|
|
354
366
|
Cuba.define do
|
355
367
|
on csrf.unsafe? do
|
@@ -374,13 +386,13 @@ among your meta tags. Here's an example that assumes you are using
|
|
374
386
|
<!DOCTYPE html>
|
375
387
|
<html>
|
376
388
|
<head>
|
377
|
-
{{
|
389
|
+
{{ app.csrf.meta_tag }}
|
378
390
|
...
|
379
391
|
</head>
|
380
392
|
...
|
381
393
|
<body>
|
382
394
|
<form action="/foo" method="POST">
|
383
|
-
{{
|
395
|
+
{{ app.csrf.form_tag }}
|
384
396
|
...
|
385
397
|
</form>
|
386
398
|
...
|
@@ -419,8 +431,8 @@ instances of [Rack::Request][request] and `Cuba::Response` respectively, and
|
|
419
431
|
`Cuba::Response` is just an optimized version of
|
420
432
|
[Rack::Response][response].
|
421
433
|
|
422
|
-
[request]: http://
|
423
|
-
[response]: http://
|
434
|
+
[request]: http://www.rubydoc.info/github/rack/rack/Rack/Request
|
435
|
+
[response]: http://www.rubydoc.info/github/rack/rack/Rack/Response
|
424
436
|
|
425
437
|
Those objects are helpers for accessing the request and for building
|
426
438
|
the response. Most of the time, you will just use `res.write`.
|
@@ -486,6 +498,29 @@ Cuba.define do
|
|
486
498
|
end
|
487
499
|
```
|
488
500
|
|
501
|
+
If you need to pass information to one sub-app, you can use the
|
502
|
+
`with` method and access it with `vars`:
|
503
|
+
|
504
|
+
```ruby
|
505
|
+
class Platforms < Cuba
|
506
|
+
define do
|
507
|
+
platform = vars[:platform]
|
508
|
+
|
509
|
+
on default do
|
510
|
+
res.write(platform) # => "heroku" or "salesforce"
|
511
|
+
end
|
512
|
+
end
|
513
|
+
end
|
514
|
+
|
515
|
+
Cuba.define do
|
516
|
+
on "(heroku|salesforce)" do |platform|
|
517
|
+
with(platform: platform) do
|
518
|
+
run(Platforms)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
end
|
522
|
+
```
|
523
|
+
|
489
524
|
Testing
|
490
525
|
-------
|
491
526
|
|
@@ -562,7 +597,7 @@ require "cuba"
|
|
562
597
|
require "cuba/render"
|
563
598
|
require "erb"
|
564
599
|
|
565
|
-
Cuba.plugin
|
600
|
+
Cuba.plugin Cuba::Render
|
566
601
|
```
|
567
602
|
|
568
603
|
This example uses ERB, a template engine that comes with Ruby. If you want to
|
data/cuba.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cuba"
|
3
|
-
s.version = "3.
|
3
|
+
s.version = "3.5.0"
|
4
4
|
s.summary = "Microframework for web applications."
|
5
5
|
s.description = "Cuba is a microframework for web applications."
|
6
6
|
s.authors = ["Michel Martens"]
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
|
13
|
-
s.add_dependency "rack"
|
13
|
+
s.add_dependency "rack", "~> 1.6.0"
|
14
14
|
s.add_development_dependency "cutest"
|
15
15
|
s.add_development_dependency "rack-test"
|
16
16
|
s.add_development_dependency "tilt"
|
data/lib/cuba.rb
CHANGED
@@ -2,7 +2,14 @@ require "rack"
|
|
2
2
|
require "time"
|
3
3
|
|
4
4
|
class Cuba
|
5
|
+
SLASH = "/".freeze
|
6
|
+
EMPTY = "".freeze
|
7
|
+
SEGMENT = "([^\\/]+)".freeze
|
8
|
+
DEFAULT = "text/html; charset=utf-8".freeze
|
9
|
+
|
5
10
|
class Response
|
11
|
+
LOCATION = "Location".freeze
|
12
|
+
|
6
13
|
attr_accessor :status
|
7
14
|
|
8
15
|
attr :body
|
@@ -27,12 +34,12 @@ class Cuba
|
|
27
34
|
s = str.to_s
|
28
35
|
|
29
36
|
@length += s.bytesize
|
30
|
-
@headers[
|
37
|
+
@headers[Rack::CONTENT_LENGTH] = @length.to_s
|
31
38
|
@body << s
|
32
39
|
end
|
33
40
|
|
34
41
|
def redirect(path, status = 302)
|
35
|
-
@headers[
|
42
|
+
@headers[LOCATION] = path
|
36
43
|
@status = status
|
37
44
|
end
|
38
45
|
|
@@ -126,7 +133,7 @@ class Cuba
|
|
126
133
|
catch(:halt) do
|
127
134
|
instance_eval(&@blk)
|
128
135
|
|
129
|
-
|
136
|
+
not_found
|
130
137
|
res.finish
|
131
138
|
end
|
132
139
|
end
|
@@ -181,9 +188,9 @@ class Cuba
|
|
181
188
|
|
182
189
|
if res.status.nil?
|
183
190
|
if res.body.empty?
|
184
|
-
|
191
|
+
not_found
|
185
192
|
else
|
186
|
-
res.headers[
|
193
|
+
res.headers[Rack::CONTENT_TYPE] ||= DEFAULT
|
187
194
|
res.status = 200
|
188
195
|
end
|
189
196
|
end
|
@@ -195,30 +202,30 @@ class Cuba
|
|
195
202
|
# @private Used internally by #on to ensure that SCRIPT_NAME and
|
196
203
|
# PATH_INFO are reset to their proper values.
|
197
204
|
def try
|
198
|
-
script, path = env[
|
205
|
+
script, path = env[Rack::SCRIPT_NAME], env[Rack::PATH_INFO]
|
199
206
|
|
200
207
|
yield
|
201
208
|
|
202
209
|
ensure
|
203
|
-
env[
|
210
|
+
env[Rack::SCRIPT_NAME], env[Rack::PATH_INFO] = script, path
|
204
211
|
end
|
205
212
|
private :try
|
206
213
|
|
207
214
|
def consume(pattern)
|
208
|
-
matchdata = env[
|
215
|
+
matchdata = env[Rack::PATH_INFO].match(/\A\/(#{pattern})(\/|\z)/)
|
209
216
|
|
210
217
|
return false unless matchdata
|
211
218
|
|
212
219
|
path, *vars = matchdata.captures
|
213
220
|
|
214
|
-
env[
|
215
|
-
env[
|
221
|
+
env[Rack::SCRIPT_NAME] += "/#{path}"
|
222
|
+
env[Rack::PATH_INFO] = "#{vars.pop}#{matchdata.post_match}"
|
216
223
|
|
217
224
|
captures.push(*vars)
|
218
225
|
end
|
219
226
|
private :consume
|
220
227
|
|
221
|
-
def match(matcher, segment =
|
228
|
+
def match(matcher, segment = SEGMENT)
|
222
229
|
case matcher
|
223
230
|
when String then consume(matcher.gsub(/:\w+/, segment))
|
224
231
|
when Regexp then consume(matcher)
|
@@ -240,20 +247,24 @@ class Cuba
|
|
240
247
|
lambda { consume("([^\\/]+?)\.#{ext}\\z") }
|
241
248
|
end
|
242
249
|
|
243
|
-
#
|
244
|
-
# precondition / assertion for your route.
|
250
|
+
# Ensures that certain request parameters are present. Acts like a
|
251
|
+
# precondition / assertion for your route. A default value can be
|
252
|
+
# provided as a second argument. In that case, it always matches
|
253
|
+
# and the result is either the parameter or the default value.
|
245
254
|
#
|
246
255
|
# @example
|
247
256
|
# # POST with data like user[fname]=John&user[lname]=Doe
|
248
257
|
# on "signup", param("user") do |atts|
|
249
258
|
# User.create(atts)
|
250
259
|
# end
|
251
|
-
|
252
|
-
|
253
|
-
|
260
|
+
#
|
261
|
+
# on "login", param("username", "guest") do |username|
|
262
|
+
# # If not provided, username == "guest"
|
263
|
+
# end
|
264
|
+
def param(key, default = nil)
|
265
|
+
value = req[key] || default
|
254
266
|
|
255
|
-
|
256
|
-
lambda { env[key.upcase.tr("-","_")] }
|
267
|
+
lambda { captures << value unless value.to_s.empty? }
|
257
268
|
end
|
258
269
|
|
259
270
|
# Useful for matching against the request host (i.e. HTTP_HOST).
|
@@ -279,7 +290,7 @@ class Cuba
|
|
279
290
|
accept = String(env["HTTP_ACCEPT"]).split(",")
|
280
291
|
|
281
292
|
if accept.any? { |s| s.strip == mimetype }
|
282
|
-
res[
|
293
|
+
res[Rack::CONTENT_TYPE] = mimetype
|
283
294
|
end
|
284
295
|
end
|
285
296
|
end
|
@@ -303,7 +314,7 @@ class Cuba
|
|
303
314
|
# res.write "Home"
|
304
315
|
# end
|
305
316
|
def root
|
306
|
-
env[
|
317
|
+
env[Rack::PATH_INFO] == SLASH || env[Rack::PATH_INFO] == EMPTY
|
307
318
|
end
|
308
319
|
|
309
320
|
# Syntatic sugar for providing HTTP Verb matching.
|
@@ -382,6 +393,10 @@ class Cuba
|
|
382
393
|
def vars
|
383
394
|
env["cuba.vars"] ||= {}
|
384
395
|
end
|
396
|
+
|
397
|
+
def not_found
|
398
|
+
res.status = 404
|
399
|
+
end
|
385
400
|
end
|
386
401
|
|
387
402
|
Cuba.settings[:req] = Rack::Request
|
data/test/composition.rb
CHANGED
@@ -19,3 +19,51 @@ test "composing on top of a PATH" do
|
|
19
19
|
|
20
20
|
assert_response resp, ["View 101"]
|
21
21
|
end
|
22
|
+
|
23
|
+
test "redefining not_found" do
|
24
|
+
class Users < Cuba
|
25
|
+
def not_found
|
26
|
+
res.status = 404
|
27
|
+
res.write "Not found!"
|
28
|
+
end
|
29
|
+
|
30
|
+
define do
|
31
|
+
on root do
|
32
|
+
res.write "Users"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Cuba
|
38
|
+
def not_found
|
39
|
+
res.status = 404
|
40
|
+
res.write "Error 404"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
Cuba.define do
|
45
|
+
on "users" do
|
46
|
+
run Users
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
env = { "SCRIPT_NAME" => "/", "PATH_INFO" => "/users" }
|
51
|
+
|
52
|
+
_, _, resp = Cuba.call(env)
|
53
|
+
|
54
|
+
assert_response resp, ["Users"]
|
55
|
+
|
56
|
+
env = { "SCRIPT_NAME" => "/", "PATH_INFO" => "/users/42" }
|
57
|
+
|
58
|
+
status, _, resp = Cuba.call(env)
|
59
|
+
|
60
|
+
assert_response resp, ["Not found!"]
|
61
|
+
assert_equal status, 404
|
62
|
+
|
63
|
+
env = { "SCRIPT_NAME" => "/", "PATH_INFO" => "/guests" }
|
64
|
+
|
65
|
+
status, _, resp = Cuba.call(env)
|
66
|
+
|
67
|
+
assert_response resp, ["Error 404"]
|
68
|
+
assert_equal status, 404
|
69
|
+
end
|
data/test/helper.rb
CHANGED
data/test/param.rb
CHANGED
@@ -7,6 +7,10 @@ prepare do
|
|
7
7
|
res.write email
|
8
8
|
end
|
9
9
|
|
10
|
+
on get, "login", param("username", "guest") do |username|
|
11
|
+
res.write username
|
12
|
+
end
|
13
|
+
|
10
14
|
on default do
|
11
15
|
res.write "No email"
|
12
16
|
end
|
@@ -42,3 +46,21 @@ test "doesn't yield an empty param" do
|
|
42
46
|
|
43
47
|
assert_response resp, ["No email"]
|
44
48
|
end
|
49
|
+
|
50
|
+
test "yields a default param" do
|
51
|
+
env = { "REQUEST_METHOD" => "GET", "PATH_INFO" => "/login",
|
52
|
+
"SCRIPT_NAME" => "/", "rack.input" => StringIO.new,
|
53
|
+
"QUERY_STRING" => "username=john" }
|
54
|
+
|
55
|
+
_, _, resp = Cuba.call(env)
|
56
|
+
|
57
|
+
assert_response resp, ["john"]
|
58
|
+
|
59
|
+
env = { "REQUEST_METHOD" => "GET", "PATH_INFO" => "/login",
|
60
|
+
"SCRIPT_NAME" => "/", "rack.input" => StringIO.new,
|
61
|
+
"QUERY_STRING" => "" }
|
62
|
+
|
63
|
+
_, _, resp = Cuba.call(env)
|
64
|
+
|
65
|
+
assert_response resp, ["guest"]
|
66
|
+
end
|
data/test/render.rb
CHANGED
@@ -38,19 +38,19 @@ scope do
|
|
38
38
|
test "partial" do
|
39
39
|
_, _, body = Cuba.call({ "PATH_INFO" => "/about", "SCRIPT_NAME" => "/" })
|
40
40
|
|
41
|
-
assert_response body, ["<h1>About Cuba</h1
|
41
|
+
assert_response body, ["<h1>About Cuba</h1>"]
|
42
42
|
end
|
43
43
|
|
44
44
|
test "view" do
|
45
45
|
_, _, body = Cuba.call({ "PATH_INFO" => "/home", "SCRIPT_NAME" => "/" })
|
46
46
|
|
47
|
-
assert_response body, ["<title>Cuba: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p
|
47
|
+
assert_response body, ["<title>Cuba: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p>"]
|
48
48
|
end
|
49
49
|
|
50
50
|
test "render" do
|
51
51
|
_, _, body = Cuba.call({ "PATH_INFO" => "/render", "SCRIPT_NAME" => "/" })
|
52
52
|
|
53
|
-
assert_response body, ["<title>Cuba: About Cuba</title>\n<h1>About Cuba</h1
|
53
|
+
assert_response body, ["<title>Cuba: About Cuba</title>\n<h1>About Cuba</h1>"]
|
54
54
|
end
|
55
55
|
|
56
56
|
test "partial with str as engine" do
|
@@ -58,7 +58,7 @@ scope do
|
|
58
58
|
|
59
59
|
_, _, body = Cuba.call({ "PATH_INFO" => "/about", "SCRIPT_NAME" => "/" })
|
60
60
|
|
61
|
-
assert_response body, ["<h1>About Cuba</h1
|
61
|
+
assert_response body, ["<h1>About Cuba</h1>"]
|
62
62
|
end
|
63
63
|
|
64
64
|
test "view with str as engine" do
|
@@ -66,7 +66,7 @@ scope do
|
|
66
66
|
|
67
67
|
_, _, body = Cuba.call({ "PATH_INFO" => "/home", "SCRIPT_NAME" => "/" })
|
68
68
|
|
69
|
-
assert_response body, ["<title>Cuba: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p
|
69
|
+
assert_response body, ["<title>Cuba: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p>"]
|
70
70
|
end
|
71
71
|
|
72
72
|
test "custom default layout support" do
|
@@ -74,7 +74,7 @@ scope do
|
|
74
74
|
|
75
75
|
_, _, body = Cuba.call({ "PATH_INFO" => "/home", "SCRIPT_NAME" => "/" })
|
76
76
|
|
77
|
-
assert_response body, ["<title>Alternative Layout: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p
|
77
|
+
assert_response body, ["<title>Alternative Layout: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p>"]
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -109,7 +109,7 @@ test "overrides layout" do
|
|
109
109
|
|
110
110
|
_, _, body = Cuba.call({})
|
111
111
|
|
112
|
-
assert_response body, ["<title>Alternative Layout: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p
|
112
|
+
assert_response body, ["<title>Alternative Layout: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p>"]
|
113
113
|
end
|
114
114
|
|
115
115
|
test "ensures content-type header is set" do
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cutest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack-test
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: tilt
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Cuba is a microframework for web applications.
|
@@ -73,9 +73,10 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gems
|
77
|
-
- .gitignore
|
76
|
+
- ".gems"
|
77
|
+
- ".gitignore"
|
78
78
|
- CHANGELOG
|
79
|
+
- CONTRIBUTING
|
79
80
|
- LICENSE
|
80
81
|
- README.md
|
81
82
|
- cuba.gemspec
|
@@ -142,17 +143,17 @@ require_paths:
|
|
142
143
|
- lib
|
143
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
144
145
|
requirements:
|
145
|
-
- -
|
146
|
+
- - ">="
|
146
147
|
- !ruby/object:Gem::Version
|
147
148
|
version: '0'
|
148
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
150
|
requirements:
|
150
|
-
- -
|
151
|
+
- - ">="
|
151
152
|
- !ruby/object:Gem::Version
|
152
153
|
version: '0'
|
153
154
|
requirements: []
|
154
155
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.4.5.1
|
156
157
|
signing_key:
|
157
158
|
specification_version: 4
|
158
159
|
summary: Microframework for web applications.
|