Skip to content

Commit

Permalink
Merge branch 'release/0.1.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilgkrishnan committed May 9, 2022
2 parents 13c5a19 + 70cedc9 commit 16598f6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ NEW_RELIC_LICENSE_KEY='replace with newrelic licence key'
# Redis url
REDIS_URL='redis://127.0.0.1:6379/12'

# Sidekiq Configuration
SIDEKIQ_USERNAME: <some_username>
SIDEKIQ_PASSWORD: <some_password>

# Stripe
STRIPE_PUBLISHABLE_KEY="stripe_publishable_key"
STRIPE_SECRET_KEY="stripe_secret_key"
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ class Application < Rails::Application
config.autoload_paths << Rails.root.join("lib")

config.react.camelize_props = true

# Use a real queuing backend for Active Job (and separate queues per environment).
config.active_job.queue_adapter = :sidekiq
end
end
2 changes: 0 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
config.action_mailer.delivery_method = ENV.fetch("MAILER_DELIVERY_METHOD", "letter_opener").to_sym
config.action_mailer.perform_deliveries = true

config.active_job.queue_adapter = :sidekiq

Rails.application.config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Expand Down
12 changes: 10 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ def draw(routes_name)
mount LetterOpenerWeb::Engine, at: "/sent_emails"
end

Sidekiq::Web.use Rack::Auth::Basic do |username, password|
ActiveSupport::SecurityUtils.secure_compare(
::Digest::SHA256.hexdigest(username),
::Digest::SHA256.hexdigest(ENV["SIDEKIQ_USERNAME"])) &
ActiveSupport::SecurityUtils.secure_compare(
::Digest::SHA256.hexdigest(password),
::Digest::SHA256.hexdigest(ENV["SIDEKIQ_PASSWORD"]))
end
mount Sidekiq::Web, at: "/sidekiq"

root to: "root#index"
draw(:internal_api)
resources :dashboard, only: [:index]
Expand Down Expand Up @@ -71,6 +81,4 @@ def draw(routes_name)
get "profile", to: "users/registrations#edit"
delete "profile/purge_avatar", to: "users/registrations#purge_avatar"
end

mount Sidekiq::Web => "/sidekiq"
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saeloun/miru-web",
"version": "0.1.9",
"version": "0.1.10",
"dependencies": {
"@babel/plugin-proposal-private-methods": "^7.16.5",
"@babel/preset-react": "^7.16.5",
Expand Down

0 comments on commit 16598f6

Please sign in to comment.