veracode 1.1.6 → 1.1.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
  SHA256:
3
- metadata.gz: 5cd6b5054a777beb3edbe568783105295ef5d2aba60403bc80afee04a53b3348
4
- data.tar.gz: 3c47c2749ce2038a316571e9f529b47ad0f19bdb3dcf45658783ad38e8783cfe
3
+ metadata.gz: 617054a5bf91d760bb14720f72d19a0f58b31928b024c4e72ef4d96f8d53938d
4
+ data.tar.gz: b612aadb4a34c954c3fcf48a975e16595ed8a4588bb1157c0fc56b5ee18bd576
5
5
  SHA512:
6
- metadata.gz: 0240d159fe34cb8516a19b1ec8e5cb0920dd5dcd777606a2dc7ce3553367d925424781f42a99e1a5b65d297a45a16a3196cb35db019673d51c45921e0abbd117
7
- data.tar.gz: ec7c3e0a1d0f3350c6cdd6f10f5c7200469598a05ccee43453ac432082894ea7be8ee203531159045048bfebb383679f5694db38554ee85fbd4753e766cea360
6
+ metadata.gz: 6ffcf2c064b7b07a29e2ade7d9934823ebfacd914a58fcec198beca4c8ed728d2706a41afa1dbad42cc0c3ec45e7bfce94c8367d34cab3ddbf88427bc58aec00
7
+ data.tar.gz: 994c8a3fbc615160bd5896fe501cd15e2f70cf4b8a6f6135bc4e03e4a0bf6315351e1cb2cdde63517f07055ffac7152f231075b8a9a6497b9d9d62161a9dd85a
@@ -25,6 +25,10 @@ module Veracode
25
25
  Schema.new.instance_eval(&block)
26
26
  end
27
27
 
28
+ def self.[](version)
29
+ self
30
+ end
31
+
28
32
  def create_table(name, options={})
29
33
  td = Model.new(name)
30
34
  td.integer('id')
@@ -1,4 +1,4 @@
1
1
  module Veracode
2
- VERSION = '1.1.6'
2
+ VERSION = '1.1.8'
3
3
  ARCHIVE_VERSION = '2020-06-29'
4
4
  end
data/lib/veracode.rb CHANGED
@@ -185,9 +185,8 @@ module Veracode
185
185
  }
186
186
  else
187
187
  Zip.write_zip64_support = true
188
- Zip::File.open(@archive_filename, Zip::File::CREATE) { |zf|
188
+ zipper = -> (zf) {
189
189
  @manifest.each { |file|
190
-
191
190
  if file.start_with?(@archive_dirname)
192
191
  name_in_archive = file.sub(/^#{@archive_dirname + File::SEPARATOR}/,"")
193
192
  else
@@ -198,6 +197,13 @@ module Veracode
198
197
  zf.add(name_in_archive, file)
199
198
  }
200
199
  }
200
+ if defined?(Zip::File::CREATE)
201
+ # rubyzip 2.X
202
+ Zip::File.open(@archive_filename, Zip::File::CREATE) { |zf| zipper.call(zf) }
203
+ else
204
+ #rubyzip 3.X
205
+ Zip::File.open(@archive_filename, create: true) { |zf| zipper.call(zf) }
206
+ end
201
207
  end
202
208
  rescue Exception => e
203
209
  log_error "Unable to create archive #{@manifest_filename}: #{e.message}"
@@ -510,7 +516,17 @@ module Veracode
510
516
 
511
517
  formatted_contents = ""
512
518
 
513
- m.constants($options[:include_inherited]).each do |c_symbol|
519
+ constants_method = m.method(:constants)
520
+ original_constants_method = Module.instance_method(:constants)
521
+
522
+ if constants_method != original_constants_method
523
+ puts " constants method has been overridden, fall back to original method" if $options[:verbose]
524
+ constants = original_constants_method.bind(m).call($options[:include_inherited])
525
+ else
526
+ constants = m.constants($options[:include_inherited])
527
+ end
528
+
529
+ constants.each do |c_symbol|
514
530
  begin
515
531
  c = m.const_get(c_symbol) if m.const_defined? c_symbol
516
532
  formatted_contents += format_constant(c_symbol, c)
@@ -1106,7 +1122,7 @@ end
1106
1122
  log_error e.message
1107
1123
  log_error e.backtrace.join("\n")
1108
1124
  else
1109
- puts "Failed to prepare veracode archive. Please see #{@archive_dirname + '/' + @errorlog_filename}."
1125
+ puts "Failed to prepare veracode archive. Please see #{@errorlog_filename}."
1110
1126
  raise
1111
1127
  end
1112
1128
  end
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.6
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Veracode
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-11 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip