Class: Rockstart::Development::LocalhostSetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::AppName, Generators::TemplateHelpers
Defined in:
lib/generators/rockstart/development/localhost_setup/localhost_setup_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_certificate_configurationObject



12
13
14
# File 'lib/generators/rockstart/development/localhost_setup/localhost_setup_generator.rb', line 12

def add_certificate_configuration
  template "localhost_domains.ext.tt", "#{app_name}_localhost.ext"
end

#add_setup_localhost_scriptObject



16
17
18
# File 'lib/generators/rockstart/development/localhost_setup/localhost_setup_generator.rb', line 16

def add_setup_localhost_script
  script_template "setup-localhost"
end

#create_localhost_certificatesObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/rockstart/development/localhost_setup/localhost_setup_generator.rb', line 20

def create_localhost_certificates
  append_file ".gitignore" do
    <<~GITIGNORE

      # localhost certificate authority
      localhostCA.*

      # Generated SSL Certificates
      certs/

    GITIGNORE
  end
end