Class: Yay

Inherits:
Object
  • Object
show all
Defined in:
lib/yay/lexer.rb,
lib/yay/paths.rb,
lib/yay/errors.rb,
lib/yay/lister.rb,
lib/yay/loader.rb,
lib/yay/parser.rb,
lib/yay/version.rb,
lib/yay/rule_set.rb,
lib/yay/installer.rb,
lib/yay/colourizer.rb,
lib/yay/parser_gen.rb,
lib/yay/application.rb,
lib/yay/lexer_regex.rb,
lib/yay/colour_wheel.rb,
lib/yay/autoformatter.rb

Defined Under Namespace

Classes: AlreadyAssignedError, Application, Autoformatter, BadFilenameError, CircularReferenceError, ColourWheel, Colourizer, CouldntFindFileError, Error, InstallFailedError, Installer, Lexer, Lister, Loader, NotAllowedError, Parser, ParserGen, Paths, RuleSet, TooManyColoursError, UnexpectedTokenError, UnresolvedSubstitutionError

Constant Summary collapse

VERSION =

the gem version. increment to make a new release!

"0.0.8"

Class Method Summary collapse

Class Method Details

.versionObject

yoinked from chef. this gives us the git revision number of the current build if possible. used for –version



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/yay/version.rb', line 10

def self.version
  @rev ||= begin
    begin
      rev = Open3.popen3("git rev-parse HEAD") {|stdin, stdout, stderr| stdout.read }.strip
    rescue Errno::ENOENT
      rev = ""
    end
    rev.empty? ? nil : " (#{rev})"
  end
  "#{VERSION}#@rev"
end