Sha256: 51802c9e52f78f1357ef1864a1294220400f3bfb2760fb76e47d2194d6c88aad

Contents?: true

Size: 515 Bytes

Versions: 13

Compression:

Stored size: 515 Bytes

Contents

namespace :houston do
  desc "Lists actions"
  task :actions do
    actions = Houston.actions.to_a
    longest_name = actions.map { |action| action.name.length }.max
    longest_params = actions.map { |action| action.required_params.join(", ").length }.max
    actions.sort_by(&:name).each do |action|
      params = "#{action.required_params.join(", ")}" if action.required_params.any?
      puts "  \e[36m#{action.name.ljust(longest_name)}\e[0m  \e[96m#{params.to_s.ljust(longest_params)}\e[0m"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
houston-core-0.9.2 lib/tasks/actions.rake
houston-core-0.9.1 lib/tasks/actions.rake
houston-core-0.9.0 lib/tasks/actions.rake
houston-core-0.9.0.rc1 lib/tasks/actions.rake
houston-core-0.8.4 lib/tasks/actions.rake
houston-core-0.8.3 lib/tasks/actions.rake
houston-core-0.8.2 lib/tasks/actions.rake
houston-core-0.8.1 lib/tasks/actions.rake
houston-core-0.8.0 lib/tasks/actions.rake
houston-core-0.8.0.pre2 lib/tasks/actions.rake
houston-core-0.8.0.pre lib/tasks/actions.rake
houston-core-0.7.0 lib/tasks/actions.rake
houston-core-0.7.0.beta4 lib/tasks/actions.rake