Module: Contrast::Api::Decorators::ApplicationUpdate
- Includes:
- Components::Interface
- Included in:
- Contrast::Api::Dtm::ApplicationUpdate
- Defined in:
- lib/contrast/api/decorators/application_update.rb
Overview
Used to decorate the Contrast::Api::Dtm::ApplicationUpdate protobuf model so it can own some of the data massaging required for AppUpdate dtm.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #append_library_update(library_dtm_list) ⇒ Object
- #append_platform_version(platform_version) ⇒ Object
-
#append_route_coverage_data(route_coverage_dtms) ⇒ Object
TS only allows you to report 500 routes per application.
Class Method Details
.included(klass) ⇒ Object
17 18 19 |
# File 'lib/contrast/api/decorators/application_update.rb', line 17 def self.included klass klass.extend(ClassMethods) end |
Instance Method Details
#append_library_update(library_dtm_list) ⇒ Object
21 22 23 24 25 |
# File 'lib/contrast/api/decorators/application_update.rb', line 21 def append_library_update library_dtm_list library_dtm_list.each do |library_dtm| libraries[library_dtm.hash_code] = library_dtm end end |
#append_platform_version(platform_version) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/contrast/api/decorators/application_update.rb', line 34 def append_platform_version platform_version self.platform = Contrast::Api::Dtm::Platform.new if platform.nil? platform.major = platform_version.major platform.minor = platform_version.minor platform.build = platform_version.patch end |
#append_route_coverage_data(route_coverage_dtms) ⇒ Object
TS only allows you to report 500 routes per application
28 29 30 31 32 |
# File 'lib/contrast/api/decorators/application_update.rb', line 28 def append_route_coverage_data route_coverage_dtms route_coverage_dtms.take(500).each do |route_coverage_dtm| routes << route_coverage_dtm end end |