Sha256: b1856fd1dc3eca6103603516ff77af1e777f1f75f41222dfbe64a6e260d28269

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 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

2 entries across 2 versions & 1 rubygems

Version Path
nagios_helper-0.1.2 lib/generators/nagios/check_generator.rb
nagios_helper-0.1.1 lib/generators/nagios/check_generator.rb