Class: Upstart::Exporter
- Inherits:
-
Object
- Object
- Upstart::Exporter
- Includes:
- Errors, ExporterHelpers
- Defined in:
- lib/upstart-exporter.rb,
lib/upstart-exporter/version.rb,
lib/upstart-exporter/templates.rb,
lib/upstart-exporter/exporter_helpers.rb,
lib/upstart-exporter/expanded_exporter.rb
Defined Under Namespace
Modules: Errors, ExporterHelpers, Options Classes: Error, ExpandedExporter, Templates
Constant Summary collapse
- VERSION =
"2.1.1"
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #clear ⇒ Object
- #export ⇒ Object
-
#initialize(command_line_args) ⇒ Exporter
constructor
A new instance of Exporter.
Methods included from ExporterHelpers
#app_cmd, #app_name, #export_cmd_helper, #helper_cmd_conf, #upstart_cmd_conf
Methods included from Errors
Constructor Details
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/upstart-exporter.rb', line 15 def @options end |
Instance Method Details
#clear ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/upstart-exporter.rb', line 36 def clear FileUtils.rm(upstart_conf) if FileTest.file?(upstart_conf) Dir[upstart_cmd_conf('*')].each do |f| FileUtils.rm(f) end Dir[helper_cmd_conf('*')].each do |f| FileUtils.rm(f) end end |
#export ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/upstart-exporter.rb', line 24 def export clear export_app if [:commands]['version'] && [:commands]['version'] == 2 ExpandedExporter.export() else [:commands].each do |cmd_name, cmd| export_command(cmd_name, cmd) end end end |