async_request 0.0.5 → 0.0.6

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: 60186a92a240d056d90e604b9da82b9fcbbe16aa
4
- data.tar.gz: 803d812f846c4d39a0c29604ba2673105ff8bc14
3
+ metadata.gz: 2eeeff73b4c3b9fda39e0c8f4b12c64002c55e89
4
+ data.tar.gz: f26dc2c97e4311e54e8a62becc788498099e6d44
5
5
  SHA512:
6
- metadata.gz: a284ff9e8f97fe450f1b7d96ef0b5968ff2f1f57b0606b27330e79fd3b64f7fd2654d935943cb1574feb809cf52291b43221b5cf24efa0b7709c2154cc7398e0
7
- data.tar.gz: f36b721226a07d168339aebe0347838d60a5b64880094558c54fe0e7555297d100ebdc693897d8de6063d5d07430863cd12308d29cdf875cebe0707c08b011b2
6
+ metadata.gz: 17fab72b105fe4dfb1e172ad5efd7007c7fbb92e8aa073f147e9533042a6ccaa750a88065c7942dd171312cf88fd158e62eb53f11c4b12818f01e742076a42b9
7
+ data.tar.gz: ca10915c8ecd445d2d81e34394e445ada1ec4a00ebcfdbdc04610bbcf0d1608dbe02e554e32c3983bf0f4305fb08cddf47f9fddd3bafb695621d0efe6019c930
@@ -3,14 +3,14 @@ module AsyncRequest
3
3
  class Engine < ::Rails::Engine
4
4
  isolate_namespace AsyncRequest
5
5
 
6
- initializer "async_request", before: :load_config_initializers do |app|
6
+ initializer 'async_request', before: :load_config_initializers do |app|
7
7
  Rails.application.routes.append do
8
- mount AsyncRequest::Engine, at: "/async_request"
8
+ mount AsyncRequest::Engine, at: '/async_request'
9
9
  end
10
10
 
11
11
  unless app.root.to_s.match root.to_s
12
- config.paths["db/migrate"].expanded.each do |expanded_path|
13
- Rails.application.config.paths["db/migrate"] << expanded_path
12
+ config.paths['db/migrate'].expanded.each do |expanded_path|
13
+ Rails.application.config.paths['db/migrate'] << expanded_path
14
14
  end
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module AsyncRequest
2
- VERSION = "0.0.5"
2
+ VERSION = '0.0.6'.freeze
3
3
  end
data/lib/async_request.rb CHANGED
@@ -1,4 +1,4 @@
1
- require "async_request/engine"
1
+ require 'async_request/engine'
2
2
 
3
3
  module AsyncRequest
4
4
  end
@@ -1,12 +1,11 @@
1
1
  require 'rails/generators/base'
2
2
 
3
-
4
3
  class AsyncRequestGenerator < Rails::Generators::Base
5
- source_root File.expand_path("../../templates", __FILE__)
4
+ source_root File.expand_path('../../templates', __FILE__)
6
5
 
7
6
  def copy_initializer_file
8
- file_name = "create_async_request_jobs.rb"
9
- now = DateTime.current.strftime("%Y%m%d%H%M%S")
7
+ file_name = 'create_async_request_jobs.rb'
8
+ now = DateTime.current.strftime('%Y%m%d%H%M%S')
10
9
  copy_file file_name, "db/migrate/#{now}_#{file_name}"
11
10
  end
12
- end
11
+ end
@@ -13,4 +13,4 @@ class CreateAsyncRequestJobs < ActiveRecord::Migration
13
13
  add_index :async_request_jobs, :status
14
14
  add_index :async_request_jobs, :uid, unique: true
15
15
  end
16
- end
16
+ end
@@ -5074,3 +5074,201 @@ WHERE c.contype = 'f'
5074
5074
  AND t3.nspname = ANY (current_schemas(false))
5075
5075
  ORDER BY c.conname
5076
5076
  
5077
+ ActiveRecord::SchemaMigration Load (1.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
5078
+  (103.7ms) DROP DATABASE IF EXISTS "dummy_test"
5079
+  (259.3ms) CREATE DATABASE "dummy_test" ENCODING = 'unicode'
5080
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
5081
+  (10.5ms) CREATE TABLE "async_request_jobs" ("id" serial primary key, "worker" character varying, "status" integer, "status_code" integer, "response" text, "uid" character varying, "params" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
5082
+  (4.6ms) CREATE INDEX "index_async_request_jobs_on_status" ON "async_request_jobs" USING btree ("status")
5083
+  (3.3ms) CREATE UNIQUE INDEX "index_async_request_jobs_on_uid" ON "async_request_jobs" USING btree ("uid")
5084
+  (4.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
5085
+  (4.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5086
+  (0.3ms) SELECT version FROM "schema_migrations"
5087
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160411190611')
5088
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5089
+  (0.4ms) ALTER TABLE "async_request_jobs" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL
5090
+  (1.2ms) SELECT schemaname || '.' || tablename
5091
+ FROM pg_tables
5092
+ WHERE
5093
+ tablename !~ '_prt_' AND
5094
+ tablename <> 'schema_migrations' AND
5095
+ schemaname = ANY (current_schemas(false))
5096
+
5097
+  (1.1ms) select table_name from information_schema.views where table_schema = 'dummy_test'
5098
+  (76.7ms) TRUNCATE TABLE "public"."async_request_jobs" RESTART IDENTITY CASCADE;
5099
+  (0.1ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "async_request_jobs" ENABLE TRIGGER ALL
5100
+  (0.1ms) BEGIN
5101
+  (0.1ms) SAVEPOINT active_record_1
5102
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5103
+  (0.1ms) SAVEPOINT active_record_1
5104
+  (0.2ms) SAVEPOINT active_record_2
5105
+ SQL (0.4ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- :a: a\n- 3\n- a\n"], ["status", 0], ["uid", "6d66b490-70ba-4ba6-b55a-6dfa2205812e"], ["created_at", "2018-02-07 16:48:00.278769"], ["updated_at", "2018-02-07 16:48:00.278769"]]
5106
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5107
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "6d66b490-70ba-4ba6-b55a-6dfa2205812e"]]
5108
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."id" = $1 LIMIT 1 [["id", 1]]
5109
+  (0.1ms) SAVEPOINT active_record_2
5110
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "updated_at" = $2 WHERE "async_request_jobs"."id" = $3 [["status", 1], ["updated_at", "2018-02-07 16:48:00.289469"], ["id", 1]]
5111
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5112
+  (0.1ms) SAVEPOINT active_record_2
5113
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "status_code" = $2, "response" = $3, "updated_at" = $4 WHERE "async_request_jobs"."id" = $5 [["status", 2], ["status_code", 200], ["response", "{\"status\":\"success\"}"], ["updated_at", "2018-02-07 16:48:00.292954"], ["id", 1]]
5114
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5115
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5116
+  (0.1ms) ROLLBACK
5117
+  (0.1ms) BEGIN
5118
+  (0.1ms) SAVEPOINT active_record_1
5119
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5120
+  (0.1ms) SAVEPOINT active_record_1
5121
+  (0.1ms) SAVEPOINT active_record_2
5122
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- :a: a\n- 3\n- a\n"], ["status", 0], ["uid", "8861bdd2-2cab-4615-9e6c-c0e9fb71aefa"], ["created_at", "2018-02-07 16:48:00.297429"], ["updated_at", "2018-02-07 16:48:00.297429"]]
5123
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5124
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "8861bdd2-2cab-4615-9e6c-c0e9fb71aefa"]]
5125
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."id" = $1 LIMIT 1 [["id", 2]]
5126
+  (0.1ms) SAVEPOINT active_record_2
5127
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "updated_at" = $2 WHERE "async_request_jobs"."id" = $3 [["status", 1], ["updated_at", "2018-02-07 16:48:00.300870"], ["id", 2]]
5128
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5129
+  (0.1ms) SAVEPOINT active_record_2
5130
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "status_code" = $2, "response" = $3, "updated_at" = $4 WHERE "async_request_jobs"."id" = $5 [["status", 2], ["status_code", 200], ["response", "{\"status\":\"success\"}"], ["updated_at", "2018-02-07 16:48:00.303286"], ["id", 2]]
5131
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5132
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "8861bdd2-2cab-4615-9e6c-c0e9fb71aefa"]]
5133
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
5134
+  (0.3ms) ROLLBACK
5135
+  (0.1ms) BEGIN
5136
+  (0.1ms) SAVEPOINT active_record_1
5137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5138
+  (0.1ms) SAVEPOINT active_record_1
5139
+  (0.1ms) SAVEPOINT active_record_2
5140
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- :a: a\n- 3\n- a\n"], ["status", 0], ["uid", "c34496cf-909c-4e1d-9d92-365adda84841"], ["created_at", "2018-02-07 16:48:00.309013"], ["updated_at", "2018-02-07 16:48:00.309013"]]
5141
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5142
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "c34496cf-909c-4e1d-9d92-365adda84841"]]
5143
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."id" = $1 LIMIT 1 [["id", 3]]
5144
+  (0.1ms) SAVEPOINT active_record_2
5145
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "updated_at" = $2 WHERE "async_request_jobs"."id" = $3 [["status", 1], ["updated_at", "2018-02-07 16:48:00.312460"], ["id", 3]]
5146
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5147
+  (0.1ms) SAVEPOINT active_record_2
5148
+ SQL (0.2ms) UPDATE "async_request_jobs" SET "status" = $1, "status_code" = $2, "response" = $3, "updated_at" = $4 WHERE "async_request_jobs"."id" = $5 [["status", 2], ["status_code", 200], ["response", "{\"status\":\"success\"}"], ["updated_at", "2018-02-07 16:48:00.314900"], ["id", 3]]
5149
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5150
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "c34496cf-909c-4e1d-9d92-365adda84841"]]
5151
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5152
+  (0.1ms) ROLLBACK
5153
+  (0.1ms) BEGIN
5154
+  (0.1ms) SAVEPOINT active_record_1
5155
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5156
+  (0.2ms) SAVEPOINT active_record_1
5157
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5158
+  (0.1ms) ROLLBACK
5159
+  (0.1ms) BEGIN
5160
+  (0.1ms) SAVEPOINT active_record_1
5161
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5162
+  (0.1ms) SAVEPOINT active_record_1
5163
+  (0.1ms) SAVEPOINT active_record_2
5164
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- a\n"], ["status", 0], ["uid", "0ff16889-3d9c-48c6-9059-3330d10a83a1"], ["created_at", "2018-02-07 16:48:00.327676"], ["updated_at", "2018-02-07 16:48:00.327676"]]
5165
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5166
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "0ff16889-3d9c-48c6-9059-3330d10a83a1"]]
5167
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5168
+  (0.1ms) ROLLBACK
5169
+  (0.1ms) BEGIN
5170
+  (0.1ms) SAVEPOINT active_record_1
5171
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5172
+  (0.1ms) SAVEPOINT active_record_1
5173
+  (0.1ms) SAVEPOINT active_record_2
5174
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- :a: a\n- 3\n- a\n"], ["status", 0], ["uid", "68ca1309-b01f-4e8b-a932-8560293329df"], ["created_at", "2018-02-07 16:48:00.333211"], ["updated_at", "2018-02-07 16:48:00.333211"]]
5175
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5176
+ AsyncRequest::Job Load (0.1ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "68ca1309-b01f-4e8b-a932-8560293329df"]]
5177
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5178
+  (0.1ms) ROLLBACK
5179
+  (0.1ms) BEGIN
5180
+  (0.1ms) SAVEPOINT active_record_1
5181
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5182
+  (0.1ms) SAVEPOINT active_record_1
5183
+  (0.1ms) SAVEPOINT active_record_2
5184
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- a\n"], ["status", 0], ["uid", "8615b999-e227-4398-8a7a-c5ad0dd57862"], ["created_at", "2018-02-07 16:48:00.338804"], ["updated_at", "2018-02-07 16:48:00.338804"]]
5185
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5186
+ AsyncRequest::Job Load (0.1ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "8615b999-e227-4398-8a7a-c5ad0dd57862"]]
5187
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5188
+  (0.1ms) ROLLBACK
5189
+  (0.1ms) BEGIN
5190
+  (0.1ms) SAVEPOINT active_record_1
5191
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5192
+  (0.1ms) SAVEPOINT active_record_1
5193
+  (0.1ms) SAVEPOINT active_record_2
5194
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- a\n"], ["status", 0], ["uid", "11c2b363-5755-4d8c-8ee5-e065178fdd84"], ["created_at", "2018-02-07 16:48:00.344081"], ["updated_at", "2018-02-07 16:48:00.344081"]]
5195
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5196
+ AsyncRequest::Job Load (0.1ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "11c2b363-5755-4d8c-8ee5-e065178fdd84"]]
5197
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5198
+  (0.1ms) ROLLBACK
5199
+  (0.1ms) BEGIN
5200
+  (0.1ms) SAVEPOINT active_record_1
5201
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5202
+  (0.1ms) SAVEPOINT active_record_1
5203
+  (0.3ms) SELECT COUNT(*) FROM "async_request_jobs"
5204
+  (0.1ms) SAVEPOINT active_record_2
5205
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "params", "status", "uid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["worker", "Test"], ["params", "---\n- a\n"], ["status", 0], ["uid", "56361448-5c8d-45ad-b2fb-dc420c059fdc"], ["created_at", "2018-02-07 16:48:00.351443"], ["updated_at", "2018-02-07 16:48:00.351443"]]
5206
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5207
+  (0.2ms) SELECT COUNT(*) FROM "async_request_jobs"
5208
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5209
+  (0.1ms) ROLLBACK
5210
+  (0.1ms) BEGIN
5211
+  (0.1ms) SAVEPOINT active_record_1
5212
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5213
+  (0.1ms) SAVEPOINT active_record_1
5214
+  (0.2ms) SAVEPOINT active_record_2
5215
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "status_code", "response", "uid", "params", "status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["worker", "corporis"], ["status_code", 200], ["response", "{\"a\":\"qui\",\"b\":\"incidunt\",\"c\":\"id\"}"], ["uid", "impedit"], ["params", "---\n- temporibus\n- :a: a\n"], ["status", 0], ["created_at", "2018-02-07 16:48:00.359439"], ["updated_at", "2018-02-07 16:48:00.359439"]]
5216
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5217
+ Processing by AsyncRequest::JobsController#show as HTML
5218
+ Parameters: {"id"=>"impedit"}
5219
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "impedit"]]
5220
+ Completed 202 Accepted in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
5221
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5222
+  (0.1ms) ROLLBACK
5223
+  (0.1ms) BEGIN
5224
+  (0.1ms) SAVEPOINT active_record_1
5225
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5226
+  (0.1ms) SAVEPOINT active_record_1
5227
+  (0.1ms) SAVEPOINT active_record_2
5228
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "status_code", "response", "uid", "params", "status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["worker", "facere"], ["status_code", 200], ["response", "{\"a\":\"numquam\",\"b\":\"distinctio\",\"c\":\"enim\"}"], ["uid", "architecto"], ["params", "---\n- temporibus\n- :a: a\n"], ["status", 1], ["created_at", "2018-02-07 16:48:00.370643"], ["updated_at", "2018-02-07 16:48:00.370643"]]
5229
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5230
+ Processing by AsyncRequest::JobsController#show as HTML
5231
+ Parameters: {"id"=>"architecto"}
5232
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "architecto"]]
5233
+ Completed 202 Accepted in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
5234
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5235
+  (0.1ms) ROLLBACK
5236
+  (0.1ms) BEGIN
5237
+  (0.1ms) SAVEPOINT active_record_1
5238
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5239
+  (0.1ms) SAVEPOINT active_record_1
5240
+  (0.1ms) SAVEPOINT active_record_2
5241
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "status_code", "response", "uid", "params", "status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["worker", "sed"], ["status_code", 200], ["response", "{\"a\":\"sint\",\"b\":\"consequatur\",\"c\":\"quos\"}"], ["uid", "ut"], ["params", "---\n- temporibus\n- :a: a\n"], ["status", 0], ["created_at", "2018-02-07 16:48:00.380251"], ["updated_at", "2018-02-07 16:48:00.380251"]]
5242
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5243
+ Processing by AsyncRequest::JobsController#show as HTML
5244
+ Parameters: {"id"=>"utABC"}
5245
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "utABC"]]
5246
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)
5247
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5248
+  (0.1ms) ROLLBACK
5249
+  (0.1ms) BEGIN
5250
+  (0.1ms) SAVEPOINT active_record_1
5251
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5252
+  (0.1ms) SAVEPOINT active_record_1
5253
+  (0.1ms) SAVEPOINT active_record_2
5254
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "status_code", "response", "uid", "params", "status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["worker", "aliquid"], ["status_code", 200], ["response", "{\"a\":\"harum\",\"b\":\"velit\",\"c\":\"earum\"}"], ["uid", "dolorem"], ["params", "---\n- temporibus\n- :a: a\n"], ["status", 2], ["created_at", "2018-02-07 16:48:00.390456"], ["updated_at", "2018-02-07 16:48:00.390456"]]
5255
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5256
+ Processing by AsyncRequest::JobsController#show as HTML
5257
+ Parameters: {"id"=>"dolorem"}
5258
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "dolorem"]]
5259
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
5260
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5261
+  (0.1ms) ROLLBACK
5262
+  (0.1ms) BEGIN
5263
+  (0.1ms) SAVEPOINT active_record_1
5264
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5265
+  (0.1ms) SAVEPOINT active_record_1
5266
+  (0.1ms) SAVEPOINT active_record_2
5267
+ SQL (0.2ms) INSERT INTO "async_request_jobs" ("worker", "status_code", "response", "uid", "params", "status", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["worker", "consequatur"], ["status_code", 200], ["response", "{\"a\":\"qui\",\"b\":\"quia\",\"c\":\"repudiandae\"}"], ["uid", "alias"], ["params", "---\n- temporibus\n- :a: a\n"], ["status", 2], ["created_at", "2018-02-07 16:48:00.400272"], ["updated_at", "2018-02-07 16:48:00.400272"]]
5268
+  (0.1ms) RELEASE SAVEPOINT active_record_2
5269
+ Processing by AsyncRequest::JobsController#show as HTML
5270
+ Parameters: {"id"=>"alias"}
5271
+ AsyncRequest::Job Load (0.2ms) SELECT "async_request_jobs".* FROM "async_request_jobs" WHERE "async_request_jobs"."uid" = $1 LIMIT 1 [["uid", "alias"]]
5272
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
5273
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5274
+  (0.1ms) ROLLBACK
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,24 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
2
+ ENV['RAILS_ENV'] ||= 'test'
3
3
  require 'factory_girl'
4
4
  require 'faker'
5
5
  require 'database_cleaner'
6
6
  require 'pry'
7
- require File.expand_path("../dummy/config/environment", __FILE__)
7
+ require File.expand_path('../dummy/config/environment', __FILE__)
8
8
  require 'rspec/rails'
9
9
  require 'rspec/autorun'
10
10
 
11
11
  # Requires supporting ruby files with custom matchers and macros, etc,
12
12
  # in spec/support/ and its subdirectories.
13
- ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
14
- Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
13
+ ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
14
+ Dir[File.join(ENGINE_RAILS_ROOT, 'spec/support/**/*.rb')].each { |f| require f }
15
15
 
16
16
  ActiveRecord::Migration.maintain_test_schema!
17
17
 
18
- require "codeclimate-test-reporter"
18
+ require 'codeclimate-test-reporter'
19
19
  CodeClimate::TestReporter.start
20
20
 
21
21
  RSpec.configure do |config|
22
-
23
22
  config.infer_spec_type_from_file_location!
24
23
 
25
24
  config.include FactoryGirl::Syntax::Methods
@@ -64,5 +63,5 @@ RSpec.configure do |config|
64
63
  # order dependency and want to debug it, you can fix the order by providing
65
64
  # the seed, which is printed after each run.
66
65
  # --seed 1234
67
- config.order = "random"
66
+ config.order = 'random'
68
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async_request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias De Santi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -247,47 +247,47 @@ specification_version: 4
247
247
  summary: async_request gives us the possibility of handling these type of requests
248
248
  in a simple way.
249
249
  test_files:
250
- - spec/controllers/async_request/jobs_controller_spec.rb
251
- - spec/dummy/app/assets/javascripts/application.js
252
- - spec/dummy/app/assets/stylesheets/application.css
253
- - spec/dummy/app/controllers/application_controller.rb
254
- - spec/dummy/app/helpers/application_helper.rb
255
- - spec/dummy/app/views/layouts/application.html.erb
256
- - spec/dummy/app/workers/test.rb
257
- - spec/dummy/bin/bundle
258
- - spec/dummy/bin/rails
259
- - spec/dummy/bin/rake
260
- - spec/dummy/bin/setup
250
+ - spec/dummy/README.rdoc
251
+ - spec/dummy/Rakefile
261
252
  - spec/dummy/config/application.rb
262
- - spec/dummy/config/boot.rb
263
- - spec/dummy/config/database.yml
264
253
  - spec/dummy/config/environment.rb
254
+ - spec/dummy/config/environments/test.rb
265
255
  - spec/dummy/config/environments/development.rb
266
256
  - spec/dummy/config/environments/production.rb
267
- - spec/dummy/config/environments/test.rb
268
- - spec/dummy/config/initializers/assets.rb
269
- - spec/dummy/config/initializers/backtrace_silencers.rb
270
- - spec/dummy/config/initializers/cookies_serializer.rb
271
- - spec/dummy/config/initializers/filter_parameter_logging.rb
272
- - spec/dummy/config/initializers/inflections.rb
273
- - spec/dummy/config/initializers/mime_types.rb
274
- - spec/dummy/config/initializers/session_store.rb
275
- - spec/dummy/config/initializers/wrap_parameters.rb
276
257
  - spec/dummy/config/locales/en.yml
277
258
  - spec/dummy/config/routes.rb
259
+ - spec/dummy/config/database.yml
260
+ - spec/dummy/config/boot.rb
278
261
  - spec/dummy/config/secrets.yml
279
- - spec/dummy/config.ru
262
+ - spec/dummy/config/initializers/backtrace_silencers.rb
263
+ - spec/dummy/config/initializers/session_store.rb
264
+ - spec/dummy/config/initializers/wrap_parameters.rb
265
+ - spec/dummy/config/initializers/inflections.rb
266
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
267
+ - spec/dummy/config/initializers/mime_types.rb
268
+ - spec/dummy/config/initializers/cookies_serializer.rb
269
+ - spec/dummy/config/initializers/assets.rb
280
270
  - spec/dummy/db/schema.rb
281
- - spec/dummy/log/development.log
271
+ - spec/dummy/config.ru
282
272
  - spec/dummy/log/test.log
283
- - spec/dummy/public/404.html
284
- - spec/dummy/public/422.html
273
+ - spec/dummy/log/development.log
274
+ - spec/dummy/app/views/layouts/application.html.erb
275
+ - spec/dummy/app/assets/stylesheets/application.css
276
+ - spec/dummy/app/assets/javascripts/application.js
277
+ - spec/dummy/app/workers/test.rb
278
+ - spec/dummy/app/controllers/application_controller.rb
279
+ - spec/dummy/app/helpers/application_helper.rb
285
280
  - spec/dummy/public/500.html
281
+ - spec/dummy/public/422.html
282
+ - spec/dummy/public/404.html
286
283
  - spec/dummy/public/favicon.ico
287
- - spec/dummy/Rakefile
288
- - spec/dummy/README.rdoc
289
- - spec/factories/async_request_job.rb
290
- - spec/helpers/async_request/application_helper_spec.rb
284
+ - spec/dummy/bin/bundle
285
+ - spec/dummy/bin/setup
286
+ - spec/dummy/bin/rails
287
+ - spec/dummy/bin/rake
291
288
  - spec/spec_helper.rb
292
- - spec/support/parsed_response_helper.rb
293
289
  - spec/workers/async_request/job_processor_spec.rb
290
+ - spec/factories/async_request_job.rb
291
+ - spec/support/parsed_response_helper.rb
292
+ - spec/controllers/async_request/jobs_controller_spec.rb
293
+ - spec/helpers/async_request/application_helper_spec.rb