brakeman-lib 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +5 -0
- data/lib/brakeman.rb +7 -3
- data/lib/brakeman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a938d977d4606bb89f4b44c38c9aae53e78d0bd7
|
4
|
+
data.tar.gz: 433a276f000a6c324ac4ddef16bebdb118f09227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bc9977cdb10fd71de60da8d8449abac3944ff14057eccbb60e7ae415333110e7d9fab9f293f44de693c872eae007bac24b58f278c6e795909793453fc85ed50
|
7
|
+
data.tar.gz: ccc8093b78af39665e15c2d772bf2f3a37afc192c2c92b82f81f6b17727cae585c123d174b1b7f229fe624b35e53418bdede43456955297a7cbf3e4533cb1f83
|
data/CHANGES
CHANGED
data/lib/brakeman.rb
CHANGED
@@ -408,7 +408,11 @@ module Brakeman
|
|
408
408
|
private_class_method :write_report_to_formats
|
409
409
|
|
410
410
|
def self.page_output text
|
411
|
-
|
411
|
+
ci = ENV["CI"]
|
412
|
+
|
413
|
+
if ci.is_a? String and ci.downcase == "true"
|
414
|
+
puts text
|
415
|
+
elsif system("which less")
|
412
416
|
# Adapted from https://github.com/piotrmurach/tty-pager/
|
413
417
|
write_io = open("|less -R", 'w')
|
414
418
|
pid = write_io.pid
|
@@ -421,7 +425,7 @@ module Brakeman
|
|
421
425
|
load_brakeman_dependency 'highline'
|
422
426
|
h = ::HighLine.new
|
423
427
|
h.page_at = :auto
|
424
|
-
h.say
|
428
|
+
h.say text
|
425
429
|
end
|
426
430
|
rescue Errno::ECHILD
|
427
431
|
# on jruby 9x waiting on pid raises (per tty-pager)
|
@@ -429,7 +433,7 @@ module Brakeman
|
|
429
433
|
rescue => e
|
430
434
|
warn "[Error] #{e}"
|
431
435
|
warn "[Error] Could not use pager. Set --no-pager to avoid this issue."
|
432
|
-
puts
|
436
|
+
puts text
|
433
437
|
end
|
434
438
|
|
435
439
|
#Rescan a subset of files in a Rails application.
|
data/lib/brakeman/version.rb
CHANGED