Class: Hanamismith::Builders::Environments::All
- Inherits:
-
Rubysmith::Builders::Abstract
- Object
- Rubysmith::Builders::Abstract
- Hanamismith::Builders::Environments::All
- Defined in:
- lib/hanamismith/builders/environments/all.rb
Overview
Builds test environment skeleton.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(generator: SecureRandom) ⇒ All
constructor
A new instance of All.
Constructor Details
#initialize(generator: SecureRandom) ⇒ All
Returns a new instance of All.
13 14 15 16 |
# File 'lib/hanamismith/builders/environments/all.rb', line 13 def initialize(generator: SecureRandom, **) @generator = generator super(**) end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/hanamismith/builders/environments/all.rb', line 18 def call builder.call(settings.with(template_path: "%project_name%/env.erb")) .render .replace("<app_secret>", generator.hex(40)) .replace("<pg_password>", generator.hex(15)) .rename(".env") true end |