On Friday, December 21, 2012 at 4:15 PM, Maven User wrote:
actually - I'm a BIT further now (maybe).
So removing the action and end.run_action items, I can see now it's executing the ruby code when it should.
BUT - now it doesn't understand what a "directory" or a "template" is - how do I import these things?You went a bit in the wrong direction. I'd recommend either:1) use resources like normal, and put raw ruby code into ruby blocks:action :something dodirectory "path" do#stuffendruby_block "arbitrary_code" doblock do# some codeendendfile "path/file" do#stuffendendOR2) Use action :nothing plus run_action, but *no* ruby blocksaction :something dodirectory "path" do#stuffaction :nothingrun_action(:create) # this works if it's very lastend # or you can put `.run_action()` here, it'll be the same result# random ruby code, NO ruby_block resourcer = file "path/file" do#stuffaction :nothingendr.run_action(:create) # this is the other way to use run_action(): assign resource to a variableendThis example is a little complicated, but you should be able to see the general pattern:--Daniel DeLeo
Archive powered by MHonArc 2.6.16.