Module: Autowow::Commands::Gem
- Includes:
- ReflectionUtils::CreateModuleFunctions
- Included in:
- Features::Gem
- Defined in:
- lib/autowow/commands/gem.rb
Instance Method Summary collapse
- #be ⇒ Object
- #build(pattern) ⇒ Object
- #bump(version = nil) ⇒ Object
- #bundle_install ⇒ Object
- #clean ⇒ Object
- #rake ⇒ Object
- #rake_db_migrate ⇒ Object
- #rake_db_schema ⇒ Object
- #rake_db_structure ⇒ Object
- #release ⇒ Object
- #rubocop_autocorrect(files) ⇒ Object
- #rubocop_parallel ⇒ Object
Instance Method Details
#be ⇒ Object
39 40 41 |
# File 'lib/autowow/commands/gem.rb', line 39 def be ["bundle", "exec"] end |
#build(pattern) ⇒ Object
35 36 37 |
# File 'lib/autowow/commands/gem.rb', line 35 def build(pattern) ["gem", "build"] + pattern end |
#bump(version = nil) ⇒ Object
20 21 22 23 24 |
# File 'lib/autowow/commands/gem.rb', line 20 def bump(version = nil) command = ["gem", "bump", "--no-commit", "--no-color"] return command unless version command + ["--version", version] end |
#bundle_install ⇒ Object
12 13 14 |
# File 'lib/autowow/commands/gem.rb', line 12 def bundle_install ["bundle", "install"] end |
#clean ⇒ Object
8 9 10 |
# File 'lib/autowow/commands/gem.rb', line 8 def clean ["gem", "clean"] end |
#rake ⇒ Object
43 44 45 |
# File 'lib/autowow/commands/gem.rb', line 43 def rake be + ["rake"] end |
#rake_db_migrate ⇒ Object
47 48 49 |
# File 'lib/autowow/commands/gem.rb', line 47 def rake_db_migrate ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:migrate"] end |
#rake_db_schema ⇒ Object
51 52 53 |
# File 'lib/autowow/commands/gem.rb', line 51 def rake_db_schema ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:schema:load"] end |
#rake_db_structure ⇒ Object
55 56 57 |
# File 'lib/autowow/commands/gem.rb', line 55 def rake_db_structure ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:structure:load"] end |
#release ⇒ Object
4 5 6 |
# File 'lib/autowow/commands/gem.rb', line 4 def release be + ["rake", "release"] end |
#rubocop_autocorrect(files) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/autowow/commands/gem.rb', line 26 def rubocop_autocorrect(files) cmd = be + ["rubocop", "--auto-correct"] if files.kind_of?(Array) cmd + files else cmd + files.split(" ") end end |
#rubocop_parallel ⇒ Object
16 17 18 |
# File 'lib/autowow/commands/gem.rb', line 16 def rubocop_parallel be + ["rubocop", "--parallel"] end |