Skip to content
Browse files

add Tilt::VERSION and update gemspec

  • Loading branch information...
1 parent f7bcad2 commit 531c141e6c2c1d1dfdd2918ca077b21f826cd6b2 @rtomayko rtomayko committed Oct 16, 2009
Showing with 16 additions and 8 deletions.
  1. +8 −6 Rakefile
  2. +2 −0 lib/tilt.rb
  3. +6 −2 tilt.gemspec
View
14 Rakefile
@@ -6,6 +6,7 @@ desc 'Generate test coverage report'
task :rcov do
sh "rcov -Ilib:test test/*_test.rb"
end
+
desc 'Run specs with unit test style output'
task :test do |t|
sh 'bacon -qa'
@@ -18,11 +19,8 @@ end
# PACKAGING =================================================================
-# load gemspec like github's gem builder to surface any SAFE issues.
-Thread.new do
- require 'rubygems/specification'
- $spec = eval("$SAFE=3\n#{File.read('tilt.gemspec')}")
-end.join
+require 'rubygems/specification'
+$spec ||= eval(File.read('tilt.gemspec'))
def package(ext='')
"dist/tilt-#{$spec.version}" + ext
@@ -58,8 +56,12 @@ end
# GEMSPEC ===================================================================
file 'tilt.gemspec' => FileList['{lib,test}/**','Rakefile'] do |f|
+ # read version from tilt.rb
+ version = File.read('lib/tilt.rb')[/VERSION = '(.*)'/] && $1
# read spec file and split out manifest section
- spec = File.read(f.name)
+ spec = File.
+ read(f.name).
+ sub(/s\.version\s*=\s*'.*'/, "s.version = '#{version}'")
parts = spec.split(" # = MANIFEST =\n")
# determine file list from git ls-files
files = `git ls-files`.
View
2 lib/tilt.rb
@@ -1,4 +1,6 @@
module Tilt
+ VERSION = '0.3'
+
@template_mappings = {}
# Hash of template path pattern => template implementation
View
8 tilt.gemspec
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.name = 'tilt'
- s.version = '0.2'
- s.date = '2009-06-07'
+ s.version = '0.3'
+ s.date = '2009-10-16'
s.description = "Generic interface to multiple Ruby template engines"
s.summary = s.description
@@ -17,13 +17,17 @@ Gem::Specification.new do |s|
COPYING
README.md
Rakefile
+ TEMPLATES.md
+ bin/tilt
lib/tilt.rb
test/.bacon
test/spec_tilt.rb
test/spec_tilt_buildertemplate.rb
test/spec_tilt_erbtemplate.rb
+ test/spec_tilt_erubistemplate.rb
test/spec_tilt_hamltemplate.rb
test/spec_tilt_liquid_template.rb
+ test/spec_tilt_mustachetemplate.rb
test/spec_tilt_rdiscount.rb
test/spec_tilt_sasstemplate.rb
test/spec_tilt_stringtemplate.rb

0 comments on commit 531c141

Please sign in to comment.
Something went wrong with that request. Please try again.