lockitron 1.1 → 2.0

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: b4c7a6e2c137b6f821d26d8a16bb7b6eee4b6be2
4
- data.tar.gz: 4331c29fc8680da98373b083deb8135b46e4c700
3
+ metadata.gz: 9a5da39938675e6e01bfdbdd2c8ec7eea267ddbb
4
+ data.tar.gz: 45d4160f497b61cbf5f3c127425f4b9894e6d178
5
5
  SHA512:
6
- metadata.gz: 455f7f83a66479a2568aa266271bfc651183d0099656e9dd54a86a311170c4038881b8ad89f0ddbad6830c47fefc4179f871a82811324191a1de006eb91a61c5
7
- data.tar.gz: c85214afe9b8d745da08155179ab7360532e22a442cd169c1acce42f72cf36e412a2f1ed9bfb5281453a9e5e7e8959475fd41aa35a63c19ec79ba549e63d3d5b
6
+ metadata.gz: 8c0bcb54ce7ff529c0fdf9e0e1b64fec3d3206bd5f264c47b48de989bf4b6360af417a832130063673daf5c42023a063f3570300f636da1f38e224e4e8a60af6
7
+ data.tar.gz: 812d0f62342efe320a5cb69d353ff3ce38f21c27aaa5d1c42340d0b79c73b2c0e3a648a8fd06d8fb3697ba73c72e3ddbf91a367836c4a4a65ed7e9a66f565a6a
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.2.2
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.2.2
5
6
  script: rspec spec
@@ -3,5 +3,5 @@ require 'lockitron/auth'
3
3
  require 'lockitron/user'
4
4
 
5
5
  module Lockitron
6
- API_ENDPOINT = "https://api.lockitron.com/v1"
6
+ API_ENDPOINT = "https://api.lockitron.com/v2"
7
7
  end
@@ -6,7 +6,7 @@ module Lockitron
6
6
  @client_secret = params[:client_secret]
7
7
  @redirect_uri = params[:redirect_uri]
8
8
  @oauth_client = OAuth2::Client.new(@client_id, @client_secret, site: API_ENDPOINT)
9
- @oauth_client.options[:token_url] = "/v1/oauth/token"
9
+ @oauth_client.options[:token_url] = "/v2/oauth/token"
10
10
  end
11
11
 
12
12
  def token_from_code auth_code
@@ -85,11 +85,11 @@ module Lockitron
85
85
  def refresh
86
86
  require_user
87
87
  lock = @user.get "locks/#{@uuid}"
88
- @name = lock['lock']['name']
89
- @status = lock['lock']['status']
90
- @latitude = lock['lock']['latitude']
91
- @longitude = lock['lock']['longitude']
92
- @keys = lock['lock']['keys']
88
+ @name = lock['name']
89
+ @status = lock['status']
90
+ @latitude = lock['latitude']
91
+ @longitude = lock['longitude']
92
+ @keys = lock['keys']
93
93
  end
94
94
 
95
95
  # Invites a user to this lock.
@@ -105,7 +105,6 @@ module Lockitron
105
105
  # @return [Hash] API response
106
106
  def invite(params={})
107
107
  require_user
108
- params[:role] ||= 'guest'
109
108
  raise InvalidArgument, "Phone or email required" unless params[:email] or params[:phone]
110
109
  if params[:start]
111
110
  params[:start] = params[:start].to_i
@@ -113,7 +112,7 @@ module Lockitron
113
112
  params[:start] = Time.now.to_i
114
113
  end
115
114
  params[:expiration] = params[:expiration].to_i if params[:expiration]
116
- @user.post "locks/#{@uuid}/add", params
115
+ @user.post "locks/#{@uuid}/keys", params
117
116
  end
118
117
 
119
118
  private
@@ -9,7 +9,7 @@ module Lockitron
9
9
  end
10
10
 
11
11
  def locks
12
- get('locks').map {|lock| Lockitron::Lock.from_json lock['lock']}
12
+ get('locks').map {|lock| Lockitron::Lock.from_json lock}
13
13
  end
14
14
 
15
15
  def get action
@@ -26,7 +26,7 @@ module Lockitron
26
26
  private
27
27
  def process resp
28
28
  raise AuthorizationError if resp.status == 403
29
- raise ApiError, "Bad API Request: #{resp.status}" unless resp.status == 200
29
+ raise ApiError, "Bad API Request: #{resp.status}" unless resp.status >= 200 && resp.status < 300
30
30
  JSON.parse resp.body
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module Lockitron
2
- VERSION = "1.1"
2
+ VERSION = "2.0"
3
3
  end
@@ -25,15 +25,15 @@ Gem::Specification.new do |s|
25
25
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
26
26
  s.require_paths = ["lib"]
27
27
 
28
- s.add_dependency 'faraday'
29
- s.add_dependency 'oauth2'
30
- s.add_development_dependency 'rspec'
31
- s.add_development_dependency 'rdoc'
32
- s.add_development_dependency 'bundler'
33
- s.add_development_dependency 'dotenv'
34
- s.add_development_dependency 'coveralls'
35
- s.add_development_dependency 'pry'
36
- s.add_development_dependency 'vcr'
37
- s.add_development_dependency 'webmock'
28
+ s.add_dependency 'faraday', '~> 0.9'
29
+ s.add_dependency 'oauth2', '~> 1.0'
30
+ s.add_development_dependency 'rspec', '~> 0'
31
+ s.add_development_dependency 'rdoc', '~> 4.2'
32
+ s.add_development_dependency 'bundler', '~> 1.10'
33
+ s.add_development_dependency 'dotenv', '~> 0'
34
+ s.add_development_dependency 'coveralls', '~> 0'
35
+ s.add_development_dependency 'pry', '~> 0'
36
+ s.add_development_dependency 'vcr', '~> 0'
37
+ s.add_development_dependency 'webmock', '~> 0'
38
38
  end
39
39
 
@@ -2,23 +2,23 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.lockitron.com/v1/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/add
5
+ uri: https://api.lockitron.com/v2/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/keys
6
6
  body:
7
- encoding: US-ASCII
8
- string: email=someone%40example.com&role=guest&start=1388345498&access_token=<OAUTH_TOKEN>
7
+ encoding: UTF-8
8
+ string: access_token=<OAUTH_TOKEN>&email=someone%40example.com&start=1436383927
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.8
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
14
  Accept-Encoding:
15
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
16
  Accept:
17
- - '*/*'
17
+ - "*/*"
18
18
  response:
19
19
  status:
20
- code: 200
21
- message: OK
20
+ code: 201
21
+ message: Created
22
22
  headers:
23
23
  Content-Type:
24
24
  - application/json; charset=utf-8
@@ -27,20 +27,19 @@ http_interactions:
27
27
  Connection:
28
28
  - keep-alive
29
29
  Status:
30
- - 200 OK
30
+ - 201 Created
31
31
  X-Ua-Compatible:
32
32
  - IE=Edge,chrome=1
33
+ Etag:
34
+ - '"1bcf6d6f70f1484fad0121550cd63e25"'
33
35
  Cache-Control:
34
36
  - max-age=0, private, must-revalidate
35
- Set-Cookie:
36
- - sessitron=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTc3YzEyNGNhN2M4ZmEzYjg5MGY2M2RlOWJkMzVmYmMyBjsAVA%3D%3D--d76f6ebfa8c397267801cd9e083ac7d6166eeec0;
37
- domain=.lockitron.com; path=/; secure; HttpOnly
38
37
  X-Request-Id:
39
- - 0c8d8a0477f3bf5b5faf35250d7a7e31
38
+ - b5a61b9957e4c12aa8f762c23fdc3a37
40
39
  X-Runtime:
41
- - '0.495693'
40
+ - '0.072823'
42
41
  Date:
43
- - Sun, 29 Dec 2013 19:30:41 GMT
42
+ - Wed, 08 Jul 2015 19:32:04 GMT
44
43
  X-Rack-Cache:
45
44
  - invalidate, pass
46
45
  X-Powered-By:
@@ -51,28 +50,28 @@ http_interactions:
51
50
  - max-age=15768000
52
51
  body:
53
52
  encoding: UTF-8
54
- string: '{"id":"7f02c05a-b94d-4c5a-814e-3bb5a07603b9","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"41d0322d-b03d-4eef-935b-904e05831496","email":"someone@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone@example.com","activated":false}}'
53
+ string: '{"id":"7f02c05a-b94d-4c5a-814e-3bb5a07603b9","start_date":null,"expiration_date":null,"role":"guest","valid":true,"visible":true,"sms_pin":null,"access_key":null,"user":{"id":"41d0322d-b03d-4eef-935b-904e05831496","email":"someone@example.com","phone":null,"full_name":null,"first_name":null,"last_name":null,"activated":false,"changing_phone":false,"changing_email":false,"facebook":false,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}}'
55
54
  http_version:
56
- recorded_at: Sun, 29 Dec 2013 19:31:39 GMT
55
+ recorded_at: Wed, 08 Jul 2015 19:32:07 GMT
57
56
  - request:
58
57
  method: post
59
- uri: https://api.lockitron.com/v1/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/add
58
+ uri: https://api.lockitron.com/v2/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/keys
60
59
  body:
61
- encoding: US-ASCII
62
- string: email=someone2%40example.com&start=1388348699&role=guest&access_token=<OAUTH_TOKEN>
60
+ encoding: UTF-8
61
+ string: access_token=<OAUTH_TOKEN>&email=someone2%40example.com&start=1436387127
63
62
  headers:
64
63
  User-Agent:
65
- - Faraday v0.8.8
64
+ - Faraday v0.9.1
66
65
  Content-Type:
67
66
  - application/x-www-form-urlencoded
68
67
  Accept-Encoding:
69
68
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
70
69
  Accept:
71
- - '*/*'
70
+ - "*/*"
72
71
  response:
73
72
  status:
74
- code: 200
75
- message: OK
73
+ code: 201
74
+ message: Created
76
75
  headers:
77
76
  Content-Type:
78
77
  - application/json; charset=utf-8
@@ -81,20 +80,19 @@ http_interactions:
81
80
  Connection:
82
81
  - keep-alive
83
82
  Status:
84
- - 200 OK
83
+ - 201 Created
85
84
  X-Ua-Compatible:
86
85
  - IE=Edge,chrome=1
86
+ Etag:
87
+ - '"69dabdd81c8b7eb37102ce9b5b6b57c4"'
87
88
  Cache-Control:
88
89
  - max-age=0, private, must-revalidate
89
- Set-Cookie:
90
- - sessitron=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTI4NDJjYTlkNjMwMTFhNjgyYTIyYzg1MDQ1NmM1MjgxBjsAVA%3D%3D--8b33fe3268f893cebad820c2cc9c0896058013d0;
91
- domain=.lockitron.com; path=/; secure; HttpOnly
92
90
  X-Request-Id:
93
- - e386e983a043542c32869becdf20b685
91
+ - 5c46b0399b4e3e1d5beda94b3cbd51e4
94
92
  X-Runtime:
95
- - '0.332159'
93
+ - '0.184460'
96
94
  Date:
97
- - Sun, 29 Dec 2013 19:30:16 GMT
95
+ - Wed, 08 Jul 2015 19:32:04 GMT
98
96
  X-Rack-Cache:
99
97
  - invalidate, pass
100
98
  X-Powered-By:
@@ -105,7 +103,7 @@ http_interactions:
105
103
  - max-age=15768000
106
104
  body:
107
105
  encoding: UTF-8
108
- string: '{"id":"402d031d-21be-4442-9bbb-2ce07ccf84b0","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"40d877eb-03f4-4d66-b631-80f3d54fd832","email":"someone2@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone2@example.com","activated":false}}'
106
+ string: '{"id":"402d031d-21be-4442-9bbb-2ce07ccf84b0","start_date":null,"expiration_date":null,"role":"guest","valid":true,"visible":true,"sms_pin":null,"access_key":null,"user":{"id":"40d877eb-03f4-4d66-b631-80f3d54fd832","email":"someone2@example.com","phone":null,"full_name":null,"first_name":null,"last_name":null,"activated":false,"changing_phone":false,"changing_email":false,"facebook":false,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}}'
109
107
  http_version:
110
- recorded_at: Sun, 29 Dec 2013 19:31:40 GMT
111
- recorded_with: VCR 2.8.0
108
+ recorded_at: Wed, 08 Jul 2015 19:32:08 GMT
109
+ recorded_with: VCR 2.9.3
@@ -2,59 +2,82 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.lockitron.com/v1/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/lock
5
+ uri: https://api.lockitron.com/v2/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/lock
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: access_token=<OAUTH_TOKEN>
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.8
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
14
  Accept-Encoding:
15
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
16
  Accept:
17
- - '*/*'
17
+ - "*/*"
18
18
  response:
19
19
  status:
20
- code: 200
21
- message: OK
20
+ code: 404
21
+ message: Not Found
22
22
  headers:
23
23
  Content-Type:
24
- - application/json; charset=utf-8
24
+ - text/html; charset=utf-8
25
25
  Transfer-Encoding:
26
26
  - chunked
27
27
  Connection:
28
28
  - keep-alive
29
29
  Status:
30
- - 200 OK
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Cache-Control:
34
- - max-age=0, private, must-revalidate
35
- Set-Cookie:
36
- - sessitron=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTVhYzdmMzU4NTQ1ZTg2YTY1NTk5MGM3OTM1ZTFhMzQ5BjsAVA%3D%3D--abb92905ec4b80c26418d1fef76477fc2c567fd6;
37
- domain=.lockitron.com; path=/; secure; HttpOnly
30
+ - 404 Not Found
38
31
  X-Request-Id:
39
- - b3bc2308b1a2805b64db186dcc14dd7c
32
+ - 8a798328172b242e795c2b04854e8b26
40
33
  X-Runtime:
41
- - '0.066245'
34
+ - '0.004663'
42
35
  Date:
43
- - Sun, 29 Dec 2013 19:30:14 GMT
36
+ - Wed, 08 Jul 2015 19:12:42 GMT
44
37
  X-Rack-Cache:
45
38
  - invalidate, pass
46
39
  X-Powered-By:
47
40
  - Phusion Passenger 4.0.25
48
41
  Server:
49
42
  - nginx + Phusion Passenger 4.0.25
50
- Strict-Transport-Security:
51
- - max-age=15768000
52
43
  body:
53
- encoding: UTF-8
54
- string: '{"activity":{"id":"7e56603d-5759-477b-a251-294891cd7c17","lock_name":"Gem
55
- Test","lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","key_id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","outcome":false,"human_outcome":"notice","type":4,"human_type":"lock-updated-locked","performed_at":1388345414.55979,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
56
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
57
- Nelson","activated":true}}}'
44
+ encoding: ASCII-8BIT
45
+ string: "\n<!DOCTYPE html>\n<html>\n\n <head>\n <title>Lockitron</title>\n
46
+ \ <meta charset=\"UTF-8\" />\n <meta content=\"authenticity_token\" name=\"csrf-param\"
47
+ />\n <link href=\"/assets/dashboard/main.css?body=1\" media=\"screen\"
48
+ rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"/assets/dashboard/select2.css?body=1\"
49
+ media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- start
50
+ Mixpanel -->\n <script type=\"text/javascript\">\n (function(e,b){if(!b.__SV){var
51
+ a,f,i,g;window.mixpanel=b;a=e.createElement(\"script\");a.type=\"text/javascript\";a.async=!0;a.src=(\"https:\"===e.location.protocol?\"https:\":\"http:\")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName(\"script\")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function
52
+ f(b,h){var a=h.split(\".\");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var
53
+ c=b;\"undefined\"!==typeof d?c=b[d]=[]:d=\"mixpanel\";c.people=c.people||[];c.toString=function(b){var
54
+ a=\"mixpanel\";\"mixpanel\"!==d&&(a+=\".\"+d);b||(a+=\" (stub)\");return a};c.people.toString=function(){return
55
+ c.toString(1)+\".people (stub)\"};i=\"disable track track_pageview track_links
56
+ track_forms register register_once alias unregister identify name_tag set_config
57
+ people.set people.set_once people.increment people.append people.track_charge
58
+ people.clear_charges people.delete_user\".split(\" \");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);\n
59
+ \ mixpanel.init(\"3953b24fe21f828e4a0382f29f1b5c7d\");\n mixpanel.set_config({});\n
60
+ \ </script>\n <!-- end Mixpanel -->\n</head>\n\n <body>\n <header
61
+ id=\"main-header\">\n <div class=\"contents\">\n <h1><a target=\"_self\"
62
+ href=\"/\">Lockitron</a></h1>\n <nav>\n <ul>\n <li
63
+ ng-show='user'><a href=\"/dashboard/\">Locks</a></li>\n <li ng-show='user'><a
64
+ href=\"/dashboard/orders\">Orders</a></li>\n <li ng-show='user'><a
65
+ target=\"_self\" href=\"/faq\">Help</a></li>\n <li ng-hide='user'><a
66
+ href='/account/login'>Login</a></li>\n </ul>\n </nav>\n\n </div>\n</header><!--
67
+ /#main-header -->\n <section id=\"main-body\">\n <section class=\"content-body
68
+ error\" id=\"not_found\">\n <div class=\"contents\">\n \t<h1>Nothing
69
+ to see here</h1>\n \t<p>You may have mistyped the address or the page
70
+ may have moved. <br>Email us at <a href=\"mailto:support@lockitron.com?subject=I
71
+ found a broken link&body=I found a broken link while I was trying to: _______\">support@lockitron.com</a>
72
+ for some help.</p>\n <a href=\"http://lockitron.com/\" class=\"leave\">Take
73
+ me home</a>\n </div>\n </section>\n</section>\n <footer id=\"main-footer\">\n
74
+ \ <div class=\"contents\">\n <a href=\"/\" class=\"logo\">Lockitron</a>\n
75
+ \ <nav>\n <ul>\n <li><a href=\"/dashboard\">Locks</a></li>\n
76
+ \ <li><a href=\"/dashboard/account\">Settings</a></li>\n <li><a
77
+ href=\"/faq\">Faq</a></li>\n <li><a href=\"/preorder\">Order</a></li>\n
78
+ \ <li><a href=\"/about\">About</a></li>\n <li><a
79
+ href=\"http://blog.lockitron.com\">Blog</a></li>\n </ul>\n </nav>\n
80
+ \ </div>\n</footer><!-- /#main-footer -->\n </body>\n \n</html>\n"
58
81
  http_version:
59
- recorded_at: Sun, 29 Dec 2013 19:31:38 GMT
60
- recorded_with: VCR 2.8.0
82
+ recorded_at: Wed, 08 Jul 2015 19:12:46 GMT
83
+ recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.lockitron.com/v1/oauth/token
5
+ uri: https://api.lockitron.com/v2/oauth/token
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: grant_type=authorization_code&code=34c39703ee0215478642f01bfbdf0a824b872aa176e7310312e393a8c0639965&client_id=f0605493712611e3fd2e53b96b0b54836b11d1b05985cc1f908e7a149a7bf5c4&client_secret=<CLIENT_SECRET>&redirect_uri=http%3A%2F%2Flockitron.com
@@ -2,17 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.lockitron.com/v1/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f?access_token=<OAUTH_TOKEN>
5
+ uri: https://api.lockitron.com/v2/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f?access_token=<OAUTH_TOKEN>
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.8
11
+ - Faraday v0.9.1
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
15
- - '*/*'
15
+ - "*/*"
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -31,11 +31,11 @@ http_interactions:
31
31
  Cache-Control:
32
32
  - max-age=0, private, must-revalidate
33
33
  X-Request-Id:
34
- - bb7042dca734164b49969cad07cc49c9
34
+ - ae65b9ef4ab0575a33e4b702f646ceaf
35
35
  X-Runtime:
36
- - '0.038802'
36
+ - '0.089836'
37
37
  Date:
38
- - Sun, 29 Dec 2013 19:30:09 GMT
38
+ - Wed, 08 Jul 2015 19:12:45 GMT
39
39
  X-Rack-Cache:
40
40
  - miss
41
41
  X-Powered-By:
@@ -44,12 +44,13 @@ http_interactions:
44
44
  - nginx + Phusion Passenger 4.0.25
45
45
  Strict-Transport-Security:
46
46
  - max-age=15768000
47
+ X-Frame-Options:
48
+ - SAMEORIGIN
47
49
  body:
48
- encoding: UTF-8
49
- string: '{"lock":{"id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","status":"unlock","name":"Gem
50
- Test","latitude":null,"longitude":null,"keys":[{"id":"402d031d-21be-4442-9bbb-2ce07ccf84b0","start":-18864896400.0,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"40d877eb-03f4-4d66-b631-80f3d54fd832","email":"someone2@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone2@example.com","activated":false}},{"id":"7f02c05a-b94d-4c5a-814e-3bb5a07603b9","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"41d0322d-b03d-4eef-935b-904e05831496","email":"someone@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone@example.com","activated":false}},{"id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"owner","valid":true,"visible":true,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
51
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
52
- Nelson","activated":true}}]}}'
50
+ encoding: ASCII-8BIT
51
+ string: '{"id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","name":"Gem Test","next_wake":null,"last_heard_from":null,"state":"lock","button_type":"slider","updated_at":"2015-04-30T17:50:21Z","handedness":"unsupported","avr_version":"unsupported","battery_voltage":"unsupported","sleep_period":null,"avr_update_progress":null,"ble_update_progress":null,"serial_number":"WRLYO-TYPTR-PTKAT-UXBMQCQ","hardware_id":null,"connected":null,"time_zone":"US/Pacific","keys":[{"id":"fc3ddc9f-d093-4436-beda-81906f71a6e5","start_date":null,"expiration_date":null,"role":"guest","valid":true,"visible":true,"sms_pin":null,"access_key":null,"user":{"id":"00e191a6-190e-46bf-a0f1-b8718312da2c","email":"example@lockitron.com","phone":null,"full_name":"Example
52
+ User","first_name":"Example","last_name":"User","activated":false,"changing_phone":false,"changing_email":false,"facebook":false,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}},{"id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","start_date":null,"expiration_date":null,"role":"owner","valid":true,"visible":true,"sms_pin":"f244","access_key":null,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","full_name":"Kurt
53
+ Nelson","first_name":"Kurt","last_name":"Nelson","activated":true,"changing_phone":false,"changing_email":false,"facebook":true,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}}],"sms":false}'
53
54
  http_version:
54
- recorded_at: Sun, 29 Dec 2013 19:31:34 GMT
55
- recorded_with: VCR 2.8.0
55
+ recorded_at: Wed, 08 Jul 2015 19:12:45 GMT
56
+ recorded_with: VCR 2.9.3
@@ -2,59 +2,82 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.lockitron.com/v1/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/unlock
5
+ uri: https://api.lockitron.com/v2/locks/a397ef51-7b33-46dd-9a96-53eb1a7ea07f/unlock
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: access_token=<OAUTH_TOKEN>
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.8
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
14
  Accept-Encoding:
15
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
16
  Accept:
17
- - '*/*'
17
+ - "*/*"
18
18
  response:
19
19
  status:
20
- code: 200
21
- message: OK
20
+ code: 404
21
+ message: Not Found
22
22
  headers:
23
23
  Content-Type:
24
- - application/json; charset=utf-8
24
+ - text/html; charset=utf-8
25
25
  Transfer-Encoding:
26
26
  - chunked
27
27
  Connection:
28
28
  - keep-alive
29
29
  Status:
30
- - 200 OK
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Cache-Control:
34
- - max-age=0, private, must-revalidate
35
- Set-Cookie:
36
- - sessitron=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTQwZWQzNTA5MzRkZTE3MGM3ZTRjZWEwNDY2ZDQ0ZWZjBjsAVA%3D%3D--d7d271630340afa4a4a79521599036b3f07afcda;
37
- domain=.lockitron.com; path=/; secure; HttpOnly
30
+ - 404 Not Found
38
31
  X-Request-Id:
39
- - 625b73980bc68c8315196b1264f9daff
32
+ - e18e407272db806028b549871301993f
40
33
  X-Runtime:
41
- - '0.062143'
34
+ - '0.003941'
42
35
  Date:
43
- - Sun, 29 Dec 2013 19:30:35 GMT
36
+ - Wed, 08 Jul 2015 19:12:45 GMT
44
37
  X-Rack-Cache:
45
38
  - invalidate, pass
46
39
  X-Powered-By:
47
40
  - Phusion Passenger 4.0.25
48
41
  Server:
49
42
  - nginx + Phusion Passenger 4.0.25
50
- Strict-Transport-Security:
51
- - max-age=15768000
52
43
  body:
53
- encoding: UTF-8
54
- string: '{"activity":{"id":"df3fa96e-9831-4a93-8401-7fb537c8a30a","lock_name":"Gem
55
- Test","lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","key_id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","outcome":false,"human_outcome":"notice","type":4,"human_type":"lock-updated-unlocked","performed_at":1388345435.58767,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
56
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
57
- Nelson","activated":true}}}'
44
+ encoding: ASCII-8BIT
45
+ string: "\n<!DOCTYPE html>\n<html>\n\n <head>\n <title>Lockitron</title>\n
46
+ \ <meta charset=\"UTF-8\" />\n <meta content=\"authenticity_token\" name=\"csrf-param\"
47
+ />\n <link href=\"/assets/dashboard/main.css?body=1\" media=\"screen\"
48
+ rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"/assets/dashboard/select2.css?body=1\"
49
+ media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- start
50
+ Mixpanel -->\n <script type=\"text/javascript\">\n (function(e,b){if(!b.__SV){var
51
+ a,f,i,g;window.mixpanel=b;a=e.createElement(\"script\");a.type=\"text/javascript\";a.async=!0;a.src=(\"https:\"===e.location.protocol?\"https:\":\"http:\")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName(\"script\")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function
52
+ f(b,h){var a=h.split(\".\");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var
53
+ c=b;\"undefined\"!==typeof d?c=b[d]=[]:d=\"mixpanel\";c.people=c.people||[];c.toString=function(b){var
54
+ a=\"mixpanel\";\"mixpanel\"!==d&&(a+=\".\"+d);b||(a+=\" (stub)\");return a};c.people.toString=function(){return
55
+ c.toString(1)+\".people (stub)\"};i=\"disable track track_pageview track_links
56
+ track_forms register register_once alias unregister identify name_tag set_config
57
+ people.set people.set_once people.increment people.append people.track_charge
58
+ people.clear_charges people.delete_user\".split(\" \");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);\n
59
+ \ mixpanel.init(\"3953b24fe21f828e4a0382f29f1b5c7d\");\n mixpanel.set_config({});\n
60
+ \ </script>\n <!-- end Mixpanel -->\n</head>\n\n <body>\n <header
61
+ id=\"main-header\">\n <div class=\"contents\">\n <h1><a target=\"_self\"
62
+ href=\"/\">Lockitron</a></h1>\n <nav>\n <ul>\n <li
63
+ ng-show='user'><a href=\"/dashboard/\">Locks</a></li>\n <li ng-show='user'><a
64
+ href=\"/dashboard/orders\">Orders</a></li>\n <li ng-show='user'><a
65
+ target=\"_self\" href=\"/faq\">Help</a></li>\n <li ng-hide='user'><a
66
+ href='/account/login'>Login</a></li>\n </ul>\n </nav>\n\n </div>\n</header><!--
67
+ /#main-header -->\n <section id=\"main-body\">\n <section class=\"content-body
68
+ error\" id=\"not_found\">\n <div class=\"contents\">\n \t<h1>Nothing
69
+ to see here</h1>\n \t<p>You may have mistyped the address or the page
70
+ may have moved. <br>Email us at <a href=\"mailto:support@lockitron.com?subject=I
71
+ found a broken link&body=I found a broken link while I was trying to: _______\">support@lockitron.com</a>
72
+ for some help.</p>\n <a href=\"http://lockitron.com/\" class=\"leave\">Take
73
+ me home</a>\n </div>\n </section>\n</section>\n <footer id=\"main-footer\">\n
74
+ \ <div class=\"contents\">\n <a href=\"/\" class=\"logo\">Lockitron</a>\n
75
+ \ <nav>\n <ul>\n <li><a href=\"/dashboard\">Locks</a></li>\n
76
+ \ <li><a href=\"/dashboard/account\">Settings</a></li>\n <li><a
77
+ href=\"/faq\">Faq</a></li>\n <li><a href=\"/preorder\">Order</a></li>\n
78
+ \ <li><a href=\"/about\">About</a></li>\n <li><a
79
+ href=\"http://blog.lockitron.com\">Blog</a></li>\n </ul>\n </nav>\n
80
+ \ </div>\n</footer><!-- /#main-footer -->\n </body>\n \n</html>\n"
58
81
  http_version:
59
- recorded_at: Sun, 29 Dec 2013 19:31:33 GMT
60
- recorded_with: VCR 2.8.0
82
+ recorded_at: Wed, 08 Jul 2015 19:12:45 GMT
83
+ recorded_with: VCR 2.9.3
@@ -2,17 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.lockitron.com/v1/locks?access_token=<OAUTH_TOKEN>
5
+ uri: https://api.lockitron.com/v2/locks?access_token=<OAUTH_TOKEN>
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.8
11
+ - Faraday v0.9.1
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
15
- - '*/*'
15
+ - "*/*"
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -31,11 +31,11 @@ http_interactions:
31
31
  Cache-Control:
32
32
  - max-age=0, private, must-revalidate
33
33
  X-Request-Id:
34
- - 6b6562e6f86146e91983fe3fab230a10
34
+ - 8d572c963529403cf5c5ceb88d17aaa4
35
35
  X-Runtime:
36
- - '0.187618'
36
+ - '0.581930'
37
37
  Date:
38
- - Sun, 29 Dec 2013 19:30:16 GMT
38
+ - Wed, 08 Jul 2015 19:12:46 GMT
39
39
  X-Rack-Cache:
40
40
  - miss
41
41
  X-Powered-By:
@@ -44,24 +44,16 @@ http_interactions:
44
44
  - nginx + Phusion Passenger 4.0.25
45
45
  Strict-Transport-Security:
46
46
  - max-age=15768000
47
+ X-Frame-Options:
48
+ - SAMEORIGIN
47
49
  body:
48
- encoding: UTF-8
49
- string: '[{"lock":{"id":"62191ffe-160e-4227-8e94-7537b83a9ba0","status":"lock","name":"Glass
50
- Fun","latitude":null,"longitude":null,"keys":[{"id":"b59e31f1-dd34-4044-9e3c-5bb150a0ab70","start":null,"expire":null,"lock_id":"62191ffe-160e-4227-8e94-7537b83a9ba0","role":"owner","valid":true,"visible":true,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
51
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
52
- Nelson","activated":true}}]}},{"lock":{"id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","status":"lock","name":"Gem
53
- Test","latitude":null,"longitude":null,"keys":[{"id":"402d031d-21be-4442-9bbb-2ce07ccf84b0","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"40d877eb-03f4-4d66-b631-80f3d54fd832","email":"someone2@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone2@example.com","activated":false}},{"id":"7f02c05a-b94d-4c5a-814e-3bb5a07603b9","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"guest","valid":true,"visible":true,"user":{"id":"41d0322d-b03d-4eef-935b-904e05831496","email":"someone@example.com","phone":null,"human_phone":null,"first_name":null,"last_name":null,"full_name":null,"best_name":"someone@example.com","activated":false}},{"id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","start":null,"expire":null,"lock_id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","role":"owner","valid":true,"visible":true,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
54
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
55
- Nelson","activated":true}}]}},{"lock":{"id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","status":"unlock","name":"611
56
- @ Windsor","latitude":null,"longitude":null,"keys":[{"id":"b1d68c1f-8815-4ec0-9357-fdcb98425f4b","start":null,"expire":1388552160.0,"lock_id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","role":"guest","valid":true,"visible":true,"user":{"id":"9a14a65b-28e2-4b64-9c84-26af2fc06c39","email":"michael.tomczak.cs@gmail.com","phone":"+18656608899","human_phone":"(865)
57
- 660-8899","first_name":"Michael","last_name":"Tomczak","full_name":"Michael
58
- Tomczak","best_name":"Michael Tomczak","activated":false}},{"id":"1c4980dc-88d9-4c48-b697-9d639e3b9a74","start":null,"expire":null,"lock_id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","role":"admin","valid":true,"visible":true,"user":{"id":"32c1f943-4622-46ef-ae8d-8689255d0702","email":"andrewskriss@gmail.com","phone":"6783159307","human_phone":"(678)
59
- 315-9307","first_name":"Andrew","last_name":"Kriss","full_name":"Andrew Kriss","best_name":"Andrew
60
- Kriss","activated":true}},{"id":"4fc2b433-57c3-479a-9707-7d35694212fc","start":null,"expire":null,"lock_id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","role":"admin","valid":true,"visible":true,"user":{"id":"3dc981f0-35f6-43f7-a48d-6d202448f53f","email":"aaron.hoodin@gmail.com","phone":"6785918040","human_phone":"(678)
61
- 591-8040","first_name":"Aaron","last_name":"Hoodin","full_name":"Aaron Hoodin","best_name":"Aaron
62
- Hoodin","activated":true}},{"id":"d937d400-183d-4de9-8fe9-1864cc3ca3cc","start":null,"expire":null,"lock_id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","role":"owner","valid":true,"visible":true,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","human_phone":"(407)
63
- 512-0689","first_name":"Kurt","last_name":"Nelson","full_name":"Kurt Nelson","best_name":"Kurt
64
- Nelson","activated":true}}]}}]'
50
+ encoding: ASCII-8BIT
51
+ string: '[{"id":"0433dabf-dd78-4599-a9cb-5cb8258f5df0","name":"611 @ Windsor","next_wake":"2015-05-12T06:55:14Z","last_heard_from":"2015-05-12T06:55:14Z","state":"lock","button_type":"slider","updated_at":"2015-05-09T15:16:02Z","handedness":"locked","avr_version":1418069060,"battery_voltage":4.4,"sleep_period":1800,"avr_update_progress":100,"ble_update_progress":100,"serial_number":null,"hardware_id":"20000c2a6904479f","connected":null,"time_zone":"America/New_York","keys":[{"id":"4fc2b433-57c3-479a-9707-7d35694212fc","start_date":null,"expiration_date":null,"role":"admin","valid":true,"visible":true,"sms_pin":null,"access_key":null,"user":{"id":"3dc981f0-35f6-43f7-a48d-6d202448f53f","email":"aaron.hoodin@gmail.com","phone":"6785918040","full_name":"Aaron
52
+ Hoodin","first_name":"Aaron","last_name":"Hoodin","activated":true,"changing_phone":false,"changing_email":false,"facebook":false,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}},{"id":"d937d400-183d-4de9-8fe9-1864cc3ca3cc","start_date":null,"expiration_date":null,"role":"owner","valid":true,"visible":true,"sms_pin":"da14","access_key":null,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","full_name":"Kurt
53
+ Nelson","first_name":"Kurt","last_name":"Nelson","activated":true,"changing_phone":false,"changing_email":false,"facebook":true,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}}],"sms":false},{"id":"a397ef51-7b33-46dd-9a96-53eb1a7ea07f","name":"Gem
54
+ Test","next_wake":null,"last_heard_from":null,"state":"lock","button_type":"slider","updated_at":"2015-04-30T17:50:21Z","handedness":"unsupported","avr_version":"unsupported","battery_voltage":"unsupported","sleep_period":null,"avr_update_progress":null,"ble_update_progress":null,"serial_number":"WRLYO-TYPTR-PTKAT-UXBMQCQ","hardware_id":null,"connected":null,"time_zone":"US/Pacific","keys":[{"id":"fc3ddc9f-d093-4436-beda-81906f71a6e5","start_date":null,"expiration_date":null,"role":"guest","valid":true,"visible":true,"sms_pin":null,"access_key":null,"user":{"id":"00e191a6-190e-46bf-a0f1-b8718312da2c","email":"example@lockitron.com","phone":null,"full_name":"Example
55
+ User","first_name":"Example","last_name":"User","activated":false,"changing_phone":false,"changing_email":false,"facebook":false,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}},{"id":"cee75f80-c36d-41fc-9bb9-f250fafe2cbc","start_date":null,"expiration_date":null,"role":"owner","valid":true,"visible":true,"sms_pin":"f244","access_key":null,"user":{"id":"6c121f58-0cc9-11e2-984d-4040401f6100","email":"kurtisnelson@gmail.com","phone":"+14075120689","full_name":"Kurt
56
+ Nelson","first_name":"Kurt","last_name":"Nelson","activated":true,"changing_phone":false,"changing_email":false,"facebook":true,"avatar_url":"http://lockitron-avatars-dev.s3.amazonaws.com/avatars/system/icon_avatar_lockitron.png"}}],"sms":false}]'
65
57
  http_version:
66
- recorded_at: Sun, 29 Dec 2013 19:31:40 GMT
67
- recorded_with: VCR 2.8.0
58
+ recorded_at: Wed, 08 Jul 2015 19:12:46 GMT
59
+ recorded_with: VCR 2.9.3
@@ -3,14 +3,14 @@ require_relative '../spec_helper'
3
3
  describe Lockitron::Auth do
4
4
  let(:auth) {Lockitron::Auth.new(client_id: CLIENT_ID, client_secret: CLIENT_SECRET, redirect_uri: REDIRECT_URI)}
5
5
  it "can provide auth URL" do
6
- auth.authorization_url.should include CLIENT_ID
7
- auth.authorization_url.should include REDIRECT_URI
6
+ expect(auth.authorization_url).to include CLIENT_ID
7
+ expect(auth.authorization_url).to include REDIRECT_URI
8
8
  end
9
9
 
10
10
  it "takes an authorization code and gets a token" do
11
11
  VCR.use_cassette 'oauth' do
12
12
  auth.token_from_code AUTH_CODE
13
13
  end
14
- auth.token.should_not be_empty
14
+ expect(auth.token).to_not be_empty
15
15
  end
16
16
  end
@@ -18,14 +18,14 @@ describe Lockitron::Lock do
18
18
  VCR.use_cassette 'refresh' do
19
19
  l.refresh
20
20
  end
21
- l.name.should eq VIRTUAL_LOCK_NAME
21
+ expect(l.name).to eq VIRTUAL_LOCK_NAME
22
22
  end
23
23
  end
24
24
 
25
25
  it "refreshes automatically if possible" do
26
26
  VCR.use_cassette 'refresh' do
27
27
  lock = Lockitron::Lock.new(uuid: VIRTUAL_LOCK_UUID, user: valid_user)
28
- lock.name.should eq VIRTUAL_LOCK_NAME
28
+ expect(lock.name).to eq VIRTUAL_LOCK_NAME
29
29
  end
30
30
  end
31
31
 
@@ -5,8 +5,8 @@ describe Lockitron::User do
5
5
  it "lists all the locks" do
6
6
  VCR.use_cassette 'user' do
7
7
  locks = user.locks
8
- locks.count.should be > 0
9
- locks.first.should be_instance_of Lockitron::Lock
8
+ expect(locks.count).to be > 0
9
+ expect(locks.first).to be_instance_of Lockitron::Lock
10
10
  end
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockitron
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '2.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurt Nelson
@@ -14,140 +14,140 @@ dependencies:
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rdoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '4.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '4.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '1.10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '1.10'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: dotenv
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coveralls
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: vcr
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  description: Communicate with a Lockitron
@@ -158,11 +158,11 @@ extra_rdoc_files:
158
158
  - LICENSE.txt
159
159
  - README.md
160
160
  files:
161
- - .document
162
- - .gitignore
163
- - .rspec
164
- - .ruby-version
165
- - .travis.yml
161
+ - ".document"
162
+ - ".gitignore"
163
+ - ".rspec"
164
+ - ".ruby-version"
165
+ - ".travis.yml"
166
166
  - Gemfile
167
167
  - LICENSE.txt
168
168
  - README.md
@@ -193,17 +193,17 @@ require_paths:
193
193
  - lib
194
194
  required_ruby_version: !ruby/object:Gem::Requirement
195
195
  requirements:
196
- - - '>='
196
+ - - ">="
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - '>='
201
+ - - ">="
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.1.11
206
+ rubygems_version: 2.4.5
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Access the Lockitron API