pisoni 1.29.0 → 1.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/Gemfile +2 -4
- data/lib/3scale/core/api_client/operations.rb +1 -1
- data/lib/3scale/core/api_client/support.rb +6 -0
- data/lib/3scale/core/application.rb +3 -10
- data/lib/3scale/core/application_key.rb +2 -6
- data/lib/3scale/core/application_referrer_filter.rb +1 -1
- data/lib/3scale/core/service.rb +1 -6
- data/lib/3scale/core/utilization.rb +1 -1
- data/lib/3scale/core/version.rb +1 -1
- data/lib/3scale/core.rb +2 -9
- data/pisoni.gemspec +7 -6
- data/spec/alert_limit_spec.rb +13 -13
- data/spec/application_key_spec.rb +26 -10
- data/spec/application_referrer_filter_spec.rb +7 -6
- data/spec/application_spec.rb +4 -4
- data/spec/service_spec.rb +0 -5
- data/spec/spec_helper.rb +2 -0
- data/spec/utilization_spec.rb +10 -0
- metadata +36 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc7b659e66478ddb954b8144e47cd83cbf80acd54e16f7f051c82f07f47c221f
|
4
|
+
data.tar.gz: fb1ab6344af206a17085bf42134622fef72e57093bad247ce8efaa2b823b8ff6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b39b7a9ed13db3500fb782b1f1f5e75cc9d15261938f70e11788f84a96957a6f38ca3cc801bf84f7b5ee94cb4bac4a1bfed12ec9a4bc99fb5c01f73ed4ea860
|
7
|
+
data.tar.gz: 1de636e31c5d8c5897eda7282283a157553a032c81f26b58378c39a342021786285b851c59bd786dbbf3f5ea536ed3cd4f564c415240887af136e46e18345c2f
|
data/CHANGELOG.md
CHANGED
@@ -2,12 +2,27 @@
|
|
2
2
|
|
3
3
|
Notable changes to Pisoni will be tracked in this document.
|
4
4
|
|
5
|
+
## 1.30.0 - 2024-02-29
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- Fixed the issue with fetching utilization and managing referrer filters for applications with special characters in the
|
10
|
+
application IDs by escaping them. [#33](https://github.com/3scale/pisoni/pull/33)
|
11
|
+
- Upgrade dependencies, specifically `faraday` and `json`, making Ruby 2.6 the minimum supported version. [#34](https://github.com/3scale/pisoni/pull/34)
|
12
|
+
|
13
|
+
## 1.29.1 - 2023-11-30
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- Fixed the issue with updating/deleting keys for applications with special characters in the
|
18
|
+
application IDs by escaping them. [#31](https://github.com/3scale/pisoni/pull/31)
|
19
|
+
|
5
20
|
## 1.29.0 - 2020-03-17
|
6
21
|
|
7
22
|
### Removed
|
8
23
|
|
9
24
|
- "Latest transactions" functionality
|
10
|
-
[#
|
25
|
+
[#27](https://github.com/3scale/pisoni/pull/27)
|
11
26
|
|
12
27
|
## 1.28.0 - 2019-12-20
|
13
28
|
|
data/Gemfile
CHANGED
@@ -3,14 +3,12 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :test do
|
6
|
-
gem 'turn', '~> 0.9.7'
|
7
6
|
gem 'minitest'
|
8
7
|
gem "codeclimate-test-reporter", require: nil
|
9
8
|
end
|
10
9
|
|
11
10
|
group :development, :test do
|
12
|
-
gem 'pry',
|
13
|
-
gem 'pry-
|
14
|
-
gem 'pry-byebug', '~> 2.0.0'
|
11
|
+
gem 'pry-doc', '>= 0.8'
|
12
|
+
gem 'pry-byebug', '>= 3.7.0'
|
15
13
|
gem 'license_finder', '~> 5', require: false
|
16
14
|
end
|
@@ -106,7 +106,7 @@ module ThreeScale
|
|
106
106
|
else
|
107
107
|
Core.faraday.send method, uri, attributes.to_json
|
108
108
|
end
|
109
|
-
rescue Faraday::
|
109
|
+
rescue Faraday::ClientError, SystemCallError => e
|
110
110
|
raise ConnectionError, e
|
111
111
|
end
|
112
112
|
private :api_http
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
1
3
|
module ThreeScale
|
2
4
|
module Core
|
3
5
|
module APIClient
|
@@ -38,6 +40,10 @@ module ThreeScale
|
|
38
40
|
@default_prefix = prefix
|
39
41
|
end
|
40
42
|
|
43
|
+
def url_encode(str)
|
44
|
+
ERB::Util.url_encode(str)
|
45
|
+
end
|
46
|
+
|
41
47
|
private
|
42
48
|
|
43
49
|
def internal_api_error(status)
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
|
3
1
|
module ThreeScale
|
4
2
|
module Core
|
5
3
|
class Application < APIClient::Resource
|
@@ -18,16 +16,12 @@ module ThreeScale
|
|
18
16
|
private_class_method :base_uri
|
19
17
|
|
20
18
|
def self.app_uri(service_id, id)
|
21
|
-
|
22
|
-
|
23
|
-
"#{base_uri(service_id)}#{escaped_id}"
|
19
|
+
"#{base_uri(service_id)}#{url_encode(id)}"
|
24
20
|
end
|
25
21
|
private_class_method :app_uri
|
26
22
|
|
27
23
|
def self.key_uri(service_id, key)
|
28
|
-
|
29
|
-
|
30
|
-
"#{base_uri(service_id)}key/#{escaped_key}"
|
24
|
+
"#{base_uri(service_id)}key/#{url_encode(key)}"
|
31
25
|
end
|
32
26
|
private_class_method :key_uri
|
33
27
|
|
@@ -77,8 +71,7 @@ module ThreeScale
|
|
77
71
|
|
78
72
|
def self.save_id_by_key(service_id, user_key, id)
|
79
73
|
raise ApplicationHasInconsistentData.new(id, user_key) if (service_id.nil? || id.nil? || user_key.nil? || service_id=="" || id=="" || user_key=="")
|
80
|
-
|
81
|
-
ret = api_do_put({}, uri: "#{app_uri(service_id, id)}/key/#{escaped_key}")
|
74
|
+
ret = api_do_put({}, uri: "#{app_uri(service_id, id)}/key/#{url_encode(user_key)}")
|
82
75
|
ret[:ok]
|
83
76
|
end
|
84
77
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
|
3
1
|
module ThreeScale
|
4
2
|
module Core
|
5
3
|
class ApplicationKey < APIClient::Resource
|
@@ -23,14 +21,12 @@ module ThreeScale
|
|
23
21
|
end
|
24
22
|
|
25
23
|
def self.base_uri(service_id, application_id)
|
26
|
-
"#{default_uri}#{service_id}/applications/#{application_id}/keys/"
|
24
|
+
"#{default_uri}#{service_id}/applications/#{url_encode(application_id)}/keys/"
|
27
25
|
end
|
28
26
|
private_class_method :base_uri
|
29
27
|
|
30
28
|
def self.application_key_uri(service_id, application_id, value = '')
|
31
|
-
|
32
|
-
|
33
|
-
"#{base_uri(service_id, application_id)}#{escaped_value}"
|
29
|
+
"#{base_uri(service_id, application_id)}#{url_encode(value)}"
|
34
30
|
end
|
35
31
|
private_class_method :application_key_uri
|
36
32
|
end
|
@@ -25,7 +25,7 @@ module ThreeScale
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.base_uri(service_id, application_id)
|
28
|
-
"#{default_uri}#{service_id}/applications/#{application_id}/referrer_filters"
|
28
|
+
"#{default_uri}#{service_id}/applications/#{url_encode(application_id)}/referrer_filters"
|
29
29
|
end
|
30
30
|
private_class_method :base_uri
|
31
31
|
end
|
data/lib/3scale/core/service.rb
CHANGED
@@ -2,8 +2,7 @@ module ThreeScale
|
|
2
2
|
module Core
|
3
3
|
class Service < APIClient::Resource
|
4
4
|
attributes :provider_key, :id, :backend_version, :referrer_filters_required,
|
5
|
-
:
|
6
|
-
:default_user_plan_name, :default_service, :state
|
5
|
+
:default_service, :state
|
7
6
|
|
8
7
|
class << self
|
9
8
|
def load_by_id(service_id)
|
@@ -85,10 +84,6 @@ module ThreeScale
|
|
85
84
|
@referrer_filters_required
|
86
85
|
end
|
87
86
|
|
88
|
-
def user_registration_required?
|
89
|
-
@user_registration_required
|
90
|
-
end
|
91
|
-
|
92
87
|
def active?
|
93
88
|
state == :active
|
94
89
|
end
|
@@ -6,7 +6,7 @@ module ThreeScale
|
|
6
6
|
default_uri '/internal/services/'
|
7
7
|
|
8
8
|
def self.utilization_uri(service_id, app_id)
|
9
|
-
"#{default_uri}#{service_id}/applications/#{app_id}/utilization/"
|
9
|
+
"#{default_uri}#{service_id}/applications/#{url_encode(app_id)}/utilization/"
|
10
10
|
end
|
11
11
|
private_class_method :utilization_uri
|
12
12
|
|
data/lib/3scale/core/version.rb
CHANGED
data/lib/3scale/core.rb
CHANGED
@@ -1,14 +1,7 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'json'
|
3
3
|
require 'faraday'
|
4
|
-
require '
|
5
|
-
|
6
|
-
# Warn that Faraday < 0.13 and Net::HTTP::Persistent >= 3.0.0 don't mix well
|
7
|
-
if Faraday::VERSION =~ /0\.([0-9]|1[012])\.\d+/ &&
|
8
|
-
Net::HTTP::Persistent::VERSION =~ /^[^012]\.\d+\.\d+/
|
9
|
-
warn 'The combination of faraday < 0.13 and net-http-persistent 3.0+ is ' \
|
10
|
-
'known to have issues. See https://github.com/lostisland/faraday/issues/617'
|
11
|
-
end
|
4
|
+
require 'faraday/net_http_persistent'
|
12
5
|
|
13
6
|
require '3scale/core/version'
|
14
7
|
require '3scale/core/logger'
|
@@ -56,7 +49,7 @@ module ThreeScale
|
|
56
49
|
@password = uri.password
|
57
50
|
end
|
58
51
|
|
59
|
-
@faraday.
|
52
|
+
@faraday.set_basic_auth(@username, @password) if @username || @password
|
60
53
|
@faraday
|
61
54
|
end
|
62
55
|
|
data/pisoni.gemspec
CHANGED
@@ -18,12 +18,13 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.description = 'Client for the Apisonator internal API for model data.'
|
19
19
|
s.license = 'Apache-2.0'
|
20
20
|
|
21
|
-
|
22
|
-
s.
|
23
|
-
s.
|
24
|
-
s.
|
21
|
+
# faraday v2.9.0 removes support for Ruby 2.7, see https://github.com/lostisland/faraday/releases/tag/v2.9.0
|
22
|
+
s.add_runtime_dependency 'faraday', '~> 2.0', '<= 2.9'
|
23
|
+
s.add_runtime_dependency 'json', '~> 2.7', '>= 2.7.1'
|
24
|
+
s.add_runtime_dependency 'injectedlogger', '0.0.13'
|
25
|
+
s.add_runtime_dependency 'faraday-net_http_persistent', '~> 2.1'
|
25
26
|
|
26
|
-
s.add_development_dependency 'rake'
|
27
|
+
s.add_development_dependency 'rake', '~> 13.1'
|
27
28
|
|
28
29
|
s.files = `git ls-files`.split($/).reject do |f| [
|
29
30
|
%r{^\.[^\/]},
|
@@ -39,5 +40,5 @@ Gem::Specification.new do |s|
|
|
39
40
|
|
40
41
|
s.rdoc_options = ["--charset=UTF-8"]
|
41
42
|
|
42
|
-
s.required_ruby_version = '>= 2.
|
43
|
+
s.required_ruby_version = '>= 2.6.0'
|
43
44
|
end
|
data/spec/alert_limit_spec.rb
CHANGED
@@ -5,17 +5,17 @@ module ThreeScale
|
|
5
5
|
describe '.load_all' do
|
6
6
|
describe 'when there are alert limits' do
|
7
7
|
let(:service_id) { 100 }
|
8
|
-
let(:
|
8
|
+
let(:limits) { [50, 100] }
|
9
9
|
before do
|
10
|
-
|
11
|
-
|
10
|
+
limits.map { |value| AlertLimit.delete(service_id, value) }
|
11
|
+
limits.map { |value| AlertLimit.save(service_id, value) }
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'returns a list of alert limits' do
|
15
15
|
alert_limits = AlertLimit.load_all(service_id)
|
16
16
|
|
17
17
|
alert_limits.size.must_equal 2
|
18
|
-
alert_limits.map(&:value).must_equal
|
18
|
+
alert_limits.map(&:value).must_equal limits
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -30,40 +30,40 @@ module ThreeScale
|
|
30
30
|
|
31
31
|
describe '.save' do
|
32
32
|
let(:service_id) { 500 }
|
33
|
-
let(:
|
33
|
+
let(:limit) { 100 }
|
34
34
|
|
35
35
|
before do
|
36
|
-
AlertLimit.delete(service_id,
|
36
|
+
AlertLimit.delete(service_id, limit)
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'returns a AlertLimit object' do
|
40
|
-
alert_limit = AlertLimit.save(service_id,
|
40
|
+
alert_limit = AlertLimit.save(service_id, limit)
|
41
41
|
|
42
42
|
alert_limit.must_be_kind_of AlertLimit
|
43
|
-
alert_limit.value.must_equal
|
43
|
+
alert_limit.value.must_equal limit
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
describe '.delete' do
|
48
48
|
describe 'with an existing alert limit' do
|
49
49
|
let(:service_id) { 300 }
|
50
|
-
let(:
|
50
|
+
let(:limit) { 50 }
|
51
51
|
|
52
52
|
before do
|
53
|
-
AlertLimit.save(service_id,
|
53
|
+
AlertLimit.save(service_id, limit)
|
54
54
|
end
|
55
55
|
|
56
56
|
it 'returns true' do
|
57
|
-
AlertLimit.delete(service_id,
|
57
|
+
AlertLimit.delete(service_id, limit).must_equal true
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
61
|
describe 'with a non-existing alert limit' do
|
62
62
|
let(:service_id) { 300 }
|
63
|
-
let(:
|
63
|
+
let(:limit) { 75 }
|
64
64
|
|
65
65
|
it 'returns true' do
|
66
|
-
AlertLimit.delete(service_id,
|
66
|
+
AlertLimit.delete(service_id, limit).must_equal false
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
@@ -6,21 +6,21 @@ module ThreeScale
|
|
6
6
|
describe 'when there are application keys' do
|
7
7
|
let(:service_id) { 100 }
|
8
8
|
let(:app_id) { 2001 }
|
9
|
-
let(:
|
9
|
+
let(:keys) { %w[foo bar] }
|
10
10
|
before do
|
11
|
-
|
11
|
+
keys.map { |key| ApplicationKey.delete(service_id, app_id, key) }
|
12
12
|
|
13
13
|
Application.save service_id: service_id, id: app_id, state: 'suspended',
|
14
14
|
plan_id: '3066', plan_name: 'crappy', redirect_url: 'blah'
|
15
15
|
|
16
|
-
|
16
|
+
keys.map { |key| ApplicationKey.save(service_id, app_id, key) }
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'returns a list of application keys' do
|
20
20
|
application_keys = ApplicationKey.load_all(service_id, app_id)
|
21
21
|
|
22
22
|
application_keys.size.must_equal 2
|
23
|
-
application_keys.map(&:value).sort.must_equal
|
23
|
+
application_keys.map(&:value).sort.must_equal keys.sort
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -42,24 +42,40 @@ module ThreeScale
|
|
42
42
|
describe '.save' do
|
43
43
|
let(:service_id) { 500 }
|
44
44
|
let(:app_id) { 500 }
|
45
|
-
let(:
|
45
|
+
let(:key) { "foobar" }
|
46
46
|
|
47
47
|
before do
|
48
|
-
ApplicationKey.delete(service_id, app_id,
|
48
|
+
ApplicationKey.delete(service_id, app_id, key)
|
49
49
|
|
50
50
|
Application.save service_id: service_id, id: app_id, state: 'suspended',
|
51
51
|
plan_id: '3066', plan_name: 'crappy', redirect_url: 'blah'
|
52
52
|
end
|
53
53
|
|
54
54
|
it 'returns an ApplicationKey object' do
|
55
|
-
application_key = ApplicationKey.save(service_id, app_id,
|
55
|
+
application_key = ApplicationKey.save(service_id, app_id, key)
|
56
56
|
|
57
57
|
application_key.must_be_kind_of ApplicationKey
|
58
|
-
application_key.value.must_equal
|
58
|
+
application_key.value.must_equal key
|
59
59
|
end
|
60
60
|
|
61
61
|
describe 'with a key that contains special chars (*, _, etc.)' do
|
62
|
-
let(:key) {
|
62
|
+
let(:key) { SPECIAL_CHARACTERS }
|
63
|
+
|
64
|
+
before do
|
65
|
+
ApplicationKey.delete(service_id, app_id, key)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'saves it correctly' do
|
69
|
+
application_key = ApplicationKey.save(service_id, app_id, key)
|
70
|
+
|
71
|
+
application_key.must_be_kind_of ApplicationKey
|
72
|
+
application_key.value.must_equal key
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'with app ID that contains special characters ({, $, ? etc.)' do
|
77
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
78
|
+
let(:key) { SPECIAL_CHARACTERS }
|
63
79
|
|
64
80
|
before do
|
65
81
|
ApplicationKey.delete(service_id, app_id, key)
|
@@ -103,7 +119,7 @@ module ThreeScale
|
|
103
119
|
end
|
104
120
|
|
105
121
|
describe 'with a key that contains special chars (*, _, etc.)' do
|
106
|
-
let(:key_with_special_chars) {
|
122
|
+
let(:key_with_special_chars) { SPECIAL_CHARACTERS }
|
107
123
|
|
108
124
|
before do
|
109
125
|
ApplicationKey.save(service_id, app_id, key)
|
@@ -3,7 +3,7 @@ module ThreeScale
|
|
3
3
|
module Core
|
4
4
|
describe ApplicationReferrerFilter do
|
5
5
|
let(:service_id) { 10 }
|
6
|
-
let(:app_id) {
|
6
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
7
7
|
let(:filters) { %w(foo bar doopah) }
|
8
8
|
let(:application) do
|
9
9
|
{ service_id: service_id,
|
@@ -24,22 +24,23 @@ module ThreeScale
|
|
24
24
|
end
|
25
25
|
|
26
26
|
describe '.load_all' do
|
27
|
+
subject { ApplicationReferrerFilter.load_all(service_id, app_id) }
|
28
|
+
|
27
29
|
describe 'Getting all referrer filters' do
|
28
|
-
let(:
|
30
|
+
let(:ref_filters) { %w(foo bar) }
|
29
31
|
|
30
32
|
before do
|
31
|
-
|
33
|
+
ref_filters.map { |value| ApplicationReferrerFilter.save(service_id, app_id, value) }
|
32
34
|
end
|
33
35
|
|
34
36
|
it 'returns a sorted list of filters' do
|
35
|
-
|
36
|
-
filters.must_equal values.sort
|
37
|
+
subject.must_equal ref_filters.sort
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
describe 'when there are no referrer filters' do
|
41
42
|
it 'returns an empty list' do
|
42
|
-
|
43
|
+
subject.must_equal []
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
data/spec/application_spec.rb
CHANGED
@@ -47,7 +47,7 @@ module ThreeScale
|
|
47
47
|
|
48
48
|
describe 'with an app ID that contains special characters' do
|
49
49
|
let(:service_id) { 2001 }
|
50
|
-
let(:app_id) {
|
50
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
51
51
|
|
52
52
|
before do
|
53
53
|
Application.save service_id: service_id, id: app_id, state: 'suspended',
|
@@ -90,7 +90,7 @@ module ThreeScale
|
|
90
90
|
|
91
91
|
describe 'with an app ID that contains special characters' do
|
92
92
|
let(:service_id) { 2001 }
|
93
|
-
let(:app_id) {
|
93
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
94
94
|
|
95
95
|
before do
|
96
96
|
Application.save service_id: service_id, id: app_id, state: 'suspended',
|
@@ -157,7 +157,7 @@ module ThreeScale
|
|
157
157
|
|
158
158
|
describe 'with an app ID that contains special characters' do
|
159
159
|
let(:service_id) { 2001 }
|
160
|
-
let(:app_id) {
|
160
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
161
161
|
|
162
162
|
before do
|
163
163
|
Application.delete(service_id, app_id)
|
@@ -271,7 +271,7 @@ module ThreeScale
|
|
271
271
|
|
272
272
|
describe 'by_key' do
|
273
273
|
let(:key) { 'a_key' }
|
274
|
-
let(:key_with_special_chars) {
|
274
|
+
let(:key_with_special_chars) { SPECIAL_CHARACTERS }
|
275
275
|
let(:service_id) { 2001 }
|
276
276
|
let(:app_id) { 8011 }
|
277
277
|
|
data/spec/service_spec.rb
CHANGED
@@ -26,8 +26,6 @@ module ThreeScale
|
|
26
26
|
id: default_service_id,
|
27
27
|
referrer_filters_required: true,
|
28
28
|
backend_version: 'oauth',
|
29
|
-
default_user_plan_id: 15,
|
30
|
-
default_user_plan_name: 'test name',
|
31
29
|
default_service: true
|
32
30
|
raise unless service.default_service
|
33
31
|
|
@@ -47,10 +45,7 @@ module ThreeScale
|
|
47
45
|
service.provider_key.must_equal default_provider_key
|
48
46
|
service.id.must_equal default_service_id.to_s
|
49
47
|
service.referrer_filters_required?.must_equal true
|
50
|
-
service.user_registration_required?.must_equal true
|
51
48
|
service.backend_version.must_equal 'oauth'
|
52
|
-
service.default_user_plan_id.must_equal '15'
|
53
|
-
service.default_user_plan_name.must_equal 'test name'
|
54
49
|
end
|
55
50
|
end
|
56
51
|
|
data/spec/spec_helper.rb
CHANGED
data/spec/utilization_spec.rb
CHANGED
@@ -105,6 +105,16 @@ module ThreeScale
|
|
105
105
|
Utilization.load(service_id, non_existing_app_id).must_be_nil
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
describe 'with an application ID with special characters' do
|
110
|
+
let(:app_id) { SPECIAL_CHARACTERS }
|
111
|
+
|
112
|
+
subject { Utilization.load(service_id, app_id) }
|
113
|
+
|
114
|
+
it 'gets expected results' do
|
115
|
+
subject.wont_be_empty
|
116
|
+
end
|
117
|
+
end
|
108
118
|
end
|
109
119
|
end
|
110
120
|
end
|
metadata
CHANGED
@@ -1,85 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pisoni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Martinez Ruiz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
- - "<="
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '2.9'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
29
|
+
version: '2.0'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.9'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.7'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
42
|
+
version: 2.7.1
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '2.7'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
52
|
+
version: 2.7.1
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: injectedlogger
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
|
-
- -
|
57
|
+
- - '='
|
46
58
|
- !ruby/object:Gem::Version
|
47
59
|
version: 0.0.13
|
48
60
|
type: :runtime
|
49
61
|
prerelease: false
|
50
62
|
version_requirements: !ruby/object:Gem::Requirement
|
51
63
|
requirements:
|
52
|
-
- -
|
64
|
+
- - '='
|
53
65
|
- !ruby/object:Gem::Version
|
54
66
|
version: 0.0.13
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
68
|
+
name: faraday-net_http_persistent
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
59
|
-
- - "
|
71
|
+
- - "~>"
|
60
72
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
73
|
+
version: '2.1'
|
62
74
|
type: :runtime
|
63
75
|
prerelease: false
|
64
76
|
version_requirements: !ruby/object:Gem::Requirement
|
65
77
|
requirements:
|
66
|
-
- - "
|
78
|
+
- - "~>"
|
67
79
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
80
|
+
version: '2.1'
|
69
81
|
- !ruby/object:Gem::Dependency
|
70
82
|
name: rake
|
71
83
|
requirement: !ruby/object:Gem::Requirement
|
72
84
|
requirements:
|
73
|
-
- - "
|
85
|
+
- - "~>"
|
74
86
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
87
|
+
version: '13.1'
|
76
88
|
type: :development
|
77
89
|
prerelease: false
|
78
90
|
version_requirements: !ruby/object:Gem::Requirement
|
79
91
|
requirements:
|
80
|
-
- - "
|
92
|
+
- - "~>"
|
81
93
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
94
|
+
version: '13.1'
|
83
95
|
description: Client for the Apisonator internal API for model data.
|
84
96
|
email:
|
85
97
|
- alex@3scale.net
|
@@ -137,7 +149,7 @@ homepage: https://github.com/3scale/pisoni
|
|
137
149
|
licenses:
|
138
150
|
- Apache-2.0
|
139
151
|
metadata: {}
|
140
|
-
post_install_message:
|
152
|
+
post_install_message:
|
141
153
|
rdoc_options:
|
142
154
|
- "--charset=UTF-8"
|
143
155
|
require_paths:
|
@@ -146,15 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
158
|
requirements:
|
147
159
|
- - ">="
|
148
160
|
- !ruby/object:Gem::Version
|
149
|
-
version: 2.
|
161
|
+
version: 2.6.0
|
150
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
163
|
requirements:
|
152
164
|
- - ">="
|
153
165
|
- !ruby/object:Gem::Version
|
154
166
|
version: '0'
|
155
167
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
157
|
-
signing_key:
|
168
|
+
rubygems_version: 3.1.6
|
169
|
+
signing_key:
|
158
170
|
specification_version: 4
|
159
171
|
summary: Client for the Apisonator internal API for model data
|
160
172
|
test_files:
|