Class: Jdt::Xampp
- Inherits:
-
Thor
- Object
- Thor
- Jdt::Xampp
- Defined in:
- lib/jdt/xampp.rb
Class Method Summary collapse
Instance Method Summary collapse
- #configure ⇒ Object
- #install_joomla ⇒ Object
- #path ⇒ Object
- #php_ini ⇒ Object
- #phpmyadmin ⇒ Object
- #web ⇒ Object
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
74 75 76 |
# File 'lib/jdt/xampp.rb', line 74 def self.(task, namespace = true, subcommand = false) "#{basename} #{task.formatted_usage(self, true, subcommand)}" end |
Instance Method Details
#configure ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/jdt/xampp.rb', line 21 def configure # get xampp path xampp_path = ask("Enter fully qualified xampp path (default: C:\\xampp):") # set xampp path default value if it has not been set if (xampp_path == "") xampp_path = "c:\\xampp" end # store it XamppConfig.new.xampp_path = xampp_path end |
#install_joomla ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/jdt/xampp.rb', line 44 def install_joomla # setup paths joomla_path = [:joomla_path] joomla_local_path = File.join(XamppConfig.new.htdocs_path, joomla_path) joomla_remote_path = "http://localhost/#{joomla_path}" joomla_zip_location = [:joomla_zip_location] # download and unzip download_zip(joomla_zip_location, joomla_local_path) # open url Launchy.open(joomla_remote_path) end |
#path ⇒ Object
59 60 61 |
# File 'lib/jdt/xampp.rb', line 59 def path puts "Path is #{XamppConfig.new.xampp_path}" end |
#php_ini ⇒ Object
35 36 37 38 39 |
# File 'lib/jdt/xampp.rb', line 35 def php_ini File.open("#{XamppConfig.new.xampp_path}/php/php.ini").each_line do |line| puts line end end |
#phpmyadmin ⇒ Object
64 65 66 |
# File 'lib/jdt/xampp.rb', line 64 def phpmyadmin Launchy.open("http://localhost/phpMyAdmin") end |
#web ⇒ Object
69 70 71 72 |
# File 'lib/jdt/xampp.rb', line 69 def web link = "http://localhost/" Launchy.open(link) end |