Class: Pronto::Runner
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(patches, commit = nil) ⇒ Runner
constructor
A new instance of Runner.
- #repo_path ⇒ Object
- #ruby_file?(path) ⇒ Boolean
- #ruby_patches ⇒ Object
Methods included from Plugin
Constructor Details
Class Method Details
.runners ⇒ Object
11 12 13 |
# File 'lib/pronto/runner.rb', line 11 def self.runners repository end |
.title ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/pronto/runner.rb', line 15 def self.title @runner_name ||= begin source_path, _line = instance_method(:run).source_location file_name, _extension = File.basename(source_path).split('.') file_name end end |
Instance Method Details
#repo_path ⇒ Object
37 38 39 |
# File 'lib/pronto/runner.rb', line 37 def repo_path @patches.first.repo.path end |
#ruby_file?(path) ⇒ Boolean
30 31 32 33 34 35 |
# File 'lib/pronto/runner.rb', line 30 def ruby_file?(path) rb_file?(path) || rake_file?(path) || gem_file?(path) || ruby_executable?(path) end |
#ruby_patches ⇒ Object
23 24 25 26 27 28 |
# File 'lib/pronto/runner.rb', line 23 def ruby_patches return [] unless @patches @ruby_patches ||= @patches.select { |patch| patch.additions > 0 } .select { |patch| ruby_file?(patch.new_file_full_path) } end |