Class: Leeroy::Jenkins
- Inherits:
-
Object
- Object
- Leeroy::Jenkins
- Defined in:
- lib/leeroy/jenkins.rb
Instance Method Summary collapse
-
#initialize ⇒ Jenkins
constructor
A new instance of Jenkins.
Constructor Details
#initialize ⇒ Jenkins
Returns a new instance of Jenkins.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/leeroy/jenkins.rb', line 12 def initialize opts = Trollop:: do version "Leeroy #{Leeroy::VERSION} (c) 2012 John Hamelink <[email protected]>" <<-EOS Leeeeeeeeeeeeeeeeroy Jenkins! Leeroy lets you quickly check the status of your builds from the commandline. Leeroy is called Leeroy because of this excellent meme: http://youtu.be/LkCNJRfSZBU Usage: ------ leeroy --username [email protected] --password p455w0rd --endpoint http://jenkins.dev:8080 Options: -------- EOS opt :username, "Your Jenkins username", :type => :string opt :password, "Your Jenkins password", :type => :string opt :endpoint, "The root URL of jenkins", :type => :string end Trollop::die :username, "must be defined" unless opts[:username] Trollop::die :password, "must be defined" unless opts[:password] Trollop::die :endpoint, "must be defined" unless opts[:endpoint] @username = opts[:username] @password = opts[:password] @endpoint = opts[:endpoint] print "\n\n" list print "\n\n" end |