startback 0.4.1 → 0.4.2

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: a06b0b31cc8840a4dd20381feb44c16a2f7a83dd
4
- data.tar.gz: 9cc508e4ac8f662f4bb1a8f60fba6f7fe8b36c82
3
+ metadata.gz: 4f615659a301a7720d4b61e8e2ce714eaad98197
4
+ data.tar.gz: 74a968e657dbccaf5c59e5ad1b03bcf4bd6c52e2
5
5
  SHA512:
6
- metadata.gz: 4936d6d7fc528704900c7178c95c9d9b1ab20befd46080ac1545f49fb56054deb8b3befd68afb426dc751ba3d4c065adf432c94b2b6c9e12a0690da1c5ac98a1
7
- data.tar.gz: d652e019cf8c22043bf8688252b89578f71fa73fe0265307105e78dd69473beb9ba36ae79f4e6cc626847aeab8f5616bd881630d957aa32dc0155dbe62114330
6
+ metadata.gz: c3636b769a3200fd2e774cabdc99e642c81e5a29921d09ad66995f5952e89aaf73012dd2589d710055aed68fa6a6dbf664bb65e79d623d4b5daf44f1dc5de3d9
7
+ data.tar.gz: 88d3d45a912a3618b154dee16a798688385351d3a3e68324674b923e1428f8bbf58a79e96e603358c4033ddb7f8a088699b6449256868f9443134fa4ddf51c4a
@@ -2,7 +2,7 @@ module Startback
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 1
5
+ TINY = 2
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -54,7 +54,7 @@ module Startback
54
54
  protected
55
55
 
56
56
  def patch_response_headers(hs)
57
- hs.merge(development? ? @cache_headers[:development] : @cache_headers[:production])
57
+ (development? ? @cache_headers[:development] : @cache_headers[:production]).merge(hs)
58
58
  end
59
59
 
60
60
  def development?
@@ -62,6 +62,20 @@ module Startback
62
62
  end
63
63
  end
64
64
 
65
+ context 'when a Cache-Control header is already set by the app' do
66
+ def app
67
+ Rack::Builder.new do
68
+ use AutoCaching
69
+ run ->(env){ [200, {"Cache-Control" => "priority"}, ["Hello error"]] }
70
+ end
71
+ end
72
+
73
+ it 'sets the production Cache-Control' do
74
+ get '/'
75
+ expect(last_response['Cache-Control']). to eql("priority")
76
+ end
77
+ end
78
+
65
79
  end # CatchAll
66
80
  end # module Web
67
81
  end # module Startback
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 2.6.11
204
+ rubygems_version: 2.5.2.3
205
205
  signing_key:
206
206
  specification_version: 4
207
207
  summary: Got Your Ruby Back