diff --git a/awesome_print.gemspec b/awesome_print.gemspec index e2d2368..621b801 100644 --- a/awesome_print.gemspec +++ b/awesome_print.gemspec @@ -4,6 +4,7 @@ # See LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ require "rake" +require File.dirname(__FILE__) + "/lib/awesome_print/version" task :default => :spec @@ -15,7 +16,7 @@ end Gem::Specification.new do |s| s.name = "awesome_print" - s.version = "1.0.0" + s.version = AwesomePrint.version # s.platform = Gem::Platform::RUBY s.authors = "Michael Dvorkin" s.date = "2011-11-08" diff --git a/lib/awesome_print.rb b/lib/awesome_print.rb index 7c689a2..d74fa6a 100755 --- a/lib/awesome_print.rb +++ b/lib/awesome_print.rb @@ -14,6 +14,7 @@ unless defined?(AwesomePrint) require File.dirname(__FILE__) + "/awesome_print/inspector" require File.dirname(__FILE__) + "/awesome_print/formatter" + require File.dirname(__FILE__) + "/awesome_print/version" require File.dirname(__FILE__) + "/awesome_print/core_ext/logger" if defined?(Logger) require File.dirname(__FILE__) + "/awesome_print/ext/action_view" if defined?(ActionView) diff --git a/lib/awesome_print/version.rb b/lib/awesome_print/version.rb new file mode 100644 index 0000000..afbcb4b --- /dev/null +++ b/lib/awesome_print/version.rb @@ -0,0 +1,10 @@ +# Copyright (c) 2010-2011 Michael Dvorkin +# +# Awesome Print is freely distributable under the terms of MIT license. +# See LICENSE file or http://www.opensource.org/licenses/mit-license.php +#------------------------------------------------------------------------------ +module AwesomePrint + def self.version + '1.0.0' + end +end