Sorry umuro, I'm a bit lost about your case. Can you describe a bit more
what are you trying to achieve? Why can you not load the taglibs with
the usual includes in application/front_site.dryml?

Warm regards,
Ignacio

El 28-01-2015 a las 03:54, umuro escribió:
> I am generating include directives. In my project every widget goes to a
> file.
> 
> scripts/generate_dryml_includes
> 
> |
> #!/usr/bin/env ruby
> 
> 
> require'pathname'
> 
> 
> defsubsite_widgets(subsite)
>   views_dir ='app/views'
>  
>   ifsubsite =='front'
>     subsite_views_dir =views_dir
>   else
>     subsite_views_dir =File.join views_dir,subsite.to_s
>   end
>  
>   widget_files =\
>       Dir[File.join subsite_views_dir,'widgets*/**/*.dryml']+\
>       Dir[File.join subsite_views_dir,'*/view_widgets*/**/*.dryml']
>   widgets =widget_files\
>       .map{|f|
>            File.join File.dirname(f),File.basename(f,'.dryml')}\
>       .map{|f|
>          
>  Pathname.new(f).relative_path_from(Pathname.new(subsite_views_dir)).to_s }
>  
>   ifsubsite=='taglibs'
>     library ='application'
>   else
>     library =subsite +'_site'
>   end
>  
>   target =File.join(views_dir,'taglibs',library +'_widgets.dryml')
>  
>   File.open(target,'w')do|s|
>     puts
>     puts target
>     puts '===='
>     widgets.each do|w|
>       cmd =%Q{<include src="#{w}"/>}
>       puts cmd
>       s.puts cmd
>     end
>   end
>  
> end
> 
> 
> subsite_widgets('taglibs')
> subsite_widgets('front')
> subsite_widgets('admin')
> subsite_widgets('accounting')
> |
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to