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 +5 -5
 - data/lib/veracode.rb +40 -36
 - data/lib/veracode/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5ad985e497f862247d92d07c550cf5e71f30e91d4a4a599937ae3af3c2a56bb0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: fbe71f39a1628e58765bba17d847812d6f3250b27f4937f4bc1b492be6ecd64b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
    
         
            -
                   
     | 
| 
      
 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? 
     | 
| 
      
 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 
     | 
    
         
            -
                 
     | 
| 
       537 
     | 
    
         
            -
                  o.instance_variables. 
     | 
| 
       538 
     | 
    
         
            -
                     
     | 
| 
       539 
     | 
    
         
            -
                       
     | 
| 
       540 
     | 
    
         
            -
             
     | 
| 
       541 
     | 
    
         
            -
             
     | 
| 
       542 
     | 
    
         
            -
                       
     | 
| 
       543 
     | 
    
         
            -
             
     | 
| 
      
 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 
     | 
    
         
            -
                 
     | 
| 
       549 
     | 
    
         
            -
                  o.singleton_methods($options[:include_inherited]). 
     | 
| 
       550 
     | 
    
         
            -
                     
     | 
| 
       551 
     | 
    
         
            -
                       
     | 
| 
       552 
     | 
    
         
            -
             
     | 
| 
       553 
     | 
    
         
            -
             
     | 
| 
       554 
     | 
    
         
            -
                       
     | 
| 
      
 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 
     | 
    
         
            -
             
     | 
| 
       569 
     | 
    
         
            -
             
     | 
| 
       570 
     | 
    
         
            -
             
     | 
| 
       571 
     | 
    
         
            -
             
     | 
| 
       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 
     | 
    
         
            -
             
     | 
| 
      
 588 
     | 
    
         
            +
                puts "archiving #{o.class.to_s.downcase} #{quote(safe_name(o))}" if $options[:verbose]
         
     | 
| 
       582 
589 
     | 
    
         | 
| 
       583 
     | 
    
         
            -
             
     | 
| 
       584 
     | 
    
         
            -
             
     | 
| 
       585 
     | 
    
         
            -
             
     | 
| 
       586 
     | 
    
         
            -
             
     | 
| 
       587 
     | 
    
         
            -
             
     | 
| 
       588 
     | 
    
         
            -
             
     | 
| 
       589 
     | 
    
         
            -
             
     | 
| 
       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
         
     | 
    
        data/lib/veracode/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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:  
     | 
| 
      
 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. 
     | 
| 
      
 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
         
     |