3scale_client 2.3.2 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,18 @@
1
- pkg
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
2
6
  Gemfile.lock
3
- .*.swp
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .idea
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - jruby
6
+ - rbx-19mode
@@ -1,58 +1,27 @@
1
- # encoding: UTF-8
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require '3scale/client/version'
2
5
 
3
- Gem::Specification.new do |s|
4
- s.name = %q{3scale_client}
5
- s.version = "2.3.2"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "3scale_client"
8
+ spec.version = ThreeScale::Client::VERSION
9
+ spec.authors = ["Michal Cichra"] | ['Adam Cigánek', 'Tiago Macedo', 'Joaquin Rivera Padron (joahking)', 'Maria Pilar Guerra']
10
+ spec.email = ["support@3scale.net"]
11
+ spec.description = "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."
12
+ spec.summary = 'Client for 3scale Web Service Management System API'
13
+ spec.homepage = "http://www.3scale.net"
14
+ spec.license = "MIT"
6
15
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Adam Cigánek", "Tiago Macedo", "Joaquin Rivera Padron (joahking)"]
9
- s.description = %q{Ruby client for 3scale platform. 3scale is an API Infrastructure service which handles API Keys, Rate Limiting, Analytics, Billing Payments and Developer Management. Includes a configurable API dashboard and developer portal CMS. More information at http://www.3scale.net/ or http://support.3scale.net/.
10
- }
11
- s.email = %q{adam@3scale.net tiago@3scale.net}
12
- s.extra_rdoc_files = [
13
- "README.rdoc"
14
- ]
15
- s.files = [
16
- ".gitignore",
17
- "3scale_client.gemspec",
18
- "Gemfile",
19
- "Gemfile.lock",
20
- "LICENCE",
21
- "README.rdoc",
22
- "Rakefile",
23
- "VERSION",
24
- "lib/3scale_client.rb",
25
- "lib/3scale/authorize_response.rb",
26
- "lib/3scale/client.rb",
27
- "lib/3scale/response.rb",
28
- "test/client_test.rb",
29
- "test/remote_test.rb"
30
- ]
31
- s.homepage = %q{http://www.3scale.net}
32
- s.rdoc_options = ["--charset=UTF-8"]
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.6}
35
- s.summary = %q{Client for 3scale Web Service Management System API}
36
- s.test_files = [
37
- "test/remote_test.rb",
38
- "test/client_test.rb"
39
- ]
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
40
20
 
41
- if s.respond_to? :specification_version then
42
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
- s.specification_version = 3
44
-
45
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
- s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
47
- else
48
- s.add_dependency(%q<nokogiri>, [">= 0"])
49
- end
50
- else
51
- s.add_dependency(%q<nokogiri>, [">= 0"])
52
- end
53
-
54
- s.add_development_dependency 'fakeweb'
55
- s.add_development_dependency 'jeweler'
56
- s.add_development_dependency 'mocha'
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rdoc"
24
+ spec.add_development_dependency "fakeweb"
25
+ spec.add_development_dependency "mocha"
26
+ spec.add_dependency 'nokogiri'
57
27
  end
58
-
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
  gemspec
data/Rakefile CHANGED
@@ -2,6 +2,8 @@
2
2
  require "rubygems"
3
3
  require "bundler/setup"
4
4
 
5
+ require "bundler/gem_tasks"
6
+
5
7
  require 'rake'
6
8
  require 'rake/testtask'
7
9
  require 'rdoc/task'
@@ -23,24 +25,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
23
25
  rdoc.rdoc_files.include('README')
24
26
  rdoc.rdoc_files.include('lib/**/*.rb')
25
27
  end
26
-
27
- begin
28
- require 'jeweler'
29
-
30
- Jeweler::Tasks.new do |gemspec|
31
- gemspec.name = '3scale_client'
32
- gemspec.summary = 'Client for 3scale Web Service Management System API'
33
- gemspec.description = <<END
34
- 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.
35
- END
36
- gemspec.email = 'support@3scale.net'
37
- gemspec.homepage = 'http://www.3scale.net'
38
- gemspec.authors = ['Adam Cigánek', 'Tiago Macedo', 'Joaquin Rivera Padron (joahking)']
39
-
40
- gemspec.add_dependency 'nokogiri'
41
- end
42
-
43
- Jeweler::GemcutterTasks.new
44
- rescue LoadError
45
- puts "Jeweler not available. Install it with: gem install jeweler"
46
- end
@@ -0,0 +1,5 @@
1
+ module ThreeScale
2
+ class Client
3
+ VERSION = '2.3.3'
4
+ end
5
+ end
data/lib/3scale/client.rb CHANGED
@@ -185,7 +185,7 @@ module ThreeScale
185
185
  path = "/transactions/authorize.xml" +
186
186
  "?provider_key=#{CGI.escape(provider_key)}" +
187
187
  "&app_id=#{CGI.escape(options[:app_id].to_s)}"
188
- path += "&app_key=#{CGI.escape(options[:app_key])}" if options[:app_key]
188
+ path += "&app_key=#{CGI.escape(options[:app_key])}" if options[:app_key]
189
189
 
190
190
  uri = URI.parse("http://#{host}#{path}")
191
191
  http_response = Net::HTTP.get_response(uri)
@@ -234,7 +234,7 @@ module ThreeScale
234
234
  path = "/transactions/oauth_authorize.xml" +
235
235
  "?provider_key=#{CGI.escape(provider_key)}" +
236
236
  "&app_id=#{CGI.escape(options[:app_id].to_s)}"
237
- path += "&app_key=#{CGI.escape(options[:app_key])}" if options[:app_key]
237
+ path += "&app_key=#{CGI.escape(options[:app_key])}" if options[:app_key]
238
238
  path += "&redirect_url=#{CGI.escape(options[:redirect_url])}" if options[:redirect_url]
239
239
 
240
240
  uri = URI.parse("http://#{host}#{path}")
@@ -298,8 +298,8 @@ module ThreeScale
298
298
  doc.css('usage_reports usage_report').each do |node|
299
299
  response.add_usage_report(:metric => node['metric'].to_s.strip,
300
300
  :period => node['period'].to_s.strip.to_sym,
301
- :period_start => node.at('period_start').content,
302
- :period_end => node.at('period_end').content,
301
+ :period_start => node.at('period_start') ? node.at('period_start').content : '' ,
302
+ :period_end => node.at('period_end') ? node.at('period_end').content : '',
303
303
  :current_value => node.at('current_value').content.to_i,
304
304
  :max_value => node.at('max_value').content.to_i)
305
305
  end
metadata CHANGED
@@ -1,32 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 3scale_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
+ - Michal Cichra
8
9
  - Adam Cigánek
9
10
  - Tiago Macedo
10
11
  - Joaquin Rivera Padron (joahking)
12
+ - Maria Pilar Guerra
11
13
  autorequire:
12
14
  bindir: bin
13
15
  cert_chain: []
14
- date: 2012-10-05 00:00:00.000000000 Z
16
+ date: 2013-10-08 00:00:00.000000000 Z
15
17
  dependencies:
16
18
  - !ruby/object:Gem::Dependency
17
- name: nokogiri
18
- requirement: &69287240 !ruby/object:Gem::Requirement
19
+ name: bundler
20
+ requirement: !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirements:
23
+ - - ~>
24
+ - !ruby/object:Gem::Version
25
+ version: '1.3'
26
+ type: :development
27
+ prerelease: false
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
36
+ requirement: !ruby/object:Gem::Requirement
19
37
  none: false
20
38
  requirements:
21
39
  - - ! '>='
22
40
  - !ruby/object:Gem::Version
23
41
  version: '0'
24
- type: :runtime
42
+ type: :development
25
43
  prerelease: false
26
- version_requirements: *69287240
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
27
50
  - !ruby/object:Gem::Dependency
28
- name: fakeweb
29
- requirement: &69286720 !ruby/object:Gem::Requirement
51
+ name: rdoc
52
+ requirement: !ruby/object:Gem::Requirement
30
53
  none: false
31
54
  requirements:
32
55
  - - ! '>='
@@ -34,10 +57,15 @@ dependencies:
34
57
  version: '0'
35
58
  type: :development
36
59
  prerelease: false
37
- version_requirements: *69286720
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
38
66
  - !ruby/object:Gem::Dependency
39
- name: jeweler
40
- requirement: &69286430 !ruby/object:Gem::Requirement
67
+ name: fakeweb
68
+ requirement: !ruby/object:Gem::Requirement
41
69
  none: false
42
70
  requirements:
43
71
  - - ! '>='
@@ -45,10 +73,15 @@ dependencies:
45
73
  version: '0'
46
74
  type: :development
47
75
  prerelease: false
48
- version_requirements: *69286430
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
49
82
  - !ruby/object:Gem::Dependency
50
83
  name: mocha
51
- requirement: &69286170 !ruby/object:Gem::Requirement
84
+ requirement: !ruby/object:Gem::Requirement
52
85
  none: false
53
86
  requirements:
54
87
  - - ! '>='
@@ -56,38 +89,57 @@ dependencies:
56
89
  version: '0'
57
90
  type: :development
58
91
  prerelease: false
59
- version_requirements: *69286170
60
- description: ! 'Ruby client for 3scale platform. 3scale is an API Infrastructure service
61
- which handles API Keys, Rate Limiting, Analytics, Billing Payments and Developer
62
- Management. Includes a configurable API dashboard and developer portal CMS. More
63
- information at http://www.3scale.net/ or http://support.3scale.net/.
64
-
65
- '
66
- email: adam@3scale.net tiago@3scale.net
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: nokogiri
100
+ requirement: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :runtime
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ! '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ description: This gem allows to easily connect an application that provides a Web
115
+ Service with the 3scale API Management System to authorize it's users and report
116
+ the usage.
117
+ email:
118
+ - support@3scale.net
67
119
  executables: []
68
120
  extensions: []
69
- extra_rdoc_files:
70
- - README.rdoc
121
+ extra_rdoc_files: []
71
122
  files:
72
123
  - .gitignore
124
+ - .travis.yml
73
125
  - 3scale_client.gemspec
74
126
  - Gemfile
75
- - Gemfile.lock
76
127
  - LICENCE
77
128
  - README.rdoc
78
129
  - Rakefile
79
130
  - VERSION
80
- - lib/3scale_client.rb
81
131
  - lib/3scale/authorize_response.rb
82
132
  - lib/3scale/client.rb
133
+ - lib/3scale/client/version.rb
83
134
  - lib/3scale/response.rb
135
+ - lib/3scale_client.rb
84
136
  - test/client_test.rb
85
137
  - test/remote_test.rb
86
138
  homepage: http://www.3scale.net
87
- licenses: []
139
+ licenses:
140
+ - MIT
88
141
  post_install_message:
89
- rdoc_options:
90
- - --charset=UTF-8
142
+ rdoc_options: []
91
143
  require_paths:
92
144
  - lib
93
145
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -96,19 +148,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
148
  - - ! '>='
97
149
  - !ruby/object:Gem::Version
98
150
  version: '0'
151
+ segments:
152
+ - 0
153
+ hash: -4299208069213055852
99
154
  required_rubygems_version: !ruby/object:Gem::Requirement
100
155
  none: false
101
156
  requirements:
102
157
  - - ! '>='
103
158
  - !ruby/object:Gem::Version
104
159
  version: '0'
160
+ segments:
161
+ - 0
162
+ hash: -4299208069213055852
105
163
  requirements: []
106
164
  rubyforge_project:
107
- rubygems_version: 1.8.15
165
+ rubygems_version: 1.8.25
108
166
  signing_key:
109
167
  specification_version: 3
110
168
  summary: Client for 3scale Web Service Management System API
111
169
  test_files:
112
- - test/remote_test.rb
113
170
  - test/client_test.rb
114
- has_rdoc:
171
+ - test/remote_test.rb
data/Gemfile.lock DELETED
@@ -1,33 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- 3scale_client (2.3.2)
5
- nokogiri
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- fakeweb (1.3.0)
11
- git (1.2.5)
12
- jeweler (1.8.3)
13
- bundler (~> 1.0)
14
- git (>= 1.2.5)
15
- rake
16
- rdoc
17
- json (1.6.5)
18
- metaclass (0.0.1)
19
- mocha (0.10.5)
20
- metaclass (~> 0.0.1)
21
- nokogiri (1.5.5)
22
- rake (0.9.2.2)
23
- rdoc (3.12)
24
- json (~> 1.4)
25
-
26
- PLATFORMS
27
- ruby
28
-
29
- DEPENDENCIES
30
- 3scale_client!
31
- fakeweb
32
- jeweler
33
- mocha