delphix 0.4.0 → 0.4.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: c2512981cc4075fb95b65652f26273053d430dbd
4
- data.tar.gz: 499f97d8cb56b7a58ea1ae68cbf716a5ff97a4b8
3
+ metadata.gz: 23b2e0d907e84294f429d51c4ae47b69becb0cfd
4
+ data.tar.gz: 5015f1056aa5fc815ebc81f1e888c5d6654ce067
5
5
  SHA512:
6
- metadata.gz: 8f6572b368ce8cc4aa68907361417e08e6cf16e82849b723dce1a056d3e252a3d751e35b0cbf65bd349bd2b78fbead4dd37609be469ce05adb992076a79009f3
7
- data.tar.gz: 372545bd4756bd75d25a680552a58272f7ffb8d32161556ca68d4f3047e211cfe1c66493ad873281f05be47dd0194a079457b39513e2a37e50e9d6f4037e2998
6
+ metadata.gz: d8c15024e86599f509f40c363ca642a30eb3bd03392395de56bdde1be4423c8ffe50a77d2f1835f7e605bb95ebbac2f8b2035fc30a1dadbb35db2e4985d95a1b
7
+ data.tar.gz: 800d8f6c4d1085a288392f0d4c09bef74829a43ad0427ad27f95eb59a3ec9d490d33227f95a304cd4b9023932dd8aebad7d2c46d5a95b66fc231558c0df8e567
@@ -52,8 +52,9 @@ module Delphix
52
52
 
53
53
  API_ENDPOINT = '/resources/json/delphix'
54
54
  HTTP_HEADERS = {
55
+ 'Accept' => 'application/json; charset=UTF-8',
55
56
  'Content-Type' => 'application/json; charset=UTF-8',
56
- 'User-Agent' => 'Delphix-Ruby-Client/' + Delphix::VERSION
57
+ 'User-Agent' => 'Delphix-Ruby-Client/1.0.0'
57
58
  }
58
59
 
59
60
  # Default timeout value in seconds.
@@ -76,6 +77,9 @@ module Delphix
76
77
  # @return [#body] parsed response body
77
78
  # @return [#raw_body] un-parsed response body
78
79
  attr_accessor :session
80
+ # @!attribute [rw] api_version
81
+ # @return [Hash] containing the major, minor and micro version numbers.
82
+ attr_accessor :api_version
79
83
  # @!attribute [rw] server
80
84
  # @return [String] Delphix server address
81
85
  attr_accessor :server
@@ -85,33 +89,11 @@ module Delphix
85
89
  # @!attribute [rw] api_passwd
86
90
  # @return [String] password for authentication
87
91
  attr_accessor :api_passwd
92
+ # @!attribute [rw] verbose
93
+ # @return [Nothing] enables verbosity
94
+ attr_accessor :verbose
88
95
  end
89
96
 
90
- # Defines custom setter that takes a string, splits on the `.` and setting
91
- # the major, minor and micro versions.
92
- #
93
- # @param [String] name
94
- # Name of the setter
95
- #
96
- # @param [String] version
97
- # The version number, i.e. '1.2.3'
98
- #
99
- # @return [undefined]
100
- #
101
- def self.version_accessor(name, version = nil)
102
- define_singleton_method("#{name}=") do |version|
103
- instance_variable_set("@#{name}",
104
- [:major, :minor, :micro].zip(version.split('.')).inject({}) {
105
- |r, i| r[i[0]] = i[1]; r
106
- }.merge(type: 'APIVersion')
107
- )
108
- end
109
- end
110
-
111
- # @!attribute [rw] api_version
112
- # @return [Hash] containing the major, minor and micro version numbers.
113
- self.version_accessor :api_version
114
-
115
97
  # Returns the API endpoint for a given resource namespace by combining the
116
98
  # server address with the appropriate HTTP headers.
117
99
  #
@@ -124,11 +106,6 @@ module Delphix
124
106
  'http://' + @server + resource
125
107
  end
126
108
 
127
- # Initiate a session with the Delphix appliance, get our cookies for the
128
- # duration of this exchange.
129
- #
130
- # @return [undefined]
131
- #
132
109
  def self.session
133
110
  Delphix.default_header(:cookies, cookies)
134
111
  @session ||= login(@api_user, @api_passwd)
@@ -27,7 +27,7 @@ module Delphix
27
27
  module Version
28
28
  MAJOR = 0
29
29
  MINOR = 4
30
- PATCH = 0
30
+ PATCH = 1
31
31
 
32
32
  # Returns a version string by joining MAJOR, MINOR, and PATCH with '.'
33
33
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delphix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Harding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hoodie