rentlinx 0.11.1 → 0.11.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 +6 -0
- data/lib/rentlinx/client.rb +2 -2
- data/lib/rentlinx/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a61207e3a6bba3e4cebb42771ad666957d26ca
|
4
|
+
data.tar.gz: 00fc1061566b9e5822459cd9a08c6b1bdbc711a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bd2b1218d792c681d4489bf4b1b21c9ac2ba64a30d041bd5fd240714f8515138546212acd6b6d707795cffd06cc1e7925ad88e5ab4a6ab444f0e72be02ac236
|
7
|
+
data.tar.gz: 236418f01905843189355a5f8742e0596e7651fbbe1a651ecb6c22ed5f22924a8a5bcdacd8876abbc48d994c72cecdf9479c7a5e8eb5f4cc531e8a2ad9845c95
|
data/lib/rentlinx.rb
CHANGED
@@ -86,5 +86,11 @@ module Rentlinx
|
|
86
86
|
@logger = args.first
|
87
87
|
end
|
88
88
|
end
|
89
|
+
|
90
|
+
# Write to the log with filtered output
|
91
|
+
def log(message)
|
92
|
+
message = message.gsub(Rentlinx.username, '<filtered_username>').gsub(Rentlinx.password, '<filtered_password>')
|
93
|
+
Rentlinx.logger.info message
|
94
|
+
end
|
89
95
|
end
|
90
96
|
end
|
data/lib/rentlinx/client.rb
CHANGED
@@ -135,13 +135,13 @@ module Rentlinx
|
|
135
135
|
|
136
136
|
def request(method, path, data = nil)
|
137
137
|
options = { body: data.to_json, header: authenticated_headers }
|
138
|
-
Rentlinx.
|
138
|
+
Rentlinx.log "#{method} Request to Rentlinx: #{path}\n#{options.inspect}"
|
139
139
|
response = session.request(method, URI.join(@url_prefix, path), options)
|
140
140
|
response_handler(response)
|
141
141
|
end
|
142
142
|
|
143
143
|
def response_handler(response)
|
144
|
-
Rentlinx.
|
144
|
+
Rentlinx.log "#{response.status} Response from Rentlinx:\n#{response.inspect}"
|
145
145
|
case response.status
|
146
146
|
when 200, 201, 202
|
147
147
|
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.11.
|
4
|
+
version: 0.11.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: 2017-
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -116,9 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.4.
|
119
|
+
rubygems_version: 2.4.8
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: API Wrapper for the Rentlinx API
|
123
123
|
test_files: []
|
124
|
-
has_rdoc:
|