Sha256: 29687744b59da0b78098f3cf401db0097dce51b147fe8d1bafeaabb5aad51ddf
Contents?: true
Size: 987 Bytes
Versions: 1
Compression:
Stored size: 987 Bytes
Contents
require 'rails/generators' module ActsAsMonitor class InstallGenerator < Rails::Generators::Base desc "Install generator for ActsAsMonitor gem" source_root File.expand_path("../templates", __FILE__) def copy_icons icons = ["acts_as_monitor_green.png", "acts_as_monitor_red.png", "acts_as_monitor_yellow.png"] icons.each do |icon| destination = "public/images/" + icon copy_file icon, destination end end def copy_locales file = "acts_as_monitor.it.yml" destination = "config/locales/" + file copy_file file, destination end end def print_usage usage = <<-START Add acts_as_monitor to model to monitor Add a private method warn_*? and error_*? to define warning and error status Use monitor_tag(model_instance) in your view START puts(usage) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_monitor-0.0.2 | lib/generators/acts_as_monitor/install/install_generator.rb |