diff --git a/activejob/lib/active_job/railtie.rb b/activejob/lib/active_job/railtie.rb index 08555d1d77d..16736374af1 100644 --- a/activejob/lib/active_job/railtie.rb +++ b/activejob/lib/active_job/railtie.rb @@ -1,4 +1,5 @@ -require 'active_model/railtie' +require 'active_job' +require 'rails' module ActiveJob # = Active Job Railtie @@ -7,4 +8,4 @@ module ActiveJob ActiveSupport.on_load(:active_job) { self.logger = ::Rails.logger } end end -end \ No newline at end of file +end diff --git a/activejob/lib/rails/generators/active_job/job_generator.rb b/activejob/lib/rails/generators/job/job_generator.rb similarity index 96% rename from activejob/lib/rails/generators/active_job/job_generator.rb rename to activejob/lib/rails/generators/job/job_generator.rb index fe4af0d2ccf..78a9c276061 100644 --- a/activejob/lib/rails/generators/active_job/job_generator.rb +++ b/activejob/lib/rails/generators/job/job_generator.rb @@ -1,6 +1,6 @@ require 'rails/generators/named_base' -module ActiveJob +module Rails module Generators # :nodoc: class JobGenerator < Rails::Generators::NamedBase # :nodoc: desc 'This generator creates an active job file at app/jobs' @@ -19,4 +19,4 @@ module ActiveJob end end -end \ No newline at end of file +end diff --git a/activejob/lib/rails/generators/active_job/templates/job.rb b/activejob/lib/rails/generators/job/templates/job.rb similarity index 100% rename from activejob/lib/rails/generators/active_job/templates/job.rb rename to activejob/lib/rails/generators/job/templates/job.rb diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index a4c010c7bdc..3f21fa644c0 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -1,5 +1,6 @@ require 'helper' require "active_support/log_subscriber/test_helper" +require 'active_support/core_ext/numeric/time' require 'jobs/hello_job' require 'jobs/logging_job' require 'jobs/nested_job' diff --git a/activejob/test/cases/queue_naming_test.rb b/activejob/test/cases/queue_naming_test.rb index 852643b9f6e..7cb516bbb4b 100644 --- a/activejob/test/cases/queue_naming_test.rb +++ b/activejob/test/cases/queue_naming_test.rb @@ -1,11 +1,13 @@ require 'helper' require 'jobs/hello_job' +require 'jobs/logging_job' +require 'jobs/nested_job' class QueueNamingTest < ActiveSupport::TestCase test 'name derived from base' do assert_equal "active_jobs", HelloJob.queue_name end - + test 'name appended in job' do begin HelloJob.queue_as :greetings