diff --git a/Gemfile b/Gemfile index 292fbb9..72e8342 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,17 @@ -source :rubygems +source 'https://rubygems.org' -gem 'puppetlabs_spec_helper' -gem 'rspec-expectations', "2.11.3" -gem 'mocha', "0.10.5" +group :development, :test do + gem 'rake', :require => false + gem 'rspec-puppet', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'simplecov', :require => false + gem 'pry', :require => false +end if puppetversion = ENV['PUPPET_GEM_VERSION'] gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false end # vim:ft=ruby diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..cd3d379 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/lib/puppet/util/ini_file.rb b/lib/puppet/util/ini_file.rb index f7ed5eb..53bed2d 100644 --- a/lib/puppet/util/ini_file.rb +++ b/lib/puppet/util/ini_file.rb @@ -6,7 +6,7 @@ module Util class IniFile @@SECTION_REGEX = /^\s*\[([\w\d\.\\\/\-\:]+)\]\s*$/ - @@SETTING_REGEX = /^(\s*)([\w\d\.\\\/\-]+)([ \t]*=[ \t]*)([\S\s]*?)\s*$/ + @@SETTING_REGEX = /^(\s*)([\w\d\.\\\/\-\s]*[\w\d\.\\\/\-])([ \t]*=[ \t]*)([\S\s]*?)\s*$/ @@COMMENTED_SETTING_REGEX = /^(\s*)[#;]+(\s*)([\w\d\.\\\/\-]+)([ \t]*=[ \t]*)([\S\s]*?)\s*$/ def initialize(path, key_val_separator = ' = ')