bravtroller 0.1.4 → 0.1.5

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: 72d84940f71aa4a52ccf87c1d3dcf5cfc0876120
4
- data.tar.gz: e317163f6fcfdf8d68e27098a96653dacd2dde9d
3
+ metadata.gz: 31fa1db5f4c097fdd8c2b112cb95dbbd355ed873
4
+ data.tar.gz: d04ee5118b33d88248ca6330589cadb7da3df3ac
5
5
  SHA512:
6
- metadata.gz: 9686553231d1fff5465812e723a61e021acd471b9850e6ac2ff0f5b59a33762f1fcf6313e00fa2c5daee5f8b6459efb45bf44dc2a9d6c466a12eaf7c011c9a49
7
- data.tar.gz: ba08a4201399871b0aeb8c1068689cef0c7ec3571ef6e87baf973ab068aa333bb4133281bf33fc2f5c016eb0f713edb415ee03aff4ae136efd240b8da5663109
6
+ metadata.gz: 6e66e501c6e42e77245f24c4665e83eacc5d9e6e3d1f04a0c119e76b89b1cff37171d099136c0850e28d45bce8eb2822e232a9b431433bbfd854bc79b620b867
7
+ data.tar.gz: c94334b619378a49685abe2ba687e805a5ed0ab9decfcfc099d0310163072ec897e3a77511f43504fac72dbab1f2e05f955babd994f331182971455d9e07a20a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bravtroller (0.1.3)
4
+ bravtroller (0.1.4)
5
5
  easy_upnp (~> 0.1.6)
6
6
 
7
7
  GEM
@@ -11,7 +11,7 @@ GEM
11
11
  gyoku (>= 0.4.0)
12
12
  nokogiri
13
13
  builder (3.2.2)
14
- easy_upnp (0.1.6)
14
+ easy_upnp (0.1.7)
15
15
  nokogiri (~> 1.6.6.2)
16
16
  nori (~> 2.6.0)
17
17
  rake
@@ -3,6 +3,8 @@ require 'json'
3
3
  require 'base64'
4
4
 
5
5
  module Bravtroller
6
+ class AuthorizationError < StandardError; end
7
+
6
8
  class Authenticator
7
9
  CLIENT_ID = 'bravtroller:de7cd7d5-a9a0-44a1-aba1-57d973a0ee8a'
8
10
 
@@ -43,6 +45,8 @@ module Bravtroller
43
45
 
44
46
  auth_response = @bravia_client.post_request('/sony/accessControl', AUTH_REQUEST_PARAMS, headers)
45
47
 
48
+ raise AuthorizationError, 'Authentication failed' if auth_response.code == '401'
49
+
46
50
  extract_cookie(auth_response)
47
51
  else
48
52
  # Already authorized, but the Set-Cookie header should still be set
@@ -1,3 +1,3 @@
1
1
  module Bravtroller
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bravtroller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: easy_upnp