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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cedfa421e0893f1fb8ece12bd133929b75107c85
4
- data.tar.gz: d2de51edd47f047a7244efa188e406b237ea964d
3
+ metadata.gz: f7ed5ff7c85420c6a64056f16eb8c0be453f5c55
4
+ data.tar.gz: 78f10e0fcb464325ed9a6054ad006388c2136bee
5
5
  SHA512:
6
- metadata.gz: 9c22c7e3ed1751a8863519d5b02563db53b47f939e6a9bfa39e87fb1a2453d2e16cc2d207da897b3dcc94274c0fe3c664b504bbf95bd0ad639acd4c9924a5824
7
- data.tar.gz: 2f6c08a6f4643ba3b5c78c588d235fb6490fb7beeba556b7c2790b647a3b296d17e942235c613427a17e5354896e094550eecb69aa968c6110a572df403e0cf5
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
- lgr = Logging.logger(STDOUT)
81
- lgr.level = (@log_level || :error)
82
- lgr
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
@@ -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.debug "#{method} Request to #{path}\n#{options.inspect}"
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)
@@ -1,5 +1,5 @@
1
1
  # This is the main rentlinx module. All Rentlinx objects
2
2
  # and methods are namespaced under this module.
3
3
  module Rentlinx
4
- VERSION = '0.9.1'
4
+ VERSION = '0.9.2'
5
5
  end
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.1
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-02 00:00:00.000000000 Z
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.8
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: