bloom_remit 0.2.0 → 0.2.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: e8fa16f494b5bdda6094edab188074c0191a2a59
4
- data.tar.gz: 93b378a258e801a8ffea80dd1b4ae761f56f00e1
3
+ metadata.gz: 719f89bbf5856431f18ebe7c3950dd10f68f0a76
4
+ data.tar.gz: 98a247d1cde20c61b91751b41673c5c9a18267a0
5
5
  SHA512:
6
- metadata.gz: 264a254bef4cf585a6ab39169e280b7c6b3e1964551b380ac1dc47d1bf6e84f6f53d623224cf1457e4e869acfba531de5b604372496174dc3d11d92ca2973bcc
7
- data.tar.gz: eb050f92ff6d3976e8ace7d635dbda302e618a4014fe064264eed279201ffa0fe3376b212037efea35920bd3af78b532d2a4d19cf0b0292a375141453947fcaa
6
+ metadata.gz: 628c4dfa4f89d444be0670ac3a5cb0465549b9dd0ce413c2043a607c92afdba3af4c960127851b6a0ee225cdcd7af7b5d5b09d07ff334abc4c0ab08223d4fb60
7
+ data.tar.gz: 9ef5f0d779febd3e6318a9e35155145b7d620b2b397401619f6788f39a906314c45da16b38c39ef8d745b6f4430e671af5e5e540e1a7e05ba9d1aad092ac134c
@@ -1,6 +1,8 @@
1
1
  module BloomRemit
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
+ skip_before_action :verify_authenticity_token
5
+
4
6
  include Trailblazer::Operation::Controller
5
7
 
6
8
  rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -28345,3 +28345,189 @@ Completed 204 No Content in 170ms (ActiveRecord: 11.1ms)
28345
28345
   (0.2ms) COMMIT
28346
28346
   (0.1ms) BEGIN
28347
28347
   (0.3ms) ROLLBACK
28348
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
28349
+  (0.7ms) 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
28350
+  (1.2ms)  SELECT schemaname || '.' || tablename
28351
+ FROM pg_tables
28352
+ WHERE
28353
+ tablename !~ '_prt_' AND
28354
+ tablename <> 'schema_migrations' AND
28355
+ schemaname = ANY (current_schemas(false))
28356
+ 
28357
+  (1.1ms) select table_name from information_schema.views where table_schema = 'bloom_remit_rails_test'
28358
+  (50.3ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
28359
+  (0.5ms) 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
28360
+  (0.3ms) BEGIN
28361
+  (0.2ms) COMMIT
28362
+  (0.2ms) BEGIN
28363
+  (0.3ms) ROLLBACK
28364
+  (0.6ms) BEGIN
28365
+  (0.2ms) COMMIT
28366
+  (0.2ms) BEGIN
28367
+  (0.2ms) ROLLBACK
28368
+  (0.3ms) BEGIN
28369
+ SQL (0.9ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
28370
+  (0.4ms) COMMIT
28371
+  (9.4ms) BEGIN
28372
+ SQL (0.4ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
28373
+  (0.4ms) COMMIT
28374
+  (0.2ms) BEGIN
28375
+ SQL (0.4ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
28376
+  (0.4ms) COMMIT
28377
+  (0.3ms) BEGIN
28378
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["secret", "b877a218-0c31-47af-8d92-729caa818418"], ["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"]]
28379
+  (0.4ms) COMMIT
28380
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
28381
+ Payment Load (0.4ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
28382
+  (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
28383
+  (9.4ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
28384
+  (0.6ms) 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
28385
+  (0.2ms) BEGIN
28386
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
28387
+  (0.5ms) COMMIT
28388
+  (0.2ms) BEGIN
28389
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "64392ab9-89a6-4b0e-964f-21c9c3750b16"], ["sender_id", "1"], ["sender_type", "User"]]
28390
+  (0.5ms) COMMIT
28391
+ 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", "64392ab9-89a6-4b0e-964f-21c9c3750b16"]]
28392
+  (0.3ms) BEGIN
28393
+ SQL (5.5ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
28394
+  (0.5ms) COMMIT
28395
+  (0.4ms) 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
28396
+  (21.3ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."bloom_remit_txns", "public"."bloom_remit_responses", "public"."payments" RESTART IDENTITY CASCADE;
28397
+  (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
28398
+  (0.2ms) BEGIN
28399
+  (0.2ms) COMMIT
28400
+  (0.2ms) BEGIN
28401
+  (0.2ms) ROLLBACK
28402
+  (0.3ms) BEGIN
28403
+  (0.2ms) COMMIT
28404
+  (0.2ms) BEGIN
28405
+  (5.9ms) ROLLBACK
28406
+  (0.2ms) BEGIN
28407
+  (0.2ms) COMMIT
28408
+  (0.2ms) BEGIN
28409
+  (0.3ms) ROLLBACK
28410
+  (0.2ms) BEGIN
28411
+  (0.2ms) COMMIT
28412
+  (0.2ms) BEGIN
28413
+  (0.2ms) ROLLBACK
28414
+  (0.3ms) BEGIN
28415
+  (0.2ms) COMMIT
28416
+  (0.2ms) BEGIN
28417
+  (0.3ms) ROLLBACK
28418
+  (5.2ms) BEGIN
28419
+  (0.2ms) COMMIT
28420
+  (0.3ms) BEGIN
28421
+  (0.4ms) ROLLBACK
28422
+  (0.3ms) BEGIN
28423
+  (0.2ms) COMMIT
28424
+  (0.2ms) BEGIN
28425
+  (0.3ms) ROLLBACK
28426
+  (0.3ms) BEGIN
28427
+  (0.3ms) COMMIT
28428
+  (0.3ms) BEGIN
28429
+  (1.6ms) SAVEPOINT active_record_1
28430
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
28431
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28432
+  (0.2ms) SAVEPOINT active_record_1
28433
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "1fbb31ca-32bc-45fa-93fb-b5f9b5ffa917"], ["sender_id", "1"], ["sender_type", "User"]]
28434
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28435
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-08-08 05:10:51 +0000
28436
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
28437
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
28438
+ 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", nil]]
28439
+ Rendered text template (0.0ms)
28440
+ Completed 404 Not Found in 216ms (Views: 214.4ms | ActiveRecord: 0.4ms)
28441
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-08-08 05:10:52 +0000
28442
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
28443
+ Parameters: {"secret"=>"1fbb31ca-32bc-45fa-93fb-b5f9b5ffa917", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"1fbb31ca-32bc-45fa-93fb-b5f9b5ffa917"}}
28444
+ 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", "1fbb31ca-32bc-45fa-93fb-b5f9b5ffa917"]]
28445
+  (0.2ms) SAVEPOINT active_record_1
28446
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
28447
+  (0.1ms) RELEASE SAVEPOINT active_record_1
28448
+ Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 1.0ms)
28449
+ BloomRemit::Txn Load (0.2ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
28450
+  (0.2ms) ROLLBACK
28451
+  (0.1ms) BEGIN
28452
+  (0.1ms) COMMIT
28453
+  (0.1ms) BEGIN
28454
+  (0.2ms) SAVEPOINT active_record_1
28455
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
28456
+  (0.1ms) RELEASE SAVEPOINT active_record_1
28457
+  (0.1ms) SAVEPOINT active_record_1
28458
+ SQL (0.5ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "f7d27694-eac4-41d5-b1f5-d0af7504d591"], ["sender_id", "2"], ["sender_type", "User"]]
28459
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28460
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-08-08 05:10:52 +0000
28461
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
28462
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
28463
+ 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]]
28464
+ Rendered text template (0.0ms)
28465
+ Completed 404 Not Found in 3ms (Views: 0.9ms | ActiveRecord: 0.3ms)
28466
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-08-08 05:10:52 +0000
28467
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
28468
+ Parameters: {"secret"=>"f7d27694-eac4-41d5-b1f5-d0af7504d591", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"f7d27694-eac4-41d5-b1f5-d0af7504d591"}}
28469
+ 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", "f7d27694-eac4-41d5-b1f5-d0af7504d591"]]
28470
+  (0.1ms) SAVEPOINT active_record_1
28471
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
28472
+  (0.1ms) RELEASE SAVEPOINT active_record_1
28473
+ Completed 204 No Content in 310ms (ActiveRecord: 0.9ms)
28474
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
28475
+  (2.7ms) ROLLBACK
28476
+  (0.5ms) BEGIN
28477
+  (0.2ms) COMMIT
28478
+  (0.2ms) BEGIN
28479
+  (0.2ms) SAVEPOINT active_record_1
28480
+ SQL (0.5ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
28481
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28482
+  (0.2ms) SAVEPOINT active_record_1
28483
+ SQL (0.6ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
28484
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28485
+  (0.3ms) SAVEPOINT active_record_1
28486
+ SQL (1.3ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
28487
+  (1.8ms) RELEASE SAVEPOINT active_record_1
28488
+  (2.6ms) SAVEPOINT active_record_1
28489
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["secret", "145291ee-e034-473f-8650-c7b13dca97c2"], ["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"]]
28490
+  (0.9ms) RELEASE SAVEPOINT active_record_1
28491
+  (0.6ms) ROLLBACK
28492
+  (0.2ms) BEGIN
28493
+  (0.2ms) COMMIT
28494
+  (0.2ms) BEGIN
28495
+  (0.2ms) ROLLBACK
28496
+  (0.2ms) BEGIN
28497
+  (0.2ms) COMMIT
28498
+  (0.2ms) BEGIN
28499
+  (0.2ms) SAVEPOINT active_record_1
28500
+ SQL (0.4ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
28501
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28502
+  (0.2ms) SAVEPOINT active_record_1
28503
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
28504
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28505
+  (0.3ms) SAVEPOINT active_record_1
28506
+ SQL (0.5ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "7631ff03-6cd6-4440-8e38-c61c5032f09f"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
28507
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28508
+  (0.3ms) SAVEPOINT active_record_1
28509
+ SQL (0.7ms) 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 05:10:53.263397"], ["updated_at", "2016-08-08 05:10:53.263397"]]
28510
+  (0.9ms) RELEASE SAVEPOINT active_record_1
28511
+  (3.8ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
28512
+ BloomRemit::Response Load (0.4ms) 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]]
28513
+  (0.3ms) ROLLBACK
28514
+  (3.0ms) BEGIN
28515
+  (0.3ms) COMMIT
28516
+  (0.2ms) BEGIN
28517
+  (0.3ms) ROLLBACK
28518
+  (0.2ms) BEGIN
28519
+  (0.2ms) COMMIT
28520
+  (0.2ms) BEGIN
28521
+  (0.3ms) ROLLBACK
28522
+  (0.2ms) BEGIN
28523
+  (0.2ms) COMMIT
28524
+  (0.1ms) BEGIN
28525
+  (0.2ms) ROLLBACK
28526
+  (0.2ms) BEGIN
28527
+  (0.2ms) COMMIT
28528
+  (0.2ms) BEGIN
28529
+  (9.1ms) ROLLBACK
28530
+  (0.2ms) BEGIN
28531
+  (0.3ms) COMMIT
28532
+  (0.2ms) BEGIN
28533
+  (4.2ms) 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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag