~nvalcarcel/ubuntu/lucid/puppet/fix-546677

« back to all changes in this revision

Viewing changes to lib/puppet/util/fileparsing.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
                fields = []
170
170
                ret = {}
171
171
                record.fields.zip(match.captures).each do |field, value|
172
 
                    if value == record.absent 
 
172
                    if value == record.absent
173
173
                        ret[field] = :absent
174
174
                    else
175
175
                        ret[field] = value
223
223
    # Split text into separate lines using the record separator.
224
224
    def lines(text)
225
225
        # Remove any trailing separators, and then split based on them
226
 
        # LAK:NOTE See http://snurl.com/21zf8  [groups_google_com] 
 
226
        # LAK:NOTE See http://snurl.com/21zf8  [groups_google_com]
227
227
        x = text.sub(/#{self.line_separator}\Q/,'').split(self.line_separator)
228
228
    end
229
229
 
332
332
        end
333
333
 
334
334
        case record.type
335
 
        when :text: return details[:line]
 
335
        when :text; return details[:line]
336
336
        else
337
337
            if record.respond_to?(:to_line)
338
338
                return record.to_line(details)