bloom_remit 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a13273f2ee664b853f5e6ea870b119a2c583bd5e
4
- data.tar.gz: ceefa048d1ddc8910e60af9a10c68c0ada2b69bb
3
+ metadata.gz: f0d3ea428b16ed968b55be8826d9dcee53c64afe
4
+ data.tar.gz: b5396535031896344b0165cd9fe57eb9b9c8d785
5
5
  SHA512:
6
- metadata.gz: d5caf36454e22cae8074bab952e6b578a3efae75071a1dfc9f3f62fd030086ba0ca945ee062918007eda90cde7b4e3528eaaf023969c93bf7adc47a7e7e5fbb5
7
- data.tar.gz: 65f6b314d36a123add0ad7b4d9488799e5fd50a36e1a2276f544360146348e6657343bd9bc0b8d42d9e05e8e9977050cd06eddab82f633cc4d7928b3e3d4bcaf
6
+ metadata.gz: e16e9313e53f690512c64673f70639424baec0d7095a300d35b1987a589436a9c6d996bd59421094826c387e154e5f24579cbd743a1aeb9163e355e64af7808b
7
+ data.tar.gz: cc925f5aa61df1b592c29ec28f5eeed29d519e8a34ef3fccfe9a69ded76e698b8024c535062c3ad5a5ca0db54d98f143048397235e6c3a56ec71cd34f95f2669
@@ -1,7 +1,7 @@
1
1
  module BloomRemit
2
2
  module Api
3
3
  module V1
4
- class TxnsController < ApplicationController
4
+ class TxnsController < ::BloomRemit::ApplicationController
5
5
 
6
6
  respond_to :json
7
7
 
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -29466,3 +29466,193 @@ Completed 204 No Content in 43ms (ActiveRecord: 1.3ms)
29466
29466
   (0.1ms) COMMIT
29467
29467
   (0.1ms) BEGIN
29468
29468
   (0.1ms) ROLLBACK
29469
+ ActiveRecord::SchemaMigration Load (1.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
29470
+  (3.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL
29471
+  (2.0ms)  SELECT schemaname || '.' || tablename
29472
+ FROM pg_tables
29473
+ WHERE
29474
+ tablename !~ '_prt_' AND
29475
+ tablename <> 'schema_migrations' AND
29476
+ schemaname = ANY (current_schemas(false))
29477
+ 
29478
+  (3.3ms) select table_name from information_schema.views where table_schema = 'bloom_remit_rails_test'
29479
+  (28.3ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
29480
+  (0.4ms) ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL
29481
+  (0.2ms) BEGIN
29482
+  (0.2ms) COMMIT
29483
+  (0.2ms) BEGIN
29484
+  (0.2ms) ROLLBACK
29485
+  (0.1ms) BEGIN
29486
+  (0.1ms) COMMIT
29487
+  (0.1ms) BEGIN
29488
+  (0.1ms) ROLLBACK
29489
+  (0.2ms) BEGIN
29490
+  (0.2ms) COMMIT
29491
+  (0.2ms) BEGIN
29492
+  (0.3ms) ROLLBACK
29493
+  (0.3ms) BEGIN
29494
+ SQL (0.5ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
29495
+  (0.3ms) COMMIT
29496
+  (0.3ms) BEGIN
29497
+ SQL (0.6ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
29498
+  (0.5ms) COMMIT
29499
+  (0.3ms) BEGIN
29500
+ SQL (0.4ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
29501
+  (0.4ms) COMMIT
29502
+  (0.2ms) BEGIN
29503
+ SQL (0.6ms) 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", "b3597f8d-42d7-4c99-b652-ccde059b3026"], ["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", "aeea91a7138e675bc9b7c236"]]
29504
+  (0.4ms) COMMIT
29505
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
29506
+ Payment Load (0.3ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
29507
+  (0.3ms) ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL
29508
+  (20.6ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
29509
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL
29510
+  (0.2ms) BEGIN
29511
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
29512
+  (0.4ms) COMMIT
29513
+  (0.2ms) BEGIN
29514
+ SQL (0.5ms) 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", "2176d69e-fa83-498c-9324-5d675389be09"], ["external_id", "9509d2037675acd11a4b84b2"], ["sender_id", "1"], ["sender_type", "User"]]
29515
+  (0.4ms) COMMIT
29516
+ BloomRemit::Txn Load (0.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", "2176d69e-fa83-498c-9324-5d675389be09"]]
29517
+  (0.2ms) BEGIN
29518
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
29519
+  (0.4ms) COMMIT
29520
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL
29521
+  (14.4ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
29522
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL
29523
+  (0.2ms) BEGIN
29524
+  (0.2ms) COMMIT
29525
+  (0.2ms) BEGIN
29526
+  (0.2ms) ROLLBACK
29527
+  (0.2ms) BEGIN
29528
+  (0.2ms) COMMIT
29529
+  (0.2ms) BEGIN
29530
+  (0.3ms) ROLLBACK
29531
+  (0.2ms) BEGIN
29532
+  (0.2ms) COMMIT
29533
+  (0.2ms) BEGIN
29534
+  (0.2ms) ROLLBACK
29535
+  (0.2ms) BEGIN
29536
+  (0.2ms) COMMIT
29537
+  (0.2ms) BEGIN
29538
+  (0.3ms) ROLLBACK
29539
+  (0.2ms) BEGIN
29540
+  (0.2ms) COMMIT
29541
+  (0.2ms) BEGIN
29542
+  (0.2ms) ROLLBACK
29543
+  (0.2ms) BEGIN
29544
+  (0.2ms) COMMIT
29545
+  (0.2ms) BEGIN
29546
+  (0.3ms) ROLLBACK
29547
+  (0.2ms) BEGIN
29548
+  (0.2ms) COMMIT
29549
+  (0.2ms) BEGIN
29550
+  (0.4ms) ROLLBACK
29551
+  (0.3ms) BEGIN
29552
+  (0.3ms) COMMIT
29553
+  (0.2ms) BEGIN
29554
+  (0.3ms) SAVEPOINT active_record_1
29555
+ SQL (0.8ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
29556
+  (0.4ms) RELEASE SAVEPOINT active_record_1
29557
+  (0.4ms) SAVEPOINT active_record_1
29558
+ SQL (0.8ms) 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", "9b9cd8b3-f07e-4a3c-aea3-1c9983e6d309"], ["external_id", "7a0272d475007334cab14657"], ["sender_id", "1"], ["sender_type", "User"]]
29559
+  (0.4ms) RELEASE SAVEPOINT active_record_1
29560
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-08-08 10:53:46 +0000
29561
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
29562
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
29563
+ BloomRemit::Txn Load (0.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", nil]]
29564
+ Rendered text template (0.0ms)
29565
+ Completed 404 Not Found in 53ms (Views: 52.2ms | ActiveRecord: 0.3ms)
29566
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-08-08 10:53:46 +0000
29567
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
29568
+ Parameters: {"secret"=>"9b9cd8b3-f07e-4a3c-aea3-1c9983e6d309", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"9b9cd8b3-f07e-4a3c-aea3-1c9983e6d309"}}
29569
+ BloomRemit::Txn Load (0.4ms) 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", "9b9cd8b3-f07e-4a3c-aea3-1c9983e6d309"]]
29570
+  (0.3ms) SAVEPOINT active_record_1
29571
+ SQL (0.4ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
29572
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29573
+ Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.3ms)
29574
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
29575
+  (0.3ms) ROLLBACK
29576
+  (0.2ms) BEGIN
29577
+  (0.2ms) COMMIT
29578
+  (0.2ms) BEGIN
29579
+  (0.3ms) SAVEPOINT active_record_1
29580
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
29581
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29582
+  (0.3ms) SAVEPOINT active_record_1
29583
+ SQL (0.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", "7bb1eef8-8324-4455-9812-9ce35877633a"], ["external_id", "d0ec3503672eea11b6bb2da1"], ["sender_id", "2"], ["sender_type", "User"]]
29584
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29585
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-08-08 10:53:46 +0000
29586
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
29587
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
29588
+ BloomRemit::Txn Load (0.3ms) 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]]
29589
+ Rendered text template (0.0ms)
29590
+ Completed 404 Not Found in 2ms (Views: 0.7ms | ActiveRecord: 0.3ms)
29591
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-08-08 10:53:46 +0000
29592
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
29593
+ Parameters: {"secret"=>"7bb1eef8-8324-4455-9812-9ce35877633a", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"7bb1eef8-8324-4455-9812-9ce35877633a"}}
29594
+ BloomRemit::Txn Load (0.4ms) 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", "7bb1eef8-8324-4455-9812-9ce35877633a"]]
29595
+  (0.3ms) SAVEPOINT active_record_1
29596
+ SQL (0.4ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
29597
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29598
+ Completed 204 No Content in 52ms (ActiveRecord: 1.4ms)
29599
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
29600
+  (0.3ms) ROLLBACK
29601
+  (0.2ms) BEGIN
29602
+  (0.2ms) COMMIT
29603
+  (0.2ms) BEGIN
29604
+  (0.3ms) SAVEPOINT active_record_1
29605
+ SQL (0.3ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
29606
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29607
+  (0.2ms) SAVEPOINT active_record_1
29608
+ SQL (0.4ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
29609
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29610
+  (0.2ms) SAVEPOINT active_record_1
29611
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
29612
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29613
+  (0.4ms) SAVEPOINT active_record_1
29614
+ SQL (0.4ms) 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", "e89765d4-4a52-40c0-ac2e-b8589217bae9"], ["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", "248dafd7d1b31632bc466116"]]
29615
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29616
+  (0.2ms) ROLLBACK
29617
+  (0.2ms) BEGIN
29618
+  (0.2ms) COMMIT
29619
+  (0.2ms) BEGIN
29620
+  (0.2ms) ROLLBACK
29621
+  (0.2ms) BEGIN
29622
+  (0.2ms) COMMIT
29623
+  (0.2ms) BEGIN
29624
+  (0.3ms) SAVEPOINT active_record_1
29625
+ SQL (0.4ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
29626
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29627
+  (0.2ms) SAVEPOINT active_record_1
29628
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
29629
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29630
+  (0.2ms) SAVEPOINT active_record_1
29631
+ SQL (0.4ms) 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", "e6248d1e-1692-4dc5-837b-4350e8cbfa37"], ["external_id", "ca053c84aa89bb40369ad996"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
29632
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29633
+  (0.2ms) SAVEPOINT active_record_1
29634
+ SQL (0.5ms) 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-08-08 10:53:46.405058"], ["updated_at", "2016-08-08 10:53:46.405058"]]
29635
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29636
+  (0.3ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
29637
+ BloomRemit::Response Load (0.3ms) 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]]
29638
+  (0.2ms) ROLLBACK
29639
+  (0.2ms) BEGIN
29640
+  (10.3ms) COMMIT
29641
+  (0.2ms) BEGIN
29642
+  (0.3ms) ROLLBACK
29643
+  (0.2ms) BEGIN
29644
+  (0.2ms) COMMIT
29645
+  (0.2ms) BEGIN
29646
+  (0.2ms) ROLLBACK
29647
+  (0.2ms) BEGIN
29648
+  (0.3ms) COMMIT
29649
+  (0.2ms) BEGIN
29650
+  (0.3ms) ROLLBACK
29651
+  (0.2ms) BEGIN
29652
+  (0.2ms) COMMIT
29653
+  (0.2ms) BEGIN
29654
+  (0.3ms) ROLLBACK
29655
+  (0.2ms) BEGIN
29656
+  (0.2ms) COMMIT
29657
+  (0.2ms) BEGIN
29658
+  (0.3ms) ROLLBACK
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag