Sha256: fbe28cd709b71f70595bcf0e5245b4ebd85ced7361f27bdda5f005be76ab3a6d

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

require 'rails'

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

      desc "Inject Ashikawa setup in config/application.rb"

      def inject_ashikawa

        sentinel =  /[\w]*config\.assets\.version.*/
        db_setup = 'Ashikawa::AR.setup :default, "http://127.0.0.1:8529"'

        in_root do
          inject_into_file "config/application.rb", "\n\n    #{db_setup}", { :after => sentinel, :verbose => true}
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ashikawa-ar-0.1.3 lib/rails/generators/ashikawa/install_generator.rb