Skip to content

Commit

Permalink
Replaced delayed job with sidekiq
Browse files Browse the repository at this point in the history
  • Loading branch information
G0dwin committed Jun 29, 2016
1 parent b719b2c commit 8120727
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 46 deletions.
7 changes: 3 additions & 4 deletions Gemfile
Expand Up @@ -38,10 +38,10 @@ gem 'activerecord-session_store'
gem 'paypal-express', '0.7.1'
gem 'sass-json-vars'
gem 'premailer-rails'
gem 'delayed_job_active_record'
gem 'redcarpet'

gem 'copydb'
gem 'sidekiq'
gem 'letter_opener'
gem 'launchy'

group :test do
gem 'rspec'
Expand Down Expand Up @@ -71,7 +71,6 @@ group :test do
gem 'guard-rspec'
gem 'factory_girl_rails'
gem 'coveralls', require: false
gem 'launchy'
gem 'selenium-webdriver'
gem 'simplecov', require: false
gem 'webmock', require: false
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/_application.scss
Expand Up @@ -3033,7 +3033,7 @@ html[data-ontop] {
}

&:last-child {
@include _(border-radius, 0 0 0.15em 0.15em);
@include _(border-radius, 0 0.15em 0.15em 0);
}
}
}
Expand Down
21 changes: 0 additions & 21 deletions config/Xsitemap.rb

This file was deleted.

15 changes: 1 addition & 14 deletions config/application.rb
Expand Up @@ -29,21 +29,8 @@ class Application < Rails::Application
config.i18n.enforce_available_locales = false
self.paths['config/database'] = Rails.root.join('config', 'database.yml')
config.active_record.raise_in_transactional_callbacks = true
config.action_mailer.raise_delivery_errors = true
config.exceptions_app = self.routes
I18n.config.language_threshold = 0

if Rails.env == 'development' || Rails.env == 'test'
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
else
# detect the language using the subdimain
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
if Rails.env == 'preview'
I18n.config.subdomain_format = 'preview-%'
# if we are in our preview environment, set the locale regex to detect the preview- prefix
I18n.config.host_locale_regex = /^preview\-([a-z]{2})\.bikebike\.org$/
end
end

config.active_job.queue_adapter = :delayed_job
end
end
7 changes: 7 additions & 0 deletions config/environments/development.rb
Expand Up @@ -51,5 +51,12 @@
config.serve_static_files = true
# config.action_controller.perform_caching = true

I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM

# to be appraised of mailing errors
config.action_mailer.raise_delivery_errors = true
# to deliver to the browser instead of email
config.action_mailer.delivery_method = :letter_opener

Paypal.sandbox!
end
3 changes: 3 additions & 0 deletions config/environments/preview.rb
Expand Up @@ -98,4 +98,7 @@
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true

I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
I18n.config.subdomain_format = 'preview-%'
end
2 changes: 2 additions & 0 deletions config/environments/production.rb
Expand Up @@ -99,4 +99,6 @@
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
I18n.config.host_locale_regex = /^preview\-([a-z]{2})\.bikebike\.org$/
end
3 changes: 3 additions & 0 deletions config/environments/test.rb
Expand Up @@ -35,5 +35,8 @@

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM

Paypal.sandbox!
end
1 change: 0 additions & 1 deletion config/initializers/delayed_job_config.rb

This file was deleted.

5 changes: 0 additions & 5 deletions public/Xrobots.txt

This file was deleted.

0 comments on commit 8120727

Please sign in to comment.