Class: Plunger::Uploader
- Inherits:
-
Object
- Object
- Plunger::Uploader
- Defined in:
- lib/plunger/uploader.rb
Instance Method Summary collapse
Instance Method Details
#command ⇒ Object
4 5 6 |
# File 'lib/plunger/uploader.rb', line 4 def command Config.data['python_bin'] || 'python' end |
#run(options, diff_options = nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/plunger/uploader.rb', line 12 def run(, = nil) argvs = [ script ] .each do |key, value| case value when true argvs << "--#{key}" when false else argvs << "--#{key}" << "#{value}" unless value.to_s.empty? end end = Array() unless .empty? argvs << '--' argvs += end system(command, *argvs) end |
#script ⇒ Object
8 9 10 |
# File 'lib/plunger/uploader.rb', line 8 def script File.('../../../python/upload.py', __FILE__) end |