turnout 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4ae8144b28714433ab814cb9604ed7e4eb82d5c
4
- data.tar.gz: c2b3041f66b67b9e446067657818a15bbd396d3d
3
+ metadata.gz: 02f1d848eeb46276843d9e7a313c040c857888a8
4
+ data.tar.gz: 8357c006e9a7d8a41d12e5fc06692abc821c7f54
5
5
  SHA512:
6
- metadata.gz: b5c5a40abcc33d99d789d3c4dfe115da5a571c9ac07bf8ae627d18f030934044e83d1931281b48bc60b5dbfe9afd50ac9642549fdd69506090ade13fbbc25171
7
- data.tar.gz: ecda16629ec28698fb40318aa156e9a4511c96f0482c8d60ff15f6f4d9c81c1dd8c57ddc3233aabe96b1fe5f116096bd05a3b31d863a5802b3c62f65fb70b381
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 *SETTINGS
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.exists? path
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 { |path| File.exists? path }
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 /{{\s?reason\s?}}/, reason
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.exists? custom_path
62
+ if File.exist? custom_path
63
63
  custom_path
64
64
  else
65
65
  default_path
@@ -1,3 +1,3 @@
1
1
  module Turnout
2
- VERSION = '2.4.0'
2
+ VERSION = '2.4.1'
3
3
  end
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.0
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: 2016-10-08 00:00:00.000000000 Z
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: