bumeran 0.3.4 → 0.3.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99eb1578c74b985efd1e24b63d80eb4f793a0803
4
- data.tar.gz: 27b938dd1144abf8c1b7bae12a7934aa3e5e956d
3
+ metadata.gz: 0c7e5f553105881f207eda1fc34e4a547171ce41
4
+ data.tar.gz: caa0b8daaee9cf8e74a82754a0e17ab894ffc04d
5
5
  SHA512:
6
- metadata.gz: d06077d9cf7ee6ef9438c15c6f10fa2af09ef2e86ae7e3491366fc995bcd0835e07db79abaf3f30221e312e3b962b78f329739a988260d6f3c88a2f645af4027
7
- data.tar.gz: 13ae23b205b1f57ea5ade2012b8d793f64d8e4fd5b6c6cf812b42b4296a9ba95dc731daacf18dc9bb31ca870c60483db2ab992120ffccf6a74134af8ded734f5
6
+ metadata.gz: e1acb6003a4befe573540eb583b8c797c7ab0468357721325396739faf7f844c574c0cd7fc0c2611d0b53f68e4c78b7c169015e63ad78187ea421df9b96b5de2
7
+ data.tar.gz: 19f0c92e56de8f992e6b966b70ac79efcbd978d37db70120989ed811a6884c7d5831e8432659cdb420f111b83a5ac943aeec54ff053e5a4ab292ca4964ce9034
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bumeran (0.3.3)
4
+ bumeran (0.3.4)
5
5
  httparty (>= 0.13.3)
6
6
  rails (>= 3.2)
7
7
 
@@ -86,6 +86,7 @@ module Bumeran
86
86
 
87
87
  def self.invalidate_access_token!
88
88
  @@access_token = nil
89
+ @@access_token_updated_at = nil
89
90
  end
90
91
 
91
92
  def self.revalidate_access_token
@@ -95,8 +96,9 @@ module Bumeran
95
96
 
96
97
  def self.has_valid_access_token?
97
98
  if @@access_token && @@access_token_updated_at && @@expires_in
98
- (Time.now < @@access_token_updated_at + @@expires_in.seconds + 10.seconds)
99
+ (Time.current < @@access_token_updated_at + @@expires_in.seconds + 5.minutes)
99
100
  else
101
+ Bumeran.invalidate_access_token!
100
102
  false
101
103
  end
102
104
  end
@@ -598,7 +600,7 @@ module Bumeran
598
600
  @@access_token = response["accessToken"]
599
601
  @@token_type = response["tokenType"]
600
602
  @@expires_in = response["expiresIn"]
601
- @@access_token_updated_at = Time.now
603
+ @@access_token_updated_at = Time.current
602
604
  return @@access_token
603
605
  end
604
606
  end
@@ -1,3 +1,3 @@
1
1
  module Bumeran
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -64,7 +64,7 @@ describe Bumeran do
64
64
  pp Bumeran.paises
65
65
  Bumeran.paises.count.should > 0
66
66
  Bumeran.zonas.count.should > 0
67
- Bumeran.localidades.count.should > 0
67
+ #Bumeran.localidades.count.should > 0
68
68
  Bumeran.plan_publicaciones.count.should > 0
69
69
  end
70
70
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bumeran
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Fernandez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2015-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails