class Object
Public Instance Methods
rails_env()
click to toggle source
# File lib/tiny_png/recipes.rb, line 3 def rails_env fetch(:rails_env, 'production') end
rake(*tasks)
click to toggle source
# File lib/tiny_png/recipes.rb, line 24 def rake(*tasks) rake = fetch(:rake, "rake") tasks.each do |t| run "if [ -d #{release_path} ]; then cd #{release_path}; else cd #{current_path}; fi; if [ -f Rakefile ]; then #{rake} #{rake_env.join(' ')} #{t}; fi;" end end
rake_env()
click to toggle source
# File lib/tiny_png/recipes.rb, line 15 def rake_env env = ["RAILS_ENV=#{rails_env}", "SHRINK=#{shrinkwrap}"] env.push "API_KEY=#{self[:tiny_png_api_key]}" unless self[:tiny_png_api_key].nil? env.push "API_USER=#{self[:tiny_png_api_user]}" unless self[:tiny_png_api_user].nil? env.push "SUPPRESS_EXCEPTIONS=#{self[:tiny_png_suppress_exceptions]}" unless self[:tiny_png_suppress_exceptions].nil? env.push "BLACKLIST=#{self[:tiny_png_blacklist]}" unless self[:tiny_png_blacklist].nil? env end
roles()
click to toggle source
# File lib/tiny_png/recipes.rb, line 7 def roles fetch(:tiny_png_server_role, :web) end
shrinkwrap()
click to toggle source
# File lib/tiny_png/recipes.rb, line 11 def shrinkwrap fetch(:tiny_png_shrink, current_path) end