rack-prefer 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaca495eacf4cba843ef56856a5ca7006d0caf2d
4
- data.tar.gz: fc70e027412b092fd724b1e805e2055b6fb39df1
3
+ metadata.gz: db5cb4b4777b2e857113d6ef19fbc7f7681795a8
4
+ data.tar.gz: ef1ebc71cb61f39a960bc2b4002724b2065b1f6a
5
5
  SHA512:
6
- metadata.gz: e3ebdc9e7ea92ca7cfcd9f4e591ed574121f473c798550259e464e7e59a1bf48c46d574c0345f2cf79c4a5f68b0396b8a98810f6156afe28929b15654b617fb7
7
- data.tar.gz: e3bf3742b4354ee360822861745c8e158d705d43b16136e79499586ca4b08974617ac67b23912a83b82b7940c1c33d7f51f039d3eca68ef9db637f396025633e
6
+ metadata.gz: d48603e05ce13db22349cc603debbb8f89f10a5f2a3fd68295300fd8a5f4cdbedcb0f78b2f1723d3ab7cf0a4512234d9469bdd135560006bfaec7e8cfc401aec
7
+ data.tar.gz: 12f3a992f672fd51938cf36acf5184f60a29e733afaf0b0d0602de01b8052e5a259c958775c6a3673f6981ef81d9f45d812b9bef78b33ede699a7d3dfa41e906
data/README.md CHANGED
@@ -27,7 +27,7 @@ require 'rack/prefer'
27
27
 
28
28
  Rails automatically includes the `rack/prefer` file.
29
29
 
30
- Once you have access to Rack::Request object (rails ActionDispatch::Request object
30
+ Once you have access to Rack::Request object (Rails ActionDispatch::Request object
31
31
  inherits from Rack's Rack::Request) you also have access to Prefer header. So for
32
32
  a request like the following prefer headers:
33
33
 
@@ -41,13 +41,13 @@ you can do:
41
41
  ```ruby
42
42
  request.prefer.values #{"respond-async"=>nil, "wait"=>"10", "priority"=>"5"}
43
43
  request.prefer.response_async? #true
44
- request.return_minimal? #false
45
- request.wait? #true
46
- request.wait # 10 (integer)
47
- request.handling_strict? #true
48
- request.values['handling'] #'strict'
49
- #rails only
50
- request.values[:handling] #strict
44
+ request.prefer.return_minimal? #false
45
+ request.prefer.wait? #true
46
+ request.prefer.wait # 10 (integer)
47
+ request.prefer.handling_strict? #true
48
+ request.prefer.values['handling'] #'strict'
49
+ #Rails only
50
+ request.prefer.values[:handling] #strict
51
51
  ```
52
52
 
53
53
  Happy coding!
@@ -57,6 +57,6 @@ end
57
57
 
58
58
  class Rack::Request
59
59
  def prefer
60
- Rack::Prefer::PreferPresenter.new(self)
60
+ @prefer_presenter ||= Rack::Prefer::PreferPresenter.new(self)
61
61
  end
62
62
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Prefer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -6,8 +6,8 @@ require 'rack/prefer/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rack-prefer"
8
8
  spec.version = Rack::Prefer::VERSION
9
- spec.authors = ["Filippos Vasilakis"]
10
- spec.email = ["vasilakisfil@gmail.com"]
9
+ spec.authors = ["Filippos Vasilakis", "Kollegorna"]
10
+ spec.email = ["vasilakisfil@gmail.com", "admin@kollegorna.se"]
11
11
 
12
12
  spec.summary = %q{Simple gem that parses the HTTP prefer header.}
13
13
  spec.description = %q{Simple gem that parses the HTTP prefer header.}
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-prefer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filippos Vasilakis
8
+ - Kollegorna
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-07-27 00:00:00.000000000 Z
12
+ date: 2015-10-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -41,6 +42,7 @@ dependencies:
41
42
  description: Simple gem that parses the HTTP prefer header.
42
43
  email:
43
44
  - vasilakisfil@gmail.com
45
+ - admin@kollegorna.se
44
46
  executables: []
45
47
  extensions: []
46
48
  extra_rdoc_files: []