cuba 3.9.0 → 3.9.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/cuba.gemspec +1 -1
  4. data/lib/cuba.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a0f252d0cdb3d4dc2a109fbf9c23b79d5b9a25a
4
- data.tar.gz: 174baccd84a96ae2f0844decaa081b72ff1633cc
3
+ metadata.gz: b32e5ca1a9c837000859c79125c00e18cb9b9508
4
+ data.tar.gz: 67f075c8237ab605a87a86b2a90b8aacf60bcd07
5
5
  SHA512:
6
- metadata.gz: 821b6dfa92e9c2a5ae19953e44823b2de138521a2cd722b48b4ed6c0e3900a29027f32cc38e84c90f9add8752e908b05460782b21cfbc9e0b5780a3e307667f0
7
- data.tar.gz: 4d3ca82b85b09f7257e993fd8f3eb1ef59a69c5a42993646c468bc0c831c6429934de245addcbe7d643cd3be22f247f8cf30be726dd2a630aeb8a22edfde51af
6
+ metadata.gz: c14827724a53ae4e32335eeba27e42bae2f7c98bac037158d9bbb37942673fa17c65f56530e95438d10e68a856af801b79bf5174d3d1606cfaf78c9593de374f
7
+ data.tar.gz: 22998108ccd432e4d5d271761a1e779f37da91af95c8cef9bddb871f047cb111f9c35584265b227841bd39cc1f2064c6fae5d86f2b2d9d2fbf747faaf8b88949
data/README.md CHANGED
@@ -416,6 +416,14 @@ on get, "api" do ... end
416
416
  Actually, `get` is syntax sugar for `req.get?`, which in turn is syntax sugar
417
417
  for `env["REQUEST_METHOD"] == "GET"`.
418
418
 
419
+ Headers
420
+ -------
421
+
422
+ You can set the headers by assigning values to the hash `req.headers`.
423
+ If you want to inspect the incoming headers, you have to read from
424
+ the `env` hash. For example, if you want to know the referrer you
425
+ can check `env["HTTP_REFERER"]`.
426
+
419
427
  Request and Response
420
428
  --------------------
421
429
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cuba"
3
- s.version = "3.9.0"
3
+ s.version = "3.9.1"
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"]
@@ -262,7 +262,7 @@ class Cuba
262
262
  # # If not provided, username == "guest"
263
263
  # end
264
264
  def param(key, default = nil)
265
- value = req[key] || default
265
+ value = req.params[key] || default
266
266
 
267
267
  lambda { captures << value unless value.to_s.empty? }
268
268
  end
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.9.0
4
+ version: 3.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Martens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack