modernizes hash syntax in activejob

This commit is contained in:
Xavier Noria 2016-08-06 19:36:54 +02:00
parent 63fff600ac
commit 301ce2a6d1
3 changed files with 12 additions and 12 deletions

View File

@ -60,7 +60,7 @@ class ArgumentSerializationTest < ActiveSupport::TestCase
end end
assert_raises ActiveJob::SerializationError do assert_raises ActiveJob::SerializationError do
ActiveJob::Arguments.serialize [ { :a => [{ 2 => 3 }] } ] ActiveJob::Arguments.serialize [ { a: [{ 2 => 3 }] } ]
end end
end end

View File

@ -1,7 +1,7 @@
module ResqueJobsManager module ResqueJobsManager
def setup def setup
ActiveJob::Base.queue_adapter = :resque ActiveJob::Base.queue_adapter = :resque
Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", :thread_safe => true) Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", thread_safe: true)
Resque.logger = Rails.logger Resque.logger = Rails.logger
unless can_run? unless can_run?
puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n" puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n"

View File

@ -16,16 +16,16 @@ end
module SneakersJobsManager module SneakersJobsManager
def setup def setup
ActiveJob::Base.queue_adapter = :sneakers ActiveJob::Base.queue_adapter = :sneakers
Sneakers.configure :heartbeat => 2, Sneakers.configure heartbeat: 2,
:amqp => "amqp://guest:guest@localhost:5672", amqp: "amqp://guest:guest@localhost:5672",
:vhost => "/", vhost: "/",
:exchange => "active_jobs_sneakers_int_test", exchange: "active_jobs_sneakers_int_test",
:exchange_type => :direct, exchange_type: :direct,
:daemonize => true, daemonize: true,
:threads => 1, threads: 1,
:workers => 1, workers: 1,
:pid_path => Rails.root.join("tmp/sneakers.pid").to_s, pid_path: Rails.root.join("tmp/sneakers.pid").to_s,
:log => Rails.root.join("log/sneakers.log").to_s log: Rails.root.join("log/sneakers.log").to_s
unless can_run? unless can_run?
puts "Cannot run integration tests for sneakers. To be able to run integration tests for sneakers you need to install and start rabbitmq.\n" puts "Cannot run integration tests for sneakers. To be able to run integration tests for sneakers you need to install and start rabbitmq.\n"
exit exit