Class: Sycersion::Runner
- Inherits:
-
Object
- Object
- Sycersion::Runner
- Defined in:
- lib/sycersion.rb
Overview
Runs the program based on the arguments provided at the commandline
Instance Method Summary collapse
- #configuration_information ⇒ Object
- #environment_settings ⇒ Object
-
#initialize(argv) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
- #version_compare ⇒ Object
- #version_manipulation ⇒ Object
Constructor Details
#initialize(argv) ⇒ Runner
Returns a new instance of Runner.
17 18 19 20 |
# File 'lib/sycersion.rb', line 17 def initialize(argv) = Options.new(argv). pp if ENV['SYC_DEBUG'] end |
Instance Method Details
#configuration_information ⇒ Object
53 54 55 |
# File 'lib/sycersion.rb', line 53 def configuration_information puts Sycersion::VersionInfo.new.process() if [:info] end |
#environment_settings ⇒ Object
29 30 31 |
# File 'lib/sycersion.rb', line 29 def environment_settings Sycersion::VersionEnvironment.new.setup if [:init] end |
#run ⇒ Object
22 23 24 25 26 27 |
# File 'lib/sycersion.rb', line 22 def run environment_settings version_manipulation version_compare configuration_information end |
#version_compare ⇒ Object
46 47 48 49 50 51 |
# File 'lib/sycersion.rb', line 46 def version_compare return unless [:compare] [:compare].shift puts Sycersion::VersionCompare.new.compare([:compare]) end |
#version_manipulation ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sycersion.rb', line 33 def version_manipulation case .keys when [:set] Sycersion::VersionSetter.new.version = ([:set]) when [:pre_release] Sycersion::VersionSetter.new.pre_release = ([:pre_release]) when [:build] Sycersion::VersionSetter.new.build = ([:build]) when [:inc] Sycersion::VersionIncrementer.new.increment([:inc]) end end |