Class: EY::Serverside::LockfileParser::Parse106
- Inherits:
-
Parse10
- Object
- BaseParser
- Parse09
- Parse10
- EY::Serverside::LockfileParser::Parse106
- Defined in:
- lib/engineyard-serverside/lockfile_parser.rb
Constant Summary
Constants inherited from Parse10
EY::Serverside::LockfileParser::Parse10::DEFAULT
Constants inherited from Parse09
EY::Serverside::LockfileParser::Parse09::DEFAULT
Instance Method Summary collapse
Methods inherited from Parse10
Methods inherited from Parse09
Methods inherited from BaseParser
Constructor Details
This class inherits a constructor from EY::Serverside::LockfileParser::BaseParser
Instance Method Details
#parse ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/engineyard-serverside/lockfile_parser.rb', line 101 def parse unless @contents.index(/^METADATA/) return super end = "" = false @contents.each_line do |line| if line =~ /^METADATA/ = true elsif line =~ /^\S/ = false elsif << line end end unless .length > 0 raise "Couldn't parse #{@contents}; exiting" exit(1) end result = .scan(/^\s*version:\s*(.*)$/).first bundler_version = result ? result.first : DEFAULT [:bundler10, bundler_version] end |