Brakeman + Guard

This commit is contained in:
Yuki 2015-09-01 19:00:05 +05:30
parent 85b099d712
commit c834b7d4dd
4 changed files with 87 additions and 1 deletions

View File

@ -98,5 +98,7 @@ group :development, :test do
gem 'simplecov-rcov', require: false gem 'simplecov-rcov', require: false
gem 'database_cleaner' gem 'database_cleaner'
gem 'better_errors' gem 'better_errors'
gem "letter_opener" # Use this just in local test environments gem 'letter_opener' # Use this just in local test environments
gem 'brakeman'
gem 'guard-brakeman'
end end

View File

@ -60,6 +60,17 @@ GEM
bootstrap_form (2.3.0) bootstrap_form (2.3.0)
bootswatch-rails (3.2.4) bootswatch-rails (3.2.4)
railties (>= 3.1) railties (>= 3.1)
brakeman (3.1.0)
erubis (~> 2.6)
fastercsv (~> 1.5)
haml (>= 3.0, < 5.0)
highline (~> 1.6)
multi_json (~> 1.2)
ruby2ruby (>= 2.1.1, < 2.3.0)
ruby_parser (~> 3.7.0)
sass (~> 3.0)
slim (>= 1.3.6, < 4.0)
terminal-table (~> 1.4.5)
buftok (0.2.0) buftok (0.2.0)
builder (3.2.2) builder (3.2.2)
byebug (4.0.5) byebug (4.0.5)
@ -124,6 +135,8 @@ GEM
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
faraday_middleware (0.9.1) faraday_middleware (0.9.1)
faraday (>= 0.7.4, < 0.10) faraday (>= 0.7.4, < 0.10)
fastercsv (1.5.5)
ffi (1.9.10)
fission (0.5.0) fission (0.5.0)
CFPropertyList (~> 2.2) CFPropertyList (~> 2.2)
fog (1.28.0) fog (1.28.0)
@ -215,9 +228,22 @@ GEM
formatador (0.2.5) formatador (0.2.5)
globalid (0.3.6) globalid (0.3.6)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-brakeman (0.8.3)
brakeman (>= 2.1.1)
guard (>= 2.0.0)
haml (4.0.6) haml (4.0.6)
tilt tilt
hashie (3.4.1) hashie (3.4.1)
highline (1.7.3)
hike (1.2.3) hike (1.2.3)
hitimes (1.2.2) hitimes (1.2.2)
http (0.6.4) http (0.6.4)
@ -252,12 +278,17 @@ GEM
addressable (~> 2.3) addressable (~> 2.3)
letter_opener (1.4.1) letter_opener (1.4.1)
launchy (~> 2.2) launchy (~> 2.2)
listen (3.0.3)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.0.9)
mail (2.6.3) mail (2.6.3)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
memoizable (0.4.2) memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
method_source (0.8.2)
mime-types (2.6.1) mime-types (2.6.1)
mini_portile (0.6.2) mini_portile (0.6.2)
minitest (5.8.0) minitest (5.8.0)
@ -267,6 +298,7 @@ GEM
multipart-post (2.0.0) multipart-post (2.0.0)
mysql2 (0.3.18) mysql2 (0.3.18)
naught (1.0.0) naught (1.0.0)
nenv (0.2.0)
nested_form (0.3.2) nested_form (0.3.2)
net-scp (1.2.1) net-scp (1.2.1)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
@ -275,6 +307,9 @@ GEM
mini_portile (~> 0.6.0) mini_portile (~> 0.6.0)
nokogumbo (1.2.0) nokogumbo (1.2.0)
nokogiri nokogiri
notiffany (0.0.7)
nenv (~> 0.1)
shellany (~> 0.0)
nprogress-rails (0.1.6.6) nprogress-rails (0.1.6.6)
oauth (0.4.7) oauth (0.4.7)
omniauth (1.2.2) omniauth (1.2.2)
@ -302,6 +337,10 @@ GEM
cliver (~> 0.3.1) cliver (~> 0.3.1)
multi_json (~> 1.0) multi_json (~> 1.0)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4) rack (1.6.4)
rack-pjax (0.8.0) rack-pjax (0.8.0)
nokogiri (~> 1.5) nokogiri (~> 1.5)
@ -356,6 +395,9 @@ GEM
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
raindrops (0.13.0) raindrops (0.13.0)
rake (10.4.2) rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (4.2.0) rdoc (4.2.0)
json (~> 1.4) json (~> 1.4)
redcarpet (3.2.3) redcarpet (3.2.3)
@ -384,6 +426,11 @@ GEM
rspec-support (~> 3.0.0) rspec-support (~> 3.0.0)
rspec-support (3.0.4) rspec-support (3.0.4)
ruby-progressbar (1.7.5) ruby-progressbar (1.7.5)
ruby2ruby (2.2.0)
ruby_parser (~> 3.1)
sexp_processor (~> 4.0)
ruby_parser (3.7.1)
sexp_processor (~> 4.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sanitize (3.1.2) sanitize (3.1.2)
crass (~> 1.0.1) crass (~> 1.0.1)
@ -398,6 +445,8 @@ GEM
sdoc (0.4.1) sdoc (0.4.1)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0) rdoc (~> 4.0)
sexp_processor (4.6.0)
shellany (0.0.1)
sidekiq (3.3.3) sidekiq (3.3.3)
celluloid (>= 0.16.0) celluloid (>= 0.16.0)
connection_pool (>= 2.1.1) connection_pool (>= 2.1.1)
@ -419,6 +468,10 @@ GEM
rack (~> 1.4) rack (~> 1.4)
rack-protection (~> 1.4) rack-protection (~> 1.4)
tilt (>= 1.3, < 3) tilt (>= 1.3, < 3)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slop (3.6.0)
spring (1.3.5) spring (1.3.5)
sprockets (2.12.4) sprockets (2.12.4)
hike (~> 1.2) hike (~> 1.2)
@ -431,6 +484,8 @@ GEM
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sweetalert-rails (0.5.0) sweetalert-rails (0.5.0)
railties (>= 3.1.0) railties (>= 3.1.0)
temple (0.7.6)
terminal-table (1.4.5)
thin (1.6.3) thin (1.6.3)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0) eventmachine (~> 1.0)
@ -499,6 +554,7 @@ DEPENDENCIES
bootstrap3-datetimepicker-rails (~> 4.7.14) bootstrap3-datetimepicker-rails (~> 4.7.14)
bootstrap_form bootstrap_form
bootswatch-rails bootswatch-rails
brakeman
byebug byebug
capybara capybara
coffee-rails (~> 4.1.0) coffee-rails (~> 4.1.0)
@ -515,6 +571,7 @@ DEPENDENCIES
font-awesome-rails (~> 4.3.0.0) font-awesome-rails (~> 4.3.0.0)
font-kit-rails font-kit-rails
foreman foreman
guard-brakeman
haml haml
i18n-js i18n-js
jbuilder (~> 2.2.4) jbuilder (~> 2.2.4)

23
Guardfile Normal file
View File

@ -0,0 +1,23 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
guard 'brakeman', :run_on_start => true do
watch(%r{^app/.+\.(erb|haml|rhtml|rb)$})
watch(%r{^config/.+\.rb$})
watch(%r{^lib/.+\.rb$})
watch('Gemfile')
end

View File

@ -5,6 +5,10 @@ require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks Rails.application.load_tasks
task :default do
Brakeman.run :app_path => ".", :print_report => true
end
namespace :justask do namespace :justask do
desc "Regenerate themes" desc "Regenerate themes"
task themes: :environment do task themes: :environment do