cuba 3.6.0 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +5 -1
  3. data/README.md +7 -16
  4. data/cuba.gemspec +1 -1
  5. data/lib/cuba.rb +10 -4
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42cd957e785c42b14bbfe58e527dacb30a01a6da
4
- data.tar.gz: 9cea4d3fae0509433f694eb682429b5fef1e3224
3
+ metadata.gz: 5312bfcf95e9e0ac5e5a9d05fe883a4790ad768a
4
+ data.tar.gz: 8f96b48c062e5410dc50c467ba182edd0016d741
5
5
  SHA512:
6
- metadata.gz: 84b6ac48a32e192b791840dfabf751293a1f11619f281c267dea76f94ec9be24e2ca0f67c555b8f2873e4e1958a616ff62d74185f8201d0cfe26122434afce8e
7
- data.tar.gz: 61590ca736f30164a9f4546b21870e4bd3339f012c8484173cb4855c3115d0a7b896f92cc7e617031b975642bf09f0318305a1d0b784cac10bacdc5f209f3c4d
6
+ metadata.gz: 23057633a8adfe69110215e9ab6917f0d0b26b4fcebc6fdf5b0b7113936d31d16eb66e090f96ad7ef6aad22a63c8097c9eb52bacbee7e76ff02f12e4b8671652
7
+ data.tar.gz: f0babb7278078c7625e862cf5d78bda5f266d5f57b5de590842666fdf2e17dc199f6d15f86a56243601f7926be3a6c4e25b2d2bb8446d3d00cda4fd829dd5dfb
data/CHANGELOG CHANGED
@@ -1,6 +1,10 @@
1
+ 3.7.0
2
+
3
+ * Add syntactic sugar for matching all HTTP methods.
4
+
1
5
  3.6.0
2
6
 
3
- * Set Strict-Transport-Security to a better default
7
+ * Set Strict-Transport-Security to a better default.
4
8
 
5
9
  3.5.0
6
10
 
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 four matchers defined for HTTP Verbs: `get`, `post`, `put` and
409
- `delete`. But the world doesn't end there, does it? As you have the whole
410
- request available via the `req` object, you can query it with helper methods
411
- like `req.options?` or `req.head?`, or you can even go to a lower level
412
- and inspect the environment via the `env` object, and check for example if
413
- `env["REQUEST_METHOD"]` equals the obscure verb `PATCH`.
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
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cuba"
3
- s.version = "3.6.0"
3
+ s.version = "3.7.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"]
@@ -325,10 +325,16 @@ class Cuba
325
325
  #
326
326
  # on post, "signup" do
327
327
  # end
328
- def get; req.get? end
329
- def post; req.post? end
330
- def put; req.put? end
331
- def delete; req.delete? end
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.6.0
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-03-19 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack