Class: MoonbaseGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/moonbase/moonbase_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_configurationObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/generators/moonbase/moonbase_generator.rb', line 4

def add_configuration
  create_file "config/moonbase_alpha.yml", "# This configuration is technically specified on a per-environment basis, but \n# moonbase doesn't currently use that\nshared: \n# Repository for the build. A build number will be set as the version\nrepository: \n# These packages will be available only while installing gems and precompiling assets\nbuild_packages: \n  - tzdata\n  - postgresql-dev\n  - sqlite-dev\n# These pckages will be available only at runtime in the final build image\nrun_packages: \n  - postgresql-libs\n  - tzdata\n  - sqlite-libs\n# If true, moonbase will run `rake assets:precompile` (not suitable for API projects)\ncompile_assets: false    \n"

  environment do 
    "config.moonbase_alpha = config_for(:moonbase_alpha)"
  end

  create_file "app.rb", File.read(File.expand_path(__dir__ + "/../../../templates/app.rb"))
end