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.
@@ -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: "values"}.to_json) }
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", job: {
9
- callback_url: "callback_url",
10
- params: {client: "params"}.to_json,
11
- secret: "secret",
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
@@ -22,7 +22,6 @@ Dir[
22
22
 
23
23
  RSpec.configure do |config|
24
24
  config.fixture_path = "#{::Rails.root}/spec/fixtures"
25
- config.use_transactional_fixtures = false
26
25
  config.infer_base_class_for_anonymous_controllers = false
27
26
  config.order = "random"
28
27
 
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.1.3
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: 2016-08-30 00:00:00.000000000 Z
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.0'
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.0'
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.1.0
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.1.0
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/controllers/asyncapi/server/v1/jobs_controller_spec.rb
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/bin/rake
356
- - spec/dummy/config/application.rb
357
- - spec/dummy/config/boot.rb
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/initializers/assets.rb
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/locales/en.yml
373
- - spec/dummy/config/routes.rb
374
- - spec/dummy/config/secrets.yml
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/db/development.sqlite3
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/factories/job.rb
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
@@ -1,43 +0,0 @@
1
-  (4.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (4.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to CreateAsyncapiServerJobs (20141112034324)
6
-  (0.1ms) begin transaction
7
-  (2.9ms) CREATE TABLE "asyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text)
8
- SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141112034324"]]
9
-  (2.5ms) commit transaction
10
- Migrating to AddSecretToAsyncapiServerJob (20141212064931)
11
-  (0.1ms) begin transaction
12
-  (4.3ms) ALTER TABLE "asyncapi_server_jobs" ADD "secret" varchar
13
- SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141212064931"]]
14
-  (4.2ms) commit transaction
15
- Migrating to AddExpiredAtToAsyncapiServerJob (20150130062520)
16
-  (0.1ms) begin transaction
17
-  (6.0ms) ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
18
- SQL (0.0ms) UPDATE "asyncapi_server_jobs" SET "expired_at" = '2016-07-31 00:11:55.202627' WHERE "asyncapi_server_jobs"."expired_at" IS NULL
19
- SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150130062520"]]
20
-  (2.3ms) commit transaction
21
- Migrating to DropExpiredAtFromAsyncapiServerJobs (20150201231018)
22
-  (0.1ms) begin transaction
23
-  (2.2ms) CREATE 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) 
24
-  (0.5ms) SELECT * FROM "asyncapi_server_jobs"
25
-  (3.0ms) DROP TABLE "asyncapi_server_jobs"
26
-  (0.2ms) 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
-  (0.1ms) SELECT * FROM "aasyncapi_server_jobs"
28
-  (0.4ms) DROP TABLE "aasyncapi_server_jobs"
29
- SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150201231018"]]
30
-  (4.5ms) commit transaction
31
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
32
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
- ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
- ActiveRecord::SchemaMigration Load (2.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
- ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
36
- Asyncapi::Server::Job Load (27.5ms) SELECT "asyncapi_server_jobs".* FROM "asyncapi_server_jobs"
37
- ActiveRecord::SchemaMigration Load (1.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
38
- Migrating to AddExpiredAtToAsyncapiServerJobs (20160721002627)
39
-  (0.1ms) begin transaction
40
-  (3.7ms) ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
41
- SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160721002627"]]
42
-  (2.0ms) commit transaction
43
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"