killbill-currency-plugin 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/currency_plugin.rb +5 -0
- data/lib/currency_plugin/api.rb +18 -0
- data/pom.xml +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/currency_plugin.rb
CHANGED
data/lib/currency_plugin/api.rb
CHANGED
@@ -9,6 +9,23 @@ module Killbill
|
|
9
9
|
module CurrencyPlugin
|
10
10
|
class DefaultPlugin < Killbill::Plugin::Currency
|
11
11
|
|
12
|
+
|
13
|
+
def self.initialize!(conf_dir=File.expand_path('../../../', File.dirname(__FILE__)))
|
14
|
+
|
15
|
+
config_file = "#{conf_dir}/currency.yml"
|
16
|
+
|
17
|
+
@@config = Killbill::CurrencyPlugin::Properties.new(config_file)
|
18
|
+
@@config.parse!
|
19
|
+
|
20
|
+
if defined?(JRUBY_VERSION)
|
21
|
+
# See https://github.com/jruby/activerecord-jdbc-adapter/issues/302
|
22
|
+
require 'jdbc/mysql'
|
23
|
+
Jdbc::MySQL.load_driver(:require) if Jdbc::MySQL.respond_to?(:load_driver)
|
24
|
+
end
|
25
|
+
|
26
|
+
ActiveRecord::Base.establish_connection(@@config[:database])
|
27
|
+
end
|
28
|
+
|
12
29
|
def initialize()
|
13
30
|
@raise_exception = false
|
14
31
|
super()
|
@@ -17,6 +34,7 @@ module Killbill
|
|
17
34
|
|
18
35
|
def start_plugin
|
19
36
|
super
|
37
|
+
DefaultPlugin.initialize! @conf_dir
|
20
38
|
end
|
21
39
|
|
22
40
|
# return DB connections to the Pool if required
|
data/pom.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
<groupId>com.ning.killbill.ruby</groupId>
|
26
26
|
<artifactId>killbill-currency-plugin</artifactId>
|
27
27
|
<packaging>pom</packaging>
|
28
|
-
<version>1.1.
|
28
|
+
<version>1.1.1</version>
|
29
29
|
<name>killbill-currency-plugin</name>
|
30
30
|
<description></description>
|
31
31
|
<scm>
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: killbill-currency-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.1.
|
5
|
+
version: 1.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kill Bill core team
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: killbill
|