Class: EY::Serverside::LockfileParser::Parse106
- Inherits:
-
Parse10
- Object
- BaseParser
- Parse09
- Parse10
- EY::Serverside::LockfileParser::Parse106
- Defined in:
- lib/engineyard-serverside/lockfile_parser.rb
Instance Method Summary collapse
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
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/engineyard-serverside/lockfile_parser.rb', line 74 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 : nil [:bundler10, bundler_version] end |