rxg_client 0.0.2 → 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxg_client.rb +5 -12
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68761d8e4d49bbe48b4371ea2d9d3c70cd3aac75
4
- data.tar.gz: b45bc993937e321af2f95061985e0b2ae6ad1f1f
3
+ metadata.gz: e7faddbac99675ec4042eb40ac013e70aa005c98
4
+ data.tar.gz: 36edf972b42b8012e37b6dc04b828952bbe1e074
5
5
  SHA512:
6
- metadata.gz: 0892a54598001398d715d0c066812fb322155dec90dc93f8530cd80f8b397316894e955c4e79cc814cbc4786e17736499a1d5f5277f1cda46daec97c1f78a7aa
7
- data.tar.gz: 4713ef391b5f1f65c2cf386b6b0a243be0541793a4f7f53dfc38a02d5133b65c96be27df88af48cbda7f6ba4543f6a1376c9c3bc8cb267d1e63013bc73472a99
6
+ metadata.gz: b1626b8e2375bb84512059f249caaf7bd3b386be98c18f69ca49378b43a2ebc7aeaae4cfd2d2f092e108a734e74554ac2d2cb9ad3dbdd29707b08efbb14ee8f7
7
+ data.tar.gz: be0004f6d585196a0f6d61e99001f79cdb020114130b581ccd786f622bcc97396222e59bd5d944d6bfd3d047cbc22124dcf3cfdddce508c8ff59de14fe7edffc
data/lib/rxg_client.rb CHANGED
@@ -11,28 +11,21 @@ class RxgClient
11
11
  @request_format = requested_format
12
12
  end
13
13
 
14
- def initialize(hostname, api_key, options = { })
15
- # Valid options:
16
- # :request_format => :json or :xml
17
- # :default_timeout => timeout in seconds
18
- # :raise_exceptions => true or false
19
- # :verify_ssl => true or false
14
+ def initialize(hostname, api_key, request_format: :json, default_timeout: 5, raise_exceptions: false, verify_ssl: false)
20
15
 
21
16
  self.api_key = api_key
22
17
 
23
- self.request_format = options[:request_format] ? options[:request_format].to_sym : :json
18
+ self.request_format = request_format.to_sym
24
19
  self.class.format self.request_format
25
20
 
26
21
  self.hostname = hostname
27
22
  self.class.base_uri "https://#{self.hostname}/admin/scaffolds"
28
23
 
29
- self.class.default_timeout options[:timeout] || 5
24
+ self.class.default_timeout default_timeout
30
25
 
31
- self.raise_exceptions = options[:raise_exceptions] || false
26
+ self.raise_exceptions = raise_exceptions
32
27
 
33
- if defined?(options[:verify_ssl])
34
- self.class.default_options.update(verify: options[:verify_ssl])
35
- end
28
+ self.class.default_options.update(verify: verify_ssl)
36
29
  end
37
30
 
38
31
  def auth
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxg_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lannar Dean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -25,14 +25,14 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.0
27
27
  description: A simple CRUDE (Create, Read, Update, Delete, Execute) client to interface
28
- with the RXG's API
28
+ with the rXg's API
29
29
  email: ldd@rgnets.com
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - lib/rxg_client.rb
35
- homepage: https://github.com/moracca/rxg_client
35
+ homepage: https://github.com/rgnets/rxg_client
36
36
  licenses:
37
37
  - MIT
38
38
  metadata: {}