Sha256: 82843aeb5dc25933f24993a155fb167af8992d1b81b72ad24ac66b541dd78db0

Contents?: true

Size: 431 Bytes

Versions: 3

Compression:

Stored size: 431 Bytes

Contents

require 'rails/generators'

module Makers
  module Generators
    class InstallGenerator < Rails::Generators::Base

      source_root File.expand_path('../templates', __FILE__)

      def create_definitions_file
        if Dir.exist?(Rails.root.join('spec'))
          directory = 'spec'
        else
          directory = 'test'
        end
        template 'definitions.rb', "#{directory}/makers.rb"
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
makers-4.0.0.4 lib/generators/makers/install/install_generator.rb
makers-4.0.0.3 lib/generators/makers/install/install_generator.rb
makers-0.2.0 lib/generators/makers/install_generator.rb