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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7be8e566c1e544001d782863b9c02f9f27687315
4
- data.tar.gz: e6413398a050073b4c9134b1566113782f5491ef
3
+ metadata.gz: f0a9039bb3c095c415031ea3a094ac0769e7b677
4
+ data.tar.gz: e53ee524ff536c00b35a4bc8fe70d3537be3c5ca
5
5
  SHA512:
6
- metadata.gz: 7b38b7ab6b0a6be82453323531b0af81e2d30ff805a3cdd49ad83fb1609a6c0f92034cacc8156b4d87f1b615cc195e8b9d3c797e4d75a5ed5bfd141ef8121289
7
- data.tar.gz: 5462cca55186f6ceb204956d165f8c311365a650546640dda9f006dcc26b63f163d48086479237652adf6242d8883ae13b49b2866387869fe82f8f7cb4a2d6fa
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
@@ -1,3 +1,3 @@
1
1
  module Bouncer
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
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.6
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-01 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday