fog-k5 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: e40070f77c9bd70b3000574e08cfc6d19ac6af256749778d6d84c1c7559891fd
4
- data.tar.gz: 6afad60e397d964e0effdd1b4ddf7d0f738a9f35a4e4e31ec0d46eedc2e7cee2
3
+ metadata.gz: e5ccec7dc892cbf7510dbca1a4096c4ada8e3d4f20b2f97e6d7e1ba5224b9f8a
4
+ data.tar.gz: b2e5a3137dcf344270d1e5997df65e5532240d85dc57a4c607870d70fe46c9c1
5
5
  SHA512:
6
- metadata.gz: 7c8c576a850fd39a458a5a063113a8c207835a68f032b31ae9bf48c3321381730b6a488f749352cbc18295b9e8d39d691b2e92a8919b20e11121bd28ad9db2dd
7
- data.tar.gz: c58e542bc8744ca2b8dab2965f97ab20a3e843f253c3162278fe1091b5201f8e470857915eb7bee77787bdc247e463c75286d2d5f629cb2eaa370efc96eca0cc
6
+ metadata.gz: 4b62b8d17c5786ad924c0cff07a39ee42d56a3514d121200d98a9253cc5357fb74cf929ff30180a1a2f541d35d95c2e5a78653f71d2121ea0962873c00eb6018
7
+ data.tar.gz: f826134c7f01e0ac60c2dbd2c15601aa0f533c9c167f509d31192b507b8ee1426c49c64456380546a422e7b4aae6fdb98d9b27237c81dd3b272718940107ff7b
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.2](https://github.com/blooper05/fog-k5/tree/v0.1.2) (2018-05-23)
4
+ [Full Changelog](https://github.com/blooper05/fog-k5/compare/v0.1.1...v0.1.2)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Authentication token is not updated [\#9](https://github.com/blooper05/fog-k5/issues/9)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - 🐛 Use instance variables instead of Fog.credentials [\#10](https://github.com/blooper05/fog-k5/pull/10) ([blooper05](https://github.com/blooper05))
13
+
3
14
  ## [v0.1.1](https://github.com/blooper05/fog-k5/tree/v0.1.1) (2018-05-17)
4
15
  [Full Changelog](https://github.com/blooper05/fog-k5/compare/v0.1.0...v0.1.1)
5
16
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module K5
3
- VERSION = '0.1.2'.freeze
3
+ VERSION = '0.1.3'.freeze
4
4
  end
5
5
  end
@@ -22,13 +22,10 @@ module Fog
22
22
  @k5_domain_name = options[:k5_domain_name]
23
23
  @k5_user_name = options[:k5_user_name]
24
24
  @k5_user_password = options[:k5_user_password]
25
-
26
- refresh_auth_token_if_expired
27
25
  end
28
26
 
29
27
  def params
30
28
  {
31
- headers: { 'X-Auth-Token' => @k5_auth_token },
32
29
  path_prefix: "#{K5_STORAGE_URL_VERSION}/AUTH_#{@k5_project_id}",
33
30
  query: { format: :json },
34
31
  }
@@ -2,16 +2,24 @@ module Fog
2
2
  module Storage
3
3
  class K5
4
4
  module Utils
5
+ include Fog::K5::Shared
6
+
5
7
  def request(params)
6
- escaped_params = escape(params)
8
+ refresh_auth_token_if_expired
9
+
10
+ escaped_params = escape(add_auth_header(params))
7
11
  parse(@connection.request(escaped_params))
8
12
  end
9
13
 
10
14
  private
11
15
 
16
+ def add_auth_header(params)
17
+ params.merge(headers: { 'X-Auth-Token' => @k5_auth_token })
18
+ end
19
+
12
20
  def escape(params)
13
21
  middlewares = Excon.defaults[:middlewares] +
14
- [Excon::Middleware::EscapePath]
22
+ [Excon::Middleware::EscapePath]
15
23
  params.merge(middlewares: middlewares)
16
24
  end
17
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-k5
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - blooper05
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-23 00:00:00.000000000 Z
11
+ date: 2018-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core