Class: ITunes::Store::Transporter::OutputParser
- Inherits:
-
Object
- Object
- ITunes::Store::Transporter::OutputParser
- Defined in:
- lib/itunes/store/transporter/output_parser.rb
Constant Summary collapse
- ERROR_LINE =
/>\s+ERROR:\s+(.+)/
- WARNING_LINE =
/>\s+WARN:\s+(.+)/
- SKIP_ERRORS =
Generic messages we want to ignore.
[ /\boperation was not successful/i, /\bunable to verify the package/i, /\bwill NOT be verified/, /^an error has occurred/i, /^an error occurred while/i, /^unknown operation/i, /\bunable to authenticate the package/i ]
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
This class extracts error and warning messages output by
iTMSTransporter
. -
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(output) ⇒ OutputParser
constructor
Arguments.
Constructor Details
#initialize(output) ⇒ OutputParser
Arguments
- output (Array)
-
iTMSTransporter
output
33 34 35 36 37 |
# File 'lib/itunes/store/transporter/output_parser.rb', line 33 def initialize(output) @errors = [] @warnings = [] parse_output(output) if Array === output end |
Instance Attribute Details
#errors ⇒ Object (readonly)
This class extracts error and warning messages output by iTMSTransporter
. For each message is creates an instance of ITunes::Store::Transporter::TransporterMessage
13 14 15 |
# File 'lib/itunes/store/transporter/output_parser.rb', line 13 def errors @errors end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
14 15 16 |
# File 'lib/itunes/store/transporter/output_parser.rb', line 14 def warnings @warnings end |