brakeman-lib 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: 65d7f9da4db99f231e82cb739f928573cbe8f1f8
4
- data.tar.gz: b2d50032e9c74c9557b905e3f5c827430bcddb54
3
+ metadata.gz: a938d977d4606bb89f4b44c38c9aae53e78d0bd7
4
+ data.tar.gz: 433a276f000a6c324ac4ddef16bebdb118f09227
5
5
  SHA512:
6
- metadata.gz: a760782c7a3be6d4db663d17ec654b0ef6212966c0318866320a7e0669e5e9c9bf3cb9d9a3c54d5a98f0951b797c27647cb7b728be65c9fea1eeb2e8fc20618b
7
- data.tar.gz: 9efcb5bbe4e4fd9fd596ce4c4e3093352faee56cfb3183c4b0f996e09aed448bad82558fd05a838f1d3575e4d153a0b11fec323ea74c13b9004ed9f260556254
6
+ metadata.gz: 5bc9977cdb10fd71de60da8d8449abac3944ff14057eccbb60e7ae415333110e7d9fab9f293f44de693c872eae007bac24b58f278c6e795909793453fc85ed50
7
+ data.tar.gz: ccc8093b78af39665e15c2d772bf2f3a37afc192c2c92b82f81f6b17727cae585c123d174b1b7f229fe624b35e53418bdede43456955297a7cbf3e4533cb1f83
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
@@ -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-lib
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