killbill-currency-plugin 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +16 -16
- data/Jarfile +10 -9
- data/Jarfile.lock +30 -27
- data/README.md +1 -0
- data/VERSION +1 -1
- data/killbill-currency-plugin.gemspec +1 -1
- data/lib/currency_plugin.rb +0 -1
- data/lib/currency_plugin/api.rb +15 -24
- data/pom.xml +1 -1
- metadata +5 -6
- data/lib/currency_plugin/properties.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9df831dd4b01fe8ed300e5277f63cdf08c5f736d
|
4
|
+
data.tar.gz: 4521c1e9beaf9ea9728297aa59f58bf6260c87c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82381cfc918a28f913899c0f9e3f5da0dcc1a6a6a032ddddbdff03fb1cde146770fdf6a26ce9496f650eb3ccc7dcd18d4bde264154b96f946e6e636b5817b32
|
7
|
+
data.tar.gz: d40da42cf00e4de6f3594ef7b72482fa01be743dd986bdbdcf3af2041c3014f2143a7e2ad50d9f8f2427cd45214bb0949a4682a6a687b0143ed537f1782f5815
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
killbill-currency-plugin (
|
4
|
+
killbill-currency-plugin (3.0.0)
|
5
5
|
activerecord (~> 4.1.0)
|
6
6
|
activerecord-bogacs (~> 0.3)
|
7
7
|
activerecord-jdbc-adapter (~> 1.3)
|
8
|
-
killbill (~>
|
8
|
+
killbill (~> 8.0)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (4.1.
|
14
|
-
activesupport (= 4.1.
|
13
|
+
activemodel (4.1.16)
|
14
|
+
activesupport (= 4.1.16)
|
15
15
|
builder (~> 3.1)
|
16
|
-
activerecord (4.1.
|
17
|
-
activemodel (= 4.1.
|
18
|
-
activesupport (= 4.1.
|
16
|
+
activerecord (4.1.16)
|
17
|
+
activemodel (= 4.1.16)
|
18
|
+
activesupport (= 4.1.16)
|
19
19
|
arel (~> 5.0.0)
|
20
|
-
activerecord-bogacs (0.
|
21
|
-
activerecord-jdbc-adapter (1.3.
|
20
|
+
activerecord-bogacs (0.5.0)
|
21
|
+
activerecord-jdbc-adapter (1.3.21)
|
22
22
|
activerecord (>= 2.2)
|
23
|
-
activesupport (4.1.
|
23
|
+
activesupport (4.1.16)
|
24
24
|
i18n (~> 0.6, >= 0.6.9)
|
25
25
|
json (~> 1.7, >= 1.7.7)
|
26
26
|
minitest (~> 5.1)
|
@@ -38,9 +38,9 @@ GEM
|
|
38
38
|
thread_safe (~> 0.3, >= 0.3.1)
|
39
39
|
diff-lcs (1.1.3)
|
40
40
|
equalizer (0.0.11)
|
41
|
-
ethon (0.
|
41
|
+
ethon (0.9.1)
|
42
42
|
ffi (>= 1.3.0)
|
43
|
-
ffi (1.9.
|
43
|
+
ffi (1.9.14-java)
|
44
44
|
i18n (0.7.0)
|
45
45
|
ice_nine (0.11.1)
|
46
46
|
jar-dependencies (0.3.1)
|
@@ -52,15 +52,15 @@ GEM
|
|
52
52
|
jdbc-mariadb (1.2.3)
|
53
53
|
jdbc-sqlite3 (3.8.11.2)
|
54
54
|
json (1.8.3-java)
|
55
|
-
killbill (
|
55
|
+
killbill (8.3.1)
|
56
56
|
rack (>= 1.5.2)
|
57
57
|
sinatra (~> 1.3.4)
|
58
58
|
typhoeus (~> 0.6.9)
|
59
59
|
tzinfo (~> 1.2.0)
|
60
60
|
maven-tools (1.0.13)
|
61
61
|
virtus (~> 1.0)
|
62
|
-
minitest (5.
|
63
|
-
rack (1.6.
|
62
|
+
minitest (5.9.1)
|
63
|
+
rack (1.6.5)
|
64
64
|
rack-protection (1.5.3)
|
65
65
|
rack
|
66
66
|
rake (10.4.2)
|
@@ -103,4 +103,4 @@ DEPENDENCIES
|
|
103
103
|
rspec (~> 2.12.0)
|
104
104
|
|
105
105
|
BUNDLED WITH
|
106
|
-
1.
|
106
|
+
1.11.2
|
data/Jarfile
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
2
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.
|
3
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.
|
4
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.
|
5
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.
|
6
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.
|
7
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.
|
8
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.
|
9
|
-
jar 'org.kill-bill.billing:killbill-util:tests', '0.
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.50'
|
2
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.23'
|
3
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.23'
|
4
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.23'
|
5
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.23'
|
6
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.23'
|
7
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.23'
|
8
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.23'
|
9
|
+
jar 'org.kill-bill.billing:killbill-util:tests', '0.18.0'
|
10
|
+
jar 'org.kill-bill.billing:killbill-util', '0.18.0'
|
10
11
|
jar 'org.mockito:mockito-all', '1.10.19'
|
11
12
|
jar 'javax.servlet:javax.servlet-api', '3.1.0'
|
data/Jarfile.lock
CHANGED
@@ -1,61 +1,64 @@
|
|
1
1
|
---
|
2
2
|
:runtime:
|
3
3
|
- io.dropwizard.metrics:metrics-core:jar:3.1.1
|
4
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.18
|
5
|
-
- com.fasterxml.jackson.core:jackson-core:jar:2.4.3
|
6
4
|
- joda-time:joda-time:jar:2.3
|
7
5
|
- org.weakref:jmxutils:jar:1.18
|
8
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.18
|
9
6
|
- commons-beanutils:commons-beanutils:jar:1.8.3
|
10
|
-
- org.kill-bill.billing:killbill-internal-api:jar:0.15.10
|
11
|
-
- org.kill-bill.commons:killbill-xmlloader:jar:0.11
|
12
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.18
|
13
7
|
- com.google.inject:guice:jar:3.0
|
14
8
|
- org.osgi:org.osgi.core:jar:5.0.0
|
15
|
-
-
|
9
|
+
- com.fasterxml.jackson.core:jackson-databind:jar:2.4.5
|
10
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.23
|
11
|
+
- org.kill-bill.billing:killbill-platform-api:jar:0.36.1
|
16
12
|
- com.samskivert:jmustache:jar:1.5
|
17
|
-
- org.kill-bill.
|
18
|
-
- org.kill-bill.billing
|
13
|
+
- org.kill-bill.commons:killbill-clock:jar:0.20
|
14
|
+
- org.kill-bill.billing:killbill-util:jar:0.18.0
|
15
|
+
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.5
|
16
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.23
|
19
17
|
- org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
|
20
18
|
- com.h2database:h2:jar:1.4.186
|
19
|
+
- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.5
|
21
20
|
- javax.activation:activation:jar:1.1
|
21
|
+
- org.javassist:javassist:jar:3.19.0-GA
|
22
22
|
- org.skife.config:config-magic:jar:0.14
|
23
|
-
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
24
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.18
|
25
23
|
- org.apache.commons:commons-email:jar:1.2
|
26
24
|
- org.mockito:mockito-all:jar:1.10.19
|
27
25
|
- antlr:antlr:jar:2.7.7
|
28
26
|
- aopalliance:aopalliance:jar:1.0
|
27
|
+
- com.zaxxer:HikariCP-java6:jar:2.3.7
|
28
|
+
- org.slf4j:slf4j-api:jar:1.7.21
|
29
29
|
- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
30
30
|
- org.antlr:stringtemplate:jar:3.2.1
|
31
|
-
- org.
|
31
|
+
- org.slf4j:jcl-over-slf4j:jar:1.7.21
|
32
32
|
- javax.mail:mail:jar:1.4.1
|
33
|
-
- org.kill-bill.billing:killbill-platform-base:jar:0.15
|
34
33
|
- io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
|
35
|
-
- org.slf4j:jcl-over-slf4j:jar:1.7.12
|
36
34
|
- org.jdbi:jdbi:jar:2.62
|
37
|
-
-
|
38
|
-
- org.kill-bill.billing:killbill-platform-osgi:jar:0.15
|
35
|
+
- com.fasterxml.jackson.core:jackson-core:jar:2.4.5
|
39
36
|
- org.apache.felix:org.apache.felix.framework:jar:4.4.1
|
40
37
|
- org.joda:joda-money:jar:0.9
|
41
|
-
- org.kill-bill.
|
42
|
-
- org.kill-bill.commons:killbill-embeddeddb-common:jar:0.11
|
38
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.23
|
43
39
|
- org.apache.shiro:shiro-core:jar:1.2.3
|
44
|
-
- org.kill-bill.billing:killbill-
|
45
|
-
- org.kill-bill.billing
|
46
|
-
-
|
40
|
+
- org.kill-bill.billing:killbill-internal-api:jar:0.18.0
|
41
|
+
- org.kill-bill.billing:killbill-util:jar:tests:0.18.0
|
42
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.23
|
43
|
+
- org.kill-bill.commons:killbill-jdbi:jar:0.20
|
47
44
|
- com.google.guava:guava:jar:r09
|
48
|
-
- org.kill-bill.commons:killbill-
|
45
|
+
- org.kill-bill.commons:killbill-queue:jar:0.20
|
49
46
|
- org.osgi:org.osgi.compendium:jar:5.0.0
|
50
|
-
- org.kill-bill.commons:killbill-
|
51
|
-
- org.kill-bill.commons:killbill-concurrent:jar:0.11
|
47
|
+
- org.kill-bill.commons:killbill-xmlloader:jar:0.20
|
52
48
|
- javax.servlet:javax.servlet-api:jar:3.1.0
|
49
|
+
- org.kill-bill.billing:killbill-platform-osgi:jar:0.36.1
|
50
|
+
- org.kill-bill.billing:killbill-platform-base:jar:0.36.1
|
53
51
|
- org.apache.shiro:shiro-ehcache:jar:1.2.3
|
54
52
|
- javax.inject:javax.inject:jar:1
|
55
|
-
-
|
53
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.23
|
54
|
+
- org.kill-bill.billing:killbill-api:jar:0.50
|
55
|
+
- org.kill-bill.billing:killbill-platform-osgi-api:jar:0.36.1
|
56
56
|
- com.google.inject.extensions:guice-multibindings:jar:3.0
|
57
57
|
- net.sf.ehcache:ehcache:jar:2.9.1
|
58
|
-
- org.kill-bill.
|
59
|
-
- org.kill-bill.
|
58
|
+
- org.kill-bill.commons:killbill-locker:jar:0.20
|
59
|
+
- org.kill-bill.commons:killbill-embeddeddb-common:jar:0.20
|
60
60
|
- org.apache.shiro:shiro-guice:jar:1.2.3
|
61
61
|
- com.google.code.findbugs:annotations:jar:3.0.0
|
62
|
+
- org.kill-bill.commons:killbill-concurrent:jar:0.20
|
63
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.23
|
64
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.23
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.rdoc_options << '--exclude' << '.'
|
24
24
|
|
25
|
-
s.add_dependency 'killbill', '~>
|
25
|
+
s.add_dependency 'killbill', '~> 8.0'
|
26
26
|
s.add_dependency 'activerecord', '~> 4.1.0'
|
27
27
|
if defined?(JRUBY_VERSION)
|
28
28
|
s.add_dependency 'activerecord-bogacs', '~> 0.3'
|
data/lib/currency_plugin.rb
CHANGED
data/lib/currency_plugin/api.rb
CHANGED
@@ -9,32 +9,25 @@ module Killbill
|
|
9
9
|
module CurrencyPlugin
|
10
10
|
class DefaultPlugin < Killbill::Plugin::Currency
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
ActiveRecord::Base.establish_connection(@@config[:database])
|
12
|
+
def self.initialize!
|
13
|
+
require 'active_record'
|
14
|
+
require 'active_record/bogacs'
|
15
|
+
require 'arjdbc'
|
16
|
+
|
17
|
+
::ActiveRecord::ConnectionAdapters::ConnectionHandler.connection_pool_class = ::ActiveRecord::Bogacs::FalsePool
|
18
|
+
db_config = {
|
19
|
+
:adapter => :mysql,
|
20
|
+
# See KillbillActivator#KILLBILL_OSGI_JDBC_JNDI_NAME
|
21
|
+
:data_source => Java::JavaxNaming::InitialContext.new.lookup('killbill/osgi/jdbc'),
|
22
|
+
# Since AR-JDBC 1.4, to disable session configuration
|
23
|
+
:configure_connection => false
|
24
|
+
}
|
25
|
+
ActiveRecord::Base.establish_connection(db_config)
|
27
26
|
end
|
28
27
|
|
29
|
-
def initialize()
|
30
|
-
@raise_exception = false
|
31
|
-
super()
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
28
|
def start_plugin
|
36
29
|
super
|
37
|
-
DefaultPlugin.initialize!
|
30
|
+
DefaultPlugin.initialize!
|
38
31
|
end
|
39
32
|
|
40
33
|
# return DB connections to the Pool if required
|
@@ -60,7 +53,6 @@ module Killbill
|
|
60
53
|
end
|
61
54
|
|
62
55
|
def get_current_rates(base_currency, options = {})
|
63
|
-
|
64
56
|
base_latest = Killbill::CurrencyPlugin::CurrencyUpdate.latest_base_currency(base_currency)
|
65
57
|
if base_latest.nil? || base_latest.size == 0
|
66
58
|
return []
|
@@ -70,7 +62,6 @@ module Killbill
|
|
70
62
|
end
|
71
63
|
|
72
64
|
def get_rates(base_currency, conversion_date, options = {})
|
73
|
-
|
74
65
|
(Killbill::CurrencyPlugin::CurrencyUpdate.historical_base_currencies(base_currency) || []).each do |e|
|
75
66
|
if Time.at(e.conversion_date) <= Time.at(conversion_date)
|
76
67
|
return get_rates_for_currency_update(e.id, base_currency, e.conversion_date)
|
data/pom.xml
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
<groupId>org.kill-bill.billing.plugin.ruby</groupId>
|
28
28
|
<artifactId>killbill-currency-plugin</artifactId>
|
29
29
|
<packaging>pom</packaging>
|
30
|
-
<version>
|
30
|
+
<version>3.0.0</version>
|
31
31
|
<name>killbill-currency-plugin</name>
|
32
32
|
<description></description>
|
33
33
|
<scm>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-currency-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: killbill
|
@@ -16,12 +16,12 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8.0'
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
22
|
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '8.0'
|
25
25
|
prerelease: false
|
26
26
|
type: :runtime
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -159,7 +159,6 @@ files:
|
|
159
159
|
- lib/currency_plugin/api.rb
|
160
160
|
- lib/currency_plugin/models/currency_rate.rb
|
161
161
|
- lib/currency_plugin/models/currency_update.rb
|
162
|
-
- lib/currency_plugin/properties.rb
|
163
162
|
- pom.xml
|
164
163
|
- release.sh
|
165
164
|
- spec/currency_plugin/api_spec.rb
|
@@ -187,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
186
|
version: '0'
|
188
187
|
requirements: []
|
189
188
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.4.6
|
191
190
|
signing_key:
|
192
191
|
specification_version: 4
|
193
192
|
summary: Default Currency Plugin.
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Killbill::CurrencyPlugin
|
2
|
-
class Properties
|
3
|
-
def initialize(file = 'currency.yml')
|
4
|
-
@config_file = Pathname.new(file).expand_path
|
5
|
-
end
|
6
|
-
|
7
|
-
def parse!
|
8
|
-
raise "#{@config_file} is not a valid file" unless @config_file.file?
|
9
|
-
@config = YAML.load_file(@config_file.to_s)
|
10
|
-
validate!
|
11
|
-
end
|
12
|
-
|
13
|
-
def [](key)
|
14
|
-
@config[key]
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def validate!
|
20
|
-
raise "Bad configuration for CurrencyPlugin plugin. Config is #{@config.inspect}" if @config.blank? ||
|
21
|
-
@config[:database].blank?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|