mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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.
This commit is contained in:
@@ -46,6 +46,7 @@ module Rails
|
||||
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
|
||||
Reference in New Issue
Block a user