killbill-client 1.7.0 → 1.8.0

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: 819aaea84a56ac9c47cde389a7a31370c15fff54
4
- data.tar.gz: 7b2e3861bad56ae984fc38f3c955ef68b119a6eb
3
+ metadata.gz: af54df91b8798a89eb4f9ef3c54ec9c6bf24a29e
4
+ data.tar.gz: 2bfd6ec299800e5d4e4baba7db34fbb907ab915a
5
5
  SHA512:
6
- metadata.gz: 81e7ee389303f02b9112c99c34a8b45ca60427eb71e97cc7f498c6b4bd0101e98e10bf97a0a9013041b4ad162252585b55f5afe35e19f55e3433edc08c345427
7
- data.tar.gz: 40d096db6f30a5922dddda046388482c71d76df687c24158e01c1cf7bb7a194190da4850d6fffdeeff55bcfc7471f70fb862cfd1c40cfd69a4fd6dd5acc05014
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: false
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
- rvm:
10
- - 1.8.7
11
- - 1.9.2
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
@@ -41,6 +41,8 @@ module KillBillClient
41
41
 
42
42
  attr_writer :url
43
43
 
44
+ attr_accessor :disable_ssl_verification
45
+
44
46
  # Tenant key/secret. Optional.
45
47
  attr_accessor :api_key
46
48
  attr_accessor :api_secret
@@ -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
 
@@ -2,8 +2,6 @@ module KillBillClient
2
2
  module Model
3
3
  class EventSubscription < EventSubscriptionAttributes
4
4
  has_many :audit_logs, KillBillClient::Model::AuditLog
5
-
6
- create_alias :effective_date, :effective_dt
7
5
  end
8
6
  end
9
7
  end
@@ -30,7 +30,7 @@ module KillBillClient
30
30
  class EventSubscriptionAttributes < Resource
31
31
  attribute :event_id
32
32
  attribute :billing_period
33
- attribute :effective_dt
33
+ attribute :effective_date
34
34
  attribute :plan
35
35
  attribute :product
36
36
  attribute :price_list
@@ -39,7 +39,7 @@ module KillBillClient
39
39
  attribute :invoice_number
40
40
  attribute :balance
41
41
  attribute :account_id
42
- attribute :external_bundle_keys
42
+ attribute :bundle_keys
43
43
  attribute :credits
44
44
  attribute :items
45
45
  attribute :is_parent_invoice
@@ -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}",
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 7
4
+ MINOR = 8
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
@@ -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 (:timeouts) {{:read_timeout => 10000, :connection_timeout => 5000}}
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, timeouts)
65
- expect(http_client.read_timeout).to eq(timeouts[:read_timeout] / 1000)
66
- expect(http_client.open_timeout).to eq(timeouts[:connection_timeout] / 1000)
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, :effective_dt
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.effective_dt).to eq("devaroop")
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.7.0
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-05-03 00:00:00.000000000 Z
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