Class: EmbulkJavundler::Cli
- Inherits:
-
Thor
- Object
- Thor
- EmbulkJavundler::Cli
- Defined in:
- lib/embulk_javundler/cli.rb
Instance Method Summary collapse
- #_run(*run_args) ⇒ Object
- #guess(*guess_args) ⇒ Object
- #install ⇒ Object
- #preview(*preview_args) ⇒ Object
- #update ⇒ Object
Instance Method Details
#_run(*run_args) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/embulk_javundler/cli.rb', line 41 def _run(*run_args) lookup_embulk_plugin_file java_plugins = parse_embulk_file Runner.new(java_plugins).run(*run_args) end |
#guess(*guess_args) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/embulk_javundler/cli.rb', line 57 def guess(*guess_args) lookup_embulk_plugin_file java_plugins = parse_embulk_file Runner.new(java_plugins).guess(*guess_args) end |
#install ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/embulk_javundler/cli.rb', line 13 def install lookup_embulk_plugin_file EmbulkJavundler.install_dir = [:path] if [:path] java_plugins = parse_embulk_file(need_lock: false) java_plugins.each do |plugin| plugin.fetch plugin.build_gem end write_lock_file(java_plugins) unless EmbulkJavundler.lock_file_path.exist? end |
#preview(*preview_args) ⇒ Object
49 50 51 52 53 54 |
# File 'lib/embulk_javundler/cli.rb', line 49 def preview(*preview_args) lookup_embulk_plugin_file java_plugins = parse_embulk_file Runner.new(java_plugins).preview(*preview_args) end |
#update ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/embulk_javundler/cli.rb', line 27 def update lookup_embulk_plugin_file java_plugins = parse_embulk_file(use_lock: false, need_lock: false) java_plugins.each do |plugin| plugin.update plugin.build_gem end write_lock_file(java_plugins) end |