diff --git a/lib/veracode/api/builds.rb b/lib/veracode/api/builds.rb index af956a1..5fc2ef8 100644 --- a/lib/veracode/api/builds.rb +++ b/lib/veracode/api/builds.rb @@ -1,15 +1,15 @@ require 'veracode/api/types' -module Veracode +module Veracode module Result - module Builds - class AnalysisUnit < Veracode::Common::Base + module Builds + class AnalysisUnit < Veracode::Common::Base api_field :analysis_type, :tag => :analysis_type api_field :status, :tag => :status api_field :published_date, :tag => :published_date end - - class Build < Veracode::Common::Base + + class Build < Veracode::Common::Base api_field :version, :tag => :version api_field :build_id, :tag => :build_id api_field :submitter, :tag => :submitter @@ -19,19 +19,19 @@ class Build < Veracode::Common::Base api_field :policy_version, :tag => :policy_version api_field :policy_compliance_status, :tag => :policy_compliance_status api_field :rules_status, :tag => :rules_status - + def grace_period_expired? @grace_period_expired ||= @xml_hash.grace_period_expired.to_bool end - + def scan_overdue? @scan_overdue ||= @xml_hash.scan_overdue.to_bool end - + def results_ready? @results_ready ||= @xml_hash.results_ready.to_bool end - + def analysis_units @analysis_units ||= [] if @analysis_units.empty? @@ -75,7 +75,7 @@ def custom_fields def cots? @cots ||= @xml_hash.cots.to_bool end - + def builds @builds ||= if @xml_hash.include?('build') @@ -91,7 +91,7 @@ def builds end end end - + class Applications < Veracode::Common::Base def applications @applications ||= [] @@ -102,7 +102,7 @@ def applications end end end - + end end end