On Tue, Aug 23, 2011 at 05:47:07PM -0400, David Kavanagh wrote:
> yes, That's actually does. I wasn't finding much to read about this.
>
> David
Maybe http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html#UN
-Stefan
pgppZP1OBsrlU.pgp
Description: PGP signature
yes, That's actually does. I wasn't finding much to read about this.
David
On Tue, Aug 23, 2011 at 5:12 PM, Stefan Schulte
wrote:
> On Tue, Aug 23, 2011 at 04:27:30PM -0400, David Kavanagh wrote:
>> I understand regular expressions. been doing them a long time in
>> various languages. But, how a
On Tue, Aug 23, 2011 at 04:27:30PM -0400, David Kavanagh wrote:
> I understand regular expressions. been doing them a long time in
> various languages. But, how are the fields determined from this regex?
>
> David
>
You have to put everything you want to capture in parentheses, so
/^Hello (.*
Like a charm!
What designates the fields in the regex? I'm having trouble finding
documentation on that part.
David
On Tue, Aug 23, 2011 at 4:59 PM, Stefan Schulte
wrote:
> On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh wrote:
>> for reference, here's how the regex matches the trailing
On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh wrote:
> for reference, here's how the regex matches the trailing comment;
> http://rubular.com/r/vJUtBWpB6J
>
Yes, rubular shows all fields but the last field is in fact nil and not an
empty string. Try to replace
str += " # #{hash[:com
I understand regular expressions. been doing them a long time in
various languages. But, how are the fields determined from this regex?
David
On Tue, Aug 23, 2011 at 4:19 PM, David Kavanagh wrote:
> for reference, here's how the regex matches the trailing comment;
> http://rubular.com/r/vJUtBWpB
for reference, here's how the regex matches the trailing comment;
http://rubular.com/r/vJUtBWpB6J
On Tue, Aug 23, 2011 at 4:17 PM, David Kavanagh wrote:
> Hi Stefan,
> I have it working using your suggestions (I took out my hacks). I
> adjusted the match regex to match the quotes in the value po
Hi Stefan,
I have it working using your suggestions (I took out my hacks). I
adjusted the match regex to match the quotes in the value portion.
Otherwise, I kept getting more quotes added in each time the file was
processed.
The only glitch now is that it always thinks there's a comment, so
even if
On Tue, Aug 23, 2011 at 10:32:54AM -0400, David Kavanagh wrote:
> I did get this working. In a nutshell, I modified to_line like this;
> def self.to_line(hash)
> return super unless hash[:record_type] == :parsed
> "#{hash[:name]}=#{hash[:value]}"
> end
As I said, I wouldn't to that. Ju
I did get this working. In a nutshell, I modified to_line like this;
def self.to_line(hash)
return super unless hash[:record_type] == :parsed
"#{hash[:name]}=#{hash[:value]}"
end
which handles the other line types. To handle wrapping values in
quotes, I changed the type like this;
ne
Thanks, I'll try to work through your suggestions. I took this from
the nova_config stuff on github, so that was my example.
David
On Mon, Aug 22, 2011 at 7:36 PM, Stefan Schulte
wrote:
> On Mon, Aug 22, 2011 at 06:33:27PM -0400, David Kavanagh wrote:
>> I'm working on a type/provider for the eu
On Mon, Aug 22, 2011 at 06:33:27PM -0400, David Kavanagh wrote:
> I'm working on a type/provider for the eucalyptus.conf file. What I
> have generally works for modifying properties. I have a couple of
> issues and not being very experienced with Ruby and custom providers,
> I wonder if anyone can
I'm working on a type/provider for the eucalyptus.conf file. What I
have generally works for modifying properties. I have a couple of
issues and not being very experienced with Ruby and custom providers,
I wonder if anyone can help?
The code is included below. The key/value constructs in the file l
13 matches
Mail list logo