asyncapi-server 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/asyncapi/server/v1/jobs_controller.rb +2 -1
- data/db/migrate/20141112034324_create_asyncapi_server_jobs.rb +1 -1
- data/db/migrate/20141212064931_add_secret_to_asyncapi_server_job.rb +1 -1
- data/db/migrate/20150130062520_add_expired_at_to_asyncapi_server_job.rb +1 -1
- data/db/migrate/20150201231018_drop_expired_at_from_asyncapi_server_jobs.rb +1 -1
- data/lib/asyncapi/server/rspec.rb +20 -7
- data/lib/asyncapi/server/version.rb +1 -1
- data/spec/controllers/asyncapi/server/v1/jobs_controller_spec.rb +4 -4
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +13 -3758
- data/spec/models/job_spec.rb +1 -1
- data/spec/requests/enqueueing_jobs_spec.rb +6 -4
- data/spec/spec_helper.rb +0 -1
- metadata +36 -40
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -43
data/spec/models/job_spec.rb
CHANGED
@@ -20,7 +20,7 @@ module Asyncapi
|
|
20
20
|
its(:status) { is_expected.to eq "queued" }
|
21
21
|
its(:callback_url) { is_expected.to eq "http://callback_url.com" }
|
22
22
|
its(:class_name) { is_expected.to eq "CreateStorageFacility" }
|
23
|
-
its(:params) { is_expected.to eq({param
|
23
|
+
its(:params) { is_expected.to eq("{\"param\"=>\"values\"}") }
|
24
24
|
|
25
25
|
context "status" do
|
26
26
|
it "can also be assigned other values" do
|
@@ -5,10 +5,12 @@ describe "Enqueueing jobs", type: :request do
|
|
5
5
|
let(:job) { build_stubbed(:asyncapi_server_job, secret: "secret") }
|
6
6
|
|
7
7
|
it "allows asynchronous handling of http requests and cleans up old jobs", cleaning_strategy: :truncation do
|
8
|
-
post("/tests",
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
post("/tests", params: {
|
9
|
+
job: {
|
10
|
+
callback_url: "callback_url",
|
11
|
+
params: {client: "params"}.to_json,
|
12
|
+
secret: "secret",
|
13
|
+
}
|
12
14
|
})
|
13
15
|
|
14
16
|
expect(response).to be_successful
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asyncapi-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- G5
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-05-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: kaminari
|
@@ -44,16 +44,16 @@ dependencies:
|
|
44
44
|
name: rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '4
|
49
|
+
version: '4'
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - "
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '4
|
56
|
+
version: '4'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: active_model_serializers
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,14 +144,14 @@ dependencies:
|
|
144
144
|
requirements:
|
145
145
|
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 3.
|
147
|
+
version: 3.5.0
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - "~>"
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 3.
|
154
|
+
version: 3.5.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: rspec-its
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -299,10 +299,8 @@ files:
|
|
299
299
|
- spec/dummy/config/locales/en.yml
|
300
300
|
- spec/dummy/config/routes.rb
|
301
301
|
- spec/dummy/config/secrets.yml
|
302
|
-
- spec/dummy/db/development.sqlite3
|
303
302
|
- spec/dummy/db/schema.rb
|
304
303
|
- spec/dummy/db/test.sqlite3
|
305
|
-
- spec/dummy/log/development.log
|
306
304
|
- spec/dummy/log/test.log
|
307
305
|
- spec/dummy/public/404.html
|
308
306
|
- spec/dummy/public/422.html
|
@@ -343,54 +341,52 @@ signing_key:
|
|
343
341
|
specification_version: 4
|
344
342
|
summary: Asynchronous API communication - Server
|
345
343
|
test_files:
|
346
|
-
- spec/
|
347
|
-
- spec/dummy/app/assets/javascripts/application.js
|
348
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
344
|
+
- spec/spec_helper.rb
|
349
345
|
- spec/dummy/app/controllers/application_controller.rb
|
350
346
|
- spec/dummy/app/controllers/tests_controller.rb
|
351
|
-
- spec/dummy/app/helpers/application_helper.rb
|
352
347
|
- spec/dummy/app/views/layouts/application.html.erb
|
348
|
+
- spec/dummy/app/assets/javascripts/application.js
|
349
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
350
|
+
- spec/dummy/app/helpers/application_helper.rb
|
351
|
+
- spec/dummy/bin/rake
|
353
352
|
- spec/dummy/bin/bundle
|
354
353
|
- spec/dummy/bin/rails
|
355
|
-
- spec/dummy/
|
356
|
-
- spec/dummy/config/
|
357
|
-
- spec/dummy/config/
|
358
|
-
- spec/dummy/config/database.yml
|
359
|
-
- spec/dummy/config/environment.rb
|
360
|
-
- spec/dummy/config/environments/development.rb
|
354
|
+
- spec/dummy/config/secrets.yml
|
355
|
+
- spec/dummy/config/routes.rb
|
356
|
+
- spec/dummy/config/locales/en.yml
|
361
357
|
- spec/dummy/config/environments/production.rb
|
358
|
+
- spec/dummy/config/environments/development.rb
|
362
359
|
- spec/dummy/config/environments/test.rb
|
363
|
-
- spec/dummy/config/
|
360
|
+
- spec/dummy/config/environment.rb
|
361
|
+
- spec/dummy/config/application.rb
|
362
|
+
- spec/dummy/config/database.yml
|
363
|
+
- spec/dummy/config/boot.rb
|
364
364
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
365
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
366
|
-
- spec/dummy/config/initializers/default_url_options.rb
|
367
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
368
|
-
- spec/dummy/config/initializers/inflections.rb
|
369
365
|
- spec/dummy/config/initializers/mime_types.rb
|
366
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
370
367
|
- spec/dummy/config/initializers/session_store.rb
|
371
368
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
372
|
-
- spec/dummy/config/
|
373
|
-
- spec/dummy/config/
|
374
|
-
- spec/dummy/config/
|
369
|
+
- spec/dummy/config/initializers/assets.rb
|
370
|
+
- spec/dummy/config/initializers/default_url_options.rb
|
371
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
372
|
+
- spec/dummy/config/initializers/inflections.rb
|
375
373
|
- spec/dummy/config.ru
|
376
|
-
- spec/dummy/
|
374
|
+
- spec/dummy/Rakefile
|
375
|
+
- spec/dummy/public/favicon.ico
|
376
|
+
- spec/dummy/public/422.html
|
377
|
+
- spec/dummy/public/500.html
|
378
|
+
- spec/dummy/public/404.html
|
377
379
|
- spec/dummy/db/schema.rb
|
378
380
|
- spec/dummy/db/test.sqlite3
|
379
|
-
- spec/dummy/log/development.log
|
380
381
|
- spec/dummy/log/test.log
|
381
|
-
- spec/dummy/public/404.html
|
382
|
-
- spec/dummy/public/422.html
|
383
|
-
- spec/dummy/public/500.html
|
384
|
-
- spec/dummy/public/favicon.ico
|
385
|
-
- spec/dummy/Rakefile
|
386
382
|
- spec/dummy/README.rdoc
|
387
|
-
- spec/
|
388
|
-
- spec/fixtures/runner.rb
|
383
|
+
- spec/server_spec.rb
|
389
384
|
- spec/models/job_spec.rb
|
390
385
|
- spec/requests/enqueueing_jobs_spec.rb
|
391
386
|
- spec/serializers/job_serializer_spec.rb
|
392
|
-
- spec/server_spec.rb
|
393
|
-
- spec/spec_helper.rb
|
394
|
-
- spec/support/factory_girl.rb
|
395
387
|
- spec/support/indifferent_hash.rb
|
388
|
+
- spec/support/factory_girl.rb
|
389
|
+
- spec/factories/job.rb
|
390
|
+
- spec/fixtures/runner.rb
|
396
391
|
- spec/workers/job_worker_spec.rb
|
392
|
+
- spec/controllers/asyncapi/server/v1/jobs_controller_spec.rb
|
Binary file
|
@@ -1,43 +0,0 @@
|
|
1
|
-
[1m[36m (4.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
-
[1m[36m (4.5ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.9ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
-
Migrating to CreateAsyncapiServerJobs (20141112034324)
|
6
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35m (2.9ms)[0m CREATE TABLE "asyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text)
|
8
|
-
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141112034324"]]
|
9
|
-
[1m[35m (2.5ms)[0m commit transaction
|
10
|
-
Migrating to AddSecretToAsyncapiServerJob (20141212064931)
|
11
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
-
[1m[35m (4.3ms)[0m ALTER TABLE "asyncapi_server_jobs" ADD "secret" varchar
|
13
|
-
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141212064931"]]
|
14
|
-
[1m[35m (4.2ms)[0m commit transaction
|
15
|
-
Migrating to AddExpiredAtToAsyncapiServerJob (20150130062520)
|
16
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17
|
-
[1m[35m (6.0ms)[0m ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
|
18
|
-
[1m[36mSQL (0.0ms)[0m [1mUPDATE "asyncapi_server_jobs" SET "expired_at" = '2016-07-31 00:11:55.202627' WHERE "asyncapi_server_jobs"."expired_at" IS NULL[0m
|
19
|
-
[1m[35mSQL (0.9ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150130062520"]]
|
20
|
-
[1m[36m (2.3ms)[0m [1mcommit transaction[0m
|
21
|
-
Migrating to DropExpiredAtFromAsyncapiServerJobs (20150201231018)
|
22
|
-
[1m[35m (0.1ms)[0m begin transaction
|
23
|
-
[1m[36m (2.2ms)[0m [1mCREATE TEMPORARY TABLE "aasyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar, "expired_at" datetime) [0m
|
24
|
-
[1m[35m (0.5ms)[0m SELECT * FROM "asyncapi_server_jobs"
|
25
|
-
[1m[36m (3.0ms)[0m [1mDROP TABLE "asyncapi_server_jobs"[0m
|
26
|
-
[1m[35m (0.2ms)[0m CREATE TABLE "asyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar)
|
27
|
-
[1m[36m (0.1ms)[0m [1mSELECT * FROM "aasyncapi_server_jobs"[0m
|
28
|
-
[1m[35m (0.4ms)[0m DROP TABLE "aasyncapi_server_jobs"
|
29
|
-
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150201231018"]]
|
30
|
-
[1m[35m (4.5ms)[0m commit transaction
|
31
|
-
[1m[36mActiveRecord::SchemaMigration Load (1.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
32
|
-
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
33
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.9ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
34
|
-
[1m[36mActiveRecord::SchemaMigration Load (2.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
35
|
-
[1m[35mActiveRecord::SchemaMigration Load (1.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
36
|
-
[1m[36mAsyncapi::Server::Job Load (27.5ms)[0m [1mSELECT "asyncapi_server_jobs".* FROM "asyncapi_server_jobs"[0m
|
37
|
-
[1m[36mActiveRecord::SchemaMigration Load (1.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
38
|
-
Migrating to AddExpiredAtToAsyncapiServerJobs (20160721002627)
|
39
|
-
[1m[35m (0.1ms)[0m begin transaction
|
40
|
-
[1m[36m (3.7ms)[0m [1mALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime[0m
|
41
|
-
[1m[35mSQL (0.8ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160721002627"]]
|
42
|
-
[1m[36m (2.0ms)[0m [1mcommit transaction[0m
|
43
|
-
[1m[35mActiveRecord::SchemaMigration Load (1.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|