Method: Framework::ApplicationGenerator#create_environment

Defined in:
lib/framework/generators/application_generator.rb

#create_environmentObject



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/framework/generators/application_generator.rb', line 77

def create_environment
  create_file 'config/environment.rb' do
    "    # Set up gems listed in the Gemfile.\n    ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)\n    require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])\n\n    require 'framework'\n\n    Bundler.require(:default, Framework.env)\n\n    Framework::Application.new do |app|\n      app.init!\n    end\n    CONFIG\n  end\nend\n".strip_heredoc