cuba 3.6.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -1
- data/README.md +7 -16
- data/cuba.gemspec +1 -1
- data/lib/cuba.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5312bfcf95e9e0ac5e5a9d05fe883a4790ad768a
|
4
|
+
data.tar.gz: 8f96b48c062e5410dc50c467ba182edd0016d741
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23057633a8adfe69110215e9ab6917f0d0b26b4fcebc6fdf5b0b7113936d31d16eb66e090f96ad7ef6aad22a63c8097c9eb52bacbee7e76ff02f12e4b8671652
|
7
|
+
data.tar.gz: f0babb7278078c7625e862cf5d78bda5f266d5f57b5de590842666fdf2e17dc199f6d15f86a56243601f7926be3a6c4e25b2d2bb8446d3d00cda4fd829dd5dfb
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -30,16 +30,6 @@ It integrates many templates via [Tilt][tilt], and testing via
|
|
30
30
|
[capybara]: http://github.com/jnicklas/capybara
|
31
31
|
[rack-test]: https://github.com/brynary/rack-test
|
32
32
|
|
33
|
-
Guide
|
34
|
-
-----
|
35
|
-
|
36
|
-
There's a book called [The Guide to Cuba][guide] that explains how
|
37
|
-
to build web applications by following a minimalistic approach. It
|
38
|
-
is recommended reading for anyone trying to learn the basics of
|
39
|
-
Cuba and other related tools.
|
40
|
-
|
41
|
-
[guide]: http://theguidetocuba.io
|
42
|
-
|
43
33
|
Installation
|
44
34
|
------------
|
45
35
|
|
@@ -405,12 +395,13 @@ among your meta tags. Here's an example that assumes you are using
|
|
405
395
|
HTTP Verbs
|
406
396
|
----------
|
407
397
|
|
408
|
-
There are
|
409
|
-
`
|
410
|
-
request available via the `req`
|
411
|
-
|
412
|
-
|
413
|
-
`env
|
398
|
+
There are matchers defined for the following HTTP Verbs: `get`,
|
399
|
+
`post`, `put`, `patch`, `delete`, `head`, `options`, `link`, `unlink`
|
400
|
+
and `trace`. As you have the whole request available via the `req`
|
401
|
+
object, you can also query it with helper methods like `req.options?`
|
402
|
+
or `req.head?`, or you can even go to a lower level and inspect the
|
403
|
+
environment via the `env` object, and check for example if
|
404
|
+
`env["REQUEST_METHOD"]` equals the verb `PATCH`.
|
414
405
|
|
415
406
|
What follows is an example of different ways of saying the same thing:
|
416
407
|
|
data/cuba.gemspec
CHANGED
data/lib/cuba.rb
CHANGED
@@ -325,10 +325,16 @@ class Cuba
|
|
325
325
|
#
|
326
326
|
# on post, "signup" do
|
327
327
|
# end
|
328
|
-
def get;
|
329
|
-
def post;
|
330
|
-
def put;
|
331
|
-
def
|
328
|
+
def get; req.get? end
|
329
|
+
def post; req.post? end
|
330
|
+
def put; req.put? end
|
331
|
+
def patch; req.patch? end
|
332
|
+
def delete; req.delete? end
|
333
|
+
def head; req.head? end
|
334
|
+
def options; req.options? end
|
335
|
+
def link; req.link? end
|
336
|
+
def unlink; req.unlink? end
|
337
|
+
def trace; req.trace? end
|
332
338
|
|
333
339
|
# If you want to halt the processing of an existing handler
|
334
340
|
# and continue it via a different handler.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.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: 2016-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|