Class: Hephaestus::LibGenerator

Inherits:
Generators::Base show all
Defined in:
lib/hephaestus/generators/lib_generator.rb

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root, inherited

Methods included from ExitOnFailure

#bundle_command

Methods included from Actions

#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #gem, #replace_in_file, #replace_in_files

Instance Method Details

#lib_plugObject



8
9
10
11
# File 'lib/hephaestus/generators/lib_generator.rb', line 8

def lib_plug
  directory("lib/plug_app", "lib/#{app_name.underscore}")
  remove_file("lib/constants/plug-#{short_app_name}.rb")
end

#lib_tasksObject



13
14
15
# File 'lib/hephaestus/generators/lib_generator.rb', line 13

def lib_tasks
  directory("lib/tasks", "lib/tasks")
end

#plug_schemaObject



17
18
19
20
# File 'lib/hephaestus/generators/lib_generator.rb', line 17

def plug_schema
  copy_file("lib/plug_app/schemas/api/2023-03-06/paths/plug.json", "lib/#{app_name.underscore}/schemas/api/2023-03-06/paths/#{short_app_name.underscore}.json")
  remove_file("lib/#{app_name.underscore}/schemas/api/2023-03-06/paths/plug.json") # cleanup
end