[augeas-devel] [Augeas] #228: Add aug_srun to ruby-augeas

Augeas trac at fedorahosted.org
Wed Nov 16 07:21:19 UTC 2011


#228: Add aug_srun to ruby-augeas
--------------------------+-------------------------------------------------
  Reporter:  domcleal     |       Owner:  lutter       
      Type:  enhancement  |      Status:  assigned     
  Priority:  minor        |   Milestone:  next         
 Component:  Augeas       |     Version:  0.9.0        
Resolution:               |    Keywords:  aug_srun ruby
--------------------------+-------------------------------------------------
Comment (by domcleal):

 Replying to [comment:2 lutter]:
 > My intent had always been to have a aug_frun (input from FILE) and
 aug_srun (input from string) in the C API; somehow, that fell completely
 through the cracks.
 >
 > I think it's time to add a aug_run that takes input from a string;
 should help make the API intuitively understanadable

 It isn't the input, it's the output to an fd from Augeas.

 int aug_srun(augeas *aug, FILE *out, const char *text);

 So aug_srun does take a string, *text, for the commands but sends the
 results back to *out.  The only way I could see of handling it in Ruby
 itself was to use a temp file and pass the fd through.

 Having thought about it again, we could just use something similar to
 Augeas's __aug_init_memstream internal functions to make a string
 available to Ruby callers with the results.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/228#comment:3>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list