Sha256: b28f51df344801968c122d5c6cc5d996c791cf348451073f49cd08964d248832

Contents?: true

Size: 356 Bytes

Versions: 3

Compression:

Stored size: 356 Bytes

Contents

# for Rails 3
if Rails::VERSION::MAJOR >= 3

  module Nagios
    class CheckGenerator < Rails::Generators::NamedBase
      source_root File.expand_path("../templates", __FILE__)

      def add_files
        template "script_class.rb", "app/nagios/#{file_path}.rb"
        template "spec.rb", "spec/nagios/#{file_path}_spec.rb"
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nagios_helper-0.2.2 lib/generators/nagios/check_generator.rb
nagios_helper-0.2.1 lib/generators/nagios/check_generator.rb
nagios_helper-0.2 lib/generators/nagios/check_generator.rb