bouncer-client 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bouncer-client/device.rb +2 -1
- data/lib/bouncer-client/test_helpers.rb +2 -1
- data/lib/bouncer-client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0a9039bb3c095c415031ea3a094ac0769e7b677
|
4
|
+
data.tar.gz: e53ee524ff536c00b35a4bc8fe70d3537be3c5ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee4ee869c80b8bdbc8af55689898956c3c38be9046b3a0211e23026051b778679a042e65cdd7774493240e41dd2d37c964448596d0e5581ff90d544c82dfd6a4
|
7
|
+
data.tar.gz: 197d7ff37788d71c561f3e89ba0475c96f09ed13790dcc891d7e1f005da680ae88f0d62216098f07e417703ab9b918dc662efd5c975b79773cdb8b9ce23a07ae
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Bouncer
|
2
2
|
class Device
|
3
|
-
attr_accessor :id, :created_at
|
3
|
+
attr_accessor :id, :created_at, :serial
|
4
4
|
def self.from_json json
|
5
5
|
device = Device.new
|
6
6
|
device.id = json['id']
|
7
|
+
device.serial = json['serial']
|
7
8
|
device.created_at = json['created_at']
|
8
9
|
device
|
9
10
|
end
|
@@ -20,10 +20,11 @@ module Bouncer
|
|
20
20
|
device_token id
|
21
21
|
end
|
22
22
|
|
23
|
-
def device_token id = SecureRandom.uuid
|
23
|
+
def device_token id = SecureRandom.uuid, serial = SecureRandom.hex(4)
|
24
24
|
token = valid_token
|
25
25
|
device = double("Bouncer::Device")
|
26
26
|
allow(device).to receive(:id).and_return(id)
|
27
|
+
allow(device).to receive(:serial).and_return(serial)
|
27
28
|
allow(token).to receive(:device?).and_return(true)
|
28
29
|
allow(token).to receive(:device).and_return(device)
|
29
30
|
token
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bouncer-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurt Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|