asyncapi-server 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +5 -5
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +39 -2
  4. data/app/controllers/asyncapi/server/v1/jobs_controller.rb +2 -1
  5. data/app/serializers/asyncapi/server/job_serializer.rb +1 -1
  6. data/app/workers/asyncapi/server/job_status_notifier_worker.rb +51 -0
  7. data/app/workers/asyncapi/server/job_worker.rb +16 -18
  8. data/db/migrate/20141112034324_create_asyncapi_server_jobs.rb +1 -1
  9. data/db/migrate/20141212064931_add_secret_to_asyncapi_server_job.rb +1 -1
  10. data/db/migrate/20150130062520_add_expired_at_to_asyncapi_server_job.rb +1 -1
  11. data/db/migrate/20150201231018_drop_expired_at_from_asyncapi_server_jobs.rb +1 -1
  12. data/lib/asyncapi/server.rb +3 -0
  13. data/lib/asyncapi/server/rails_ext/controller.rb +3 -1
  14. data/lib/asyncapi/server/rspec.rb +20 -7
  15. data/lib/asyncapi/server/version.rb +1 -1
  16. data/spec/controllers/asyncapi/server/v1/jobs_controller_spec.rb +4 -4
  17. data/spec/dummy/db/development.sqlite3 +0 -0
  18. data/spec/dummy/db/schema.rb +2 -2
  19. data/spec/dummy/db/test.sqlite3 +0 -0
  20. data/spec/dummy/log/development.log +81 -0
  21. data/spec/dummy/log/test.log +2011 -0
  22. data/spec/models/job_spec.rb +1 -1
  23. data/spec/requests/enqueueing_jobs_spec.rb +10 -19
  24. data/spec/serializers/job_serializer_spec.rb +1 -0
  25. data/spec/spec_helper.rb +5 -4
  26. data/spec/workers/job_status_notifier_worker_spec.rb +115 -0
  27. data/spec/workers/job_worker_spec.rb +9 -30
  28. metadata +91 -47
  29. data/spec/dummy/db/migrate/20141212065005_create_asyncapi_server_jobs.asyncapi_server.rb +0 -11
  30. data/spec/dummy/db/migrate/20141212065006_add_secret_to_asyncapi_server_job.asyncapi_server.rb +0 -6
  31. data/spec/dummy/db/migrate/20150130062901_add_expired_at_to_asyncapi_server_job.asyncapi_server.rb +0 -12
  32. data/spec/dummy/db/migrate/20150201231329_drop_expired_at_from_asyncapi_server_jobs.asyncapi_server.rb +0 -10
@@ -1,11 +0,0 @@
1
- # This migration comes from asyncapi_server (originally 20141112034324)
2
- class CreateAsyncapiServerJobs < ActiveRecord::Migration
3
- def change
4
- create_table :asyncapi_server_jobs do |t|
5
- t.integer :status
6
- t.string :callback_url
7
- t.string :class_name
8
- t.text :params
9
- end
10
- end
11
- end
@@ -1,6 +0,0 @@
1
- # This migration comes from asyncapi_server (originally 20141212064931)
2
- class AddSecretToAsyncapiServerJob < ActiveRecord::Migration
3
- def change
4
- add_column :asyncapi_server_jobs, :secret, :string
5
- end
6
- end
@@ -1,12 +0,0 @@
1
- # This migration comes from asyncapi_server (originally 20150130062520)
2
- class AddExpiredAtToAsyncapiServerJob < ActiveRecord::Migration
3
- def change
4
- add_column :asyncapi_server_jobs, :expired_at, :datetime
5
-
6
- Asyncapi::Server::Job.reset_column_information
7
-
8
- Asyncapi::Server::Job.
9
- where(Asyncapi::Server::Job.arel_table[:expired_at].eq(nil)).
10
- update_all(expired_at: Asyncapi::Server.expiry_threshold.from_now)
11
- end
12
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from asyncapi_server (originally 20150201231018)
2
- class DropExpiredAtFromAsyncapiServerJobs < ActiveRecord::Migration
3
- def up
4
- remove_column :asyncapi_server_jobs, :expired_at
5
- end
6
-
7
- def down
8
- add_column :asyncapi_server_jobs, :expired_at, :datetime
9
- end
10
- end