brakeman-min 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6da0818252caeb9fcafb77f9d0ed792d68d916e1
4
- data.tar.gz: ffa5242a910ffdd4ad3165a968621192917f6e65
3
+ metadata.gz: 730e9fa0a5a00feba7a5c64d6cdb6e5eabc914da
4
+ data.tar.gz: 1b75b40d02c13de9191aa9a5f6643d2609ec3a78
5
5
  SHA512:
6
- metadata.gz: 17475a7bc6c647f7a017bcb9553da54dff68841e3e4a643942e438a1789894181fb9486330fe183aadf720acdd993e9b2e23012d06287b6a5106a30ea0959981
7
- data.tar.gz: f8ef2192d20f49d9c2f379b31af16589e0fdcf83e9ed9d29005080121b9dc6c773c6b3ba4581225df534694fac170283b517b12bf2909fd1b3fb8648f44eb276
6
+ metadata.gz: 9d35409bcb12d0790b5b8cbb0ba90137caff38bcd7d0bfebca7cd039e2964197e4422b77be305eaa8daaf10ef8b22b9c675c55b24c8f75ebc8f70f31f3ec187b
7
+ data.tar.gz: 4bdd9e7f614bde8928b4d3722d6f49e40136db09bcdfb247a9a2ea9642cc04f2f10a3e1b247c85b9d8ad0826f6982037c3ba4fe5703a5eab26c515bd66139c0b
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ # 4.0.1
2
+
3
+ * Disable pager when `CI` environment variable is set
4
+ * Fix output when pager fails
5
+
1
6
  # 4.0.0
2
7
 
3
8
  * Add simple pager for reports output to terminal
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
- if system("which less")
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 tracker.report.format(output_formats.first)
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 tracker.report.format(output_formats.first)
436
+ puts text
433
437
  end
434
438
 
435
439
  #Rescan a subset of files in a Rails application.
@@ -1,3 +1,3 @@
1
1
  module Brakeman
2
- Version = "4.0.0"
2
+ Version = "4.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brakeman-min
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Collins