Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Filter using Ant style pattern
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Terminus  
View profile  
 More options Jul 13 2007, 2:24 pm
From: Terminus <emmanuel.pir...@gmail.com>
Date: Fri, 13 Jul 2007 18:24:44 -0000
Local: Fri, Jul 13 2007 2:24 pm
Subject: Filter using Ant style pattern
Hi,

My current Ant buid is using filters to replace some tokens in some
files.

Buildr support filters but they use the Ruby syntax for the tokens.

To make porting the Ant build to Buildr, it would be nice if I could
do :

filter("src-path").into("dest-path").style(:ant).using(filter_map).run

Right now I have to do :
FILTERS= {"TOKEN" => "value"}
FILTER_PROC= proc {|file_name, content|
        FILTERS.each_pair do |var, value|
                content.gsub!("@#{var}@", value)
        end
        content

}

filter("src-path").into("dest-path").using(FILTER_PROC).run

It's not bad, but it sure would be nicer that Buildr support Ant style
tokens.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Assaf Arkin  
View profile  
 More options Jul 13 2007, 10:33 pm
From: "Assaf Arkin" <as...@labnotes.org>
Date: Fri, 13 Jul 2007 19:33:43 -0700
Local: Fri, Jul 13 2007 10:33 pm
Subject: Re: Filter using Ant style pattern

Good idea. I've added two other formats (Ant and Ruby) and you can also use
regular expressions. To use Ant tokens:

filter("src-path").into("dest-path").using(:ant, filter_map).run

Assaf

On 7/13/07, Terminus <emmanuel.pir...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google