killbill-client 1.7.0 → 1.8.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +35 -15
- data/lib/killbill_client.rb +2 -0
- data/lib/killbill_client/api/net_http_adapter.rb +1 -0
- data/lib/killbill_client/models/event_subscription.rb +0 -2
- data/lib/killbill_client/models/gen/event_subscription_attributes.rb +1 -1
- data/lib/killbill_client/models/gen/invoice_attributes.rb +1 -1
- data/lib/killbill_client/models/invoice.rb +0 -2
- data/lib/killbill_client/version.rb +1 -1
- data/spec/killbill_client/http_adapter_spec.rb +6 -4
- data/spec/killbill_client/model_relation_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af54df91b8798a89eb4f9ef3c54ec9c6bf24a29e
|
4
|
+
data.tar.gz: 2bfd6ec299800e5d4e4baba7db34fbb907ab915a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54023ed88e5864e3de534031cf79df96e41fdd0ee202d1a08576a1ff7314dcfd0b0dc8ef624cc153e52aa7754b245c58fb4fca89c3232136ba10248762c235be
|
7
|
+
data.tar.gz: 9e1765d6a5455f61ce85f2f1b348c3b746fefb49710bd0b67e7b3231edcfca892f9af9bc4c8cab12aa32619062f78683f78b9fdb52bcd8f1e7da5422a4a15e14
|
data/.travis.yml
CHANGED
@@ -1,27 +1,47 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
|
-
sudo:
|
3
|
+
sudo: required
|
4
|
+
cache: bundler
|
5
|
+
|
6
|
+
dist: trusty
|
7
|
+
|
8
|
+
before_install:
|
9
|
+
- sudo sysctl -w net.ipv4.tcp_fin_timeout=15
|
10
|
+
- sudo sysctl -w net.ipv4.tcp_tw_reuse=1
|
11
|
+
- travis_retry gem install bundler
|
12
|
+
- travis_retry curl -LO 'https://search.maven.org/remotecontent?filepath=org/kill-bill/billing/killbill-profiles-killbill/0.18.8/killbill-profiles-killbill-0.18.8-jetty-console.war' && java -Dorg.killbill.catalog.uri=SpyCarAdvanced.xml -Djava.security.egd=file:/dev/./urandom -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN -jar killbill-profiles-killbill-0.18.8-jetty-console.war --port 8080 --headless 2>&1 | egrep -v "lvl='INFO'| < | > |[ \t]*at [ \ta-zA-Z0-9\.\:\(\)]+" & sleep 80 && travis_retry curl -v -X POST -u 'admin:password' -H 'Content-Type:application/json' -H 'X-Killbill-CreatedBy:admin' -d '{"apiKey":"bob", "apiSecret":"lazar"}' "http://127.0.0.1:8080/1.0/kb/tenants"
|
13
|
+
|
14
|
+
before_script:
|
15
|
+
- jdk_switcher use $JDK
|
16
|
+
|
17
|
+
# Need Kill Bill 0.18.9
|
18
|
+
#script: 'bundle exec rake test:spec test:remote:spec'
|
19
|
+
script: 'bundle exec rake test:spec'
|
4
20
|
|
5
21
|
notifications:
|
6
22
|
email:
|
7
23
|
- kill-bill-commits@googlegroups.com
|
8
24
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- 1.9.3
|
13
|
-
- 2.0.0
|
14
|
-
- ruby-head
|
15
|
-
- jruby-19mode
|
16
|
-
- jruby-20mode
|
17
|
-
- jruby-head
|
18
|
-
|
19
|
-
jdk:
|
20
|
-
- openjdk6
|
21
|
-
- openjdk7
|
22
|
-
- oraclejdk7
|
25
|
+
env:
|
26
|
+
global:
|
27
|
+
- JRUBY_OPTS='--2.0 -J-Xmx1024M'
|
23
28
|
|
24
29
|
matrix:
|
30
|
+
include:
|
31
|
+
- rvm: ree-1.8.7-2011.12
|
32
|
+
- rvm: 1.8.7
|
33
|
+
- rvm: 1.9.3
|
34
|
+
- rvm: 2.2.0
|
35
|
+
- rvm: ruby-head
|
36
|
+
- rvm: jruby-1.7.26
|
37
|
+
env: JDK=oraclejdk8
|
38
|
+
- rvm: jruby-1.7.26
|
39
|
+
env: JDK=openjdk8
|
40
|
+
- rvm: jruby-head
|
41
|
+
env: JDK=oraclejdk8
|
42
|
+
- rvm: jruby-head
|
43
|
+
env: JDK=openjdk8
|
25
44
|
allow_failures:
|
26
45
|
- rvm: ruby-head
|
27
46
|
- rvm: jruby-head
|
47
|
+
fast_finish: true
|
data/lib/killbill_client.rb
CHANGED
@@ -68,6 +68,7 @@ module KillBillClient
|
|
68
68
|
http.read_timeout = options[:read_timeout].to_f / 1000 if options[:read_timeout].is_a? Numeric
|
69
69
|
http.open_timeout = options[:connection_timeout].to_f / 1000 if options[:connection_timeout].is_a? Numeric
|
70
70
|
http.use_ssl = uri.scheme == 'https'
|
71
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if (options[:disable_ssl_verification] || KillBillClient.disable_ssl_verification)
|
71
72
|
http
|
72
73
|
end
|
73
74
|
|
@@ -13,8 +13,6 @@ module KillBillClient
|
|
13
13
|
|
14
14
|
has_custom_fields KILLBILL_API_INVOICES_PREFIX, :invoice_id
|
15
15
|
|
16
|
-
create_alias :bundle_keys, :external_bundle_keys
|
17
|
-
|
18
16
|
class << self
|
19
17
|
def find_by_id_or_number(id_or_number, with_items = true, audit = "NONE", options = {})
|
20
18
|
get "#{KILLBILL_API_INVOICES_PREFIX}/#{id_or_number}",
|
@@ -10,7 +10,7 @@ describe KillBillClient::API do
|
|
10
10
|
|
11
11
|
let (:ssl_uri) {URI.parse 'https://killbill.io'}
|
12
12
|
let (:uri) {URI.parse 'http://killbill.io'}
|
13
|
-
let (:
|
13
|
+
let (:options) {{:read_timeout => 10000, :connection_timeout => 5000, :disable_ssl_verification => true}}
|
14
14
|
|
15
15
|
it 'should send double-encoded uri' do
|
16
16
|
contract_property = KillBillClient::Model::PluginPropertyAttributes.new
|
@@ -57,14 +57,16 @@ describe KillBillClient::API do
|
|
57
57
|
expect(http_client.read_timeout).to eq(60)
|
58
58
|
expect(http_client.open_timeout).to be_nil
|
59
59
|
expect(http_client.use_ssl?).to be false
|
60
|
+
expect(http_client.verify_mode).to be_nil
|
60
61
|
end
|
61
62
|
|
62
63
|
it 'should set the correct parameters for http client' do
|
63
64
|
http_adapter = DummyForHTTPAdapter.new
|
64
|
-
http_client = http_adapter.send(:create_http_client, ssl_uri,
|
65
|
-
expect(http_client.read_timeout).to eq(
|
66
|
-
expect(http_client.open_timeout).to eq(
|
65
|
+
http_client = http_adapter.send(:create_http_client, ssl_uri, options)
|
66
|
+
expect(http_client.read_timeout).to eq(options[:read_timeout] / 1000)
|
67
|
+
expect(http_client.open_timeout).to eq(options[:connection_timeout] / 1000)
|
67
68
|
expect(http_client.use_ssl?).to be true
|
69
|
+
expect(http_client.verify_mode).to eq(OpenSSL::SSL::VERIFY_NONE)
|
68
70
|
end
|
69
71
|
|
70
72
|
end
|
@@ -59,7 +59,7 @@ describe KillBillClient::Model::Resource do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
it 'should create alias attr accessors' do
|
62
|
-
KillBillClient::Model::EventSubscription.create_alias :alias_date, :
|
62
|
+
KillBillClient::Model::EventSubscription.create_alias :alias_date, :effective_date
|
63
63
|
|
64
64
|
methods = KillBillClient::Model::EventSubscription.instance_methods
|
65
65
|
expect(methods.map(&:to_sym)).to include :alias_date
|
@@ -67,7 +67,7 @@ describe KillBillClient::Model::Resource do
|
|
67
67
|
|
68
68
|
evt = KillBillClient::Model::EventSubscription.new
|
69
69
|
evt.alias_date = "devaroop"
|
70
|
-
expect(evt.
|
70
|
+
expect(evt.effective_date).to eq("devaroop")
|
71
71
|
expect(evt.alias_date).to eq("devaroop")
|
72
72
|
end
|
73
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Killbill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|