vivialconnect 0.0.2 → 0.0.3

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: 9e65db123633edbb42c7bb154aaa83b71074e126
4
- data.tar.gz: a1e4578831432c28d121f12ea6a5f0f0bc078d39
3
+ metadata.gz: 7a7d93e83e8aae2ecf57e49bc6a1f49fe9b3ab08
4
+ data.tar.gz: 8d2e9c0c671891afa9fd47071bba01d247a86d9e
5
5
  SHA512:
6
- metadata.gz: 3e338e4bbd2d960f563717311b10c21b4ef10c9c1f55ff80c3805917c7574779fb700da2e4d1df0c6495db5dcd178ab4e22ad7ad95db21ef72149d40ca53d97f
7
- data.tar.gz: 1dd0267470a00d5861c7d122cdd6e8bf311f0e7f5c54819e5052be5736232b00ce413c1f013249b18924a5ccd14cdc02d61a0862db479846a5ffd77b47fb31aa
6
+ metadata.gz: b21028a598b2995a20af3d93c7e4aa112291a166a90bfe1005d161bc09e331a927c8b06fa63a7ee81afca5c63a8ae428803370db1760f9cce0d8d3efa527e325
7
+ data.tar.gz: aa13d775ddd7d6d738f3a0b72beb45bb6299eb55bea6ac3a3ced5c47d945c90768100e4a250c1920b3f872783253cfc7dd11c6d408b190ab25a2e7ebf6395125
@@ -69,14 +69,6 @@ module VivialConnect
69
69
 
70
70
  @@configured = false
71
71
 
72
- def initialize
73
- begin
74
- @base_api_path = host + "#{api_version}/"
75
- rescue NameError => e
76
- raise VivialConnectClientError, "Please configure client before making requests. You can do this like so: .configure(api_key, api_secret, account_id) to "
77
- end
78
- end
79
-
80
72
  def self.configure(api_key, api_secret, account_id, host="https://api.vivialconnect.net/api/", api_version="v1.0" )
81
73
  @@api_key= api_key
82
74
  @@api_secret = api_secret
@@ -104,6 +96,10 @@ module VivialConnect
104
96
  @@host
105
97
  end
106
98
 
99
+ def set_host(host)
100
+ @@host = host
101
+ end
102
+
107
103
  def account_id
108
104
  @@account_id
109
105
  end
@@ -113,9 +109,11 @@ module VivialConnect
113
109
  end
114
110
 
115
111
  def reset_api_base_path(new_host, new_api_version)
116
- @base_api_path = new_host + "#{new_api_version}/"
117
- connection
118
- true
112
+ set_host(new_host)
113
+ set_api_version(new_api_version)
114
+ @base_api_path = host + api_version
115
+ connection
116
+ true
119
117
  end
120
118
 
121
119
 
@@ -123,8 +121,12 @@ module VivialConnect
123
121
  @@api_version
124
122
  end
125
123
 
124
+ def set_api_version(api_version)
125
+ @@api_version = api_version
126
+ end
127
+
126
128
  def base_api_path
127
- @base_api_path
129
+ @base_api_path = host + "#{api_version}/"
128
130
  end
129
131
 
130
132
  def self.configured?
@@ -1,3 +1,3 @@
1
1
  module Vivialconnect # :nodoc:
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vivialconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin LeFurjah
8
8
  autorequire:
9
9
  bindir: exe
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: faraday