civo 0.6.0 → 0.6.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: f400a8bdc064187e6eaf1f3a8cd88f7c8c11bd06
4
- data.tar.gz: 7684ca5090ef694fba2f51bff23dafb3e48afe52
3
+ metadata.gz: c74497ec61fe77ae9d31a49419b8dfbc0ee6b5b2
4
+ data.tar.gz: a47aee9b39678543df358b7d65d2523333a83dc7
5
5
  SHA512:
6
- metadata.gz: 5eded1cd62419433edb0e45ca84463724c1a4b7f9721118f0625aca0aa02fc8df23fefc0418d1d21d387a8ac8e898a34dcdaab93a603957e17d1a261e982bdd5
7
- data.tar.gz: c474d73cddfcec284e8c5bc121ab1b4c505e23be1ac4d971993b01afe1f8cb004633f5db478db51ca81367d263b5855b7675513538197bb21ff82f06866a2c65
6
+ metadata.gz: c4663ec341edf8f7335404ab95cf788a0e230af2721778a6d6f3b1295cc2e031e4d2863287517a439417b04a5a863812fc9db21682edbbe52c30dbc632aa8996
7
+ data.tar.gz: c2dd167a5d12ba6c23a57a010b68ad4315cd28ffd3e281cc208b8f308e9dcbe6e834aff541097b5e0da084dee2d05d9f1cdf5393f84fe50b7a670ba8c97953fb
@@ -1,10 +1,7 @@
1
1
  module Civo
2
2
  class Base < ::Flexirest::Base
3
3
  before_request :authorization_token
4
-
5
- if ENV["CIVO_API_VERSION"] == "2"
6
- before_request :administration_set_user
7
- end
4
+ before_request :administration_set_user
8
5
 
9
6
  private
10
7
 
@@ -13,6 +10,11 @@ module Civo
13
10
  end
14
11
 
15
12
  def administration_set_user(name, request)
13
+ unless ENV["CIVO_API_VERSION"].to_s == "2"
14
+ Rails.logger.debug("Not using v2, using #{ENV["CIVO_API_VERSION"]}")
15
+ return
16
+ end
17
+
16
18
  user_id = request.post_params[:user_id] # Don't delete the param in case it's needed by an action
17
19
  if user_id.present?
18
20
  request.headers["X-Civo-UserID"] = user_id
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries