delphix 0.2.3 → 0.2.4

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: 372b9b43191b6c23d5b49a4af1744f125bbce880
4
- data.tar.gz: 9b53210bb6055807fba32550b33aa7321f241e3d
3
+ metadata.gz: b82aa1028f0dd27b6a4b6af8719cbc7d20025c1f
4
+ data.tar.gz: eaca66468376585c2d53a1cc3283b4f41d09e1bf
5
5
  SHA512:
6
- metadata.gz: f34a8f6008d7cc1505b9ea3bda57de55fa941057f6ba6e19b53f48a8696e221f010ac52e88160eabed7ab92485bb1b5ceed0c67d206594848931af62a3615d83
7
- data.tar.gz: 90782b025d15f02295e49a6fdbf4dc68d925e0b768e4f307ccca8b34cc0998b8e5372167e99695edfe5b4d2eac9f91fa03c32cc42c1e196d032599d4aa775d54
6
+ metadata.gz: 3b8456d5f0482a0ee5384d42e6caa3aa50ca86ebb95f1c31bfd58c4cdb692a74a91729e8f0c18639feaa0371aa765c8fc9eb14b76442b75d7aca36cbd85a4f93
7
+ data.tar.gz: 4b2d68797514bb17063b3a1ebf2c4e0efa83499c2e6f1fe758b41d3d181e3f6a0edc64341a93be78f3c4707f0af9ba077f7f2d7bea70e5e750b882a8bd8212b3
data/lib/delphix.rb CHANGED
@@ -36,7 +36,7 @@ require_relative 'delphix/version'
36
36
  # hash format as `{ major: 1, micro: 0, minor: 0 }`, for example:
37
37
  # Delphix.api_version = {
38
38
  # type: 'APIVersion',
39
- # major: { major: 1, micro: 0, minor: 0 }
39
+ # version: { major: 1, micro: 0, minor: 0 }
40
40
  # }
41
41
  # * Specify the Delphix server to connect to.
42
42
  # Delphix.server = 'delphix.example.com'
@@ -106,23 +106,23 @@ module Delphix
106
106
  end
107
107
 
108
108
  def self.session
109
- Delphix.default_header(:cookies, cookies)
109
+ Delphix.default_header('Cookie', cookie)
110
110
  @session ||= login(@api_user, @api_passwd)
111
111
  end
112
112
 
113
113
  # Establish a session with the Delphix engine and return an identifier
114
- # through browser cookies. This session will be reused in subsequent calls,
114
+ # through browser cookie. This session will be reused in subsequent calls,
115
115
  # the same session credentials and state are preserved without requiring a
116
116
  # re-authentication call. Sessions do not persisit between incovations.
117
117
  #
118
- # @return [Hash] cookies
119
- # containing the new session cookies
118
+ # @return [Hash] cookie
119
+ # containing the new session cookie
120
120
  #
121
121
  # @api public
122
- def self.cookies
122
+ def self.cookie
123
123
  @resp ||= Delphix.post session_url,
124
124
  type: 'APISession', version: @api_version
125
- @resp.cookies
125
+ @resp.cookie
126
126
  end
127
127
 
128
128
  # Authenticates the session so that API calls can be made. Only supports basic
@@ -27,7 +27,7 @@ module Delphix
27
27
  module Version
28
28
  MAJOR = 0
29
29
  MINOR = 2
30
- PATCH = 3
30
+ PATCH = 4
31
31
 
32
32
  # Returns a version string by joining MAJOR, MINOR, and PATCH with '.'
33
33
  #
@@ -42,22 +42,22 @@ module Delphix
42
42
  # @return [#headers]
43
43
  attr_reader :headers
44
44
  # @!attribute [r] method
45
- # The current session cookies.
45
+ # The current session cookie.
46
46
  # @return [#raw_body]
47
- attr_reader :cookies
47
+ attr_reader :cookie
48
48
 
49
49
  def initialize(response)
50
50
  @code = response.code
51
51
  @headers = response.headers
52
52
  @raw_body = response
53
53
  @body = @raw_body
54
- @cookies = response.cookies
54
+ @cookie = response.cookie
55
55
 
56
56
  Delphix.last_response = {
57
57
  code: response.code,
58
58
  headers: response.headers,
59
59
  body: JSON.parse(response.body),
60
- cookies: response.cookies,
60
+ cookie: response.cookie,
61
61
  description: response.description
62
62
  }.recursively_normalize_keys
63
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delphix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Harding