varnish_rest_api 0.0.13 → 0.0.14

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: 196e88876f375e01591434d86493037a98161f09
4
- data.tar.gz: b2cebab2381a4bbc503b2dc34476c99b0d2d2950
3
+ metadata.gz: 45204c8198a6e43567a474233106d834e82c27bd
4
+ data.tar.gz: 2c19b28160fc45733778040a4c3c6c5d15315bba
5
5
  SHA512:
6
- metadata.gz: 9caae0837317e2cd7fd68b4d9340dde898e04e80df1873d3d7c552419a9d21bd186c8d1e9b469c026ef91f2567558617cf9175ae147398b372131318cb61d243
7
- data.tar.gz: 5d07c37f8c7253f218b7848095296caeb40b55c317d797f3d810b13f8c1c80eeb68fd6cb3c4ff4d2c870c4895e3abf777f5a2cca1df77630867d259f67f1d752
6
+ metadata.gz: 04a3c50ac7ed8f571817484916a6aaaddece73a9a201a8b6cb4666b14db17325fb9e854549e7774f67e79ea37dd1b5517938014f56c48a60e12ae9abfbbdbecf
7
+ data.tar.gz: ebb6e6dd2a90da31299cb3a406a96982b11e292e4939e8d6ac892647e181960a436c0e10e996e264ffdd3e5767fa1f4347fd49cbe9dcaf1338f036508354921c
@@ -1,3 +1,3 @@
1
1
  module VarnishRestApiVersion
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
@@ -128,16 +128,16 @@ get %r{^/(.*?)/(in|out)$} do
128
128
  action = params[:captures].last
129
129
  health = action == 'out' ? 'sick' : 'auto'
130
130
 
131
- if (!params[:safe].nil?)
131
+ if (params[:safe].blank?)
132
+ safe = true
133
+ else
132
134
  if (params[:safe] =~ (/^(false|f|no|n|0)$/i))
133
135
  safe = false
134
136
  else
135
137
  safe = true
136
- end
137
- else
138
- safe = true
138
+ end
139
139
  end
140
- backends = varnish.set_health(backend,health, safe)
140
+ backends = varnish.set_health(backend,health, :safe => safe)
141
141
 
142
142
  if backends.empty?
143
143
  content_type :html
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.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby