connect_wise_rest 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.travis.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/connect_wise_rest.gemspec +0 -0
- data/lib/connect_wise_rest/client.rb +10 -3
- data/lib/connect_wise_rest/configuration.rb +3 -1
- data/lib/connect_wise_rest/report.rb +0 -0
- data/lib/connect_wise_rest/version.rb +1 -1
- data/lib/connect_wise_rest.rb +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c3f8a3959e75abf08881226e4d4c2a38ff8958
|
4
|
+
data.tar.gz: 75b82e684a3eaad75b3622dbe2bec4bfac9f5197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 811e3746a8c179e3008616fc7e2cb975f0a854c73e8a28003211e7c2fe8a03e5324703232a7c9c808d2e47bc8b36270a4d298e89cc3fbec023525ae653fd37a5
|
7
|
+
data.tar.gz: c5c02793f8a4a77fab42d8885582624d6fc312d629149b3bede83e9ed32400e6d02b7f5af7f8ddeea4e0ffa13fccfc359f89f4709364183c1615ed82b0ba5240
|
data/.gitignore
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/connect_wise_rest.gemspec
CHANGED
File without changes
|
@@ -34,8 +34,11 @@ module ConnectWiseRest
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def response
|
37
|
-
@response ||= HTTParty.get(
|
38
|
-
|
37
|
+
@response ||= HTTParty.get(url, request_options)
|
38
|
+
end
|
39
|
+
|
40
|
+
def request_options
|
41
|
+
request_options = {
|
39
42
|
headers: { 'Accept' => 'application/json' },
|
40
43
|
query: self.options[:query],
|
41
44
|
timeout: options[:timeout],
|
@@ -43,7 +46,11 @@ module ConnectWiseRest
|
|
43
46
|
username: "#{options[:company_id]}+#{options[:public_key]}",
|
44
47
|
password: options[:private_key]
|
45
48
|
}
|
46
|
-
|
49
|
+
}
|
50
|
+
|
51
|
+
request_options[:debug_output] = options[:logger] if options[:debug] && options[:logger]
|
52
|
+
|
53
|
+
request_options
|
47
54
|
end
|
48
55
|
|
49
56
|
def url
|
@@ -13,10 +13,12 @@ module ConnectWiseRest
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class Configuration
|
16
|
-
attr_accessor :company_id, :private_key, :public_key, :url_prefix, :version
|
16
|
+
attr_accessor :company_id, :private_key, :public_key, :url_prefix, :version, :debug, :logger
|
17
17
|
|
18
18
|
def initialize
|
19
19
|
@version = '3.0'
|
20
|
+
@debug = false
|
21
|
+
@logger = $stdout
|
20
22
|
end
|
21
23
|
|
22
24
|
def set(options = {})
|
File without changes
|
data/lib/connect_wise_rest.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect_wise_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Pheasey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|