veracodecli 1.0.7 → 1.0.8

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
  SHA1:
3
- metadata.gz: c72518447d9b8ac2f2baa75565f4d0bd2f74a9f5
4
- data.tar.gz: 98e4867893dfe6e4ba3891a481b5b0b81b62a188
3
+ metadata.gz: 13aaf51ec3dd98078195872eab8c378cc29589ff
4
+ data.tar.gz: 68a4ba69ec7b596afef5187120d127c4c01e5dee
5
5
  SHA512:
6
- metadata.gz: 8180371bc854cc530acea334fb9c4ab80cdcd384042d63f63eeefd4927bc23c270b02b1a66dfe006f7a45bcfde467bfd3061aed7c522ea20cbe9099ac271f9ed
7
- data.tar.gz: 72384927ad33f56a3f029827c3d4cb9a3f08aac941c481ef4b707f5a2e0dd3e553a74baab9e3ca3fefee27f0ce5dd92b7b77cd14f2fc627f3c1e7cc2e2e0ef27
6
+ metadata.gz: 1a5824f88c723ecdfde7792a430576b33752540e93688b04cc4f195617d1edbb07cf5734cdbd5c4632dc7858a7ca5b540ac884b9dcef3bcc499c4384c813e8bd
7
+ data.tar.gz: f9f86ac0c46e269daea6bcd8bf6804862d678162254f18dd92383dcb27be484ebf974d49a1f587bda576434c3e2ced12eb6f5afaa5d70c4a6304ecc2e093c646
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.8
@@ -10,7 +10,7 @@ module VeracodeApiBase
10
10
  begin
11
11
  response = RestClient.post "https://#{Settings.veracode_username}:#{Settings.veracode_password}@analysiscenter.veracode.com/api/#{api_version}/#{api_call}", { params: params }
12
12
  log = ResponseLogger.new "/home/#{ENV['USER']/veracodecli_data}"
13
- log.log api_call, response.body
13
+ log.log api_call, response.code, response.body
14
14
  rescue
15
15
  abort '401: Unauthorized. Veracode API call Failed, please check your veracode credentials or whitelisted IPs'
16
16
  end
@@ -45,7 +45,12 @@ module VeracodeApiScan
45
45
 
46
46
  def create_app_profile(app_name, business_criticality, business_unit, team)
47
47
  create_app_response = veracode_api_request 'createapp.do', app_name: app_name, business_criticality: business_criticality, business_unit: business_unit, teams: team
48
- create_app_response.body.scan(/app_id=\"(.+)\" app_name=\"#{app_name}\"/)[0][0]
48
+ app_id = create_app_response.body.scan(/app_id=\"(.+)\" app_name=\"#{app_name}\"/)
49
+ if app_id.emtpy?
50
+ fail 'createapp failed. Make sure you have supplied the correct parameters.'
51
+ else
52
+ app_id[0][0]
53
+ end
49
54
  end
50
55
 
51
56
  def upload_file(app_id, archive_path)
@@ -6,9 +6,10 @@ class ResponseLogger
6
6
  @path = log_path
7
7
  end
8
8
 
9
- def log(call, response)
9
+ def log(call, code, response)
10
10
  log = File.open "#{@path}/veracodecli.log", 'a+'
11
11
  log.write "#{call} called @ #{timestamp}"
12
+ log.write "HTTP #{code}"
12
13
  log.write response
13
14
  log.write "\n"
14
15
  log.close
data/veracodecli.gemspec CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "veracodecli"
9
- s.version = "1.0.7"
9
+ s.version = "1.0.8"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veracodecli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - isaiah thiessen