Adding letter opener for development and Rack::Attack for future rate limiting implementations

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Eugen Rochko 2016-03-19 14:57:30 +01:00
parent 5d72b92271
commit e2b846f630
5 changed files with 17 additions and 0 deletions

View File

@ -35,6 +35,7 @@ gem 'htmlentities'
gem 'onebox' gem 'onebox'
gem 'simple_form' gem 'simple_form'
gem 'will_paginate', '~> 3.0.6' gem 'will_paginate', '~> 3.0.6'
gem 'rack-attack'
group :development, :test do group :development, :test do
gem 'rspec-rails' gem 'rspec-rails'
@ -55,6 +56,7 @@ group :development do
gem 'better_errors' gem 'better_errors'
gem 'binding_of_caller' gem 'binding_of_caller'
gem 'rack-mini-profiler' gem 'rack-mini-profiler'
gem 'letter_opener'
end end
group :production do group :production do

View File

@ -129,6 +129,10 @@ GEM
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (1.8.3) json (1.8.3)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.4.1)
launchy (~> 2.2)
libv8 (3.16.14.13) libv8 (3.16.14.13)
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
@ -180,6 +184,8 @@ GEM
rabl (0.12.0) rabl (0.12.0)
activesupport (>= 2.3.14) activesupport (>= 2.3.14)
rack (1.6.4) rack (1.6.4)
rack-attack (4.4.1)
rack
rack-mini-profiler (0.9.9.2) rack-mini-profiler (0.9.9.2)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-test (0.6.3) rack-test (0.6.3)
@ -331,6 +337,7 @@ DEPENDENCIES
http http
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-rails jquery-rails
letter_opener
nokogiri nokogiri
oj oj
onebox onebox
@ -342,6 +349,7 @@ DEPENDENCIES
puma puma
quiet_assets quiet_assets
rabl rabl
rack-attack
rack-mini-profiler rack-mini-profiler
rails (= 4.2.5.1) rails (= 4.2.5.1)
rails_12factor rails_12factor

View File

@ -33,5 +33,7 @@ module Mastodon
Doorkeeper::AuthorizedApplicationsController.layout 'dashboard' Doorkeeper::AuthorizedApplicationsController.layout 'dashboard'
Doorkeeper::AuthorizationsController.layout 'auth' Doorkeeper::AuthorizationsController.layout 'auth'
end end
config.middleware.use Rack::Attack
end end
end end

View File

@ -38,4 +38,6 @@ Rails.application.configure do
# Raises error for missing translations # Raises error for missing translations
# config.action_view.raise_on_missing_translations = true # config.action_view.raise_on_missing_translations = true
config.action_mailer.delivery_method = :letter_opener
end end

View File

@ -0,0 +1,3 @@
class Rack::Attack
# TODO
end