3scale_client 2.2.4 → 2.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/3scale_client.gemspec +3 -3
- data/README.rdoc +0 -2
- data/lib/3scale/client.rb +1 -1
- data/test/client_test.rb +1 -1
- metadata +12 -4
data/3scale_client.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{3scale_client}
|
8
|
-
s.version = "2.2.
|
8
|
+
s.version = "2.2.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Adam Cigánek"]
|
12
|
-
s.date = %q{
|
11
|
+
s.authors = ["Adam Cigánek", "Tiago Macedo"]
|
12
|
+
s.date = %q{2011-01-27}
|
13
13
|
s.description = %q{This gem allows to easily connect an application that provides a Web Service with the 3scale API Management System to authorize it's users and report the usage.
|
14
14
|
}
|
15
15
|
s.email = %q{adam@3scale.net}
|
data/README.rdoc
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
= Client for 3scale web service management system API
|
2
2
|
|
3
|
-
Please note: This version of the library targets the new API, which is currently in beta phase. Please contact 3scale support as support@3scale.net before you use it. You can also use older version (2.0.1) targeting the old API: http://github.com/3scale/3scale_ws_api_for_ruby/tree/v2.0.1.
|
4
|
-
|
5
3
|
== Installation
|
6
4
|
|
7
5
|
This library is distributed as a gem:
|
data/lib/3scale/client.rb
CHANGED
@@ -148,7 +148,7 @@ module ThreeScale
|
|
148
148
|
http_response = Net::HTTP.get_response(uri)
|
149
149
|
|
150
150
|
case http_response
|
151
|
-
when Net::HTTPSuccess
|
151
|
+
when Net::HTTPSuccess,Net::HTTPConflict
|
152
152
|
build_authorize_response(http_response.body)
|
153
153
|
when Net::HTTPClientError
|
154
154
|
build_error_response(http_response.body)
|
data/test/client_test.rb
CHANGED
@@ -104,7 +104,7 @@ class ThreeScale::ClientTest < Test::Unit::TestCase
|
|
104
104
|
</usage_reports>
|
105
105
|
</status>'
|
106
106
|
|
107
|
-
FakeWeb.register_uri(:get, "http://#{@host}/transactions/authorize.xml?provider_key=1234abcd&app_id=foo", :status => ['
|
107
|
+
FakeWeb.register_uri(:get, "http://#{@host}/transactions/authorize.xml?provider_key=1234abcd&app_id=foo", :status => ['409'], :body => body)
|
108
108
|
|
109
109
|
response = @client.authorize(:app_id => 'foo')
|
110
110
|
|
metadata
CHANGED
@@ -1,29 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: 3scale_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 2
|
7
8
|
- 2
|
8
|
-
-
|
9
|
-
version: 2.2.
|
9
|
+
- 7
|
10
|
+
version: 2.2.7
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- "Adam Cig\xC3\xA1nek"
|
14
|
+
- Tiago Macedo
|
13
15
|
autorequire:
|
14
16
|
bindir: bin
|
15
17
|
cert_chain: []
|
16
18
|
|
17
|
-
date:
|
19
|
+
date: 2011-01-27 00:00:00 +01:00
|
18
20
|
default_executable:
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
21
23
|
name: nokogiri
|
22
24
|
prerelease: false
|
23
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
27
31
|
segments:
|
28
32
|
- 0
|
29
33
|
version: "0"
|
@@ -61,23 +65,27 @@ rdoc_options:
|
|
61
65
|
require_paths:
|
62
66
|
- lib
|
63
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
64
69
|
requirements:
|
65
70
|
- - ">="
|
66
71
|
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
67
73
|
segments:
|
68
74
|
- 0
|
69
75
|
version: "0"
|
70
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
71
78
|
requirements:
|
72
79
|
- - ">="
|
73
80
|
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
74
82
|
segments:
|
75
83
|
- 0
|
76
84
|
version: "0"
|
77
85
|
requirements: []
|
78
86
|
|
79
87
|
rubyforge_project:
|
80
|
-
rubygems_version: 1.3.
|
88
|
+
rubygems_version: 1.3.7
|
81
89
|
signing_key:
|
82
90
|
specification_version: 3
|
83
91
|
summary: Client for 3scale Web Service Management System API
|