Class: Develoz::Generators::DocSpecsGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- Develoz::Generators::DocSpecsGenerator
show all
- Defined in:
- lib/generators/develoz/doc_specs/doc_specs_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#add_gem, #app_class, #app_name, #append_env, #apply_template, #ensure_gitignore, #inject_once, #insert_route, #migration_exists?, next_migration_timestamp
Class Method Details
.source_root ⇒ Object
8
9
10
|
# File 'lib/generators/develoz/doc_specs/doc_specs_generator.rb', line 8
def self.source_root
File.expand_path("templates", __dir__)
end
|
Instance Method Details
#create_doc_screenshot_helper ⇒ Object
18
19
20
21
|
# File 'lib/generators/develoz/doc_specs/doc_specs_generator.rb', line 18
def create_doc_screenshot_helper
template "spec/support/doc_screenshot_helper.rb.tt",
"spec/support/doc_screenshot_helper.rb"
end
|
#create_docs_check_rake_task ⇒ Object
23
24
25
|
# File 'lib/generators/develoz/doc_specs/doc_specs_generator.rb', line 23
def create_docs_check_rake_task
template "lib/tasks/docs_check.rake.tt", "lib/tasks/docs_check.rake"
end
|
#create_example_system_spec ⇒ Object
27
28
29
30
|
# File 'lib/generators/develoz/doc_specs/doc_specs_generator.rb', line 27
def create_example_system_spec
template "spec/system/example_doc_spec.rb.tt",
"spec/system/example_doc_spec.rb"
end
|
#create_generate_docs_script ⇒ Object
12
13
14
15
16
|
# File 'lib/generators/develoz/doc_specs/doc_specs_generator.rb', line 12
def create_generate_docs_script
template "bin/generate-docs.tt", "bin/generate-docs"
dest = File.join(destination_root, "bin/generate-docs")
File.chmod(0o755, dest)
end
|