dune-balanced 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.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.travis.yml +13 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +125 -0
- data/LICENSE.txt +22 -0
- data/README.md +63 -0
- data/Rakefile +34 -0
- data/app/controllers/dune/balanced/notifications_controller.rb +11 -0
- data/app/decorators/dune/balanced/customer_decorator.rb +14 -0
- data/app/models/dune/balanced/.gitkip +0 -0
- data/app/models/dune/balanced/contributor.rb +11 -0
- data/app/models/dune/balanced/customer.rb +56 -0
- data/app/models/dune/balanced/event.rb +101 -0
- data/app/models/dune/balanced/order.rb +9 -0
- data/app/models/dune/balanced/order_proxy.rb +55 -0
- data/app/models/dune/balanced/payout.rb +77 -0
- data/app/models/dune/balanced/refund.rb +53 -0
- data/app/models/dune/balanced/user.rb +6 -0
- data/app/observers/dune/balanced/events_observer/debit_canceled.rb +13 -0
- data/bin/rails +8 -0
- data/config/initializers/balanced.rb +2 -0
- data/config/initializers/events_observer.rb +2 -0
- data/config/locales/en.yml +9 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20140211203335_create_balanced_contributors.rb +10 -0
- data/db/migrate/20140324175041_add_bank_account_uri_to_balanced_contributors.rb +5 -0
- data/db/migrate/20140817195359_create_dune_balanced_orders.rb +10 -0
- data/dune-balanced.gemspec +32 -0
- data/lib/dune/balanced.rb +9 -0
- data/lib/dune/balanced/engine.rb +13 -0
- data/lib/dune/balanced/version.rb +5 -0
- data/spec/controllers/dune/balanced/notifications_controller_spec.rb +61 -0
- data/spec/decorators/dune/balanced/customer_decorator_spec.rb +19 -0
- data/spec/fixtures/notifications/bank_account_verification.deposited.yml +48 -0
- data/spec/fixtures/notifications/bank_account_verification.verified.yml +48 -0
- data/spec/fixtures/notifications/debit.canceled.yml +74 -0
- data/spec/fixtures/notifications/debit.created.yml +72 -0
- data/spec/fixtures/notifications/debit.succeeded.yml +72 -0
- data/spec/models/dune/balanced/customer_spec.rb +73 -0
- data/spec/models/dune/balanced/event_spec.rb +219 -0
- data/spec/models/dune/balanced/order_proxy_spec.rb +87 -0
- data/spec/models/dune/balanced/order_spec.rb +8 -0
- data/spec/models/dune/balanced/payout_spec.rb +104 -0
- data/spec/models/dune/balanced/refund_spec.rb +157 -0
- data/spec/observers/dune/balanced/events_observer/debit_canceled_spec.rb +32 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/fixtures_test_helper.rb +11 -0
- metadata +223 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dune::Balanced::OrderProxy do
|
4
|
+
subject { described_class.new(project) }
|
5
|
+
before do
|
6
|
+
allow_any_instance_of(Dune::Balanced::Customer).to receive(:fetch).
|
7
|
+
and_return(customer)
|
8
|
+
allow(Rails.application.routes).to receive(:url_helpers).
|
9
|
+
and_return(double('rails router').as_null_object)
|
10
|
+
end
|
11
|
+
let(:project) { double('Project', href: '/FOOBAR').as_null_object }
|
12
|
+
let(:customer) { double('Customer').as_null_object }
|
13
|
+
|
14
|
+
it 'does not trigger request to Balanced until calling methods delegated to order' do
|
15
|
+
expect(Balanced::Order).to_not receive(:find)
|
16
|
+
expect_any_instance_of(Balanced::Customer).to_not receive(:create_order)
|
17
|
+
subject.user
|
18
|
+
end
|
19
|
+
|
20
|
+
describe 'methods of order' do
|
21
|
+
let(:balanced_order) do
|
22
|
+
double('Dune::Balanced::Order', amount: 42).as_null_object
|
23
|
+
end
|
24
|
+
before do
|
25
|
+
allow(Dune::Balanced::Order).to receive(:create!)
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'when there is no order yet' do
|
29
|
+
before do
|
30
|
+
allow(Dune::Balanced::Order).to receive(:find_by)
|
31
|
+
allow(customer).to receive(:create_order).and_return(balanced_order)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'creates one in Balanced' do
|
35
|
+
expect(customer).to receive(:create_order)
|
36
|
+
subject.amount
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'creates one in app database' do
|
40
|
+
expect(Dune::Balanced::Order).to receive(:create!)
|
41
|
+
subject.amount
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'defines a description' do
|
45
|
+
expect(balanced_order).to receive(:description=)
|
46
|
+
subject.amount
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'defines meta information' do
|
50
|
+
expect(balanced_order).to receive(:meta=)
|
51
|
+
subject.amount
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'delegates to order object' do
|
55
|
+
expect(subject.amount).to eql(42)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'when there is already an order' do
|
60
|
+
before do
|
61
|
+
allow(Dune::Balanced::Order).to receive(:find_by).
|
62
|
+
and_return(order)
|
63
|
+
allow(Balanced::Order).to receive(:find).and_return(balanced_order)
|
64
|
+
end
|
65
|
+
let(:order) { double('Order').as_null_object }
|
66
|
+
|
67
|
+
it 'skips creation of new one in Balanced' do
|
68
|
+
expect(customer).to_not receive(:create_order)
|
69
|
+
subject.amount
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'skips creation of new one in app database' do
|
73
|
+
expect(Dune::Balanced::Order).to_not receive(:create!)
|
74
|
+
subject.amount
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'fetches the existing' do
|
78
|
+
expect(Balanced::Order).to receive(:find)
|
79
|
+
subject.amount
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'delegates to order object' do
|
83
|
+
expect(subject.amount).to eql(balanced_order.amount)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dune::Balanced::Payout do
|
4
|
+
subject { described_class.new(project, requestor) }
|
5
|
+
before do
|
6
|
+
allow(subject).to receive(:financials).and_return(financials)
|
7
|
+
subject.stub(:dune_customer).and_return(dune_customer)
|
8
|
+
allow(subject).to receive(:order).and_return(order)
|
9
|
+
allow(subject).to receive(:credit_platform!)
|
10
|
+
end
|
11
|
+
let(:project) { double('Project').as_null_object }
|
12
|
+
let(:requestor) { double('User').as_null_object }
|
13
|
+
let(:dune_customer) do
|
14
|
+
double('Dune::Balanced::Customer').as_null_object
|
15
|
+
end
|
16
|
+
let(:financials) do
|
17
|
+
double(
|
18
|
+
net_amount: BigDecimal.new(90),
|
19
|
+
payment_service_fee: BigDecimal.new(5),
|
20
|
+
platform_fee: BigDecimal.new(10),
|
21
|
+
)
|
22
|
+
end
|
23
|
+
let(:order) { double('Order', credit_to: nil) }
|
24
|
+
let(:bank_account) do
|
25
|
+
double('::Balanced::BankAccount', href: '/bank_accounts/foobar')
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "completion" do
|
29
|
+
before do
|
30
|
+
dune_customer.stub(:bank_accounts).
|
31
|
+
and_return(bank_accounts)
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'giving a bank account href' do
|
35
|
+
before do
|
36
|
+
allow(Balanced::BankAccount).to receive(:find)
|
37
|
+
.and_return(given_bank_account)
|
38
|
+
end
|
39
|
+
let(:given_bank_account) { bank_account }
|
40
|
+
let(:bank_accounts) { [] }
|
41
|
+
|
42
|
+
it 'credits the amount (in cents) to costumer\'s account' do
|
43
|
+
expect(order).to receive(:credit_to).with(hash_including(amount: 9000))
|
44
|
+
subject.complete!('/bank_accounts/foobar')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context "when customer already has a bank account" do
|
49
|
+
let(:bank_accounts) { [bank_account] }
|
50
|
+
|
51
|
+
it "credits the amount (in cents) to costumer's account" do
|
52
|
+
expect(order).to receive(:credit_to).with(hash_including(amount: 9000))
|
53
|
+
subject.complete!
|
54
|
+
end
|
55
|
+
|
56
|
+
context 'with successful credit' do
|
57
|
+
it 'logs the payout' do
|
58
|
+
expect(::Payout).to receive(:create).
|
59
|
+
with(hash_including(
|
60
|
+
payment_service: 'balanced',
|
61
|
+
project_id: project,
|
62
|
+
user_id: requestor,
|
63
|
+
value: financials.net_amount))
|
64
|
+
subject.complete!
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'with unsuccessful credit' do
|
69
|
+
before do
|
70
|
+
allow(order).to receive(:credit_to)
|
71
|
+
.and_raise(Balanced::Conflict.new({}))
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'skips payout logging' do
|
75
|
+
expect(::Payout).to_not receive(:create)
|
76
|
+
subject.complete! rescue Balanced::Conflict
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context "when customer has no bank accounts" do
|
82
|
+
let(:bank_accounts) { [] }
|
83
|
+
|
84
|
+
it "skips credit call" do
|
85
|
+
expect(dune_customer).to_not receive(:credit)
|
86
|
+
subject.complete! rescue Dune::Balanced::Error
|
87
|
+
end
|
88
|
+
|
89
|
+
it "raises NoBankAccount exception" do
|
90
|
+
expect {
|
91
|
+
subject.complete!
|
92
|
+
}.to raise_error(Dune::Balanced::NoBankAccount)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe "customer" do
|
98
|
+
it "gets the Customer related to User" do
|
99
|
+
updated_customer = double('customer')
|
100
|
+
dune_customer.stub(:fetch).and_return(updated_customer)
|
101
|
+
expect(subject.customer).to eql(updated_customer)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,157 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dune::Balanced::Refund do
|
4
|
+
let(:payable_resource) do
|
5
|
+
double(
|
6
|
+
class: double(model_name: double(human: 'Resource')),
|
7
|
+
id: '1',
|
8
|
+
payment_id: '1234567890',
|
9
|
+
payment_service_fee: 1.3,
|
10
|
+
payment_service_fee_paid_by_user: true,
|
11
|
+
refund!: nil,
|
12
|
+
value: 100.0
|
13
|
+
)
|
14
|
+
end
|
15
|
+
let(:debit) { double('Debit', refund: nil) }
|
16
|
+
subject { described_class.new(payable_resource) }
|
17
|
+
|
18
|
+
describe 'debit' do
|
19
|
+
it 'gets the debit object through Balanced API' do
|
20
|
+
Balanced::Debit.stub(:find).
|
21
|
+
with('/debits/1234567890').
|
22
|
+
and_return(debit)
|
23
|
+
expect(subject.debit).to eql(debit)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'completion' do
|
28
|
+
before { subject.stub(:debit).and_return(debit) }
|
29
|
+
let(:operational_fee) { described_class::FIXED_OPERATIONAL_FEE }
|
30
|
+
|
31
|
+
context 'without passing amount parameter' do
|
32
|
+
context 'when contributor paid payment service fees' do
|
33
|
+
before do
|
34
|
+
payable_resource.stub(:payment_service_fee_paid_by_user).and_return(true)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'refunds them using cents unit plus refundable fee' do
|
38
|
+
expect(debit).to receive(:refund).with(hash_including(amount: 10100))
|
39
|
+
subject.complete!(:match_automatic)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'refunds an integer amount' do
|
43
|
+
debit.stub(:refund) do |args|
|
44
|
+
expect(args[:amount]).to be_an(Integer)
|
45
|
+
end
|
46
|
+
subject.complete!(:match_automatic)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context 'when contributor didn\'t paid payment service fees' do
|
51
|
+
before do
|
52
|
+
payable_resource.stub(:payment_service_fee_paid_by_user).and_return(false)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'refund contributed value using cents unit' do
|
56
|
+
expect(debit).to receive(:refund).with(hash_including(amount: 9970))
|
57
|
+
subject.complete!(:match_automatic)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'refunds an integer amount' do
|
61
|
+
debit.stub(:refund) do |args|
|
62
|
+
expect(args[:amount]).to be_an(Integer)
|
63
|
+
end
|
64
|
+
subject.complete!(:match_automatic)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context 'passing amount parameter' do
|
70
|
+
it 'refunds in the value given plus refundable fees' do
|
71
|
+
expect(debit).to receive(:refund).with(hash_including(amount: 4225))
|
72
|
+
subject.complete!(:match_automatic, 42)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context 'with non zero amount' do
|
77
|
+
it 'performs a refund through Balanced API for the given payable_resource' do
|
78
|
+
expect(debit).to receive(:refund)
|
79
|
+
subject.complete!(:match_automatic, 12)
|
80
|
+
end
|
81
|
+
|
82
|
+
context 'with successful refund through Balanced' do
|
83
|
+
it 'sets the payable_resource as refunded' do
|
84
|
+
expect(payable_resource).to receive(:refund!)
|
85
|
+
subject.complete!(:match_automatic)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
context 'with unsuccessful refund through Balanced' do
|
90
|
+
before do
|
91
|
+
debit.stub(:refund).and_raise { Balanced::Error }
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'doesn\'t update state of the payable_resource to refunded' do
|
95
|
+
expect(payable_resource).to_not receive(:refund!)
|
96
|
+
subject.complete!(:match_automatic) rescue nil
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'with zero amount' do
|
102
|
+
it 'sets the payable_resource as refunded' do
|
103
|
+
expect(payable_resource).to receive(:refund!)
|
104
|
+
subject.complete!(:match_automatic, 0)
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'doesn\'t perform request to Balanced API' do
|
108
|
+
expect(debit).to_not receive(:refund)
|
109
|
+
subject.complete!(:match_automatic, 0)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe 'refundable fees' do
|
115
|
+
before do
|
116
|
+
stub_const("#{described_class}::FIXED_OPERATIONAL_FEE", 0.3)
|
117
|
+
payable_resource.stub(:value).and_return(100.0)
|
118
|
+
payable_resource.stub(:payment_service_fee).and_return(1.3)
|
119
|
+
end
|
120
|
+
|
121
|
+
context 'when user paid fees' do
|
122
|
+
before do
|
123
|
+
payable_resource.stub(:payment_service_fee_paid_by_user).and_return(true)
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'returns percentage fee on full refund' do
|
127
|
+
expect(
|
128
|
+
subject.refundable_fees(payable_resource.value)
|
129
|
+
).to eql(1.0)
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'returns percentage fee proportionally to percentage fee part of the payment' do
|
133
|
+
expect(
|
134
|
+
subject.refundable_fees(60.0)
|
135
|
+
).to eql(0.48)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
context 'when user didn\'t paid fees' do
|
140
|
+
before do
|
141
|
+
payable_resource.stub(:payment_service_fee_paid_by_user).and_return(false)
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'returns negative fixed fee on full refund' do
|
145
|
+
expect(
|
146
|
+
subject.refundable_fees(payable_resource.value)
|
147
|
+
).to eql(-described_class::FIXED_OPERATIONAL_FEE)
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'returns negative fixed fee on partial refund' do
|
151
|
+
expect(
|
152
|
+
subject.refundable_fees(60.0)
|
153
|
+
).to eql(-described_class::FIXED_OPERATIONAL_FEE)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dune::Balanced::EventsObserver::DebitCanceled do
|
4
|
+
let(:contribution) { double('Contribution') }
|
5
|
+
let(:event) do
|
6
|
+
double('Dune::Balanced::Event', resource: contribution)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#perform' do
|
10
|
+
context 'with \'debit.canceled\' event' do
|
11
|
+
before do
|
12
|
+
event.stub(:type).and_return('debit.canceled')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'cancel the contribution' do
|
16
|
+
expect(contribution).to receive(:cancel!)
|
17
|
+
subject.perform(event)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with other types of events' do
|
22
|
+
before do
|
23
|
+
event.stub(:type).and_return('debit.created')
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'not cancel the contribution' do
|
27
|
+
expect(contribution).to_not receive(:cancel)
|
28
|
+
subject.perform(event)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'shoulda/matchers'
|
7
|
+
|
8
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
9
|
+
|
10
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
11
|
+
# in spec/support/ and its subdirectories.
|
12
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.use_transactional_fixtures = true
|
16
|
+
|
17
|
+
config.include FixturesTestHelper
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dune-balanced
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pierro
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.8.9
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.8.9
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.9.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: balanced
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: draper
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.14'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.14'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: shoulda-matchers
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.3'
|
125
|
+
description: This is the base to integrate Balanced Payments on dune-investissement
|
126
|
+
email:
|
127
|
+
- legrand.work@gmail.com
|
128
|
+
executables:
|
129
|
+
- rails
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- .gitignore
|
134
|
+
- .gitmodules
|
135
|
+
- .rspec
|
136
|
+
- .travis.yml
|
137
|
+
- CHANGELOG.md
|
138
|
+
- Gemfile
|
139
|
+
- Gemfile.lock
|
140
|
+
- LICENSE.txt
|
141
|
+
- README.md
|
142
|
+
- Rakefile
|
143
|
+
- app/controllers/dune/balanced/notifications_controller.rb
|
144
|
+
- app/decorators/dune/balanced/customer_decorator.rb
|
145
|
+
- app/models/dune/balanced/.gitkip
|
146
|
+
- app/models/dune/balanced/contributor.rb
|
147
|
+
- app/models/dune/balanced/customer.rb
|
148
|
+
- app/models/dune/balanced/event.rb
|
149
|
+
- app/models/dune/balanced/order.rb
|
150
|
+
- app/models/dune/balanced/order_proxy.rb
|
151
|
+
- app/models/dune/balanced/payout.rb
|
152
|
+
- app/models/dune/balanced/refund.rb
|
153
|
+
- app/models/dune/balanced/user.rb
|
154
|
+
- app/observers/dune/balanced/events_observer/debit_canceled.rb
|
155
|
+
- bin/rails
|
156
|
+
- config/initializers/balanced.rb
|
157
|
+
- config/initializers/events_observer.rb
|
158
|
+
- config/locales/en.yml
|
159
|
+
- config/routes.rb
|
160
|
+
- db/migrate/20140211203335_create_balanced_contributors.rb
|
161
|
+
- db/migrate/20140324175041_add_bank_account_uri_to_balanced_contributors.rb
|
162
|
+
- db/migrate/20140817195359_create_dune_balanced_orders.rb
|
163
|
+
- dune-balanced.gemspec
|
164
|
+
- lib/dune/balanced.rb
|
165
|
+
- lib/dune/balanced/engine.rb
|
166
|
+
- lib/dune/balanced/version.rb
|
167
|
+
- spec/controllers/dune/balanced/notifications_controller_spec.rb
|
168
|
+
- spec/decorators/dune/balanced/customer_decorator_spec.rb
|
169
|
+
- spec/fixtures/notifications/bank_account_verification.deposited.yml
|
170
|
+
- spec/fixtures/notifications/bank_account_verification.verified.yml
|
171
|
+
- spec/fixtures/notifications/debit.canceled.yml
|
172
|
+
- spec/fixtures/notifications/debit.created.yml
|
173
|
+
- spec/fixtures/notifications/debit.succeeded.yml
|
174
|
+
- spec/models/dune/balanced/customer_spec.rb
|
175
|
+
- spec/models/dune/balanced/event_spec.rb
|
176
|
+
- spec/models/dune/balanced/order_proxy_spec.rb
|
177
|
+
- spec/models/dune/balanced/order_spec.rb
|
178
|
+
- spec/models/dune/balanced/payout_spec.rb
|
179
|
+
- spec/models/dune/balanced/refund_spec.rb
|
180
|
+
- spec/observers/dune/balanced/events_observer/debit_canceled_spec.rb
|
181
|
+
- spec/spec_helper.rb
|
182
|
+
- spec/support/fixtures_test_helper.rb
|
183
|
+
homepage: https://github.com/FromUte/dune-balanced
|
184
|
+
licenses:
|
185
|
+
- MIT
|
186
|
+
metadata: {}
|
187
|
+
post_install_message:
|
188
|
+
rdoc_options: []
|
189
|
+
require_paths:
|
190
|
+
- lib
|
191
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - '>='
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
requirements: []
|
202
|
+
rubyforge_project:
|
203
|
+
rubygems_version: 2.0.14
|
204
|
+
signing_key:
|
205
|
+
specification_version: 4
|
206
|
+
summary: dune integration with Balanced Payments From Neighborly
|
207
|
+
test_files:
|
208
|
+
- spec/controllers/dune/balanced/notifications_controller_spec.rb
|
209
|
+
- spec/decorators/dune/balanced/customer_decorator_spec.rb
|
210
|
+
- spec/fixtures/notifications/bank_account_verification.deposited.yml
|
211
|
+
- spec/fixtures/notifications/bank_account_verification.verified.yml
|
212
|
+
- spec/fixtures/notifications/debit.canceled.yml
|
213
|
+
- spec/fixtures/notifications/debit.created.yml
|
214
|
+
- spec/fixtures/notifications/debit.succeeded.yml
|
215
|
+
- spec/models/dune/balanced/customer_spec.rb
|
216
|
+
- spec/models/dune/balanced/event_spec.rb
|
217
|
+
- spec/models/dune/balanced/order_proxy_spec.rb
|
218
|
+
- spec/models/dune/balanced/order_spec.rb
|
219
|
+
- spec/models/dune/balanced/payout_spec.rb
|
220
|
+
- spec/models/dune/balanced/refund_spec.rb
|
221
|
+
- spec/observers/dune/balanced/events_observer/debit_canceled_spec.rb
|
222
|
+
- spec/spec_helper.rb
|
223
|
+
- spec/support/fixtures_test_helper.rb
|