Permalink
Browse files

Cleanup staff; extracted Version constant

  • Loading branch information...
1 parent 300c063 commit 721713e90b28e20dc8411a9bb96d0cd604729d7f @svenyurgensson committed Oct 6, 2012
Showing with 19 additions and 3 deletions.
  1. +2 −1 lib/penetrator.rb
  2. +16 −1 lib/penetrator/version.rb
  3. +1 −1 penetrator.gemspec
  4. 0 spec/{coerce_spec.rb → concern_spec.rb}
View
@@ -1,8 +1,9 @@
# -*- encoding : utf-8 -*-
require "penetrator/inflector"
-require "penetrator/version"
module Penetrator
+ autoload :Version, 'penetrator/version'
+
module Concern
def self.extended(base) #:nodoc:
base.instance_variable_set("@_dependencies", [])
View
@@ -1,4 +1,19 @@
# -*- encoding : utf-8 -*-
+
module Penetrator
- VERSION = "0.1.0"
+ # Contains information about this gem's version
+ module Version
+ MAJOR = 0
+ MINOR = 1
+ PATCH = 2
+
+ # Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
+ #
+ # Example
+ #
+ # Version.to_s # '1.0.2'
+ def self.to_s
+ [MAJOR, MINOR, PATCH].join('.')
+ end
+ end
end
View
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
gem.name = "penetrator"
gem.require_paths = ["lib"]
- gem.version = Penetrator::VERSION
+ gem.version = Penetrator::Version.to_s
if RUBY_VERSION < '1.9.0'
gem.add_development_dependency "minitest"
end
File renamed without changes.

0 comments on commit 721713e

Please sign in to comment.