veracode 1.0.0.alpha12 → 1.0.0.alpha15

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
- SHA1:
3
- metadata.gz: 9ffaeba52a85aff23949c824adca1d68314d41c0
4
- data.tar.gz: c6f539d71f08767169996d16fbcd997d04658af7
2
+ SHA256:
3
+ metadata.gz: 5ad985e497f862247d92d07c550cf5e71f30e91d4a4a599937ae3af3c2a56bb0
4
+ data.tar.gz: fbe71f39a1628e58765bba17d847812d6f3250b27f4937f4bc1b492be6ecd64b
5
5
  SHA512:
6
- metadata.gz: f48037a017dba0acf886e1bfdfd6abd4143ece680195568c412fe0344643a62252f9da9da269a1580ced4d663276f9299954a94552bbc6766b832e8e2639758e
7
- data.tar.gz: 2a54b797348504a26cfd322783c64ff8ba639afa75be29794fd96bdb063f997d71a479ca04dc14e07bd7de9261195ac977ca1edc56741244e1c9f1a1b223ec15
6
+ metadata.gz: 377bdd9c7c20e5811aa04b42bed81d94ce8e97a8f33e832cee012b10dac39aadba0b239a757b8b5d03f2ce46b2efb420871ff949f7273e83a9cc6916faa68333
7
+ data.tar.gz: c42fd23e7d02f02d0e3565866aef8e21f0dc0271172f7ad95c35f9754f6897b6ad89666a44f89a6be405b95d16f0a9e95ba681027bdb0f82eda88b83657d012e
data/lib/veracode.rb CHANGED
@@ -443,7 +443,7 @@ module Veracode
443
443
  formatted_contents = ""
444
444
 
445
445
  begin
446
- fomatted_contents += ( m.included_modules.count > 0 ?
446
+ formatted_contents += ( m.included_modules.count > 0 ?
447
447
  m.included_modules.map {|m| "include #{m.inspect.dump}\n" }.join :
448
448
  ""
449
449
  )
@@ -527,33 +527,41 @@ module Veracode
527
527
  end
528
528
 
529
529
  def self.object_contents(o, with_disasm=true)
530
- return "" unless o.is_a? Object
530
+ return "" unless !o.nil? && o.is_a?(Object)
531
531
 
532
532
  puts " object contents" if $options[:verbose]
533
533
 
534
534
  formatted_contents = ""
535
-
536
- if o.respond_to?(:instance_variables) && o.instance_variables.count > 0
537
- o.instance_variables.each do |v_symbol|
538
- begin
539
- v = o.instance_variable_get(v_symbol)
540
- formatted_contents += format_variable(v_symbol, v, "instance")
541
- rescue Exception => e
542
- log_error "Error archiving instance variable #{v_symbol.to_s.dump}: #{e.message}"
543
- formatted_contents += format_variable(v_symbol, :veracode_nil, "instance")
535
+
536
+ begin
537
+ if o.respond_to?(:instance_variables) && o.instance_variables.count > 0
538
+ o.instance_variables.each do |v_symbol|
539
+ begin
540
+ v = o.instance_variable_get(v_symbol)
541
+ formatted_contents += format_variable(v_symbol, v, "instance")
542
+ rescue Exception => e
543
+ log_error "Error archiving instance variable #{v_symbol.to_s.dump}: #{e.message}"
544
+ formatted_contents += format_variable(v_symbol, :veracode_nil, "instance")
545
+ end
544
546
  end
545
547
  end
548
+ rescue Exception => e
549
+ log_error "Error getting :instance_variables for object #{o}: #{e.message}"
546
550
  end
547
551
 
548
- if o.respond_to?(:singleton_methods) && o.singleton_methods($options[:include_inherited]).count > 0
549
- o.singleton_methods($options[:include_inherited]).each do |m_symbol|
550
- begin
551
- m = o.method(m_symbol)
552
- formatted_contents += format_method(m, "singleton", with_disasm)
553
- rescue Exception => e
554
- log_error "Error archiving singleton method #{m_symbol.to_s.dump}: #{e.message}"
552
+ begin
553
+ if o.respond_to?(:singleton_methods) && o.singleton_methods($options[:include_inherited]).count > 0
554
+ o.singleton_methods($options[:include_inherited]).each do |m_symbol|
555
+ begin
556
+ m = o.method(m_symbol)
557
+ formatted_contents += format_method(m, "singleton", with_disasm)
558
+ rescue Exception => e
559
+ log_error "Error archiving singleton method #{m_symbol.to_s.dump}: #{e.message}"
560
+ end
555
561
  end
556
562
  end
563
+ rescue Exception => e
564
+ log_error "Error getting :singleton_methods for object #{o}: #{e.message}"
557
565
  end
558
566
 
559
567
  formatted_contents
@@ -563,13 +571,12 @@ module Veracode
563
571
  ##############################################################################
564
572
  # Archiving Objects
565
573
  def self.archive(objects, with_disasm=true)
566
-
567
574
  objects = objects - [
568
- Veracode,
569
- Veracode::ActiveRecord,
570
- Veracode::ActiveRecord::Model,
571
- Veracode::ActiveRecord::Schema,
572
- ]
575
+ Veracode,
576
+ Veracode::ActiveRecord,
577
+ Veracode::ActiveRecord::Model,
578
+ Veracode::ActiveRecord::Schema,
579
+ ]
573
580
 
574
581
  if $options[:verbose]
575
582
  puts "Archiving #{objects.count.to_s} objects" + (with_disasm ? " with disassembly" : "")
@@ -578,20 +585,16 @@ module Veracode
578
585
 
579
586
  objects.sort_by {|o| safe_name(o) }.each do |o|
580
587
 
581
- puts "archiving #{o.class.to_s.downcase} #{quote(safe_name(o))}" if $options[:verbose]
588
+ puts "archiving #{o.class.to_s.downcase} #{quote(safe_name(o))}" if $options[:verbose]
582
589
 
583
- add_to_archive "#{o.class.to_s.downcase} #{quote(safe_name(o))}\n" +
584
-
585
- ( o.is_a?(Class) ? class_header(o) : "") + # superclass
586
- ( o.is_a?(Module) ? module_header(o) : "") + # included modules
587
-
588
- ( o.is_a?(Object) ? object_contents(o, with_disasm) : "") +
589
- ( o.is_a?(Module) ? module_contents(o, with_disasm) : "") +
590
-
591
- "end#{o.class.to_s.downcase}\n" +
592
- "\n"
590
+ add_to_archive "#{o.class.to_s.downcase} #{quote(safe_name(o))}\n" +
591
+ ( o.is_a?(Class) ? class_header(o) : "") + # superclass
592
+ ( o.is_a?(Module) ? module_header(o) : "") + # included modules
593
+ ( (o.is_a?(Object) && !o.nil?) ? object_contents(o, with_disasm) : "") +
594
+ ( o.is_a?(Module) ? module_contents(o, with_disasm) : "") +
595
+ "end#{o.class.to_s.downcase}\n" +
596
+ "\n"
593
597
  end
594
-
595
598
  end
596
599
 
597
600
 
@@ -955,6 +958,7 @@ end
955
958
  puts "Processing and disassembling #{APP_NAME} classes and modules"
956
959
  archive(@modules - @baseline_modules, true)
957
960
  archive_schema
961
+
958
962
  end
959
963
 
960
964
  ## /phase 3 - require app
@@ -1,4 +1,4 @@
1
1
  module Veracode
2
- VERSION = '1.0.0.alpha12'
2
+ VERSION = '1.0.0.alpha15'
3
3
  ARCHIVE_VERSION = '2012-07-04'
4
4
  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.0.0.alpha12
4
+ version: 1.0.0.alpha15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Veracode
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: 1.3.1
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 2.6.11
58
+ rubygems_version: 2.7.8
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Command line tool for preparing your Ruby on Rails app for submission to