gems-validator 0.4.3 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab34a7d9ea4625c880476c97fd355b40d254f29ed6d9750db1f4564cd1ed8b8b
4
- data.tar.gz: 53e50ad4df15efb914a787fb8307810918b112ff96986123c81b00cfbc7ce257
3
+ metadata.gz: bfd35451ef8cb25ffdb401f920012fdc857b5c378c38d96a0272a3817cd10c45
4
+ data.tar.gz: cee5beec7c38bef5a379955591e33e209768302c3c096994f9c7288f2e463e7c
5
5
  SHA512:
6
- metadata.gz: d724ced1423b2deb614f000997789efda0a2cfb7167b59e5fa74e0f22afd2826eff62e3822c7eaf61cc4b2e5ea04ffb95fd5e136b56f4b5ebcc97ffb970fc6aa
7
- data.tar.gz: f8f354bfd8a7976258b878adec62ef7a4815b1ed50a5a052f52f679aae624cf66db04b89c26d374e4fcc685ccfbcdf76f23cbb96474ab3fe43eb42d5040ab7f2
6
+ metadata.gz: 2c7595d8c25136edb0d1f20228144283be27417c5b432ea65cc10d17a2a845f73944b2ce10d51b960479e3dad481f1cd00a06a07f730c5a0cbeaad3890a9783d
7
+ data.tar.gz: 7293be71c2c38410fcfb59e94b037f67210db6424286b83d106ef24833b4dd35e01aa1ecb97692af4ee1eb082dc0a1152350fa245f139b8a5e69fb95b96bbdaa
@@ -3,7 +3,8 @@
3
3
  module GemsValidator
4
4
  class AuditService
5
5
  def initialize()
6
- system 'bundler-audit check --format json --output bundler-audit.json'
6
+ @pwd = Dir.pwd
7
+ system "bundler-audit check --format json --output #{@pwd}/bundler-audit.json"
7
8
  @read_file = read_parsed_file
8
9
  end
9
10
 
@@ -18,15 +19,15 @@ module GemsValidator
18
19
  return Bundler.ui.confirm "[GemsValidator::Success] - A gem não apresenta nenhum vulnerabilidade!"
19
20
  end
20
21
 
21
- Bundler.ui.warn "[GemsValidator::Error] - A gem #{gem_vulnerabilities[0]["gem"]["name"]} na versao #{gem_vulnerabilities[0]["gem"]["version"]} apresenta #{gem_vulnerabilities.size} vulnerabilidade#{gem_vulnerabilities.size ? "s" : ""}"
22
+ Bundler.ui.warn "[GemsValidator::Warning] - A gem #{gem_vulnerabilities[0]["gem"]["name"]} na versao #{gem_vulnerabilities[0]["gem"]["version"]} apresenta #{gem_vulnerabilities.size} vulnerabilidade#{gem_vulnerabilities.size ? "s" : ""}"
22
23
 
23
24
  gem_vulnerabilities.map.with_index do |vulnerability, number|
24
- Bundler.ui.error "#{number+1} -> #{vulnerability["advisory"]["title"]} \n Nivel: #{vulnerability["advisory"]["criticality"]} \n URL da issue: #{vulnerability["advisory"]["url"]}"
25
+ Bundler.ui.warn "#{number+1} -> #{vulnerability["advisory"]["title"]} \n Nivel: #{vulnerability["advisory"]["criticality"]} \n URL da issue: #{vulnerability["advisory"]["url"]}"
25
26
  end
26
27
  end
27
28
 
28
29
  def read_parsed_file
29
- file = File.read('bundler-audit.json')
30
+ file = File.read("#{@pwd}/bundler-audit.json")
30
31
  parsed_file = JSON.parse(file)
31
32
  end
32
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GemsValidator
4
- VERSION = "0.4.3"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gems-validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - henriquesml