Class: Develoz::Generators::CiGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- Develoz::Generators::CiGenerator
show all
- Defined in:
- lib/generators/develoz/ci/ci_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/ci/ci_generator.rb', line 8
def self.source_root
File.expand_path("templates", __dir__)
end
|
Instance Method Details
#add_ci_gems ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 12
def add_ci_gems
add_gem "rubocop-rails-omakase", group: %i[development test]
add_gem "reek", group: %i[development test]
add_gem "flay", group: %i[development test]
add_gem "brakeman", group: %i[development test]
add_gem "bundler-audit", group: %i[development test]
add_gem "haml_lint", require: false, group: %i[development test]
end
|
#create_biome_config ⇒ Object
41
42
43
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 41
def create_biome_config
template "biome.json.tt", "biome.json"
end
|
#create_ci_config ⇒ Object
25
26
27
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 25
def create_ci_config
template "config/ci.rb.tt", "config/ci.rb"
end
|
#create_ci_entrypoint ⇒ Object
21
22
23
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 21
def create_ci_entrypoint
template "bin/ci.tt", "bin/ci"
end
|
#create_ci_workflow ⇒ Object
61
62
63
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 61
def create_ci_workflow
template ".github/workflows/ci.yml.tt", ".github/workflows/ci.yml"
end
|
#create_haml_lint_config ⇒ Object
49
50
51
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 49
def create_haml_lint_config
template ".haml-lint.yml.tt", ".haml-lint.yml"
end
|
#create_markdownlint_config ⇒ Object
53
54
55
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 53
def create_markdownlint_config
template ".markdownlint.json.tt", ".markdownlint.json"
end
|
#create_rakefile ⇒ Object
29
30
31
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 29
def create_rakefile
template "Rakefile.tt", "Rakefile"
end
|
#create_reek_config ⇒ Object
37
38
39
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 37
def create_reek_config
template ".reek.yml.tt", ".reek.yml"
end
|
#create_rubocop_config ⇒ Object
33
34
35
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 33
def create_rubocop_config
template ".rubocop.yml.tt", ".rubocop.yml"
end
|
#create_stylelint_config ⇒ Object
45
46
47
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 45
def create_stylelint_config
template ".stylelintrc.json.tt", ".stylelintrc.json"
end
|
#create_yamllint_config ⇒ Object
57
58
59
|
# File 'lib/generators/develoz/ci/ci_generator.rb', line 57
def create_yamllint_config
template ".yamllint.tt", ".yamllint"
end
|