turnout 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/turnout/maintenance_file.rb +3 -3
- data/lib/turnout/maintenance_page/base.rb +2 -2
- data/lib/turnout/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f1d848eeb46276843d9e7a313c040c857888a8
|
4
|
+
data.tar.gz: 8357c006e9a7d8a41d12e5fc06692abc821c7f54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0042d84e4989d168955ad234825783ae6621ba0c44182315b5f28e3cc810c68146d3f54405bd278981d1c37edb58f36e19938dc17ed0be1d4c86a1059469f483
|
7
|
+
data.tar.gz: a37a682278fff4e3ba5115c1a1f848f6b6a475839891729ca2791101a2f0c96918f67b9e3658aee2aaddcc08e873ba3a17b317c7796be0a101e4cd6bb55b6795
|
@@ -6,7 +6,7 @@ module Turnout
|
|
6
6
|
attr_reader :path
|
7
7
|
|
8
8
|
SETTINGS = [:reason, :allowed_paths, :allowed_ips, :response_code, :retry_after]
|
9
|
-
attr_reader
|
9
|
+
attr_reader(*SETTINGS)
|
10
10
|
|
11
11
|
def initialize(path)
|
12
12
|
@path = path
|
@@ -20,7 +20,7 @@ module Turnout
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def exists?
|
23
|
-
File.
|
23
|
+
File.exist? path
|
24
24
|
end
|
25
25
|
|
26
26
|
def to_h
|
@@ -58,7 +58,7 @@ module Turnout
|
|
58
58
|
|
59
59
|
# Find the first MaintenanceFile that exists
|
60
60
|
def self.find
|
61
|
-
path = named_paths.values.find { |
|
61
|
+
path = named_paths.values.find { |p| File.exist? p }
|
62
62
|
self.new(path) if path
|
63
63
|
end
|
64
64
|
|
@@ -51,7 +51,7 @@ module Turnout
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def content
|
54
|
-
file_content.gsub
|
54
|
+
file_content.gsub(/{{\s?reason\s?}}/, reason)
|
55
55
|
end
|
56
56
|
|
57
57
|
def file_content
|
@@ -59,7 +59,7 @@ module Turnout
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def path
|
62
|
-
if File.
|
62
|
+
if File.exist? custom_path
|
63
63
|
custom_path
|
64
64
|
else
|
65
65
|
default_path
|
data/lib/turnout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|
@@ -214,4 +214,3 @@ signing_key:
|
|
214
214
|
specification_version: 4
|
215
215
|
summary: A Rack based maintenance mode plugin for Rails
|
216
216
|
test_files: []
|
217
|
-
has_rdoc:
|