Module: Autowow::Features::Gem
- Includes:
- Commands::Gem, Commands::Vcs, Executor, EasyLogging, ReflectionUtils::CreateModuleFunctions
- Defined in:
- lib/autowow/features/gem.rb
Instance Method Summary collapse
Methods included from Executor
#pretty, #pretty_with_output, #quiet
Methods included from Commands::Vcs
#add_remote, #branch, #branch_force_delete, #branch_list, #changes_not_on_remote, #checkout, #cmd, #create, #current_branch, #default_options, #fetch, #git_status, #merge, #pull, #push, #rebase, #remotes, #set_upstream, #stash, #stash_pop
Methods included from Commands::Gem
#clean, #release, #rubocop_autocorrect, #rubocop_parallel
Instance Method Details
#gem_clean ⇒ Object
27 28 29 |
# File 'lib/autowow/features/gem.rb', line 27 def gem_clean pretty_with_output.run(clean) end |
#gem_release ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/autowow/features/gem.rb', line 12 def gem_release pretty_with_output.run(git_status) start_branch = Vcs.working_branch logger.error("Not on master.") and return unless start_branch.eql?('master') pretty.run(push) Vcs.on_branch('release') do pretty.run(pull) pretty.run(rebase(start_branch)) pretty_with_output.run(release) end pretty_with_output.run(git_status) end |
#rubocop_parallel_autocorrect ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/autowow/features/gem.rb', line 31 def rubocop_parallel_autocorrect result = pretty_with_output.run!(rubocop_parallel) if result.failed? filtered = result.out.each_line.select { |line| line.match(%r{(.*):([0-9]*):([0-9]*):}) }.map{ |line| line.split(':')[0] }.uniq pretty_with_output.run(rubocop_autocorrect(filtered)) if filtered.any? end end |