Class: Printer::InstallGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/printer/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_cmd_in_binObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/printer/install_generator.rb', line 4

def create_cmd_in_bin
  path = `bundle list oxen_printer`.strip
  create_file "bin/printer_cmd.sh", "#!/bin/sh\n# This command was installed by rake generate oxen_printer:install\n# and provides the generic printer_cmd to the oxen_printer Gem\njava -jar \#{path}/lib/java_pdf/barcodeprinter.jar $1 $2\n"
  system 'chmod +x bin/printer_cmd.sh'
end