I'm a bit lost as to what we're actually doing - I seem to be losing the thread between recommended and potential solutions.
Care to enlighten me on the overall state here, again? On Sep 29, 2009, at 7:34 AM, Markus Roberts wrote: > +0 From me, and I wrote it. > > Teyo and I have been discussing the extent to which the bundle-json > path to a solution has grown from a bug fix to a refactoring, and I > threw this out as an alternative (and minimalistic) approach for > 0.25.1. We can "fix" the problem by adding essentially one line of > code (note that the infrastructure is already in place and has been > all along) and a wee bit of nose holding. > > For the record, we've been testing and working with the bundled-json > version, this was just to make concrete the existence of an > alternative.. > > On Mon, Sep 28, 2009 at 11:48 PM, Luke Kanies <[email protected]> > wrote: > > Holy freaking horribleness. > > I can only trust you on this one; I'm not willing to say I like it. > If you say this is what we should use... > > On Sep 28, 2009, at 11:39 AM, Markus Roberts wrote: > > > > > This reduces the cases of #2615 to the level that were present in > > 0.24.x by removing the optional (and problematic) domain-boundary > > "\n"s in the generated yaml. This means the only times serialized > > text values should pick up an additional trailing "\n" is if they > > contain two or more trailing "\n" to start with and either occur > > at the very end of the stream or directly before a Regex or DateTime > > used as a Hash key (i.e. we should almost never see it). > > > > Signed-off-by: Markus Roberts <[email protected]> > > --- > > lib/puppet/network/formats.rb | 5 +++-- > > 1 files changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/lib/puppet/network/formats.rb b/lib/puppet/network/ > > formats.rb > > index 3a19b0b..ef0d9f7 100644 > > --- a/lib/puppet/network/formats.rb > > +++ b/lib/puppet/network/formats.rb > > @@ -34,8 +34,9 @@ Puppet::Network::FormatHandler.create(:yaml, :mime > > => "text/yaml") do > > # fixup invalid yaml as per: > > # http://redmine.ruby-lang.org/issues/show/1331 > > def fixup(yaml) > > - yaml.gsub!(/((?:&id\d+\s+)?!ruby\/object:.*?)\s*\?/) { "? > > #{$1}" } > > - yaml > > + yaml. > > + gsub(/((?:&id\d+\s+)?!ruby\/object:.*?)\s*\?/) { "? > > #{$1}" }. > > + gsub(/\n?(\n\s*)\? (!ruby\/sym\s+.+)\n\s*:/) > > { "#{$1}#{$2}:" } > > end > > end > > > > -- > > 1.6.4 > > > > > > > > > > -- > A conservative is a man who believes that nothing should be done for > the first time. --Alfred E. Wiggam > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > > > > -- A child can go only so far in life without potty training. It is not mere coincidence that six of the last seven presidents were potty trained, not to mention nearly half of the nation's state legislators. -- Dave Barry --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
