Top Level Namespace
Defined Under Namespace
Modules: Motion
Instance Method Summary collapse
Instance Method Details
#create_launcher(files) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/motion-sparkinspector.rb', line 7 def create_launcher(files) # --- based on motion-testflight launcher_code = <<EOF # created by motion-sparkinspector if Object.const_defined?('SparkInspector') SparkInspector.enableObservation end EOF launcher_file = './app/sparkinspector_launcher.rb' if !File.exist?(launcher_file) or File.read(launcher_file) != launcher_code File.open(launcher_file, 'w') { |io| io.write(launcher_code) } end files = files.flatten files << launcher_file unless files.find { |x| File.(x) == File.(launcher_file) } end |