3scale_api 1.0.10 → 1.0.11

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: 75d586bd62eb74e45a90dca8fca52e29db2a5de9
4
- data.tar.gz: c411e405465bf9d4898c6c833152fadec4168c20
3
+ metadata.gz: 8e7cfb891b2ed35e525ece7bcd749ea3bd55422d
4
+ data.tar.gz: 054ed669994171561b4d569d3c04939bdacd1cc6
5
5
  SHA512:
6
- metadata.gz: 71afd9b2e268e0ead676872c957418e2b8a1a6a292ce19d8be73f67e0b97fc6f4d86aa7c7109aa59e3d5c864826a12252a07a0852d31ea8a6cd424d2a08dfa50
7
- data.tar.gz: 7056564f7ea3b3fd1084cd8e4bcbdab9974f518dae8aef99389cbe20a305b9ebdf91ad405afb2a53ad41d4759b76fb32c5559a8276609a7a5a0317807588cc7b
6
+ metadata.gz: 93f41fb6b4cc5c9386c6cc01c5838662f8b2f7c48098b273d11908a646908902ed060b381b6a4b24688710994dc09e048d33af4465b1a5ee7b2f23d5d51bcd54
7
+ data.tar.gz: 8528ba81265e3ae4b495dff44795257c417c13a767450e2cc4ae6a656a358c71e2e1edaacecad189e54c3eced2e5e0fc1744a97529bb04a31eba3de5eb80cbaf
@@ -81,7 +81,9 @@ module Threescale
81
81
  :id => application.css('id').text,
82
82
  :name => application.css('name').text,
83
83
  :application_id => application.css('application_id').text,
84
- :plan_type => application.css('plan name').text})
84
+ :plan_type => application.css('plan name').text,
85
+ :service_id => application.css('service_id').first.text
86
+ })
85
87
  end
86
88
  results
87
89
  end
@@ -119,11 +121,9 @@ module Threescale
119
121
  response.status == 201
120
122
  end
121
123
 
122
- def signup_express(account_plan_id, application_plan_id, email, org_name, password, service_plan_id, username,
123
- additional_fields = nil)
124
+ def signup_express( email, org_name, password, username, additional_fields = nil)
124
125
  params = {:provider_key => @provider_key, :username => username, :password => password, :email => email,
125
- :org_name => org_name, :account_plan_id => account_plan_id, :service_plan_id => service_plan_id,
126
- :application_plan_id => application_plan_id}
126
+ :org_name => org_name}
127
127
  if (additional_fields)
128
128
  additional_fields.each do |key, value|
129
129
  params[key] = value
@@ -1,3 +1,3 @@
1
1
  module Threescale
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.11"
3
3
  end
@@ -190,18 +190,6 @@ describe "3scaleApi" do
190
190
  end
191
191
  end
192
192
 
193
- describe "change_role_to_member" do
194
- it "should call /admin/api/signup.xml" do
195
- stub_request(:post, "http://test-url.test/admin/api/signup.xml").
196
- with(:body => {"account_plan_id"=>"account_plan_id", "application_plan_id"=>"application_plan_id", "email"=>"emailorg_name", "org_name"=>"password", "password"=>"service_plan_id", "provider_key"=>"provider-key", "service_plan_id"=>"username", "username"=>{"first_field"=>"first-field"}},
197
- :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.1'}).
198
- to_return(:status => 200, :body => "", :headers => {})
199
-
200
- @threescale.signup_express "account_plan_id", "application_plan_id", "email" "org_name", "password",
201
- "service_plan_id", "username", {:first_field => 'first-field'}
202
- end
203
- end
204
-
205
193
  describe "approve_account" do
206
194
  it "should call /admin/api/accounts/{account_id}/users/{user_id}/member.xml" do
207
195
  stub_request(:put, "http://test-url.test/admin/api/accounts/account_id/approve.xml").
@@ -216,12 +204,11 @@ describe "3scaleApi" do
216
204
  describe "signup_express" do
217
205
  it "should call admin/api/accounts/account_id/approve.xml" do
218
206
  stub_request(:post, "http://test-url.test/admin/api/signup.xml").
219
- with(:body => {"account_plan_id"=>"account-plan-id", "application_plan_id"=>"application-plan-id", "email"=>"email", "optional"=>"optional", "org_name"=>"org-name", "password"=>"password", "provider_key"=>"provider-key", "service_plan_id"=>"service-plan", "username"=>"username"},
207
+ with(:body => {"email"=>"email", "optional"=>"optional", "org_name"=>"org-name", "password"=>"password", "provider_key"=>"provider-key", "username"=>"username"},
220
208
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.1'}).
221
209
  to_return(:status => 200, :body => "", :headers => {})
222
210
 
223
- @threescale.signup_express "account-plan-id", "application-plan-id", "email", "org-name", "password",
224
- "service-plan", "username", {:optional => 'optional'}
211
+ @threescale.signup_express "email", "org-name", "password", "username", {:optional => 'optional'}
225
212
  end
226
213
  end
227
214
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 3scale_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robbie Holmes