bloom_remit 0.8.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19e5b892ac994036a07aa500f15a42d40218b98d
4
- data.tar.gz: 1f205caf04341f305ae7c21b9dbf0e92f12aecb6
3
+ metadata.gz: 004cf8a8cbe6e2f79f425da1a3362b7bf7b0861d
4
+ data.tar.gz: a8671438ad0a3af55f9c2aa0023abc6809e1adea
5
5
  SHA512:
6
- metadata.gz: b3e6c2ee8efc6d63d9163bebe7cbd32b966290a1e27f49fae93eaff9972ac2d68dc5c65de3b3af1d6a5e2e8869aeabd427eb1b5e9f528c258457b41c0394596f
7
- data.tar.gz: 7e15e8b2a09af1ba376e466b501ba67c2b9c1f4486a2da37eaac83948efee9eae9dbb3370a96f48083ec0b9d22cd7ef63a92c78a1235a09444b7cc62706e9d9c
6
+ metadata.gz: da741fcd5c70b9feff9eee795e3d5142889b889b8b8a59e01263bc117948968ace80edb5ab79923ce306f5b9a37f8df86b8d5d8aa1798ef993c30c74871e9394
7
+ data.tar.gz: 84ec86f256fea4f420528978e61c364404cf49ea53b560d13b08a13a39ee4caf2ecf7abfe247c03435f41f7a37b808b8cfedbbddfb6b838cb5597811362352d1
@@ -14,8 +14,6 @@ module BloomRemit
14
14
  property :owner_type
15
15
  property :external_id
16
16
 
17
- validates :external_id, presence: true
18
-
19
17
  end
20
18
  end
21
19
  end
@@ -1,15 +1,32 @@
1
1
  module BloomRemit
2
2
  class CreateTxn
3
3
 
4
- def self.call(
5
- target_slug:,
6
- sender:,
7
- owner:,
8
- amount:,
9
- account_name:,
10
- account_id:,
11
- external_id:
4
+ include Virtus.model
5
+ attribute :target_slug, String
6
+ attribute :sender, String
7
+ attribute :owner
8
+ attribute :amount, Float
9
+ attribute :account_name, String
10
+ attribute :account_id, String
11
+ attribute :external_id, String
12
+
13
+ include ActiveModel::Validations
14
+ validates(
15
+ :target_slug,
16
+ :sender,
17
+ :owner,
18
+ :amount,
19
+ :account_name,
20
+ presence: true
12
21
  )
22
+
23
+ def self.call(opts)
24
+ create_txn = self.new(opts)
25
+ fail ArgumentError, create_txn.errors.full_messages if create_txn.invalid?
26
+ create_txn.()
27
+ end
28
+
29
+ def call
13
30
  ::BloomRemit::Txns::Operations::Create.(txn: {
14
31
  sender_id: sender.id,
15
32
  sender_type: sender.class.base_class.name,
@@ -0,0 +1,5 @@
1
+ class AllowNullExternalIdForBloomRemitTxns < ActiveRecord::Migration
2
+ def change
3
+ change_column :bloom_remit_txns, :external_id, :string, null: true
4
+ end
5
+ end
@@ -1,4 +1,6 @@
1
1
  require "ar_after_transaction"
2
+ require "virtus"
3
+ require "active_model"
2
4
  require "storext"
3
5
  require "sidekiq"
4
6
  require "light-service"
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -7,7 +7,6 @@ module BloomRemit
7
7
 
8
8
  describe "validations" do
9
9
  subject { described_class.new(Txn.new) }
10
- it { is_expected.to validate_presence_of(:external_id) }
11
10
  end
12
11
 
13
12
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20160817003323) do
14
+ ActiveRecord::Schema.define(version: 20160930034811) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -40,7 +40,7 @@ ActiveRecord::Schema.define(version: 20160817003323) do
40
40
  t.string "target_slug", null: false
41
41
  t.string "owner_id"
42
42
  t.string "owner_type"
43
- t.string "external_id", null: false
43
+ t.string "external_id"
44
44
  t.text "status_description"
45
45
  t.string "vendor_external_id"
46
46
  end
@@ -33827,3 +33827,599 @@ Completed 204 No Content in 13ms (ActiveRecord: 2.5ms)
33827
33827
   (0.3ms) COMMIT
33828
33828
   (0.4ms) BEGIN
33829
33829
   (0.6ms) ROLLBACK
33830
+ ActiveRecord::SchemaMigration Load (14.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
33831
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
33832
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
33833
+  (4.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
33834
+  (1.9ms)  SELECT schemaname || '.' || tablename
33835
+ FROM pg_tables
33836
+ WHERE
33837
+ tablename !~ '_prt_' AND
33838
+ tablename <> 'schema_migrations' AND
33839
+ schemaname = ANY (current_schemas(false))
33840
+ 
33841
+  (5.2ms) select table_name from information_schema.views where table_schema = 'app_test'
33842
+  (394.9ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
33843
+  (1.0ms) ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
33844
+  (0.6ms) BEGIN
33845
+  (0.5ms) COMMIT
33846
+  (0.6ms) BEGIN
33847
+  (0.7ms) SAVEPOINT active_record_1
33848
+ SQL (1.0ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
33849
+  (0.6ms) RELEASE SAVEPOINT active_record_1
33850
+  (0.6ms) SAVEPOINT active_record_1
33851
+ SQL (0.8ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
33852
+  (0.5ms) RELEASE SAVEPOINT active_record_1
33853
+  (0.7ms) SAVEPOINT active_record_1
33854
+ SQL (0.8ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
33855
+  (0.5ms) RELEASE SAVEPOINT active_record_1
33856
+  (0.7ms) SAVEPOINT active_record_1
33857
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "9e4c75e1-fbf0-45e7-9cd4-6f0deb8abab4"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "f8346db2d56fbc2f8ba599b7"]]
33858
+  (0.6ms) RELEASE SAVEPOINT active_record_1
33859
+  (0.8ms) ROLLBACK
33860
+ ActiveRecord::SchemaMigration Load (3.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
33861
+  (226.4ms) DROP DATABASE IF EXISTS "app_test"
33862
+  (596.9ms) CREATE DATABASE "app_test" ENCODING = 'unicode'
33863
+ SQL (2.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
33864
+  (123.1ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying)
33865
+  (84.4ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
33866
+  (55.5ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" USING btree ("txn_id")
33867
+  (79.7ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "sender_id" character varying NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL, "target_slug" character varying NOT NULL, "owner_id" character varying, "owner_type" character varying, "external_id" character varying NOT NULL, "status_description" text, "vendor_external_id" character varying) 
33868
+  (51.4ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" USING btree ("external_id")
33869
+  (39.4ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" USING btree ("owner_id", "owner_type")
33870
+  (44.2ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" USING btree ("vendor_external_id")
33871
+  (90.4ms) CREATE TABLE "payments" ("id" serial primary key, "type" character varying) 
33872
+  (73.1ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying, "type" character varying)
33873
+  (44.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
33874
+  (44.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33875
+  (1.4ms) SELECT version FROM "schema_migrations"
33876
+  (13.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160817003323')
33877
+  (14.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160729085500')
33878
+  (11.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805001840')
33879
+  (11.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805042105')
33880
+  (12.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806011259')
33881
+  (11.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806012210')
33882
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
33883
+ ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
33884
+  (224.6ms) DROP DATABASE IF EXISTS "app_test"
33885
+  (512.8ms) CREATE DATABASE "app_test" ENCODING = 'unicode'
33886
+ SQL (0.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
33887
+  (59.9ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying)
33888
+  (56.9ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
33889
+  (38.0ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" USING btree ("txn_id")
33890
+  (53.3ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "sender_id" character varying NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL, "target_slug" character varying NOT NULL, "owner_id" character varying, "owner_type" character varying, "external_id" character varying NOT NULL, "status_description" text, "vendor_external_id" character varying) 
33891
+  (37.5ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" USING btree ("external_id")
33892
+  (32.5ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" USING btree ("owner_id", "owner_type")
33893
+  (46.9ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" USING btree ("vendor_external_id")
33894
+  (67.9ms) CREATE TABLE "payments" ("id" serial primary key, "type" character varying) 
33895
+  (61.8ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying, "type" character varying)
33896
+  (31.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
33897
+  (37.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33898
+  (1.1ms) SELECT version FROM "schema_migrations"
33899
+  (11.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160817003323')
33900
+  (17.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160729085500')
33901
+  (13.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805001840')
33902
+  (17.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805042105')
33903
+  (16.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806011259')
33904
+  (16.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806012210')
33905
+ ActiveRecord::SchemaMigration Load (3.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
33906
+ ActiveRecord::SchemaMigration Load (2.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
33907
+ Migrating to CreateBloomRemitTxns (20160729070509)
33908
+  (0.9ms) BEGIN
33909
+  (4.4ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
33910
+  (0.6ms) ROLLBACK
33911
+  (38.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
33912
+  (42.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33913
+ ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
33914
+ Migrating to CreateBloomRemitTxns (20160729070509)
33915
+  (0.6ms) BEGIN
33916
+  (51.8ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
33917
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729070509"]]
33918
+  (11.9ms) COMMIT
33919
+ Migrating to CreateUsers (20160729085500)
33920
+  (2.9ms) BEGIN
33921
+  (77.6ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying) 
33922
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729085500"]]
33923
+  (26.3ms) COMMIT
33924
+ Migrating to CreateBillers (20160805001840)
33925
+  (2.3ms) BEGIN
33926
+  (58.8ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
33927
+ SQL (5.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805001840"]]
33928
+  (15.6ms) COMMIT
33929
+ Migrating to DropRecipientFromTxns (20160805004223)
33930
+  (1.8ms) BEGIN
33931
+  (9.2ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_id"
33932
+  (6.5ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_type"
33933
+ SQL (2.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004223"]]
33934
+  (17.2ms) COMMIT
33935
+ Migrating to AddTargetSlugToBloomRemitTxns (20160805004350)
33936
+  (2.0ms) BEGIN
33937
+  (2.9ms) ALTER TABLE "bloom_remit_txns" ADD "target_slug" character varying NOT NULL
33938
+ SQL (3.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004350"]]
33939
+  (18.0ms) COMMIT
33940
+ Migrating to AddOwnerToBloomRemitTxns (20160805040950)
33941
+  (0.9ms) BEGIN
33942
+  (1.4ms) ALTER TABLE "bloom_remit_txns" ADD "owner_id" character varying
33943
+  (4.6ms) ALTER TABLE "bloom_remit_txns" ADD "owner_type" character varying
33944
+  (35.5ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" ("owner_id", "owner_type")
33945
+ SQL (3.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805040950"]]
33946
+  (14.8ms) COMMIT
33947
+ Migrating to CreatePayments (20160805042105)
33948
+  (0.7ms) BEGIN
33949
+  (30.7ms) CREATE TABLE "payments" ("id" serial primary key)
33950
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805042105"]]
33951
+  (23.6ms) COMMIT
33952
+ Migrating to ChangeTxnsSenderIdToString (20160805095308)
33953
+  (4.9ms) BEGIN
33954
+  (115.3ms) ALTER TABLE "bloom_remit_txns" ALTER COLUMN "sender_id" TYPE character varying
33955
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805095308"]]
33956
+  (13.9ms) COMMIT
33957
+ Migrating to AddTypeToUsers (20160806011259)
33958
+  (0.7ms) BEGIN
33959
+  (1.1ms) ALTER TABLE "users" ADD "type" character varying
33960
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806011259"]]
33961
+  (12.1ms) COMMIT
33962
+ Migrating to AddTypeToPayments (20160806012210)
33963
+  (0.6ms) BEGIN
33964
+  (25.1ms) ALTER TABLE "payments" ADD "type" character varying
33965
+ SQL (1.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806012210"]]
33966
+  (13.1ms) COMMIT
33967
+ Migrating to CreateBloomRemitResponses (20160806054012)
33968
+  (0.7ms) BEGIN
33969
+  (56.9ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
33970
+  (26.0ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" ("txn_id")
33971
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806054012"]]
33972
+  (9.7ms) COMMIT
33973
+ Migrating to AddExternalIdToBloomRemitTxns (20160808081300)
33974
+  (0.8ms) BEGIN
33975
+  (0.9ms) ALTER TABLE "bloom_remit_txns" ADD "external_id" character varying NOT NULL
33976
+  (24.9ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" ("external_id")
33977
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160808081300"]]
33978
+  (11.2ms) COMMIT
33979
+ Migrating to AddStatusDescriptionToBloomRemitTxns (20160809043433)
33980
+  (0.7ms) BEGIN
33981
+  (0.8ms) ALTER TABLE "bloom_remit_txns" ADD "status_description" text
33982
+ SQL (1.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160809043433"]]
33983
+  (17.8ms) COMMIT
33984
+ Migrating to AddVendorExternalIdToBloomRemitTxns (20160817003323)
33985
+  (1.3ms) BEGIN
33986
+  (0.9ms) ALTER TABLE "bloom_remit_txns" ADD "vendor_external_id" character varying
33987
+  (22.0ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" ("vendor_external_id")
33988
+ SQL (5.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160817003323"]]
33989
+  (12.7ms) COMMIT
33990
+ Migrating to AllowNullExternalIdForTxns (20160930034811)
33991
+  (0.8ms) BEGIN
33992
+  (1.5ms) ALTER TABLE "txns" ALTER COLUMN "external_id" TYPE character varying
33993
+  (1.1ms) ROLLBACK
33994
+  (38.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
33995
+  (39.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33996
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
33997
+ Migrating to CreateBloomRemitTxns (20160729070509)
33998
+  (0.6ms) BEGIN
33999
+  (55.4ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
34000
+ SQL (2.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729070509"]]
34001
+  (17.4ms) COMMIT
34002
+ Migrating to CreateUsers (20160729085500)
34003
+  (2.2ms) BEGIN
34004
+  (53.1ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying) 
34005
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729085500"]]
34006
+  (12.2ms) COMMIT
34007
+ Migrating to CreateBillers (20160805001840)
34008
+  (1.1ms) BEGIN
34009
+  (53.2ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
34010
+ SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805001840"]]
34011
+  (16.3ms) COMMIT
34012
+ Migrating to DropRecipientFromTxns (20160805004223)
34013
+  (0.7ms) BEGIN
34014
+  (1.1ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_id"
34015
+  (0.8ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_type"
34016
+ SQL (1.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004223"]]
34017
+  (16.6ms) COMMIT
34018
+ Migrating to AddTargetSlugToBloomRemitTxns (20160805004350)
34019
+  (4.0ms) BEGIN
34020
+  (0.9ms) ALTER TABLE "bloom_remit_txns" ADD "target_slug" character varying NOT NULL
34021
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004350"]]
34022
+  (14.4ms) COMMIT
34023
+ Migrating to AddOwnerToBloomRemitTxns (20160805040950)
34024
+  (1.5ms) BEGIN
34025
+  (3.0ms) ALTER TABLE "bloom_remit_txns" ADD "owner_id" character varying
34026
+  (2.8ms) ALTER TABLE "bloom_remit_txns" ADD "owner_type" character varying
34027
+  (34.5ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" ("owner_id", "owner_type")
34028
+ SQL (2.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805040950"]]
34029
+  (14.6ms) COMMIT
34030
+ Migrating to CreatePayments (20160805042105)
34031
+  (5.9ms) BEGIN
34032
+  (33.1ms) CREATE TABLE "payments" ("id" serial primary key)
34033
+ SQL (2.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805042105"]]
34034
+  (19.3ms) COMMIT
34035
+ Migrating to ChangeTxnsSenderIdToString (20160805095308)
34036
+  (1.4ms) BEGIN
34037
+  (90.9ms) ALTER TABLE "bloom_remit_txns" ALTER COLUMN "sender_id" TYPE character varying
34038
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805095308"]]
34039
+  (16.3ms) COMMIT
34040
+ Migrating to AddTypeToUsers (20160806011259)
34041
+  (0.8ms) BEGIN
34042
+  (0.8ms) ALTER TABLE "users" ADD "type" character varying
34043
+ SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806011259"]]
34044
+  (12.2ms) COMMIT
34045
+ Migrating to AddTypeToPayments (20160806012210)
34046
+  (0.7ms) BEGIN
34047
+  (28.2ms) ALTER TABLE "payments" ADD "type" character varying
34048
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806012210"]]
34049
+  (12.6ms) COMMIT
34050
+ Migrating to CreateBloomRemitResponses (20160806054012)
34051
+  (0.7ms) BEGIN
34052
+  (44.0ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
34053
+  (21.5ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" ("txn_id")
34054
+ SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806054012"]]
34055
+  (11.3ms) COMMIT
34056
+ Migrating to AddExternalIdToBloomRemitTxns (20160808081300)
34057
+  (1.2ms) BEGIN
34058
+  (0.8ms) ALTER TABLE "bloom_remit_txns" ADD "external_id" character varying NOT NULL
34059
+  (37.5ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" ("external_id")
34060
+ SQL (3.0ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160808081300"]]
34061
+  (15.3ms) COMMIT
34062
+ Migrating to AddStatusDescriptionToBloomRemitTxns (20160809043433)
34063
+  (0.7ms) BEGIN
34064
+  (0.7ms) ALTER TABLE "bloom_remit_txns" ADD "status_description" text
34065
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160809043433"]]
34066
+  (12.9ms) COMMIT
34067
+ Migrating to AddVendorExternalIdToBloomRemitTxns (20160817003323)
34068
+  (1.5ms) BEGIN
34069
+  (1.5ms) ALTER TABLE "bloom_remit_txns" ADD "vendor_external_id" character varying
34070
+  (32.1ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" ("vendor_external_id")
34071
+ SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160817003323"]]
34072
+  (13.0ms) COMMIT
34073
+ Migrating to AllowNullExternalIdForTxns (20160930034811)
34074
+  (42.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
34075
+  (38.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34076
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34077
+ Migrating to CreateBloomRemitTxns (20160729070509)
34078
+  (0.6ms) BEGIN
34079
+  (45.1ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
34080
+ SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729070509"]]
34081
+  (12.6ms) COMMIT
34082
+ Migrating to CreateUsers (20160729085500)
34083
+  (0.9ms) BEGIN
34084
+  (52.6ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying) 
34085
+ SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729085500"]]
34086
+  (10.9ms) COMMIT
34087
+ Migrating to CreateBillers (20160805001840)
34088
+  (1.8ms) BEGIN
34089
+  (76.5ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
34090
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805001840"]]
34091
+  (10.0ms) COMMIT
34092
+ Migrating to DropRecipientFromTxns (20160805004223)
34093
+  (1.9ms) BEGIN
34094
+  (4.2ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_id"
34095
+  (4.2ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_type"
34096
+ SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004223"]]
34097
+  (15.6ms) COMMIT
34098
+ Migrating to AddTargetSlugToBloomRemitTxns (20160805004350)
34099
+  (0.7ms) BEGIN
34100
+  (0.8ms) ALTER TABLE "bloom_remit_txns" ADD "target_slug" character varying NOT NULL
34101
+ SQL (2.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004350"]]
34102
+  (17.1ms) COMMIT
34103
+ Migrating to AddOwnerToBloomRemitTxns (20160805040950)
34104
+  (3.1ms) BEGIN
34105
+  (3.2ms) ALTER TABLE "bloom_remit_txns" ADD "owner_id" character varying
34106
+  (1.1ms) ALTER TABLE "bloom_remit_txns" ADD "owner_type" character varying
34107
+  (37.9ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" ("owner_id", "owner_type")
34108
+ SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805040950"]]
34109
+  (16.9ms) COMMIT
34110
+ Migrating to CreatePayments (20160805042105)
34111
+  (1.3ms) BEGIN
34112
+  (39.1ms) CREATE TABLE "payments" ("id" serial primary key)
34113
+ SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805042105"]]
34114
+  (19.2ms) COMMIT
34115
+ Migrating to ChangeTxnsSenderIdToString (20160805095308)
34116
+  (2.9ms) BEGIN
34117
+  (94.9ms) ALTER TABLE "bloom_remit_txns" ALTER COLUMN "sender_id" TYPE character varying
34118
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805095308"]]
34119
+  (10.6ms) COMMIT
34120
+ Migrating to AddTypeToUsers (20160806011259)
34121
+  (0.6ms) BEGIN
34122
+  (0.9ms) ALTER TABLE "users" ADD "type" character varying
34123
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806011259"]]
34124
+  (9.7ms) COMMIT
34125
+ Migrating to AddTypeToPayments (20160806012210)
34126
+  (0.6ms) BEGIN
34127
+  (23.4ms) ALTER TABLE "payments" ADD "type" character varying
34128
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806012210"]]
34129
+  (14.4ms) COMMIT
34130
+ Migrating to CreateBloomRemitResponses (20160806054012)
34131
+  (3.0ms) BEGIN
34132
+  (57.8ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
34133
+  (27.4ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" ("txn_id")
34134
+ SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806054012"]]
34135
+  (17.7ms) COMMIT
34136
+ Migrating to AddExternalIdToBloomRemitTxns (20160808081300)
34137
+  (1.2ms) BEGIN
34138
+  (5.4ms) ALTER TABLE "bloom_remit_txns" ADD "external_id" character varying NOT NULL
34139
+  (33.1ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" ("external_id")
34140
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160808081300"]]
34141
+  (14.7ms) COMMIT
34142
+ Migrating to AddStatusDescriptionToBloomRemitTxns (20160809043433)
34143
+  (2.4ms) BEGIN
34144
+  (1.2ms) ALTER TABLE "bloom_remit_txns" ADD "status_description" text
34145
+ SQL (2.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160809043433"]]
34146
+  (13.1ms) COMMIT
34147
+ Migrating to AddVendorExternalIdToBloomRemitTxns (20160817003323)
34148
+  (0.8ms) BEGIN
34149
+  (1.2ms) ALTER TABLE "bloom_remit_txns" ADD "vendor_external_id" character varying
34150
+  (28.9ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" ("vendor_external_id")
34151
+ SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160817003323"]]
34152
+  (15.5ms) COMMIT
34153
+ Migrating to AllowNullExternalIdForBloomRemitTxns (20160930034811)
34154
+  (0.7ms) BEGIN
34155
+  (1.2ms) ALTER TABLE "bloom_remit_txns" ALTER COLUMN "external_id" TYPE character varying
34156
+  (0.6ms) ALTER TABLE "bloom_remit_txns" ALTER "external_id" DROP NOT NULL
34157
+ SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160930034811"]]
34158
+  (14.8ms) COMMIT
34159
+ ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
34160
+  (2.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34161
+ FROM pg_constraint c
34162
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34163
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34164
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34165
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34166
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34167
+ WHERE c.contype = 'f'
34168
+ AND t1.relname = 'billers'
34169
+ AND t3.nspname = ANY (current_schemas(false))
34170
+ ORDER BY c.conname
34171
+
34172
+  (2.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34173
+ FROM pg_constraint c
34174
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34175
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34176
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34177
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34178
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34179
+ WHERE c.contype = 'f'
34180
+ AND t1.relname = 'bloom_remit_responses'
34181
+ AND t3.nspname = ANY (current_schemas(false))
34182
+ ORDER BY c.conname
34183
+ 
34184
+  (2.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34185
+ FROM pg_constraint c
34186
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34187
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34188
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34189
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34190
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34191
+ WHERE c.contype = 'f'
34192
+ AND t1.relname = 'bloom_remit_txns'
34193
+ AND t3.nspname = ANY (current_schemas(false))
34194
+ ORDER BY c.conname
34195
+
34196
+  (2.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34197
+ FROM pg_constraint c
34198
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34199
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34200
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34201
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34202
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34203
+ WHERE c.contype = 'f'
34204
+ AND t1.relname = 'payments'
34205
+ AND t3.nspname = ANY (current_schemas(false))
34206
+ ORDER BY c.conname
34207
+ 
34208
+  (2.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34209
+ FROM pg_constraint c
34210
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34211
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34212
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34213
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34214
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34215
+ WHERE c.contype = 'f'
34216
+ AND t1.relname = 'users'
34217
+ AND t3.nspname = ANY (current_schemas(false))
34218
+ ORDER BY c.conname
34219
+
34220
+ ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
34221
+  (1.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
34222
+  (2.2ms)  SELECT schemaname || '.' || tablename
34223
+ FROM pg_tables
34224
+ WHERE
34225
+ tablename !~ '_prt_' AND
34226
+ tablename <> 'schema_migrations' AND
34227
+ schemaname = ANY (current_schemas(false))
34228
+ 
34229
+  (1.9ms) select table_name from information_schema.views where table_schema = 'app_test'
34230
+  (358.3ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
34231
+  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
34232
+  (0.6ms) BEGIN
34233
+  (0.5ms) COMMIT
34234
+  (0.5ms) BEGIN
34235
+  (0.7ms) ROLLBACK
34236
+  (0.6ms) BEGIN
34237
+  (0.4ms) COMMIT
34238
+  (0.5ms) BEGIN
34239
+  (0.6ms) ROLLBACK
34240
+  (0.6ms) BEGIN
34241
+ SQL (0.9ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34242
+  (13.5ms) COMMIT
34243
+  (0.7ms) BEGIN
34244
+ SQL (1.9ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34245
+  (21.6ms) COMMIT
34246
+  (0.9ms) BEGIN
34247
+ SQL (1.0ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34248
+  (12.9ms) COMMIT
34249
+  (0.8ms) BEGIN
34250
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "78e86390-c7bb-4356-9b57-1de35f8aeb4c"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "ec2495560413b85cd84f8bcc"]]
34251
+  (12.4ms) COMMIT
34252
+ User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
34253
+ Payment Load (0.9ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
34254
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
34255
+  (359.9ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
34256
+  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
34257
+  (0.7ms) BEGIN
34258
+ SQL (1.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
34259
+  (10.7ms) COMMIT
34260
+  (0.9ms) BEGIN
34261
+ SQL (1.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "60e9a0da-4b67-4acf-bee7-f7d29cd04eef"], ["external_id", "6abe9b9def0a5d6a8d8854d0"], ["sender_id", "1"], ["sender_type", "User"]]
34262
+  (13.7ms) COMMIT
34263
+ BloomRemit::Txn Load (1.3ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "60e9a0da-4b67-4acf-bee7-f7d29cd04eef"]]
34264
+  (1.1ms) BEGIN
34265
+ SQL (2.6ms) UPDATE "bloom_remit_txns" SET "status" = $1, "status_description" = $2, "vendor_external_id" = $3 WHERE "bloom_remit_txns"."id" = $4 [["status", 1], ["status_description", "My status description"], ["vendor_external_id", "somerefno"], ["id", 1]]
34266
+  (11.5ms) COMMIT
34267
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
34268
+  (352.2ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
34269
+  (1.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
34270
+  (0.5ms) BEGIN
34271
+  (0.5ms) COMMIT
34272
+  (0.4ms) BEGIN
34273
+  (0.5ms) ROLLBACK
34274
+  (0.5ms) BEGIN
34275
+  (0.4ms) COMMIT
34276
+  (0.5ms) BEGIN
34277
+  (1.7ms) ROLLBACK
34278
+  (0.8ms) BEGIN
34279
+  (0.5ms) COMMIT
34280
+  (0.4ms) BEGIN
34281
+  (0.8ms) ROLLBACK
34282
+  (0.6ms) BEGIN
34283
+  (0.6ms) COMMIT
34284
+  (0.5ms) BEGIN
34285
+  (0.7ms) ROLLBACK
34286
+  (0.6ms) BEGIN
34287
+  (0.5ms) COMMIT
34288
+  (0.5ms) BEGIN
34289
+  (0.5ms) ROLLBACK
34290
+  (0.6ms) BEGIN
34291
+  (0.5ms) COMMIT
34292
+  (0.4ms) BEGIN
34293
+  (0.4ms) ROLLBACK
34294
+  (0.4ms) BEGIN
34295
+  (0.4ms) COMMIT
34296
+  (0.4ms) BEGIN
34297
+  (1.4ms) ROLLBACK
34298
+  (0.6ms) BEGIN
34299
+  (0.5ms) COMMIT
34300
+  (0.5ms) BEGIN
34301
+  (0.9ms) SAVEPOINT active_record_1
34302
+ SQL (1.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
34303
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34304
+  (0.6ms) SAVEPOINT active_record_1
34305
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "3597527b-097a-41b9-bf95-6d4068dad936"], ["external_id", "f9145fea664a67b039934157"], ["sender_id", "1"], ["sender_type", "User"]]
34306
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34307
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-30 11:55:23 +0800
34308
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
34309
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
34310
+ BloomRemit::Txn Load (1.0ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", nil]]
34311
+ Rendered text template (0.0ms)
34312
+ Completed 404 Not Found in 17ms (Views: 15.4ms | ActiveRecord: 1.0ms)
34313
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-30 11:55:24 +0800
34314
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
34315
+ Parameters: {"secret"=>"3597527b-097a-41b9-bf95-6d4068dad936", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"3597527b-097a-41b9-bf95-6d4068dad936"}}
34316
+ BloomRemit::Txn Load (1.3ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "3597527b-097a-41b9-bf95-6d4068dad936"]]
34317
+  (0.6ms) SAVEPOINT active_record_1
34318
+ SQL (0.8ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
34319
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34320
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 3.1ms)
34321
+ BloomRemit::Txn Load (0.7ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
34322
+  (0.6ms) ROLLBACK
34323
+  (0.4ms) BEGIN
34324
+  (0.4ms) COMMIT
34325
+  (0.4ms) BEGIN
34326
+  (0.8ms) SAVEPOINT active_record_1
34327
+ SQL (0.7ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
34328
+  (0.5ms) RELEASE SAVEPOINT active_record_1
34329
+  (0.6ms) SAVEPOINT active_record_1
34330
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "ebbc4f0d-2ed9-4207-9354-4a35a56788d2"], ["external_id", "5d65f6ca013abe6f13c097ab"], ["sender_id", "2"], ["sender_type", "User"]]
34331
+  (0.7ms) RELEASE SAVEPOINT active_record_1
34332
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-30 11:55:24 +0800
34333
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
34334
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
34335
+ BloomRemit::Txn Load (0.9ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", nil]]
34336
+ Rendered text template (0.0ms)
34337
+ Completed 404 Not Found in 2ms (Views: 0.3ms | ActiveRecord: 0.9ms)
34338
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-30 11:55:24 +0800
34339
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
34340
+ Parameters: {"secret"=>"ebbc4f0d-2ed9-4207-9354-4a35a56788d2", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"ebbc4f0d-2ed9-4207-9354-4a35a56788d2"}}
34341
+ BloomRemit::Txn Load (0.9ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", "ebbc4f0d-2ed9-4207-9354-4a35a56788d2"]]
34342
+  (0.9ms) SAVEPOINT active_record_1
34343
+ SQL (1.0ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
34344
+  (0.7ms) RELEASE SAVEPOINT active_record_1
34345
+ Completed 204 No Content in 23ms (ActiveRecord: 3.5ms)
34346
+ BloomRemit::Txn Load (1.2ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
34347
+  (0.7ms) ROLLBACK
34348
+  (0.7ms) BEGIN
34349
+  (0.6ms) COMMIT
34350
+  (0.6ms) BEGIN
34351
+  (0.6ms) SAVEPOINT active_record_1
34352
+ SQL (1.0ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34353
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34354
+  (0.6ms) SAVEPOINT active_record_1
34355
+ SQL (0.9ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34356
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34357
+  (1.5ms) SAVEPOINT active_record_1
34358
+ SQL (0.9ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34359
+  (0.5ms) RELEASE SAVEPOINT active_record_1
34360
+  (0.8ms) SAVEPOINT active_record_1
34361
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "d2f65adf-0924-4c16-91b6-bc63b96ef15d"], ["sender_type", "User"], ["sender_id", "3"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "8c13944c69c425e285e7b1b8"]]
34362
+  (0.7ms) RELEASE SAVEPOINT active_record_1
34363
+  (0.7ms) ROLLBACK
34364
+  (0.6ms) BEGIN
34365
+  (0.7ms) COMMIT
34366
+  (0.6ms) BEGIN
34367
+  (0.7ms) ROLLBACK
34368
+  (0.5ms) BEGIN
34369
+  (0.5ms) COMMIT
34370
+  (1.2ms) BEGIN
34371
+  (0.7ms) SAVEPOINT active_record_1
34372
+ SQL (0.9ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
34373
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34374
+  (0.6ms) SAVEPOINT active_record_1
34375
+ SQL (0.7ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
34376
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34377
+  (0.7ms) SAVEPOINT active_record_1
34378
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "0c3cf030-ca19-45d7-a96e-8fcf7ffbd728"], ["external_id", "0c05e32beefd0e97024f8825"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
34379
+  (0.7ms) RELEASE SAVEPOINT active_record_1
34380
+  (0.8ms) SAVEPOINT active_record_1
34381
+ SQL (1.1ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"i\":\"am body\"}"], ["txn_id", 4], ["created_at", "2016-09-30 03:55:24.141234"], ["updated_at", "2016-09-30 03:55:24.141234"]]
34382
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34383
+  (1.0ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
34384
+ BloomRemit::Response Load (0.8ms) SELECT "bloom_remit_responses".* FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 ORDER BY "bloom_remit_responses"."id" ASC LIMIT 1 [["txn_id", 4]]
34385
+  (0.6ms) ROLLBACK
34386
+  (0.5ms) BEGIN
34387
+  (0.5ms) COMMIT
34388
+  (0.4ms) BEGIN
34389
+  (0.6ms) SAVEPOINT active_record_1
34390
+ SQL (0.8ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
34391
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34392
+  (0.5ms) SAVEPOINT active_record_1
34393
+ SQL (0.7ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
34394
+  (0.5ms) RELEASE SAVEPOINT active_record_1
34395
+  (0.4ms) SAVEPOINT active_record_1
34396
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "d4068db1-db2e-41e3-9028-d56d18438a11"], ["external_id", "f317415d3fca29902c933c06"], ["owner_id", "3"], ["owner_type", "Payment"], ["sender_id", "5"], ["sender_type", "User"]]
34397
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34398
+  (0.5ms) SAVEPOINT active_record_1
34399
+ SQL (0.9ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 7], ["id", 5]]
34400
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34401
+  (0.6ms) SAVEPOINT active_record_1
34402
+ SQL (0.8ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"status\":\"500\",\"error\":\"Internal Server Error\"}"], ["txn_id", 5], ["created_at", "2016-09-30 03:55:24.172343"], ["updated_at", "2016-09-30 03:55:24.172343"]]
34403
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34404
+ BloomRemit::Txn Load (0.8ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 5]]
34405
+  (0.7ms) ROLLBACK
34406
+  (0.5ms) BEGIN
34407
+  (0.5ms) COMMIT
34408
+  (0.4ms) BEGIN
34409
+  (0.7ms) ROLLBACK
34410
+  (1.2ms) BEGIN
34411
+  (0.6ms) COMMIT
34412
+  (0.5ms) BEGIN
34413
+  (0.7ms) ROLLBACK
34414
+  (0.9ms) BEGIN
34415
+  (1.1ms) COMMIT
34416
+  (0.5ms) BEGIN
34417
+  (0.6ms) ROLLBACK
34418
+  (0.7ms) BEGIN
34419
+  (0.5ms) COMMIT
34420
+  (0.4ms) BEGIN
34421
+  (0.8ms) ROLLBACK
34422
+  (0.7ms) BEGIN
34423
+  (0.6ms) COMMIT
34424
+  (0.5ms) BEGIN
34425
+  (0.7ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2016-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,34 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: virtus
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: activemodel
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
209
237
  - !ruby/object:Gem::Dependency
210
238
  name: sqlite3
211
239
  requirement: !ruby/object:Gem::Requirement
@@ -385,6 +413,7 @@ files:
385
413
  - db/migrate/20160808081300_add_external_id_to_bloom_remit_txns.rb
386
414
  - db/migrate/20160809043433_add_status_description_to_bloom_remit_txns.rb
387
415
  - db/migrate/20160817003323_add_vendor_external_id_to_bloom_remit_txns.rb
416
+ - db/migrate/20160930034811_allow_null_external_id_for_bloom_remit_txns.rb
388
417
  - lib/bloom_remit.rb
389
418
  - lib/bloom_remit/engine.rb
390
419
  - lib/bloom_remit/factories.rb