bloom_remit 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/concepts/bloom_remit/txns/contracts/create.rb +4 -2
- data/app/concepts/bloom_remit/txns/contracts/update.rb +1 -0
- data/app/concepts/bloom_remit/txns/operations/create.rb +11 -1
- data/app/concepts/bloom_remit/txns/operations/update.rb +22 -1
- data/app/jobs/bloom_remit/txns/on_update_job.rb +15 -0
- data/app/jobs/bloom_remit/txns/payout_job.rb +1 -1
- data/app/models/bloom_remit/response.rb +9 -0
- data/app/models/bloom_remit/txn.rb +2 -1
- data/app/services/bloom_remit/create_txn.rb +5 -4
- data/app/services/bloom_remit/txns/handle_response.rb +16 -0
- data/app/services/bloom_remit/txns/on_update.rb +12 -0
- data/app/services/bloom_remit/txns/payout.rb +2 -0
- data/app/services/bloom_remit/txns/post.rb +7 -3
- data/app/services/bloom_remit/txns/run_hook.rb +14 -0
- data/db/migrate/20160805004223_drop_recipient_from_txns.rb +6 -0
- data/db/migrate/20160805004350_add_target_slug_to_bloom_remit_txns.rb +5 -0
- data/db/migrate/20160805040950_add_owner_to_bloom_remit_txns.rb +7 -0
- data/db/migrate/20160805095308_change_txns_sender_id_to_string.rb +5 -0
- data/db/migrate/20160806054012_create_bloom_remit_responses.rb +9 -0
- data/lib/bloom_remit/factories/response.rb +7 -0
- data/lib/bloom_remit/factories/txn.rb +9 -0
- data/lib/bloom_remit/factories.rb +2 -0
- data/lib/bloom_remit/version.rb +1 -1
- data/lib/bloom_remit.rb +2 -0
- data/spec/bloom_remit_spec.rb +29 -0
- data/spec/concepts/bloom_remit/txns/operations/create_spec.rb +36 -0
- data/spec/concepts/bloom_remit/txns/operations/update_spec.rb +25 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/biller.rb +3 -0
- data/spec/dummy/app/models/payment.rb +3 -0
- data/spec/dummy/app/models/sub_payment.rb +3 -0
- data/spec/dummy/app/models/sub_user.rb +3 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +16 -0
- data/spec/dummy/config/database.yml.sample +16 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +44 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +46 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20160729085500_create_users.rb +8 -0
- data/spec/dummy/db/migrate/20160805001840_create_billers.rb +7 -0
- data/spec/dummy/db/migrate/20160805042105_create_payments.rb +6 -0
- data/spec/dummy/db/migrate/20160806011259_add_type_to_users.rb +5 -0
- data/spec/dummy/db/migrate/20160806012210_add_type_to_payments.rb +5 -0
- data/spec/dummy/db/schema.rb +57 -0
- data/spec/dummy/log/development.log +1633 -0
- data/spec/dummy/log/test.log +27581 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/biller.rb +7 -0
- data/spec/factories/payment.rb +14 -0
- data/spec/factories/response.rb +7 -0
- data/spec/factories/txn.rb +8 -0
- data/spec/factories/user.rb +14 -0
- data/spec/fixtures/cassettes/BloomRemit_Billers_Sync/syncs_the_billers_with_the_local_system.yml +270 -0
- data/spec/fixtures/cassettes/BloomRemit_CreateTxn/creates_a_model_and_pays_for_the_bill.yml +270 -0
- data/spec/fixtures/on_txn_response.rb +7 -0
- data/spec/jobs/bloom_remit/txns/on_update_job_spec.rb +22 -0
- data/spec/jobs/bloom_remit/txns/payout_job.rb +21 -0
- data/spec/models/bloom_remit/response_spec.rb +15 -0
- data/spec/models/bloom_remit/txn_spec.rb +16 -0
- data/spec/rails_helper.rb +75 -0
- data/spec/requests/api/v1/txns_spec.rb +41 -0
- data/spec/services/bloom_remit/create_txn_spec.rb +36 -0
- data/spec/services/bloom_remit/initialize_client_spec.rb +23 -0
- data/spec/services/bloom_remit/txns/handle_response_spec.rb +25 -0
- data/spec/services/bloom_remit/txns/on_update_spec.rb +33 -0
- data/spec/services/bloom_remit/txns/payout_spec.rb +28 -0
- data/spec/services/bloom_remit/txns/post_spec.rb +45 -0
- data/spec/services/bloom_remit/txns/run_hook_spec.rb +17 -0
- data/spec/spec_helper.rb +99 -0
- data/spec/support/bloom_remit.rb +1 -0
- data/spec/support/database_cleaner.rb +43 -0
- data/spec/support/factory_girl.rb +7 -0
- data/spec/support/rspec-sidekiq.rb +1 -0
- data/spec/support/shoulda-matchers.rb +8 -0
- data/spec/support/storext_matchers.rb +1 -0
- data/spec/support/vcr.rb +11 -0
- metadata +208 -11
- data/app/concepts/bloom_remit/txns/callbacks/after_create.rb +0 -15
- data/app/jobs/bloom_remit/sync_billers_job.rb +0 -19
- data/app/models/bloom_remit/biller.rb +0 -21
- data/app/services/bloom_remit/billers/sync.rb +0 -15
- data/db/migrate/20160720038018_install_hstore.rb +0 -5
- data/db/migrate/20160720040018_create_bloom_remit_billers.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66d45aad8f97251312abcdf0da5ecb2e90365aae
|
4
|
+
data.tar.gz: 21a83f8b40228a62e0055e749dad4ab5416ee4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e1397e6e12435c937e28d50d786798210c093de3873fa2c511c516106d13ee806dcad6cd4492466a8debb1a4247e87888ac6df1b161e7da7deb3096de50195f
|
7
|
+
data.tar.gz: c2fd6eb776e1ca1aefc521b1fc37ad9b2c78642c4b947aae1fcf6d090b8f467ee1f7bad213119b5eab9195613fbd370bc27a424c01e109f87f3733e9d7a2021b
|
@@ -3,13 +3,15 @@ module BloomRemit
|
|
3
3
|
module Contracts
|
4
4
|
class Create < Reform::Form
|
5
5
|
|
6
|
-
|
7
|
-
property :recipient_id
|
6
|
+
model ::BloomRemit::Txn
|
8
7
|
property :sender_type
|
9
8
|
property :sender_id
|
10
9
|
property :amount
|
11
10
|
property :account_name
|
12
11
|
property :account_id
|
12
|
+
property :target_slug
|
13
|
+
property :owner_id
|
14
|
+
property :owner_type
|
13
15
|
|
14
16
|
end
|
15
17
|
end
|
@@ -9,7 +9,9 @@ module BloomRemit
|
|
9
9
|
contract Contracts::Create
|
10
10
|
|
11
11
|
include Dispatch
|
12
|
-
callback :after_create
|
12
|
+
callback :after_create do
|
13
|
+
on_change :after_create
|
14
|
+
end
|
13
15
|
|
14
16
|
def process(params)
|
15
17
|
validate(params[:txn]) do |f|
|
@@ -19,6 +21,14 @@ module BloomRemit
|
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
24
|
+
private
|
25
|
+
|
26
|
+
def after_create(form, opts)
|
27
|
+
ActiveRecord::Base.after_transaction do
|
28
|
+
PayoutJob.perform_async(form.model.id)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
end
|
23
33
|
end
|
24
34
|
end
|
@@ -8,18 +8,39 @@ module BloomRemit
|
|
8
8
|
|
9
9
|
contract Contracts::Update
|
10
10
|
|
11
|
+
include Callback
|
12
|
+
callback :after_update do
|
13
|
+
on_change :after_update
|
14
|
+
end
|
15
|
+
|
11
16
|
def process(params)
|
12
17
|
validate(params[:txn]) do |f|
|
13
|
-
f.save
|
18
|
+
if f.save
|
19
|
+
dispatch! :after_update
|
20
|
+
end
|
14
21
|
end
|
15
22
|
end
|
16
23
|
|
17
24
|
private
|
18
25
|
|
26
|
+
def setup_params!(params)
|
27
|
+
params[:txn] ||= {}
|
28
|
+
params[:txn].merge!(
|
29
|
+
status: params[:status],
|
30
|
+
secret: params[:secret],
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
19
34
|
def model!(params)
|
20
35
|
Txn.find_by!(id: params[:id], secret: params[:secret])
|
21
36
|
end
|
22
37
|
|
38
|
+
def after_update(form, opts)
|
39
|
+
ActiveRecord::Base.after_transaction do
|
40
|
+
OnUpdateJob.perform_async(form.model.id, opts[:params][:txn])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
23
44
|
end
|
24
45
|
end
|
25
46
|
end
|
@@ -1,8 +1,9 @@
|
|
1
1
|
module BloomRemit
|
2
2
|
class Txn < ActiveRecord::Base
|
3
3
|
|
4
|
-
belongs_to :recipient, polymorphic: true
|
5
4
|
belongs_to :sender, polymorphic: true
|
5
|
+
belongs_to :owner, polymorphic: true
|
6
|
+
has_many :responses, class_name: "BloomRemit::Response", dependent: :destroy
|
6
7
|
|
7
8
|
enum status: {
|
8
9
|
bank_error: -2,
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module BloomRemit
|
2
2
|
class CreateTxn
|
3
3
|
|
4
|
-
def self.call(
|
4
|
+
def self.call(target_slug:, sender:, owner:, amount:, account_name:, account_id:)
|
5
5
|
Txns::Operations::Create.(txn: {
|
6
|
-
recipient_id: recipient.id,
|
7
|
-
recipient_type: recipient.class.name,
|
8
6
|
sender_id: sender.id,
|
9
|
-
sender_type: sender.class.name,
|
7
|
+
sender_type: sender.class.base_class.name,
|
10
8
|
amount: amount,
|
11
9
|
account_name: account_name,
|
12
10
|
account_id: account_id,
|
11
|
+
target_slug: target_slug,
|
12
|
+
owner_id: owner.id,
|
13
|
+
owner_type: owner.class.base_class.name,
|
13
14
|
})
|
14
15
|
end
|
15
16
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module BloomRemit
|
2
|
+
module Txns
|
3
|
+
class HandleResponse
|
4
|
+
|
5
|
+
extend LightService::Action
|
6
|
+
expects :txn, :remote_response
|
7
|
+
promises :response
|
8
|
+
|
9
|
+
executed do |c|
|
10
|
+
body = c.remote_response.body
|
11
|
+
c.response = c.txn.responses.create!(body: body)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -4,18 +4,22 @@ module BloomRemit
|
|
4
4
|
|
5
5
|
extend LightService::Action
|
6
6
|
expects :client, :txn
|
7
|
+
promises :remote_response
|
7
8
|
|
8
9
|
executed do |c|
|
9
10
|
txn = c.txn
|
11
|
+
callback_url =
|
12
|
+
Engine.routes.url_helpers.api_v1_txn_url(txn, secret: txn.secret)
|
10
13
|
|
11
|
-
c.client.create_payment(
|
14
|
+
c.remote_response = c.client.create_payment(
|
12
15
|
sender_id: txn.sender.send(BloomRemit.sender_id_method),
|
13
16
|
account_name: txn.account_name,
|
14
17
|
account_number: txn.account_id,
|
15
|
-
callback_url:
|
18
|
+
callback_url: callback_url,
|
16
19
|
dest_currency: "PHP",
|
17
20
|
orig_currency: "PHP",
|
18
|
-
payout_method: txn.
|
21
|
+
payout_method: txn.target_slug,
|
22
|
+
paid_in_orig_currency: txn.amount,
|
19
23
|
receivable_in_dest_currency: txn.amount,
|
20
24
|
)
|
21
25
|
end
|
data/lib/bloom_remit/version.rb
CHANGED
data/lib/bloom_remit.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "ar_after_transaction"
|
1
2
|
require "storext"
|
2
3
|
require "sidekiq"
|
3
4
|
require "light-service"
|
@@ -21,6 +22,7 @@ module BloomRemit
|
|
21
22
|
mattr_accessor :agent_id
|
22
23
|
mattr_accessor :url
|
23
24
|
mattr_reader :sender_id_method_default
|
25
|
+
mattr_accessor :on_txn_response
|
24
26
|
@@sender_id_method_default = :bloom_remit_id
|
25
27
|
mattr_accessor :sender_id_method
|
26
28
|
self.sender_id_method = self.sender_id_method_default
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe BloomRemit do
|
4
|
+
|
5
|
+
it "is configurable" do
|
6
|
+
BloomRemit.configure do |c|
|
7
|
+
c.token = "token"
|
8
|
+
c.secret = "secret"
|
9
|
+
c.url = "https://url.com"
|
10
|
+
c.agent_id = "agent_id"
|
11
|
+
c.on_txn_response = OnTxnResponse
|
12
|
+
end
|
13
|
+
|
14
|
+
expect(described_class.token).to eq "token"
|
15
|
+
expect(described_class.secret).to eq "secret"
|
16
|
+
expect(described_class.url).to eq "https://url.com"
|
17
|
+
expect(described_class.agent_id).to eq "agent_id"
|
18
|
+
expect(described_class.sender_id_method).to eq :bloom_remit_id
|
19
|
+
expect(described_class.on_txn_response).to eq OnTxnResponse
|
20
|
+
end
|
21
|
+
|
22
|
+
describe ".sender_id_method" do
|
23
|
+
it "is configuratble" do
|
24
|
+
described_class.configure {|c| c.sender_id_method = "asd"}
|
25
|
+
expect(described_class.sender_id_method).to eq "asd"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
module BloomRemit
|
4
|
+
module Txns
|
5
|
+
module Operations
|
6
|
+
RSpec.describe Create, cleaning_strategy: :truncation do
|
7
|
+
|
8
|
+
let(:user) { create(:bloom_remit_dummy_sub_user) }
|
9
|
+
let(:biller) { create(:bloom_remit_dummy_biller, slug: "PLDT") }
|
10
|
+
let(:payment) { create(:bloom_remit_dummy_sub_payment) }
|
11
|
+
|
12
|
+
it "creates a txn with a secret and enqueues the PayoutJob" do
|
13
|
+
op = described_class.(txn: {
|
14
|
+
target_slug: biller.slug,
|
15
|
+
sender_id: user.id,
|
16
|
+
sender_type: user.class.base_class.name,
|
17
|
+
amount: 800.0,
|
18
|
+
account_name: "028109090",
|
19
|
+
account_id: "Hooli X",
|
20
|
+
owner_id: payment.id,
|
21
|
+
owner_type: payment.class.base_class.name,
|
22
|
+
})
|
23
|
+
txn = op.model
|
24
|
+
expect(txn.target_slug).to eq biller.slug
|
25
|
+
expect(txn.sender).to eq user
|
26
|
+
expect(txn.amount).to eq 800.0
|
27
|
+
expect(txn.account_name).to eq "028109090"
|
28
|
+
expect(txn.account_id).to eq "Hooli X"
|
29
|
+
expect(txn.owner).to eq payment
|
30
|
+
expect(PayoutJob).to have_enqueued_job(txn.id)
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
module BloomRemit
|
4
|
+
module Txns
|
5
|
+
module Operations
|
6
|
+
RSpec.describe Update, cleaning_strategy: :truncation do
|
7
|
+
|
8
|
+
let(:user) { create(:bloom_remit_dummy_user) }
|
9
|
+
let(:txn) { create(:bloom_remit_txn, sender: user) }
|
10
|
+
|
11
|
+
it "creates the txn, and triggers BloomRemit.on_txn_update" do
|
12
|
+
op = described_class.
|
13
|
+
(id: txn.id, secret: txn.secret, status: "paid")
|
14
|
+
txn = op.model
|
15
|
+
expect(txn.status).to eq "paid"
|
16
|
+
expect(OnUpdateJob).to have_enqueued_job(txn.id, {
|
17
|
+
status: "paid",
|
18
|
+
secret: txn.secret,
|
19
|
+
})
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "bloom_remit"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
+
|
18
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
+
# config.i18n.default_locale = :de
|
21
|
+
|
22
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|