killbill-currency-plugin-test 1.0.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.
data/.gitignore ADDED
@@ -0,0 +1,25 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+ build
15
+ test.db
16
+ killbill-currency-plugin*
17
+ # YARD artifacts
18
+ .yardoc
19
+ _yardoc
20
+ doc/
21
+ .jbundler
22
+ Jarfile.lock
23
+ Gemfile.lock
24
+ *.swp
25
+ .idea
data/.travis.yml ADDED
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+
3
+ notifications:
4
+ email:
5
+ - killbilling-dev@googlegroups.com
6
+
7
+ rvm:
8
+ - jruby-19mode
9
+ - jruby-head
10
+
11
+ jdk:
12
+ - openjdk7
13
+ - oraclejdk7
14
+ - openjdk6
15
+
16
+ matrix:
17
+ allow_failures:
18
+ - rvm: jruby-head
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ #gem 'killbill', :path => '../killbill-plugin-framework-ruby'
data/Jarfile ADDED
@@ -0,0 +1,6 @@
1
+ jar 'com.ning.billing:killbill-api', '0.7.2'
2
+ jar 'com.ning.billing.plugin:killbill-plugin-api-notification', '0.6.0'
3
+ jar 'com.ning.billing.plugin:killbill-plugin-api-payment', '0.6.0'
4
+ jar 'com.ning.billing.plugin:killbill-plugin-api-currency', '0.6.0'
5
+ jar 'com.ning.billing:killbill-util:tests', '0.7.0'
6
+ jar 'javax.servlet:javax.servlet-api', '3.0.1'
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ killbill-currency-plugin
2
+ ==============================
3
+
4
+ A currency plugin used for integration tests.
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env rake
2
+
3
+ # Install tasks to build and release the plugin
4
+ require 'bundler/setup'
5
+ Bundler::GemHelper.install_tasks
6
+
7
+ # Install test tasks
8
+ require 'rspec/core/rake_task'
9
+ desc "Run RSpec"
10
+ RSpec::Core::RakeTask.new
11
+
12
+ # Install tasks to package the plugin for Killbill
13
+ require 'killbill/rake_task'
14
+ Killbill::PluginHelper.install_tasks
15
+
16
+ # Run tests by default
17
+ task :default => :spec
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,3 @@
1
+ mainClass=Killbill::CurrencyPlugin::TestPlugin
2
+ require=currency_plugin_test
3
+ pluginType=CURRENCY
@@ -0,0 +1,3 @@
1
+ require 'killbill'
2
+
3
+ require 'currency_plugin_test/api'
@@ -0,0 +1,51 @@
1
+ require 'time'
2
+
3
+ require 'killbill'
4
+
5
+ module Killbill
6
+ module CurrencyPlugin
7
+ class TestPlugin < Killbill::Plugin::Currency
8
+
9
+ def initialize()
10
+ @raise_exception = false
11
+ super()
12
+ end
13
+
14
+
15
+ def start_plugin
16
+ super
17
+ end
18
+
19
+ # return DB connections to the Pool if required
20
+ def after_request
21
+ end
22
+
23
+ def get_base_currencies(options = {})
24
+ ['USD']
25
+ end
26
+
27
+ def get_latest_conversion_date(base_currency, options = {})
28
+ Time.now.utc
29
+ end
30
+
31
+ def get_conversion_dates(base_currency, options = {})
32
+ [Time.now.utc]
33
+ end
34
+
35
+ def get_current_rates(base_currency, options = {})
36
+
37
+ rate = Killbill::Plugin::Model::Rate.new
38
+ rate.base_currency = base_currency
39
+ rate.currency = 'BRL'
40
+ rate.value = 12.3
41
+ rate.conversion_date = Time.now.utc
42
+ [rate]
43
+ end
44
+
45
+ def get_rates(base_currency, conversion_date, options = {})
46
+ get_current_rates(base_currency, options)
47
+ end
48
+
49
+ end
50
+ end
51
+ end
data/pom.xml ADDED
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ ~ Copyright 2010-2013 Ning, Inc.
4
+ ~
5
+ ~ Ning licenses this file to you under the Apache License, version 2.0
6
+ ~ (the "License"); you may not use this file except in compliance with the
7
+ ~ License. You may obtain a copy of the License at:
8
+ ~
9
+ ~ http://www.apache.org/licenses/LICENSE-2.0
10
+ ~
11
+ ~ Unless required by applicable law or agreed to in writing, software
12
+ ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ ~ License for the specific language governing permissions and limitations
15
+ ~ under the License.
16
+ -->
17
+
18
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19
+ <parent>
20
+ <groupId>org.sonatype.oss</groupId>
21
+ <artifactId>oss-parent</artifactId>
22
+ <version>5</version>
23
+ </parent>
24
+ <modelVersion>4.0.0</modelVersion>
25
+ <groupId>com.ning.killbill.ruby</groupId>
26
+ <artifactId>killbill-currency-plugin-test</artifactId>
27
+ <packaging>pom</packaging>
28
+ <version>1.0.0</version>
29
+ <name>killbill-currency-plugin-test</name>
30
+ <description></description>
31
+ <scm>
32
+ <connection>scm:git:git://github.com/killbill/killbill-killbill-currency-plugin-test.git</connection>
33
+ <url>https://github.com/killbill/killbill-killbill-currency-plugin-test/</url>
34
+ <developerConnection>scm:git:git@github.com:killbill/killbill-killbill-currency-plugin-test.git</developerConnection>
35
+ </scm>
36
+ </project>
data/release.sh ADDED
@@ -0,0 +1,28 @@
1
+ set -e
2
+
3
+ VERSION=`grep -E '<version>([0-9]+\.[0-9]+\.[0-9]+)</version>' pom.xml | sed 's/[\t \n]*<version>\(.*\)<\/version>[\t \n]*/\1/'`
4
+ if [ "$VERSION" != "$(cat $PWD/VERSION)" ]; then
5
+ echo "Unable to release: make sure the versions in pom.xml and VERSION match"
6
+ exit 1
7
+ fi
8
+
9
+ echo "Cleaning up"
10
+ rake killbill:clean ; rake build
11
+
12
+ echo "Pushing the gem to Rubygems"
13
+ rake release
14
+
15
+ echo "Building artifact"
16
+ rake killbill:package
17
+
18
+ ARTIFACT="$PWD/pkg/killbill-currency-plugin-test-$VERSION.tar.gz"
19
+ echo "Pushing $ARTIFACT to Maven Central"
20
+ mvn gpg:sign-and-deploy-file \
21
+ -DgroupId=com.ning.killbill.ruby \
22
+ -DartifactId=killbill-currency-plugin-test \
23
+ -Dversion=$VERSION \
24
+ -Dpackaging=tar.gz \
25
+ -DrepositoryId=ossrh-releases \
26
+ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
27
+ -Dfile=$ARTIFACT \
28
+ -DpomFile=pom.xml
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: killbill-currency-plugin-test
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kill Bill core team
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-10-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: killbill
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 1.8.0
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.8.0
27
+ none: false
28
+ prerelease: false
29
+ type: :runtime
30
+ - !ruby/object:Gem::Dependency
31
+ name: jbundler
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: 0.4.1
37
+ none: false
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 0.4.1
43
+ none: false
44
+ prerelease: false
45
+ type: :development
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 10.0.0
53
+ none: false
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: 10.0.0
59
+ none: false
60
+ prerelease: false
61
+ type: :development
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 2.12.0
69
+ none: false
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 2.12.0
75
+ none: false
76
+ prerelease: false
77
+ type: :development
78
+ description: Mock plugin used for integration tests.
79
+ email: killbilling-users@googlegroups.com
80
+ executables: []
81
+ extensions: []
82
+ extra_rdoc_files: []
83
+ files:
84
+ - ".gitignore"
85
+ - ".travis.yml"
86
+ - Gemfile
87
+ - Jarfile
88
+ - README.md
89
+ - Rakefile
90
+ - VERSION
91
+ - killbill-currency-plugin-test.gemspec
92
+ - killbill.properties
93
+ - lib/currency_plugin_test.rb
94
+ - lib/currency_plugin_test/api.rb
95
+ - pom.xml
96
+ - release.sh
97
+ homepage: http://kill-bill.org
98
+ licenses:
99
+ - Apache License (2.0)
100
+ post_install_message:
101
+ rdoc_options:
102
+ - "--exclude"
103
+ - "."
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 1.9.3
111
+ none: false
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ segments:
117
+ - 0
118
+ version: !binary |-
119
+ MA==
120
+ hash: 2
121
+ none: false
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 1.8.24
125
+ signing_key:
126
+ specification_version: 3
127
+ summary: Test Currency Plugin.
128
+ test_files: []