Sha256: a56d3cbb586a5f398f2f06db892c9338986dce1a4ecb7376295c2c4be2a180a9

Contents?: true

Size: 598 Bytes

Versions: 12

Compression:

Stored size: 598 Bytes

Contents

module RailsMachine
  module Generators
    class RailsLoader
      def self.load!(options)
        require "#{options[:apply_to]}/config/environment"
        require "rails_generator"
        require "rails_generator/scripts/generate"

        Rails::Generator::Base.sources << Rails::Generator::PathSource.new(
          :railsmachine, File.dirname(__FILE__))

        args = ["railsmachine"]
        args << (options[:application] || "Application")
        args << (options[:domain] || "my.railsmachina.com")

        Rails::Generator::Scripts::Generate.new.run(args)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
railsmachine-railsmachine-1.0.3 lib/railsmachine/generators/loader.rb
railsmachine-railsmachine-1.0.4 lib/railsmachine/generators/loader.rb
railsmachine-railsmachine-1.0.5 lib/railsmachine/generators/loader.rb
railsmachine-1.0.6 lib/railsmachine/generators/loader.rb
railsmachine-0.1.0 lib/railsmachine/generators/loader.rb
railsmachine-0.1.1 lib/railsmachine/generators/loader.rb
railsmachine-1.0.1 lib/railsmachine/generators/loader.rb
railsmachine-1.0.3 lib/railsmachine/generators/loader.rb
railsmachine-1.0.0 lib/railsmachine/generators/loader.rb
railsmachine-1.0.4 lib/railsmachine/generators/loader.rb
railsmachine-0.1.2 lib/railsmachine/generators/loader.rb
railsmachine-1.0.5 lib/railsmachine/generators/loader.rb