loco_bill 0.0.7 → 0.0.8

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.
Files changed (2) hide show
  1. data/lib/loco_bill/request.rb +4 -0
  2. metadata +3 -3
@@ -102,6 +102,10 @@ module LocoBill
102
102
 
103
103
  if res[:status] == 'OK'
104
104
  RequestResult.new(res)
105
+ elsif res[:loginresult] && res[:loginresult]["status"] == "failed" && res[:loginresult]["errormessage"] == "Invalid Session"
106
+ # stale session, relogin + try again
107
+ LocoBill::Configuration.session_id = LocoBill.login.result.sessionId
108
+ api(original_request)
105
109
  else
106
110
  HoptoadNotifier.notify(
107
111
  :error_class => "LocoBill::RequestError",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - chris mcc
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-08 00:00:00 +00:00
17
+ date: 2010-07-09 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency