tap
tap copied to clipboard
A framework for creating configurable, distributable tasks and workflows.
Like _attrs_ or similar... otherwise attrs cannot be used as a variable. ``` # Build the template, setting the attributes and filename if specified. # All methods of self will...
That way only a subset of the templates could be funneled through template_files. ``` template_files('subset') do |source, target| m.file(target) {|io| io
By using method missing you open up subtle bugs: ``` m.template_files do |source, target| m.file(target) {|io| io
``` module FilePatch def file(target, options={}) options[:source] ||= begin source_file = Tempfile.new('generate') yield(source_file) if block_given? source_file.close source_file.path end source = options[:source] target = path(target) copy_file = true msg = case...
``` def directory(target, options={}) target = path(target) case when !File.exists?(target) log_relative :missing, target when !File.directory?(target) log_relative 'not a directory', target when target == Dir.pwd when !Root.empty?(target) paths = Dir.glob File.join(target,...
It would be nice to have a set_env method used internally by with_env such that you can use setup/teardown to set the env.
http://bka-bonn.de/wordpress/index.php/2009/06/01/determine-os-with-ruby/ (see comments) ``` require ‘rbconfig’ puts RbConfig::CONFIG[’target_os’] => “linux” ``` This is where the update needs to happen. ``` def match_platform?(*platforms) platforms.each do |platform| platform.to_s =~ /^(non_)?(.*)/ non =...
Config for how long to sleep.
It would be helpful if apps allowed middleware to have before/after hooks for a run: ``` def run synchronize do return self unless state == State::READY @state = State::RUN end...
## Signatures No problem to determine incorrect node signatures at the call, process, and process_block levels. The output should notify the node, and ideally the join causing the problem. Once...