rack-maintenance 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/maintenance.rb +1 -1
- data/lib/rack/maintenance/version.rb +1 -1
- data/spec/rack-maintenance_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a53afd94dd0a604271a5cde5bb5b9b4c0fdcd6dc
|
4
|
+
data.tar.gz: 271f1d25bad09379c36c417bbeb172b710ea49ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d69ec530a5e4cb128017be188495ac6ade119c54857f8f528222b8d2934d7ae63780ac80c9c12f862c9633511614da229b089cb162a96a4d54cbfe1cadc9f348
|
7
|
+
data.tar.gz: 0d4d3545b0d3951932eba0af6599373f1e68e09b3562c0e683df7f78a208c72586d58710bdc089461785e729971be352b57886a62624f55404b8b4ee1592e353
|
data/lib/rack/maintenance.rb
CHANGED
@@ -23,7 +23,7 @@ class Rack::Maintenance
|
|
23
23
|
private ######################################################################
|
24
24
|
|
25
25
|
def content_type
|
26
|
-
file.end_with?('json') ? 'application/json' : 'text/html'
|
26
|
+
file.to_s.end_with?('json') ? 'application/json' : 'text/html'
|
27
27
|
end
|
28
28
|
|
29
29
|
def environment
|
@@ -78,6 +78,11 @@ describe "RackMaintenance with json maintenance file" do
|
|
78
78
|
let(:file_name) { "spec/maintenance.json" }
|
79
79
|
let(:content_type) { "application/json" }
|
80
80
|
end
|
81
|
+
|
82
|
+
it_behaves_like "RackMaintenance" do
|
83
|
+
let(:file_name) { Pathname.new("spec/maintenance.json") }
|
84
|
+
let(:content_type) { "application/json" }
|
85
|
+
end
|
81
86
|
end
|
82
87
|
|
83
88
|
describe "RackMaintenance with html maintenance file" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-maintenance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Dollar
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|