2008-08-23 17:00:46 +00:00
|
|
|
module Compass
|
|
|
|
module Commands
|
|
|
|
class PrintVersion
|
|
|
|
attr_accessor :options
|
2009-02-04 17:10:07 +00:00
|
|
|
def initialize(working_path, options)
|
2008-08-23 17:00:46 +00:00
|
|
|
self.options = options
|
|
|
|
end
|
|
|
|
|
2009-04-07 07:11:54 +00:00
|
|
|
def execute
|
2008-08-23 17:00:46 +00:00
|
|
|
if options[:quiet]
|
|
|
|
# The quiet option may make scripting easier
|
|
|
|
puts ::Compass.version[:string]
|
|
|
|
else
|
|
|
|
lines = []
|
|
|
|
lines << "Compass #{::Compass.version[:string]}"
|
2009-04-07 07:13:16 +00:00
|
|
|
lines << "Copyright (c) 2008-2009 Chris Eppstein"
|
2008-08-23 17:00:46 +00:00
|
|
|
lines << "Released under the MIT License."
|
|
|
|
puts lines.join("\n")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|