Permalink
Browse files

Extracted version from gemspec and placed it in its own file. This is…

… consistent with the approach taken by "bundle gem", and is expected by gems such as svenfuchs/gem-release which can be used to bump / tag versions of gems.
  • Loading branch information...
1 parent b82e226 commit f9eadb8b432f220865c5205a81e6dd5af90f35b5 @dgeb dgeb committed with fxn Jul 26, 2011
@@ -46,6 +46,7 @@ def gitignore
def lib
template "lib/%name%.rb"
template "lib/tasks/%name%_tasks.rake"
+ template "lib/%name%/version.rb"
if full?
template "lib/%name%/engine.rb"
end
@@ -1,8 +1,12 @@
-# Provide a simple gemspec so you can easily use your
-# project in your rails apps through git.
+$:.push File.expand_path("../lib", __FILE__)
+
+# Maintain your gem's version:
+require "<%= name %>/version"
+
+# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "<%= name %>"
- s.version = "0.0.1"
+ s.version = <%= camelized %>::VERSION
s.authors = ["TODO: Your name"]
s.email = ["TODO: Your email"]
s.homepage = "TODO"
@@ -0,0 +1,3 @@
+module <%= camelized %>
+ VERSION = "0.0.1"
+end

0 comments on commit f9eadb8

Please sign in to comment.