varnish_rest_api 0.0.12 → 0.0.13

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: 80c937af5f9038bcf7c86ac57d9f243d5db9a356
4
- data.tar.gz: 3fb2bc1a2241680220eee964593a0679a1df101c
3
+ metadata.gz: 196e88876f375e01591434d86493037a98161f09
4
+ data.tar.gz: b2cebab2381a4bbc503b2dc34476c99b0d2d2950
5
5
  SHA512:
6
- metadata.gz: b8aa929a220bb3952d0ccf359feacdd4e3dbde2d44bd125bbe56b866869014538bd037b5abc3e1682248dfb09c652974212919352744beb29db9ac69f5a2949d
7
- data.tar.gz: 7c9f0443531e7579c0adc392e53bc3c0f870945b08617535c2ec8d6b1402488b7b02cbf85fd6b2bb3b3d6e193f3e24011d88fb0b11cdd20c2ddc5b1d64c93c24
6
+ metadata.gz: 9caae0837317e2cd7fd68b4d9340dde898e04e80df1873d3d7c552419a9d21bd186c8d1e9b469c026ef91f2567558617cf9175ae147398b372131318cb61d243
7
+ data.tar.gz: 5d07c37f8c7253f218b7848095296caeb40b55c317d797f3d810b13f8c1c80eeb68fd6cb3c4ff4d2c870c4895e3abf777f5a2cca1df77630867d259f67f1d752
@@ -127,7 +127,16 @@ get %r{^/(.*?)/(in|out)$} do
127
127
  backend = params[:captures].first
128
128
  action = params[:captures].last
129
129
  health = action == 'out' ? 'sick' : 'auto'
130
- safe = params[:safe].nil? ? options[:safe] : params[:safe]
130
+
131
+ if (!params[:safe].nil?)
132
+ if (params[:safe] =~ (/^(false|f|no|n|0)$/i))
133
+ safe = false
134
+ else
135
+ safe = true
136
+ end
137
+ else
138
+ safe = true
139
+ end
131
140
  backends = varnish.set_health(backend,health, safe)
132
141
 
133
142
  if backends.empty?
@@ -1,3 +1,3 @@
1
1
  module VarnishRestApiVersion
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: varnish_rest_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby