Skip to content

Commit 4af4997

Browse files
committed
Updated ci.rake usage of brakeman
* Run brakeman like: `brakeman --exit-on-warn --quiet -A` * This makes ci fail if there's a brakeman issue. * Updated brakeman gem to current (3.1.1) * Bonus: Added pry debugging gems
1 parent 2ab439c commit 4af4997

File tree

3 files changed

+51
-14
lines changed

3 files changed

+51
-14
lines changed

Diff for: Gemfile

+8-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ group :production do
5353
end
5454

5555
group :development, :test do
56-
# Call "debugger" anywhere in the code to stop execution and get a debugger console
57-
gem "byebug"
58-
5956
# Access an IRB console on exceptions page and /console in development
6057
gem "web-console"
6158

@@ -80,6 +77,14 @@ group :development, :test do
8077
gem "bundler-audit", require: false
8178

8279
gem "rainbow"
80+
81+
# Favorite debugging gems
82+
gem "pry"
83+
gem "pry-doc"
84+
gem "pry-rails"
85+
gem "pry-stack_explorer"
86+
gem "pry-rescue"
87+
gem "pry-byebug"
8388
end
8489

8590
group :test do

Diff for: Gemfile.lock

+41-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ GEM
5252
bootstrap-sass (3.3.5.1)
5353
autoprefixer-rails (>= 5.0.0.1)
5454
sass (>= 3.3.0)
55-
brakeman (3.0.5)
55+
brakeman (3.1.1)
5656
erubis (~> 2.6)
5757
fastercsv (~> 1.5)
5858
haml (>= 3.0, < 5.0)
59-
highline (~> 1.6.20)
59+
highline (~> 1.6)
6060
multi_json (~> 1.2)
61-
ruby2ruby (~> 2.1.1)
61+
ruby2ruby (>= 2.1.1, < 2.3.0)
6262
ruby_parser (~> 3.7.0)
6363
sass (~> 3.0)
64+
slim (>= 1.3.6, < 4.0)
6465
terminal-table (~> 1.4)
6566
builder (3.2.2)
6667
bundler-audit (0.4.0)
@@ -82,6 +83,7 @@ GEM
8283
chromedriver-helper (1.0.0)
8384
archive-zip (~> 0.7.0)
8485
nokogiri (~> 1.6)
86+
coderay (1.1.0)
8587
coffee-rails (4.1.0)
8688
coffee-script (>= 2.2.0)
8789
railties (>= 4.0.0, < 5.0)
@@ -118,12 +120,13 @@ GEM
118120
thor (~> 0.19.1)
119121
globalid (0.3.5)
120122
activesupport (>= 4.1.0)
121-
haml (4.0.6)
123+
haml (4.0.7)
122124
tilt
123-
highline (1.6.21)
125+
highline (1.7.7)
124126
http-cookie (1.0.2)
125127
domain_name (~> 0.5)
126128
i18n (0.7.0)
129+
interception (0.5)
127130
io-like (0.3.0)
128131
jbuilder (2.3.1)
129132
activesupport (>= 3.0.0, < 5)
@@ -137,6 +140,7 @@ GEM
137140
nokogiri (>= 1.5.9)
138141
mail (2.6.3)
139142
mime-types (>= 1.16, < 3)
143+
method_source (0.8.2)
140144
mime-types (2.6.1)
141145
mini_portile (0.6.2)
142146
minitest (5.7.0)
@@ -148,6 +152,24 @@ GEM
148152
ast (>= 1.1, < 3.0)
149153
pg (0.18.2)
150154
powerpack (0.1.1)
155+
pry (0.10.1)
156+
coderay (~> 1.1.0)
157+
method_source (~> 0.8.1)
158+
slop (~> 3.4)
159+
pry-byebug (3.2.0)
160+
byebug (~> 5.0)
161+
pry (~> 0.10)
162+
pry-doc (0.8.0)
163+
pry (~> 0.9)
164+
yard (~> 0.8)
165+
pry-rails (0.3.4)
166+
pry (>= 0.9.10)
167+
pry-rescue (1.4.2)
168+
interception (>= 0.5)
169+
pry
170+
pry-stack_explorer (0.4.9.2)
171+
binding_of_caller (>= 0.7)
172+
pry (>= 0.9.11)
151173
rack (1.6.4)
152174
rack-test (0.6.3)
153175
rack (>= 1.0)
@@ -219,13 +241,13 @@ GEM
219241
parser (~> 2.2)
220242
slop (~> 3.4, >= 3.4.7)
221243
ruby-progressbar (1.7.5)
222-
ruby2ruby (2.1.4)
244+
ruby2ruby (2.2.0)
223245
ruby_parser (~> 3.1)
224246
sexp_processor (~> 4.0)
225-
ruby_parser (3.7.0)
247+
ruby_parser (3.7.1)
226248
sexp_processor (~> 4.1)
227249
rubyzip (1.1.7)
228-
sass (3.4.16)
250+
sass (3.4.18)
229251
sass-rails (5.0.3)
230252
railties (>= 4.0.0, < 5.0)
231253
sass (~> 3.1)
@@ -249,6 +271,9 @@ GEM
249271
json (~> 1.8)
250272
simplecov-html (~> 0.10.0)
251273
simplecov-html (0.10.0)
274+
slim (3.0.6)
275+
temple (~> 0.7.3)
276+
tilt (>= 1.3.3, < 2.1)
252277
slop (3.6.0)
253278
spring (1.3.6)
254279
spring-commands-rspec (1.0.4)
@@ -260,6 +285,7 @@ GEM
260285
activesupport (>= 3.0)
261286
sprockets (>= 2.8, < 4.0)
262287
sqlite3 (1.3.10)
288+
temple (0.7.6)
263289
term-ansicolor (1.3.2)
264290
tins (~> 1.0)
265291
terminal-table (1.5.2)
@@ -292,6 +318,7 @@ GEM
292318
websocket (1.2.2)
293319
xpath (2.0.0)
294320
nokogiri (~> 1.3)
321+
yard (0.8.7.6)
295322

296323
PLATFORMS
297324
ruby
@@ -302,7 +329,6 @@ DEPENDENCIES
302329
bootstrap-sass (~> 3.3.1)
303330
brakeman
304331
bundler-audit
305-
byebug
306332
capybara
307333
capybara-screenshot
308334
chromedriver-helper
@@ -315,6 +341,12 @@ DEPENDENCIES
315341
jbuilder
316342
launchy
317343
pg
344+
pry
345+
pry-byebug
346+
pry-doc
347+
pry-rails
348+
pry-rescue
349+
pry-stack_explorer
318350
rails (~> 4.2)
319351
rails-html-sanitizer
320352
rails_12factor

Diff for: lib/tasks/ci.rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ if Rails.env.development?
88

99
task :security_audit do
1010
puts Rainbow("Running security audit on code (brakeman)").green
11-
Rake::Task["brakeman:run"].invoke("tmp/brakeman-report.html")
11+
12+
sh "brakeman --exit-on-warn --quiet -A"
1213
end
1314

1415
namespace :ci do
@@ -29,5 +30,4 @@ if Rails.env.development?
2930
task ci: "ci:all"
3031

3132
task(:default).clear.enhance([:ci])
32-
3333
end

0 commit comments

Comments
 (0)