diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-15 05:48:43 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-15 05:48:43 +0000 |
| commit | 39aaa9910f8bc5a120f35233d6dda0b06150747b (patch) | |
| tree | 66029bd2f6805d6089c18851b1886a01bd06e385 /lib | |
| parent | 6c6ff03155101cebbd4ba76ce09cc23adf45f9f7 (diff) | |
| download | puppet-39aaa9910f8bc5a120f35233d6dda0b06150747b.tar.gz puppet-39aaa9910f8bc5a120f35233d6dda0b06150747b.tar.xz puppet-39aaa9910f8bc5a120f35233d6dda0b06150747b.zip | |
fixing some tests
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@667 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/parser/grammar.ra | 4 | ||||
| -rw-r--r-- | lib/puppet/parser/parser.rb | 34 | ||||
| -rw-r--r-- | lib/puppet/type/pfile.rb | 4 | ||||
| -rwxr-xr-x | lib/puppet/type/user.rb | 24 |
4 files changed, 29 insertions, 37 deletions
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index c9e79422e..f4f142132 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -408,12 +408,8 @@ import: IMPORT QTEXT { if dir == "" dir = "." end - Puppet.notice "Orig: %s" % @lexer.file.inspect - Puppet.notice "Dir: %s" % dir.inspect Dir.chdir(dir) { - Puppet.notice "Globbing %s" % val[1] Dir.glob(val[1]).each { |file| - Puppet.notice "File: %s" % file.inspect parser = Puppet::Parser::Parser.new() parser.stack = self.stack Puppet.debug("importing '%s'" % file) diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb index a23c95d95..ccfd1ed0b 100644 --- a/lib/puppet/parser/parser.rb +++ b/lib/puppet/parser/parser.rb @@ -31,7 +31,7 @@ module Puppet class Parser < Racc::Parser -module_eval <<'..end grammar.ra modeval..ide594950ab5', 'grammar.ra', 572 +module_eval <<'..end grammar.ra modeval..id37b4503337', 'grammar.ra', 568 attr_writer :stack attr_reader :file @@ -135,7 +135,7 @@ end def string=(string) @lexer.string = string end -..end grammar.ra modeval..ide594950ab5 +..end grammar.ra modeval..id37b4503337 ##### racc 1.4.4 generates ### @@ -1005,7 +1005,7 @@ module_eval <<'.,.,', 'grammar.ra', 399 # reduce 60 omitted -module_eval <<'.,.,', 'grammar.ra', 436 +module_eval <<'.,.,', 'grammar.ra', 432 def _reduce_61( val, _values, result ) # importing files # yuk, i hate keywords @@ -1015,12 +1015,8 @@ module_eval <<'.,.,', 'grammar.ra', 436 if dir == "" dir = "." end - Puppet.notice "Orig: %s" % @lexer.file.inspect - Puppet.notice "Dir: %s" % dir.inspect Dir.chdir(dir) { - Puppet.notice "Globbing %s" % val[1] Dir.glob(val[1]).each { |file| - Puppet.notice "File: %s" % file.inspect parser = Puppet::Parser::Parser.new() parser.stack = self.stack Puppet.debug("importing '%s'" % file) @@ -1044,7 +1040,7 @@ module_eval <<'.,.,', 'grammar.ra', 436 end .,., -module_eval <<'.,.,', 'grammar.ra', 446 +module_eval <<'.,.,', 'grammar.ra', 442 def _reduce_62( val, _values, result ) result = AST::CompDef.new( :name => AST::Name.new(:value => val[1], :line => @lexer.line), @@ -1057,7 +1053,7 @@ module_eval <<'.,.,', 'grammar.ra', 446 end .,., -module_eval <<'.,.,', 'grammar.ra', 457 +module_eval <<'.,.,', 'grammar.ra', 453 def _reduce_63( val, _values, result ) result = AST::ClassDef.new( :name => AST::Name.new(:value => val[1], :line => @lexer.line), @@ -1071,7 +1067,7 @@ module_eval <<'.,.,', 'grammar.ra', 457 end .,., -module_eval <<'.,.,', 'grammar.ra', 472 +module_eval <<'.,.,', 'grammar.ra', 468 def _reduce_64( val, _values, result ) result = AST::ASTArray.new( :line => @lexer.line, @@ -1084,14 +1080,14 @@ module_eval <<'.,.,', 'grammar.ra', 472 # reduce 65 omitted -module_eval <<'.,.,', 'grammar.ra', 477 +module_eval <<'.,.,', 'grammar.ra', 473 def _reduce_66( val, _values, result ) result = val[1] result end .,., -module_eval <<'.,.,', 'grammar.ra', 488 +module_eval <<'.,.,', 'grammar.ra', 484 def _reduce_67( val, _values, result ) if val[1].is_a?(AST::ASTArray) result = val[1] @@ -1108,7 +1104,7 @@ module_eval <<'.,.,', 'grammar.ra', 488 # reduce 68 omitted -module_eval <<'.,.,', 'grammar.ra', 502 +module_eval <<'.,.,', 'grammar.ra', 498 def _reduce_69( val, _values, result ) if val[0].is_a?(AST::ASTArray) val[0].push(val[2]) @@ -1124,7 +1120,7 @@ module_eval <<'.,.,', 'grammar.ra', 502 end .,., -module_eval <<'.,.,', 'grammar.ra', 510 +module_eval <<'.,.,', 'grammar.ra', 506 def _reduce_70( val, _values, result ) result = AST::ASTArray.new( :line => @lexer.line, @@ -1135,7 +1131,7 @@ module_eval <<'.,.,', 'grammar.ra', 510 end .,., -module_eval <<'.,.,', 'grammar.ra', 517 +module_eval <<'.,.,', 'grammar.ra', 513 def _reduce_71( val, _values, result ) result = AST::ASTArray.new( :line => @lexer.line, @@ -1148,7 +1144,7 @@ module_eval <<'.,.,', 'grammar.ra', 517 # reduce 72 omitted -module_eval <<'.,.,', 'grammar.ra', 526 +module_eval <<'.,.,', 'grammar.ra', 522 def _reduce_73( val, _values, result ) result = AST::Name.new( :value => val[1], @@ -1159,7 +1155,7 @@ module_eval <<'.,.,', 'grammar.ra', 526 end .,., -module_eval <<'.,.,', 'grammar.ra', 535 +module_eval <<'.,.,', 'grammar.ra', 531 def _reduce_74( val, _values, result ) name = val[0].sub(/^\$/,'') result = AST::Variable.new( @@ -1171,7 +1167,7 @@ module_eval <<'.,.,', 'grammar.ra', 535 end .,., -module_eval <<'.,.,', 'grammar.ra', 544 +module_eval <<'.,.,', 'grammar.ra', 540 def _reduce_75( val, _values, result ) if val[1].is_a?(AST::ASTArray) result = val[1] @@ -1189,7 +1185,7 @@ module_eval <<'.,.,', 'grammar.ra', 544 # reduce 78 omitted -module_eval <<'.,.,', 'grammar.ra', 549 +module_eval <<'.,.,', 'grammar.ra', 545 def _reduce_79( val, _values, result ) result = nil result diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 8594681f4..659889c06 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -120,9 +120,9 @@ module Puppet raise error end rescue => detail - error = Puppet::Error.new "Could not create %s: %s" % + raise Puppet::Error.new("Could not create %s: %s" % [@should, detail] - raise error + ) end return event end diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index fb3a2966e..15c6a3d03 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -212,18 +212,18 @@ module Puppet # all of the states are very similar, but syncing is different # for each _type_ of state @states.each { |state| - begin - klass = eval("Puppet::State::UserState" + @@extender) - if klass.test - state.send(:include, klass) - else - Puppet.err "Cannot sync %s on %s" % - [state.name, @name] - end - rescue NameError - Puppet.notice "No %s extender for %s" % - [@@extender, state.name] - end +# begin +# klass = eval("Puppet::State::UserState" + @@extender) +# if klass.test +# state.send(:include, klass) +# else +# Puppet.err "Cannot sync %s on %s" % +# [state.name, @name] +# end +# rescue NameError +# Puppet.notice "No %s extender for %s" % +# [@@extender, state.name] +# end } @paramdoc[:name] = "User name. While limitations are determined for |
