veracode 1.1.8 → 1.1.9.alpha0

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: 617054a5bf91d760bb14720f72d19a0f58b31928b024c4e72ef4d96f8d53938d
4
- data.tar.gz: b612aadb4a34c954c3fcf48a975e16595ed8a4588bb1157c0fc56b5ee18bd576
3
+ metadata.gz: 213efcb58cc5c61f9476882ecdaabb2f95d8eed806b2c5664770dc5667216f89
4
+ data.tar.gz: 41a5b4401ea1b0b6a57444eefb491db821711e0d1cd39b29996ede780c2097ef
5
5
  SHA512:
6
- metadata.gz: 6ffcf2c064b7b07a29e2ade7d9934823ebfacd914a58fcec198beca4c8ed728d2706a41afa1dbad42cc0c3ec45e7bfce94c8367d34cab3ddbf88427bc58aec00
7
- data.tar.gz: 994c8a3fbc615160bd5896fe501cd15e2f70cf4b8a6f6135bc4e03e4a0bf6315351e1cb2cdde63517f07055ffac7152f231075b8a9a6497b9d9d62161a9dd85a
6
+ metadata.gz: 9904a88687218ec9f377db858f9cb8ba6662c5fca92288b1ba43882116e1acc02fbe9db2310de121cb8719545eb81c563cf114710eeb6da94ef669d6bf23bf8f
7
+ data.tar.gz: 761fc4e7da59427d09384a6238eb2924436f173f2f4fa90396b2e55033af1d1a60437255a9b1c513a00854438169db99eb46eccc57dcd656d5d11e1fa5d50720
@@ -1,4 +1,4 @@
1
1
  module Veracode
2
- VERSION = '1.1.8'
2
+ VERSION = '1.1.9.alpha0'
3
3
  ARCHIVE_VERSION = '2020-06-29'
4
4
  end
data/lib/veracode.rb CHANGED
@@ -38,6 +38,8 @@ module Veracode
38
38
 
39
39
  @expanded_app_dir = Dir.getwd
40
40
 
41
+ @app_patterns = ["lib/**/*.rb", "app/**/*.rb"]
42
+
41
43
  def self.init
42
44
  if Gem::Dependency.new('', '~> 2.2.0').match?('', RUBY_VERSION.dup)
43
45
  $stderr.puts "Ruby 2.2 is not supported, please consult the compilation guide for all supported Ruby versions"
@@ -244,6 +246,25 @@ module Veracode
244
246
 
245
247
  def self.rebaseline
246
248
  self.baseline
249
+
250
+ # Modules for the application files should never be in the baseline modules when rebaselining
251
+ if Module.respond_to? :const_source_location
252
+ app_files = @app_patterns.each_with_object(Set.new) do |p, s|
253
+ s.merge(Dir.glob(p).collect { |f| File.expand_path f } )
254
+ end
255
+ @baseline_modules.reject! do |m|
256
+ ret = false
257
+ begin
258
+ mn = m.name
259
+ unless mn.nil?
260
+ csl = Module.const_source_location(mn.to_sym)
261
+ ret = !csl[0].nil? && app_files.include?(csl[0])
262
+ end
263
+ rescue
264
+ end
265
+ ret
266
+ end
267
+ end
247
268
  end
248
269
 
249
270
  def self.update
@@ -1071,8 +1092,7 @@ end
1071
1092
  any_new = true
1072
1093
  while any_new
1073
1094
  any_new = false
1074
- any_new |= glob_require "lib/**/*.rb"
1075
- any_new |= glob_require "app/**/*.rb"
1095
+ @app_patterns.each { |p| any_new |= glob_require p }
1076
1096
  puts "new successful requires? #{any_new.to_s}" if $options[:verbose]
1077
1097
  end
1078
1098
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veracode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9.alpha0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Veracode
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-22 00:00:00.000000000 Z
11
+ date: 2025-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -50,9 +50,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
50
  version: 1.9.3.0
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - ">"
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: 1.3.1
56
56
  requirements: []
57
57
  rubygems_version: 3.1.6
58
58
  signing_key: