protocol-http 0.14.0 → 0.14.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
  SHA256:
3
- metadata.gz: 01134dcd19c1c455c4708bb156394142cf7d1c0fad2c77c6215b38be4bf222f1
4
- data.tar.gz: 3d5d904768b5db52a90a671334f67e9b1aa94a25fec68104ca51165d448c3a63
3
+ metadata.gz: 1a8ecc7ff666bfe900451d95f8fb7fa40f67caa5ca686844b827c19729816693
4
+ data.tar.gz: 4acbac83b751e2602479adc863c6b75f7bb2bba9bbe4dfc30a6151435c8f2ebe
5
5
  SHA512:
6
- metadata.gz: d0ea0d0cafc40fd91c8b4ce519e5ff8de4b11001313e5124deb4ededc17a1c05cf173f695646b4361ee827a925654f4cf454b60d9715e5db67c33ebecf3f0c7b
7
- data.tar.gz: 516d31553b772881473ba0008c52e7081a1c274d3c3d000bc5818cd765f9e9cc34aa492d4665660813bbdf2911beae67b7c72b293ea53fed490d07fdba60b7e8
6
+ metadata.gz: be4092bb56744f84e434cc8de3d3b7d7632cfdbe2d424e4153b5204cefd17bdf0cb64304070e5ed2f4070bab08d25cbb4e0ae04daad1157bb6cdc03da4b44385
7
+ data.tar.gz: d1b4cdd713e5b03eba86c6c3ed63f5097eddc4e343d187cf2957378abfcb5094b103a2c3df6c19e3209afcafb7d3950eb4eb387400b548ad42da88a580ad7a5d
@@ -29,6 +29,8 @@ module Protocol
29
29
  class CacheControl < Split
30
30
  PRIVATE = 'private'
31
31
  PUBLIC = 'public'
32
+ NO_CACHE = 'no-cache'
33
+ NO_STORE = 'no-store'
32
34
  MAX_AGE = 'max-age'
33
35
 
34
36
  def initialize(value)
@@ -47,6 +49,14 @@ module Protocol
47
49
  self.include?(PUBLIC)
48
50
  end
49
51
 
52
+ def no_cache?
53
+ self.include?(NO_CACHE)
54
+ end
55
+
56
+ def no_store?
57
+ self.include?(NO_STORE)
58
+ end
59
+
50
60
  def max_age
51
61
  if value = self.find{|value| value.start_with?(MAX_AGE)}
52
62
  _, age = value.split('=', 2)
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Protocol
24
24
  module HTTP
25
- VERSION = "0.14.0"
25
+ VERSION = "0.14.1"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-05 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: covered