civo 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/civo/base.rb +6 -4
- data/lib/civo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74497ec61fe77ae9d31a49419b8dfbc0ee6b5b2
|
4
|
+
data.tar.gz: a47aee9b39678543df358b7d65d2523333a83dc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4663ec341edf8f7335404ab95cf788a0e230af2721778a6d6f3b1295cc2e031e4d2863287517a439417b04a5a863812fc9db21682edbbe52c30dbc632aa8996
|
7
|
+
data.tar.gz: c2dd167a5d12ba6c23a57a010b68ad4315cd28ffd3e281cc208b8f308e9dcbe6e834aff541097b5e0da084dee2d05d9f1cdf5393f84fe50b7a670ba8c97953fb
|
data/app/models/civo/base.rb
CHANGED
@@ -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
|
data/lib/civo/version.rb
CHANGED