turnout 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/turnout/configuration.rb +2 -1
- data/lib/turnout/maintenance_file.rb +1 -1
- data/lib/turnout/version.rb +1 -1
- 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: b2fee460064d100fd288969bbd5f24729f741f30
|
4
|
+
data.tar.gz: 252ff93aedf7e0762d1f9f0789eda0f338800528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf17e5dc593d8335f9d0771b589926b0091d019160b789c578118dd2c91a0b0d0ea05f1a3242d3daf3f7d318b8b5ec9a76eb9d80d1e421b94c2cc9f535f767ea
|
7
|
+
data.tar.gz: 95a70f7afefb4ab37598f9ab42612c8ea9c4d8f26d635fb0392ddcf9f39503874006d2acd04b99e2740d935ec8ec5d0ce5ca65a04df22a58a412e71f8bceecfd
|
data/README.md
CHANGED
@@ -101,6 +101,7 @@ Turnout can be configured in two different ways:
|
|
101
101
|
named_maintenance_file_paths: {app: 'tmp/app.yml', server: '/tmp/server.yml'},
|
102
102
|
default_maintenance_page: Turnout::MaintenancePage::JSON,
|
103
103
|
default_reason: 'Somebody googled Google!',
|
104
|
+
default_allowed_paths: ['^/admin/'],
|
104
105
|
default_response_code: 418,
|
105
106
|
default_retry_after: 3600
|
106
107
|
```
|
@@ -113,6 +114,7 @@ Turnout can be configured in two different ways:
|
|
113
114
|
config.named_maintenance_file_paths = {app: 'tmp/app.yml', server: '/tmp/server.yml'}
|
114
115
|
config.default_maintenance_page = Turnout::MaintenancePage::JSON
|
115
116
|
config.default_reason = 'Somebody googled Google!'
|
117
|
+
config.default_allowed_paths = ['^/admin/']
|
116
118
|
config.default_response_code = 418
|
117
119
|
config.default_retry_after = 3600
|
118
120
|
end
|
@@ -129,6 +131,7 @@ Turnout.configure do |config|
|
|
129
131
|
config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s}
|
130
132
|
config.default_maintenance_page = Turnout::MaintenancePage::HTML
|
131
133
|
config.default_reason = "The site is temporarily down for maintenance.\nPlease check back soon."
|
134
|
+
config.default_allowed_paths = []
|
132
135
|
config.default_response_code = 503
|
133
136
|
config.default_retry_after = 7200
|
134
137
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Turnout
|
2
2
|
class Configuration
|
3
3
|
SETTINGS = [:app_root, :named_maintenance_file_paths, :default_maintenance_page, :default_reason,
|
4
|
-
:default_response_code, :default_retry_after]
|
4
|
+
:default_allowed_paths, :default_response_code, :default_retry_after]
|
5
5
|
|
6
6
|
SETTINGS.each do |setting|
|
7
7
|
attr_accessor setting
|
@@ -12,6 +12,7 @@ module Turnout
|
|
12
12
|
@named_maintenance_file_paths = {default: app_root.join('tmp', 'maintenance.yml').to_s}
|
13
13
|
@default_maintenance_page = Turnout::MaintenancePage::HTML
|
14
14
|
@default_reason = "The site is temporarily down for maintenance.\nPlease check back soon."
|
15
|
+
@default_allowed_paths = []
|
15
16
|
@default_response_code = 503
|
16
17
|
@default_retry_after = 7200 # 2 hours by default
|
17
18
|
end
|
@@ -11,7 +11,7 @@ module Turnout
|
|
11
11
|
def initialize(path)
|
12
12
|
@path = path
|
13
13
|
@reason = Turnout.config.default_reason
|
14
|
-
@allowed_paths =
|
14
|
+
@allowed_paths = Turnout.config.default_allowed_paths
|
15
15
|
@allowed_ips = []
|
16
16
|
@response_code = Turnout.config.default_response_code
|
17
17
|
@retry_after = Turnout.config.default_retry_after
|
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
|
+
version: 2.2.0
|
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: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|