Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
aa28c5ca
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aa28c5ca
编写于
7月 10, 2017
作者:
K
Koichi ITO
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Active Job] `rubocop -a --only Layout/EmptyLineAfterMagicComment`
上级
ac717d65
变更
100
隐藏空白更改
内联
并排
Showing
100 changed file
with
100 addition
and
0 deletion
+100
-0
activejob/Rakefile
activejob/Rakefile
+1
-0
activejob/activejob.gemspec
activejob/activejob.gemspec
+1
-0
activejob/lib/active_job.rb
activejob/lib/active_job.rb
+1
-0
activejob/lib/active_job/arguments.rb
activejob/lib/active_job/arguments.rb
+1
-0
activejob/lib/active_job/base.rb
activejob/lib/active_job/base.rb
+1
-0
activejob/lib/active_job/callbacks.rb
activejob/lib/active_job/callbacks.rb
+1
-0
activejob/lib/active_job/configured_job.rb
activejob/lib/active_job/configured_job.rb
+1
-0
activejob/lib/active_job/core.rb
activejob/lib/active_job/core.rb
+1
-0
activejob/lib/active_job/enqueuing.rb
activejob/lib/active_job/enqueuing.rb
+1
-0
activejob/lib/active_job/exceptions.rb
activejob/lib/active_job/exceptions.rb
+1
-0
activejob/lib/active_job/execution.rb
activejob/lib/active_job/execution.rb
+1
-0
activejob/lib/active_job/gem_version.rb
activejob/lib/active_job/gem_version.rb
+1
-0
activejob/lib/active_job/logging.rb
activejob/lib/active_job/logging.rb
+1
-0
activejob/lib/active_job/queue_adapter.rb
activejob/lib/active_job/queue_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters.rb
activejob/lib/active_job/queue_adapters.rb
+1
-0
activejob/lib/active_job/queue_adapters/async_adapter.rb
activejob/lib/active_job/queue_adapters/async_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/backburner_adapter.rb
...vejob/lib/active_job/queue_adapters/backburner_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb
...ejob/lib/active_job/queue_adapters/delayed_job_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/inline_adapter.rb
activejob/lib/active_job/queue_adapters/inline_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/qu_adapter.rb
activejob/lib/active_job/queue_adapters/qu_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/que_adapter.rb
activejob/lib/active_job/queue_adapters/que_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb
...ob/lib/active_job/queue_adapters/queue_classic_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/resque_adapter.rb
activejob/lib/active_job/queue_adapters/resque_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb
activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/sneakers_adapter.rb
activejob/lib/active_job/queue_adapters/sneakers_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb
...job/lib/active_job/queue_adapters/sucker_punch_adapter.rb
+1
-0
activejob/lib/active_job/queue_adapters/test_adapter.rb
activejob/lib/active_job/queue_adapters/test_adapter.rb
+1
-0
activejob/lib/active_job/queue_name.rb
activejob/lib/active_job/queue_name.rb
+1
-0
activejob/lib/active_job/queue_priority.rb
activejob/lib/active_job/queue_priority.rb
+1
-0
activejob/lib/active_job/railtie.rb
activejob/lib/active_job/railtie.rb
+1
-0
activejob/lib/active_job/test_case.rb
activejob/lib/active_job/test_case.rb
+1
-0
activejob/lib/active_job/test_helper.rb
activejob/lib/active_job/test_helper.rb
+1
-0
activejob/lib/active_job/translation.rb
activejob/lib/active_job/translation.rb
+1
-0
activejob/lib/active_job/version.rb
activejob/lib/active_job/version.rb
+1
-0
activejob/lib/rails/generators/job/job_generator.rb
activejob/lib/rails/generators/job/job_generator.rb
+1
-0
activejob/test/adapters/async.rb
activejob/test/adapters/async.rb
+1
-0
activejob/test/adapters/backburner.rb
activejob/test/adapters/backburner.rb
+1
-0
activejob/test/adapters/delayed_job.rb
activejob/test/adapters/delayed_job.rb
+1
-0
activejob/test/adapters/inline.rb
activejob/test/adapters/inline.rb
+1
-0
activejob/test/adapters/qu.rb
activejob/test/adapters/qu.rb
+1
-0
activejob/test/adapters/que.rb
activejob/test/adapters/que.rb
+1
-0
activejob/test/adapters/queue_classic.rb
activejob/test/adapters/queue_classic.rb
+1
-0
activejob/test/adapters/resque.rb
activejob/test/adapters/resque.rb
+1
-0
activejob/test/adapters/sidekiq.rb
activejob/test/adapters/sidekiq.rb
+1
-0
activejob/test/adapters/sneakers.rb
activejob/test/adapters/sneakers.rb
+1
-0
activejob/test/adapters/sucker_punch.rb
activejob/test/adapters/sucker_punch.rb
+1
-0
activejob/test/adapters/test.rb
activejob/test/adapters/test.rb
+1
-0
activejob/test/cases/adapter_test.rb
activejob/test/cases/adapter_test.rb
+1
-0
activejob/test/cases/argument_serialization_test.rb
activejob/test/cases/argument_serialization_test.rb
+1
-0
activejob/test/cases/callbacks_test.rb
activejob/test/cases/callbacks_test.rb
+1
-0
activejob/test/cases/exceptions_test.rb
activejob/test/cases/exceptions_test.rb
+1
-0
activejob/test/cases/job_serialization_test.rb
activejob/test/cases/job_serialization_test.rb
+1
-0
activejob/test/cases/logging_test.rb
activejob/test/cases/logging_test.rb
+1
-0
activejob/test/cases/queue_adapter_test.rb
activejob/test/cases/queue_adapter_test.rb
+1
-0
activejob/test/cases/queue_naming_test.rb
activejob/test/cases/queue_naming_test.rb
+1
-0
activejob/test/cases/queue_priority_test.rb
activejob/test/cases/queue_priority_test.rb
+1
-0
activejob/test/cases/queuing_test.rb
activejob/test/cases/queuing_test.rb
+1
-0
activejob/test/cases/rescue_test.rb
activejob/test/cases/rescue_test.rb
+1
-0
activejob/test/cases/test_case_test.rb
activejob/test/cases/test_case_test.rb
+1
-0
activejob/test/cases/test_helper_test.rb
activejob/test/cases/test_helper_test.rb
+1
-0
activejob/test/cases/translation_test.rb
activejob/test/cases/translation_test.rb
+1
-0
activejob/test/helper.rb
activejob/test/helper.rb
+1
-0
activejob/test/integration/queuing_test.rb
activejob/test/integration/queuing_test.rb
+1
-0
activejob/test/jobs/application_job.rb
activejob/test/jobs/application_job.rb
+1
-0
activejob/test/jobs/callback_job.rb
activejob/test/jobs/callback_job.rb
+1
-0
activejob/test/jobs/gid_job.rb
activejob/test/jobs/gid_job.rb
+1
-0
activejob/test/jobs/hello_job.rb
activejob/test/jobs/hello_job.rb
+1
-0
activejob/test/jobs/inherited_job.rb
activejob/test/jobs/inherited_job.rb
+1
-0
activejob/test/jobs/kwargs_job.rb
activejob/test/jobs/kwargs_job.rb
+1
-0
activejob/test/jobs/logging_job.rb
activejob/test/jobs/logging_job.rb
+1
-0
activejob/test/jobs/nested_job.rb
activejob/test/jobs/nested_job.rb
+1
-0
activejob/test/jobs/overridden_logging_job.rb
activejob/test/jobs/overridden_logging_job.rb
+1
-0
activejob/test/jobs/provider_jid_job.rb
activejob/test/jobs/provider_jid_job.rb
+1
-0
activejob/test/jobs/queue_adapter_job.rb
activejob/test/jobs/queue_adapter_job.rb
+1
-0
activejob/test/jobs/queue_as_job.rb
activejob/test/jobs/queue_as_job.rb
+1
-0
activejob/test/jobs/rescue_job.rb
activejob/test/jobs/rescue_job.rb
+1
-0
activejob/test/jobs/retry_job.rb
activejob/test/jobs/retry_job.rb
+1
-0
activejob/test/jobs/translated_hello_job.rb
activejob/test/jobs/translated_hello_job.rb
+1
-0
activejob/test/models/person.rb
activejob/test/models/person.rb
+1
-0
activejob/test/support/backburner/inline.rb
activejob/test/support/backburner/inline.rb
+1
-0
activejob/test/support/delayed_job/delayed/backend/test.rb
activejob/test/support/delayed_job/delayed/backend/test.rb
+1
-0
activejob/test/support/integration/adapters/async.rb
activejob/test/support/integration/adapters/async.rb
+1
-0
activejob/test/support/integration/adapters/backburner.rb
activejob/test/support/integration/adapters/backburner.rb
+1
-0
activejob/test/support/integration/adapters/delayed_job.rb
activejob/test/support/integration/adapters/delayed_job.rb
+1
-0
activejob/test/support/integration/adapters/inline.rb
activejob/test/support/integration/adapters/inline.rb
+1
-0
activejob/test/support/integration/adapters/qu.rb
activejob/test/support/integration/adapters/qu.rb
+1
-0
activejob/test/support/integration/adapters/que.rb
activejob/test/support/integration/adapters/que.rb
+1
-0
activejob/test/support/integration/adapters/queue_classic.rb
activejob/test/support/integration/adapters/queue_classic.rb
+1
-0
activejob/test/support/integration/adapters/resque.rb
activejob/test/support/integration/adapters/resque.rb
+1
-0
activejob/test/support/integration/adapters/sidekiq.rb
activejob/test/support/integration/adapters/sidekiq.rb
+1
-0
activejob/test/support/integration/adapters/sneakers.rb
activejob/test/support/integration/adapters/sneakers.rb
+1
-0
activejob/test/support/integration/adapters/sucker_punch.rb
activejob/test/support/integration/adapters/sucker_punch.rb
+1
-0
activejob/test/support/integration/dummy_app_template.rb
activejob/test/support/integration/dummy_app_template.rb
+1
-0
activejob/test/support/integration/helper.rb
activejob/test/support/integration/helper.rb
+1
-0
activejob/test/support/integration/jobs_manager.rb
activejob/test/support/integration/jobs_manager.rb
+1
-0
activejob/test/support/integration/test_case_helpers.rb
activejob/test/support/integration/test_case_helpers.rb
+1
-0
activejob/test/support/job_buffer.rb
activejob/test/support/job_buffer.rb
+1
-0
activejob/test/support/que/inline.rb
activejob/test/support/que/inline.rb
+1
-0
activejob/test/support/queue_classic/inline.rb
activejob/test/support/queue_classic/inline.rb
+1
-0
activejob/test/support/sneakers/inline.rb
activejob/test/support/sneakers/inline.rb
+1
-0
未找到文件。
activejob/Rakefile
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"rake/testtask"
#TODO: add qu back to the list after it support Rails 5.1
...
...
activejob/activejob.gemspec
浏览文件 @
aa28c5ca
# frozen_string_literal: true
version
=
File
.
read
(
File
.
expand_path
(
"../RAILS_VERSION"
,
__dir__
)).
strip
Gem
::
Specification
.
new
do
|
s
|
...
...
activejob/lib/active_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
#--
# Copyright (c) 2014-2017 David Heinemeier Hansson
#
...
...
activejob/lib/active_job/arguments.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/hash"
module
ActiveJob
...
...
activejob/lib/active_job/base.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"core"
require_relative
"queue_adapter"
require_relative
"queue_name"
...
...
activejob/lib/active_job/callbacks.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/callbacks"
module
ActiveJob
...
...
activejob/lib/active_job/configured_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
class
ConfiguredJob
#:nodoc:
def
initialize
(
job_class
,
options
=
{})
...
...
activejob/lib/active_job/core.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
# Provides general behavior that will be included into every Active Job
# object that inherits from ActiveJob::Base.
...
...
activejob/lib/active_job/enqueuing.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"arguments"
module
ActiveJob
...
...
activejob/lib/active_job/exceptions.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/numeric/time"
module
ActiveJob
...
...
activejob/lib/active_job/execution.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/rescuable"
require_relative
"arguments"
...
...
activejob/lib/active_job/gem_version.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
# Returns the version of the currently loaded Active Job as a <tt>Gem::Version</tt>
def
self
.
gem_version
...
...
activejob/lib/active_job/logging.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/hash/transform_values"
require
"active_support/core_ext/string/filters"
require
"active_support/tagged_logging"
...
...
activejob/lib/active_job/queue_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/string/inflections"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
# == Active Job adapters
#
...
...
activejob/lib/active_job/queue_adapters/async_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"securerandom"
require
"concurrent/scheduled_task"
require
"concurrent/executor/thread_pool_executor"
...
...
activejob/lib/active_job/queue_adapters/backburner_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"backburner"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"delayed_job"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/inline_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
module
QueueAdapters
# == Active Job Inline adapter
...
...
activejob/lib/active_job/queue_adapters/qu_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"qu"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/que_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"que"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"queue_classic"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/resque_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"resque"
require
"active_support/core_ext/enumerable"
require
"active_support/core_ext/array/access"
...
...
activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sidekiq"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/sneakers_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sneakers"
require
"monitor"
...
...
activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sucker_punch"
module
ActiveJob
...
...
activejob/lib/active_job/queue_adapters/test_adapter.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
module
QueueAdapters
# == Test adapter for Active Job
...
...
activejob/lib/active_job/queue_name.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
module
QueueName
extend
ActiveSupport
::
Concern
...
...
activejob/lib/active_job/queue_priority.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
module
QueuePriority
extend
ActiveSupport
::
Concern
...
...
activejob/lib/active_job/railtie.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"global_id/railtie"
require
"active_job"
...
...
activejob/lib/active_job/test_case.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/test_case"
module
ActiveJob
...
...
activejob/lib/active_job/test_helper.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/class/subclasses"
require
"active_support/core_ext/hash/keys"
...
...
activejob/lib/active_job/translation.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ActiveJob
module
Translation
#:nodoc:
extend
ActiveSupport
::
Concern
...
...
activejob/lib/active_job/version.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"gem_version"
module
ActiveJob
...
...
activejob/lib/rails/generators/job/job_generator.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"rails/generators/named_base"
module
Rails
# :nodoc:
...
...
activejob/test/adapters/async.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
ActiveJob
::
Base
.
queue_adapter
=
:async
ActiveJob
::
Base
.
queue_adapter
.
immediate
=
true
activejob/test/adapters/backburner.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"support/backburner/inline"
ActiveJob
::
Base
.
queue_adapter
=
:backburner
activejob/test/adapters/delayed_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
ActiveJob
::
Base
.
queue_adapter
=
:delayed_job
$LOAD_PATH
<<
File
.
expand_path
(
"../support/delayed_job"
,
__dir__
)
...
...
activejob/test/adapters/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
ActiveJob
::
Base
.
queue_adapter
=
:inline
activejob/test/adapters/qu.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"qu-immediate"
ActiveJob
::
Base
.
queue_adapter
=
:qu
activejob/test/adapters/que.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"support/que/inline"
ActiveJob
::
Base
.
queue_adapter
=
:que
...
...
activejob/test/adapters/queue_classic.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"support/queue_classic/inline"
ActiveJob
::
Base
.
queue_adapter
=
:queue_classic
activejob/test/adapters/resque.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
ActiveJob
::
Base
.
queue_adapter
=
:resque
Resque
.
inline
=
true
activejob/test/adapters/sidekiq.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sidekiq/testing/inline"
ActiveJob
::
Base
.
queue_adapter
=
:sidekiq
activejob/test/adapters/sneakers.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"support/sneakers/inline"
ActiveJob
::
Base
.
queue_adapter
=
:sneakers
activejob/test/adapters/sucker_punch.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sucker_punch/testing/inline"
ActiveJob
::
Base
.
queue_adapter
=
:sucker_punch
activejob/test/adapters/test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
ActiveJob
::
Base
.
queue_adapter
=
:test
ActiveJob
::
Base
.
queue_adapter
.
perform_enqueued_jobs
=
true
ActiveJob
::
Base
.
queue_adapter
.
perform_enqueued_at_jobs
=
true
activejob/test/cases/adapter_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
class
AdapterTest
<
ActiveSupport
::
TestCase
...
...
activejob/test/cases/argument_serialization_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"active_job/arguments"
require
"models/person"
...
...
activejob/test/cases/callbacks_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/callback_job"
...
...
activejob/test/cases/exceptions_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/retry_job"
...
...
activejob/test/cases/job_serialization_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/gid_job"
require
"jobs/hello_job"
...
...
activejob/test/cases/logging_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"active_support/log_subscriber/test_helper"
require
"active_support/core_ext/numeric/time"
...
...
activejob/test/cases/queue_adapter_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
module
ActiveJob
...
...
activejob/test/cases/queue_naming_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/hello_job"
require
"jobs/logging_job"
...
...
activejob/test/cases/queue_priority_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/hello_job"
...
...
activejob/test/cases/queuing_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/hello_job"
require
"active_support/core_ext/numeric/time"
...
...
activejob/test/cases/rescue_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/rescue_job"
require
"models/person"
...
...
activejob/test/cases/test_case_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/hello_job"
require
"jobs/logging_job"
...
...
activejob/test/cases/test_helper_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"active_support/core_ext/time"
require
"active_support/core_ext/date"
...
...
activejob/test/cases/translation_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/translated_hello_job"
...
...
activejob/test/helper.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_job"
require
"support/job_buffer"
...
...
activejob/test/integration/queuing_test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"helper"
require
"jobs/logging_job"
require
"jobs/hello_job"
...
...
activejob/test/jobs/application_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
ApplicationJob
<
ActiveJob
::
Base
end
activejob/test/jobs/callback_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
CallbackJob
<
ActiveJob
::
Base
before_perform
->
(
job
)
{
job
.
history
<<
"CallbackJob ran before_perform"
}
after_perform
->
(
job
)
{
job
.
history
<<
"CallbackJob ran after_perform"
}
...
...
activejob/test/jobs/gid_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
GidJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/hello_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
HelloJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/inherited_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"application_job"
class
InheritedJob
<
ApplicationJob
...
...
activejob/test/jobs/kwargs_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
KwargsJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/logging_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
LoggingJob
<
ActiveJob
::
Base
def
perform
(
dummy
)
logger
.
info
"Dummy, here is it:
#{
dummy
}
"
...
...
activejob/test/jobs/nested_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
NestedJob
<
ActiveJob
::
Base
def
perform
LoggingJob
.
perform_later
"NestedJob"
...
...
activejob/test/jobs/overridden_logging_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
OverriddenLoggingJob
<
ActiveJob
::
Base
def
perform
(
dummy
)
logger
.
info
"Dummy, here is it:
#{
dummy
}
"
...
...
activejob/test/jobs/provider_jid_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
ProviderJidJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/queue_adapter_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
QueueAdapterJob
<
ActiveJob
::
Base
self
.
queue_adapter
=
:inline
end
activejob/test/jobs/queue_as_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
QueueAsJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/rescue_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
RescueJob
<
ActiveJob
::
Base
...
...
activejob/test/jobs/retry_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
require
"active_support/core_ext/integer/inflections"
...
...
activejob/test/jobs/translated_hello_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require_relative
"../support/job_buffer"
class
TranslatedHelloJob
<
ActiveJob
::
Base
...
...
activejob/test/models/person.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
Person
class
RecordNotFound
<
StandardError
;
end
...
...
activejob/test/support/backburner/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"backburner"
Backburner
::
Worker
.
class_eval
do
...
...
activejob/test/support/delayed_job/delayed/backend/test.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
#copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb
require
"ostruct"
...
...
activejob/test/support/integration/adapters/async.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
AsyncJobsManager
def
setup
ActiveJob
::
Base
.
queue_adapter
=
:async
...
...
activejob/test/support/integration/adapters/backburner.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
BackburnerJobsManager
def
setup
ActiveJob
::
Base
.
queue_adapter
=
:backburner
...
...
activejob/test/support/integration/adapters/delayed_job.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"delayed_job"
require
"delayed_job_active_record"
...
...
activejob/test/support/integration/adapters/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
InlineJobsManager
def
setup
ActiveJob
::
Base
.
queue_adapter
=
:inline
...
...
activejob/test/support/integration/adapters/qu.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
QuJobsManager
def
setup
require
"qu-rails"
...
...
activejob/test/support/integration/adapters/que.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
QueJobsManager
def
setup
require
"sequel"
...
...
activejob/test/support/integration/adapters/queue_classic.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
QueueClassicJobsManager
def
setup
ENV
[
"QC_DATABASE_URL"
]
||=
"postgres:///active_jobs_qc_int_test"
...
...
activejob/test/support/integration/adapters/resque.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
ResqueJobsManager
def
setup
ActiveJob
::
Base
.
queue_adapter
=
:resque
...
...
activejob/test/support/integration/adapters/sidekiq.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sidekiq/api"
require
"sidekiq/testing"
...
...
activejob/test/support/integration/adapters/sneakers.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sneakers/runner"
require
"sneakers/publisher"
require
"timeout"
...
...
activejob/test/support/integration/adapters/sucker_punch.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
SuckerPunchJobsManager
def
setup
ActiveJob
::
Base
.
queue_adapter
=
:sucker_punch
...
...
activejob/test/support/integration/dummy_app_template.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
if
ENV
[
"AJ_ADAPTER"
]
==
"delayed_job"
generate
"delayed_job:active_record"
,
"--quiet"
end
...
...
activejob/test/support/integration/helper.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
puts
"
\n\n
*** rake aj:integration:
#{
ENV
[
'AJ_ADAPTER'
]
}
***
\n
"
ENV
[
"RAILS_ENV"
]
=
"test"
...
...
activejob/test/support/integration/jobs_manager.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
class
JobsManager
@@managers
=
{}
attr
:adapter_name
...
...
activejob/test/support/integration/test_case_helpers.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"active_support/core_ext/string/inflections"
require
"support/integration/jobs_manager"
...
...
activejob/test/support/job_buffer.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
module
JobBuffer
class
<<
self
def
clear
...
...
activejob/test/support/que/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"que"
Que
::
Job
.
class_eval
do
...
...
activejob/test/support/queue_classic/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"queue_classic"
module
QC
...
...
activejob/test/support/sneakers/inline.rb
浏览文件 @
aa28c5ca
# frozen_string_literal: true
require
"sneakers"
module
Sneakers
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录