rentlinx 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rentlinx.rb +7 -4
- data/lib/rentlinx/client.rb +2 -1
- data/lib/rentlinx/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7ed5ff7c85420c6a64056f16eb8c0be453f5c55
|
4
|
+
data.tar.gz: 78f10e0fcb464325ed9a6054ad006388c2136bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb2c09a3a2888959e63d3a2026f499fa8118c73e5aa34eeeaaf6c35fe7bce5ec9adddfa83f3556ebaffc4438eadabe52767d64a50f894cb12d40188debb54b3e
|
7
|
+
data.tar.gz: a71d96fa5e04166e0f9181a62375631b840369d97557be03f6c819795e30ccd28e3171e5cc81e19f4b11ea5d1e18f3398d5c67feb367aa5f14c1aef8e3fe97f4
|
data/lib/rentlinx.rb
CHANGED
@@ -76,10 +76,13 @@ module Rentlinx
|
|
76
76
|
end
|
77
77
|
|
78
78
|
# The logger object
|
79
|
-
def logger
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
def logger(*args)
|
80
|
+
if args.empty?
|
81
|
+
@logger ||= Logging.logger(STDOUT)
|
82
|
+
@logger
|
83
|
+
else
|
84
|
+
@logger = args.first
|
85
|
+
end
|
83
86
|
end
|
84
87
|
end
|
85
88
|
end
|
data/lib/rentlinx/client.rb
CHANGED
@@ -108,12 +108,13 @@ module Rentlinx
|
|
108
108
|
|
109
109
|
def request(method, path, data = nil)
|
110
110
|
options = { body: data.to_json, header: authenticated_headers }
|
111
|
-
Rentlinx.logger.
|
111
|
+
Rentlinx.logger.info "#{method} Request to Rentlinx: #{path}\n#{options.inspect}"
|
112
112
|
response = session.request(method, URI.join(@url_prefix, path), options)
|
113
113
|
response_handler(response)
|
114
114
|
end
|
115
115
|
|
116
116
|
def response_handler(response)
|
117
|
+
Rentlinx.logger.info "#{response.status} Response from Rentlinx:\n#{response.inspect}"
|
117
118
|
case response.status
|
118
119
|
when 200, 201, 202
|
119
120
|
JSON.parse(response.body)
|
data/lib/rentlinx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rentlinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -124,8 +124,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.4.
|
127
|
+
rubygems_version: 2.4.3
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: API Wrapper for the Rentlinx API
|
131
131
|
test_files: []
|
132
|
+
has_rdoc:
|