sidekiq-unique-jobs 5.0.2 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq-unique-jobs might be problematic. Click here for more details.

Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/Appraisals +1 -1
  4. data/CHANGELOG.md +9 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +1 -1
  7. data/LICENSE.txt +21 -0
  8. data/bin/bench +1 -1
  9. data/lib/sidekiq-unique-jobs.rb +3 -1
  10. data/lib/sidekiq/simulator.rb +4 -10
  11. data/lib/sidekiq_unique_jobs/cli.rb +2 -0
  12. data/lib/sidekiq_unique_jobs/client/middleware.rb +2 -0
  13. data/lib/sidekiq_unique_jobs/config.rb +2 -0
  14. data/lib/sidekiq_unique_jobs/constants.rb +19 -17
  15. data/lib/sidekiq_unique_jobs/core_ext.rb +2 -0
  16. data/lib/sidekiq_unique_jobs/lock.rb +2 -0
  17. data/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb +2 -0
  18. data/lib/sidekiq_unique_jobs/lock/until_executed.rb +3 -1
  19. data/lib/sidekiq_unique_jobs/lock/until_executing.rb +2 -0
  20. data/lib/sidekiq_unique_jobs/lock/until_timeout.rb +2 -0
  21. data/lib/sidekiq_unique_jobs/lock/while_executing.rb +2 -0
  22. data/lib/sidekiq_unique_jobs/middleware.rb +2 -0
  23. data/lib/sidekiq_unique_jobs/normalizer.rb +2 -0
  24. data/lib/sidekiq_unique_jobs/options_with_fallback.rb +2 -0
  25. data/lib/sidekiq_unique_jobs/run_lock_failed.rb +2 -0
  26. data/lib/sidekiq_unique_jobs/script_mock.rb +2 -0
  27. data/lib/sidekiq_unique_jobs/scripts.rb +15 -10
  28. data/lib/sidekiq_unique_jobs/scripts/acquire_lock.rb +2 -0
  29. data/lib/sidekiq_unique_jobs/scripts/release_lock.rb +2 -0
  30. data/lib/sidekiq_unique_jobs/server/middleware.rb +2 -0
  31. data/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb +2 -0
  32. data/lib/sidekiq_unique_jobs/testing.rb +2 -0
  33. data/lib/sidekiq_unique_jobs/testing/sidekiq_overrides.rb +2 -0
  34. data/lib/sidekiq_unique_jobs/timeout_calculator.rb +2 -0
  35. data/lib/sidekiq_unique_jobs/unique_args.rb +3 -1
  36. data/lib/sidekiq_unique_jobs/unlockable.rb +2 -0
  37. data/lib/sidekiq_unique_jobs/util.rb +5 -3
  38. data/lib/sidekiq_unique_jobs/version.rb +3 -1
  39. data/sidekiq-unique-jobs.gemspec +27 -23
  40. metadata +44 -200
  41. data/LICENSE +0 -13
  42. data/circle.yml +0 -41
  43. data/gemfiles/sidekiq_4.0.gemfile +0 -22
  44. data/gemfiles/sidekiq_4.1.gemfile +0 -22
  45. data/gemfiles/sidekiq_4.2.gemfile +0 -22
  46. data/gemfiles/sidekiq_5.0.gemfile +0 -22
  47. data/gemfiles/sidekiq_develop.gemfile +0 -22
  48. data/rails_example/.env +0 -12
  49. data/rails_example/.env.test +0 -12
  50. data/rails_example/.gitignore +0 -13
  51. data/rails_example/.rspec +0 -2
  52. data/rails_example/Gemfile +0 -38
  53. data/rails_example/Procfile +0 -2
  54. data/rails_example/README.rdoc +0 -28
  55. data/rails_example/Rakefile +0 -6
  56. data/rails_example/app/assets/images/.keep +0 -0
  57. data/rails_example/app/assets/javascripts/application.js +0 -16
  58. data/rails_example/app/assets/stylesheets/application.css +0 -15
  59. data/rails_example/app/channels/appearance_channel.rb +0 -17
  60. data/rails_example/app/channels/application_cable/channel.rb +0 -4
  61. data/rails_example/app/channels/application_cable/connection.rb +0 -9
  62. data/rails_example/app/channels/post_channel.rb +0 -5
  63. data/rails_example/app/controllers/application_controller.rb +0 -5
  64. data/rails_example/app/controllers/concerns/.keep +0 -0
  65. data/rails_example/app/controllers/work_controller.rb +0 -39
  66. data/rails_example/app/helpers/application_helper.rb +0 -2
  67. data/rails_example/app/mailers/.keep +0 -0
  68. data/rails_example/app/models/.keep +0 -0
  69. data/rails_example/app/models/application_record.rb +0 -3
  70. data/rails_example/app/models/concerns/.keep +0 -0
  71. data/rails_example/app/models/guest.rb +0 -18
  72. data/rails_example/app/models/post.rb +0 -2
  73. data/rails_example/app/views/layouts/application.html.erb +0 -15
  74. data/rails_example/app/workers/simple_worker.rb +0 -15
  75. data/rails_example/app/workers/slow_until_executing_worker.rb +0 -15
  76. data/rails_example/app/workers/spawn_simple_worker.rb +0 -10
  77. data/rails_example/app/workers/while_executing_worker.rb +0 -12
  78. data/rails_example/app/workers/without_args_worker.rb +0 -16
  79. data/rails_example/app/workers/without_argument_worker.rb +0 -12
  80. data/rails_example/bin/bundle +0 -3
  81. data/rails_example/bin/check_or_setup_db +0 -56
  82. data/rails_example/bin/docker-setup +0 -20
  83. data/rails_example/bin/rails +0 -4
  84. data/rails_example/bin/rake +0 -4
  85. data/rails_example/bin/setup +0 -34
  86. data/rails_example/bin/update +0 -29
  87. data/rails_example/cable.ru +0 -6
  88. data/rails_example/common-services.yml +0 -52
  89. data/rails_example/config.ru +0 -4
  90. data/rails_example/config/application.rb +0 -27
  91. data/rails_example/config/boot.rb +0 -3
  92. data/rails_example/config/cable.yml +0 -9
  93. data/rails_example/config/database.docker.yml +0 -12
  94. data/rails_example/config/database.yml +0 -19
  95. data/rails_example/config/environment.rb +0 -5
  96. data/rails_example/config/environments/development.rb +0 -54
  97. data/rails_example/config/environments/production.rb +0 -86
  98. data/rails_example/config/environments/test.rb +0 -42
  99. data/rails_example/config/initializers/application_controller_renderer.rb +0 -6
  100. data/rails_example/config/initializers/assets.rb +0 -11
  101. data/rails_example/config/initializers/backtrace_silencers.rb +0 -9
  102. data/rails_example/config/initializers/cookies_serializer.rb +0 -5
  103. data/rails_example/config/initializers/filter_parameter_logging.rb +0 -4
  104. data/rails_example/config/initializers/inflections.rb +0 -16
  105. data/rails_example/config/initializers/mime_types.rb +0 -4
  106. data/rails_example/config/initializers/new_framework_defaults.rb +0 -23
  107. data/rails_example/config/initializers/session_store.rb +0 -3
  108. data/rails_example/config/initializers/sidekiq.rb +0 -13
  109. data/rails_example/config/initializers/wrap_parameters.rb +0 -14
  110. data/rails_example/config/locales/en.yml +0 -23
  111. data/rails_example/config/puma.rb +0 -38
  112. data/rails_example/config/routes.rb +0 -8
  113. data/rails_example/config/secrets.yml +0 -22
  114. data/rails_example/config/sidekiq.yml +0 -6
  115. data/rails_example/config/spring.rb +0 -6
  116. data/rails_example/db/migrate/20160724111322_create_posts.rb +0 -12
  117. data/rails_example/db/schema.rb +0 -25
  118. data/rails_example/db/seeds.rb +0 -7
  119. data/rails_example/dev-entrypoint.sh +0 -55
  120. data/rails_example/dev.env +0 -12
  121. data/rails_example/docker-compose.yml +0 -71
  122. data/rails_example/docker/rails.Dockerfile +0 -27
  123. data/rails_example/lib/assets/.keep +0 -0
  124. data/rails_example/lib/tasks/.keep +0 -0
  125. data/rails_example/log/.keep +0 -0
  126. data/rails_example/public/404.html +0 -67
  127. data/rails_example/public/422.html +0 -67
  128. data/rails_example/public/500.html +0 -66
  129. data/rails_example/public/favicon.ico +0 -0
  130. data/rails_example/public/robots.txt +0 -5
  131. data/rails_example/simple.ru +0 -12
  132. data/rails_example/spec/controllers/work_controller_mock_spec.rb +0 -91
  133. data/rails_example/spec/controllers/work_controller_spec.rb +0 -77
  134. data/rails_example/spec/factories/posts.rb +0 -8
  135. data/rails_example/spec/models/post_spec.rb +0 -4
  136. data/rails_example/spec/rails_helper.rb +0 -20
  137. data/rails_example/spec/spec_helper.rb +0 -20
  138. data/rails_example/spec/support/sidekiq_meta.rb +0 -12
  139. data/rails_example/spec/workers/simple_worker_spec.rb +0 -4
  140. data/rails_example/vendor/assets/javascripts/.keep +0 -0
  141. data/rails_example/vendor/assets/stylesheets/.keep +0 -0
  142. data/spec/jobs/another_unique_job.rb +0 -13
  143. data/spec/jobs/custom_queue_job.rb +0 -5
  144. data/spec/jobs/custom_queue_job_with_filter_method.rb +0 -7
  145. data/spec/jobs/custom_queue_job_with_filter_proc.rb +0 -10
  146. data/spec/jobs/expiring_job.rb +0 -4
  147. data/spec/jobs/inline_worker.rb +0 -8
  148. data/spec/jobs/just_a_worker.rb +0 -7
  149. data/spec/jobs/long_running_job.rb +0 -6
  150. data/spec/jobs/main_job.rb +0 -7
  151. data/spec/jobs/my_job.rb +0 -12
  152. data/spec/jobs/my_unique_job.rb +0 -11
  153. data/spec/jobs/my_unique_job_with_filter_method.rb +0 -17
  154. data/spec/jobs/my_unique_job_with_filter_proc.rb +0 -15
  155. data/spec/jobs/notify_worker.rb +0 -10
  156. data/spec/jobs/plain_class.rb +0 -3
  157. data/spec/jobs/simple_worker.rb +0 -11
  158. data/spec/jobs/spawn_simple_worker.rb +0 -8
  159. data/spec/jobs/test_class.rb +0 -3
  160. data/spec/jobs/unique_job_with_conditional_parameter.rb +0 -14
  161. data/spec/jobs/unique_job_with_filter_method.rb +0 -18
  162. data/spec/jobs/unique_job_with_nil_unique_args.rb +0 -16
  163. data/spec/jobs/unique_job_with_no_unique_args_method.rb +0 -12
  164. data/spec/jobs/unique_job_withthout_unique_args_parameter.rb +0 -14
  165. data/spec/jobs/unique_on_all_queues_job.rb +0 -13
  166. data/spec/jobs/until_and_while_executing_job.rb +0 -7
  167. data/spec/jobs/until_executed_job.rb +0 -17
  168. data/spec/jobs/until_executing_job.rb +0 -7
  169. data/spec/jobs/until_global_timeout_job.rb +0 -8
  170. data/spec/jobs/until_timeout_job.rb +0 -8
  171. data/spec/jobs/while_executing_job.rb +0 -12
  172. data/spec/jobs/without_argument_job.rb +0 -9
  173. data/spec/lib/sidekiq_unique_jobs/cli_spec.rb +0 -183
  174. data/spec/lib/sidekiq_unique_jobs/client/middleware_spec.rb +0 -316
  175. data/spec/lib/sidekiq_unique_jobs/config_spec.rb +0 -84
  176. data/spec/lib/sidekiq_unique_jobs/core_ext_spec.rb +0 -25
  177. data/spec/lib/sidekiq_unique_jobs/lock/until_and_while_executing_spec.rb +0 -42
  178. data/spec/lib/sidekiq_unique_jobs/lock/until_executed_spec.rb +0 -37
  179. data/spec/lib/sidekiq_unique_jobs/lock/until_timeout_spec.rb +0 -26
  180. data/spec/lib/sidekiq_unique_jobs/lock/while_executing_spec.rb +0 -86
  181. data/spec/lib/sidekiq_unique_jobs/normalizer_spec.rb +0 -21
  182. data/spec/lib/sidekiq_unique_jobs/options_with_fallback_spec.rb +0 -113
  183. data/spec/lib/sidekiq_unique_jobs/queue_lock_timeout_calculator_spec.rb +0 -47
  184. data/spec/lib/sidekiq_unique_jobs/run_lock_timeout_calculator_spec.rb +0 -36
  185. data/spec/lib/sidekiq_unique_jobs/script_mock_spec.rb +0 -88
  186. data/spec/lib/sidekiq_unique_jobs/scripts/acquire_lock_spec.rb +0 -50
  187. data/spec/lib/sidekiq_unique_jobs/scripts/release_lock_spec.rb +0 -41
  188. data/spec/lib/sidekiq_unique_jobs/scripts_spec.rb +0 -68
  189. data/spec/lib/sidekiq_unique_jobs/server/middleware_spec.rb +0 -78
  190. data/spec/lib/sidekiq_unique_jobs/sidekiq_testing_enabled_spec.rb +0 -164
  191. data/spec/lib/sidekiq_unique_jobs/sidekiq_unique_ext_spec.rb +0 -75
  192. data/spec/lib/sidekiq_unique_jobs/sidekiq_unique_jobs_spec.rb +0 -41
  193. data/spec/lib/sidekiq_unique_jobs/timeout_calculator_spec.rb +0 -70
  194. data/spec/lib/sidekiq_unique_jobs/unique_args_spec.rb +0 -257
  195. data/spec/lib/sidekiq_unique_jobs/unlockable_spec.rb +0 -37
  196. data/spec/lib/sidekiq_unique_jobs/util_spec.rb +0 -81
  197. data/spec/spec_helper.rb +0 -92
  198. data/spec/support/matchers/redis_matchers.rb +0 -29
  199. data/spec/support/ruby_meta.rb +0 -17
  200. data/spec/support/sidekiq_meta.rb +0 -30
  201. data/spec/support/unique_macros.rb +0 -71
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require_relative 'application'
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,54 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable/disable caching. By default caching is disabled.
16
- if Rails.root.join('tmp/caching-dev.txt').exist?
17
- config.action_controller.perform_caching = true
18
-
19
- config.cache_store = :memory_store
20
- config.public_file_server.headers = {
21
- 'Cache-Control' => 'public, max-age=172800',
22
- }
23
- else
24
- config.action_controller.perform_caching = false
25
-
26
- config.cache_store = :null_store
27
- end
28
-
29
- # Don't care if the mailer can't send.
30
- config.action_mailer.raise_delivery_errors = false
31
-
32
- config.action_mailer.perform_caching = false
33
-
34
- # Print deprecation notices to the Rails logger.
35
- config.active_support.deprecation = :log
36
-
37
- # Raise an error on page load if there are pending migrations.
38
- config.active_record.migration_error = :page_load
39
-
40
- # Debug mode disables concatenation and preprocessing of assets.
41
- # This option may cause significant delays in view rendering with a large
42
- # number of complex assets.
43
- config.assets.debug = true
44
-
45
- # Suppress logger output for asset requests.
46
- config.assets.quiet = true
47
-
48
- # Raises error for missing translations
49
- # config.action_view.raise_on_missing_translations = true
50
-
51
- # Use an evented file watcher to asynchronously detect changes in source code,
52
- # routes, locales, etc. This feature depends on the listen gem.
53
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54
- end
@@ -1,86 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Disable serving static files from the `/public` folder by default since
18
- # Apache or NGINX already handles this.
19
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
20
-
21
- # Compress JavaScripts and CSS.
22
- config.assets.js_compressor = :uglifier
23
- # config.assets.css_compressor = :sass
24
-
25
- # Do not fallback to assets pipeline if a precompiled asset is missed.
26
- config.assets.compile = false
27
-
28
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29
-
30
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31
- # config.action_controller.asset_host = 'http://assets.example.com'
32
-
33
- # Specifies the header that your server uses for sending files.
34
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
35
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36
-
37
- # Mount Action Cable outside main process or domain
38
- # config.action_cable.mount_path = nil
39
- # config.action_cable.url = 'wss://example.com/cable'
40
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
41
-
42
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
- # config.force_ssl = true
44
-
45
- # Use the lowest log level to ensure availability of diagnostic information
46
- # when problems arise.
47
- config.log_level = :debug
48
-
49
- # Prepend all log lines with the following tags.
50
- config.log_tags = [:request_id]
51
-
52
- # Use a different cache store in production.
53
- # config.cache_store = :mem_cache_store
54
-
55
- # Use a real queuing backend for Active Job (and separate queues per environment)
56
- # config.active_job.queue_adapter = :resque
57
- # config.active_job.queue_name_prefix = "rails_example_#{Rails.env}"
58
- config.action_mailer.perform_caching = false
59
-
60
- # Ignore bad email addresses and do not raise email delivery errors.
61
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
62
- # config.action_mailer.raise_delivery_errors = false
63
-
64
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
65
- # the I18n.default_locale when a translation cannot be found).
66
- config.i18n.fallbacks = true
67
-
68
- # Send deprecation notices to registered listeners.
69
- config.active_support.deprecation = :notify
70
-
71
- # Use default logging formatter so that PID and timestamp are not suppressed.
72
- config.log_formatter = ::Logger::Formatter.new
73
-
74
- # Use a different logger for distributed setups.
75
- # require 'syslog/logger'
76
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
77
-
78
- if ENV['RAILS_LOG_TO_STDOUT'].present?
79
- logger = ActiveSupport::Logger.new(STDOUT)
80
- logger.formatter = config.log_formatter
81
- config.logger = ActiveSupport::TaggedLogging.new(logger)
82
- end
83
-
84
- # Do not dump schema after migrations.
85
- config.active_record.dump_schema_after_migration = false
86
- end
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure public file server for tests with Cache-Control for performance.
16
- config.public_file_server.enabled = true
17
- config.public_file_server.headers = {
18
- 'Cache-Control' => 'public, max-age=3600',
19
- }
20
-
21
- # Show full error reports and disable caching.
22
- config.consider_all_requests_local = true
23
- config.action_controller.perform_caching = false
24
-
25
- # Raise exceptions instead of rendering exception templates.
26
- config.action_dispatch.show_exceptions = false
27
-
28
- # Disable request forgery protection in test environment.
29
- config.action_controller.allow_forgery_protection = false
30
- config.action_mailer.perform_caching = false
31
-
32
- # Tell Action Mailer not to deliver emails to the real world.
33
- # The :test delivery method accumulates sent emails in the
34
- # ActionMailer::Base.deliveries array.
35
- config.action_mailer.delivery_method = :test
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end
@@ -1,6 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # ApplicationController.renderer.defaults.merge!(
4
- # http_host: 'example.org',
5
- # https: false
6
- # )
@@ -1,11 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
5
-
6
- # Add additional assets to the asset load path
7
- # Rails.application.config.assets.paths << Emoji.images_path
8
-
9
- # Precompile additional assets.
10
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
- # Rails.application.config.assets.precompile += %w( search.js )
@@ -1,9 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers
7
- # if you're trying to debug a problem that might stem
8
- # from framework code.
9
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Specify a serializer for the signed and encrypted cookie jars.
4
- # Valid options are :json, :marshal, and :hybrid.
5
- Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
@@ -1,23 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains migration options to ease your Rails 5.0 upgrade.
4
- #
5
- # Once upgraded flip defaults one by one to migrate to the new default.
6
- #
7
- # Read the Rails 5.0 release notes for more info on each option.
8
-
9
- # Enable per-form CSRF tokens. Previous versions had false.
10
- Rails.application.config.action_controller.per_form_csrf_tokens = false
11
-
12
- # Enable origin-checking CSRF mitigation. Previous versions had false.
13
- Rails.application.config.action_controller.forgery_protection_origin_check = false
14
-
15
- # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
16
- # Previous versions had false.
17
- ActiveSupport.to_time_preserves_timezone = false
18
-
19
- # Require `belongs_to` associations by default. Previous versions had false.
20
- Rails.application.config.active_record.belongs_to_required_by_default = false
21
-
22
- # Do not halt callback chains when a callback returns false. Previous versions had true.
23
- ActiveSupport.halt_callback_chains_on_return_false = true
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_rails_example_session'
@@ -1,13 +0,0 @@
1
- Sidekiq.default_worker_options = {
2
- backtrace: true,
3
- retry: false,
4
- }
5
-
6
- Sidekiq.configure_server do |config|
7
- config.redis = { url: ENV['REDIS_URL'] }
8
- # config.error_handlers << Proc.new { |ex, context| Airbrake.notify_or_ignore(ex, parameters: context) }
9
- end
10
-
11
- Sidekiq.configure_client do |config|
12
- config.redis = { url: ENV['REDIS_URL'] }
13
- end
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
@@ -1,23 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
- en:
23
- hello: "Hello world"
@@ -1,38 +0,0 @@
1
- threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
2
- threads threads_count, threads_count
3
- port ENV.fetch('PORT') { 3000 }
4
- environment ENV.fetch('RAILS_ENV') { 'development' }
5
- # daemonize false
6
-
7
- # Store the pid of the server in the file at "path".
8
- #
9
- # pidfile '/u/apps/lolcat/tmp/pids/puma.pid'
10
-
11
- # Use "path" as the file to store the server info state. This is
12
- # used by "pumactl" to query and control the server.
13
- #
14
- # state_path '/u/apps/lolcat/tmp/pids/puma.state'
15
-
16
- # Use the `preload_app!` method when specifying a `workers` number.
17
- # This directive tells Puma to first boot the application and load code
18
- # before forking the application. This takes advantage of Copy On Write
19
- # process behavior so workers use less memory. If you use this option
20
- # you need to make sure to reconnect any threads in the `on_worker_boot`
21
- # block.
22
- #
23
- # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
24
- # preload_app!
25
-
26
- # The code in the `on_worker_boot` will be called if you are using
27
- # clustered mode by specifying a number of `workers`. After each worker
28
- # process is booted this block will be run, if you are using `preload_app!`
29
- # option you will want to use this block to reconnect to any threads
30
- # or connections that may have been created at application boot, Ruby
31
- # cannot share connections between processes.
32
- #
33
- # on_worker_boot do
34
- # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
35
- # end
36
-
37
- # Allow puma to be restarted by `rails restart` command.
38
- # plugin :tmp_restart
@@ -1,8 +0,0 @@
1
- Rails.application.routes.draw do
2
- require 'sidekiq/web'
3
- mount Sidekiq::Web, at: '/sidekiq'
4
- get 'work/duplicate_simple' => 'work#duplicate_simple'
5
- get 'work/duplicate_nested' => 'work#duplicate_nested'
6
- get 'work/duplicate_without_args' => 'work#duplicate_without_args'
7
- get 'work/duplicate_with_args' => 'work#duplicate_with_args'
8
- end
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rails secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: f5771482e38ac985be78a1668b8a155f3be99b707cea923e7f0e55a649f78bb2e9debd08f49f57ba2f3da4ffcfc73a18bd43054e0f704c2513735e57cf612cf0
15
-
16
- test:
17
- secret_key_base: cb65c5fd20b500e74f0971e1f2eb440c9965e16ff469542ed2077b523c4eeb2fd890a5aae8dc063fba7ef97c5a5a65fdfa5fddea5b8f650916719abcd83861e0
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -1,6 +0,0 @@
1
- ---
2
- :verbose: false
3
- :concurrency: 5
4
- :timeout: 3
5
- :queues:
6
- - [default, 7]
@@ -1,6 +0,0 @@
1
- %w[
2
- .ruby-version
3
- .rbenv-vars
4
- tmp/restart.txt
5
- tmp/caching-dev.txt
6
- ].each { |path| Spring.watch(path) }
@@ -1,12 +0,0 @@
1
- class CreatePosts < ActiveRecord::Migration[5.0]
2
- def change
3
- create_table :posts do |t|
4
- t.string :title
5
- t.text :body
6
- t.string :excerpt
7
- t.integer :read_count
8
-
9
- t.timestamps
10
- end
11
- end
12
- end