Class: Jdt::CLI
- Inherits:
-
Thor
- Object
- Thor
- Jdt::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/jdt/cli.rb,
lib/jdt/xampp.rb,
lib/jdt/commands/new.rb,
lib/jdt/commands/bump.rb,
lib/jdt/commands/build.rb,
lib/jdt/commands/secure.rb,
lib/jdt/commands/status.rb,
lib/jdt/commands/install.rb,
lib/jdt/commands/version.rb,
lib/jdt/commands/validate.rb,
lib/jdt/commands/pretty_print.rb
Instance Method Summary collapse
- #build ⇒ Object
- #bump ⇒ Object
- #clean ⇒ Object
- #install ⇒ Object
- #manifest ⇒ Object
- #release ⇒ Object
- #secure ⇒ Object
- #status ⇒ Object
- #validate ⇒ Object
- #version ⇒ Object
Instance Method Details
#build ⇒ Object
11 12 13 14 15 |
# File 'lib/jdt/commands/build.rb', line 11 def build handle_errors do say "Build created at: #{Manifest.find([:location]).build}" end end |
#bump ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/jdt/commands/bump.rb', line 13 def bump handle_errors do # find manifest manifest = Manifest.find([:location]) # determine what is to be bumped if (.major?) bump_option = :major elsif (.minor?) bump_option = :minor else bump_option = :patch end # bump manifest.bump!(bump_option) # inform user say "Bumped version to #{manifest.version} (bumped #{bump_option.to_s})" end end |
#clean ⇒ Object
29 30 31 32 33 34 |
# File 'lib/jdt/commands/build.rb', line 29 def clean handle_errors do Manifest.find([:location]).clean say "Everything is cleaned!" end end |
#install ⇒ Object
11 12 13 14 15 16 |
# File 'lib/jdt/commands/install.rb', line 11 def install handle_errors do manifest = Manifest.find([:location]) end end |
#manifest ⇒ Object
8 9 10 11 12 |
# File 'lib/jdt/commands/pretty_print.rb', line 8 def manifest handle_errors do say Jdt::Manifest.find([:location]).to_xml end end |
#release ⇒ Object
20 21 22 23 24 |
# File 'lib/jdt/commands/build.rb', line 20 def release handle_errors do say "Release created at: #{Manifest.find([:location]).release}" end end |
#secure ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jdt/commands/secure.rb', line 12 def secure () handle_errors do Manifest.find([:location]).secure end end |
#status ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/jdt/commands/status.rb', line 11 def status handle_errors do manifest = Manifest.find([:location]) say("Extension #{manifest.prefixed_name_with_version}") end end |
#validate ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jdt/commands/validate.rb', line 10 def validate handle_errors do manifest = Manifest.find([:location]) if (manifest.valid?) say "Manifest (#{manifest.file}) is valid" else say "Manifest (#{manifest.file}) is NOT valid" manifest.errors.each do |error| say "ERR: #{error}" end end if (not manifest.warnings.empty?) manifest.warnings.each do |warning| say "WARN: #{warning}" end end end end |