rack-rpx 0.1.3 → 0.1.4
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.
- data/VERSION +1 -1
- data/lib/rack-rpx.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/rack-rpx.rb
CHANGED
@@ -45,7 +45,7 @@ module Rack #:nodoc:
|
|
45
45
|
end
|
46
46
|
|
47
47
|
class << self
|
48
|
-
def
|
48
|
+
def get_credentials(token)
|
49
49
|
u = URI.parse(RPX_LOGIN_URL)
|
50
50
|
req = Net::HTTP::Post.new(u.path)
|
51
51
|
req.set_form_data({:token => token, :apiKey => OPTIONS[:api_key], :format => 'json', :extended => 'true'})
|
@@ -53,7 +53,7 @@ module Rack #:nodoc:
|
|
53
53
|
http.use_ssl = true if u.scheme == 'https'
|
54
54
|
json = JSON.parse(http.request(req).body)
|
55
55
|
|
56
|
-
raise LoginFailedError,
|
56
|
+
raise LoginFailedError, "Cannot log in. Try another account! #{json.inspect}" unless json['stat'] == 'ok'
|
57
57
|
json
|
58
58
|
end
|
59
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-rpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Del Gallego
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-17 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|