Permalink
Browse files

Bundled noe's template up

  • Loading branch information...
1 parent 16b65ec commit 309e83940835dd14b09540c6fb139bea4c8cc85a @blambeau committed Feb 25, 2011
Showing with 24 additions and 11 deletions.
  1. 0 .gemtest
  2. +1 −3 lib/wlang.rb
  3. +14 −0 lib/wlang/version.rb
  4. +1 −0 tasks/debug_mail.rake
  5. +3 −2 tasks/unit_test.rake
  6. +5 −6 wlang.gemspec
View
No changes.
View
@@ -1,4 +1,5 @@
require 'wlang/loader'
+require 'wlang/version'
require 'wlang/ext/string'
require 'stringio'
require 'wlang/rule'
@@ -20,9 +21,6 @@
#
module WLang
- # Current version of WLang
- VERSION = "0.10.2".freeze
-
######################################################################## About files and extensions
# Regular expression for file extensions
View
@@ -0,0 +1,14 @@
+module WLang
+ module Version
+
+ MAJOR = 0
+ MINOR = 10
+ TINY = 2
+
+ def self.to_s
+ [ MAJOR, MINOR, TINY ].join('.')
+ end
+
+ end
+ VERSION = Version.to_s
+end
View
@@ -35,6 +35,7 @@ begin
require 'wlang'
require 'yaml'
+ desc "Debug the release announcement mail"
task :debug_mail do
# Check that a .noespec file exists
noespec_file = File.expand_path('../../wlang.noespec', __FILE__)
View
@@ -25,8 +25,8 @@
# http://rake.rubyforge.org/classes/Rake/TestTask.html
#
begin
- desc "Lauches unit tests"
require 'rake/testtask'
+ desc "Run unit tests"
Rake::TestTask.new(:unit_test) do |t|
# List of directories to added to $LOAD_PATH before running the
@@ -68,9 +68,10 @@ begin
end
rescue LoadError => ex
task :unit_test do
- abort 'rspec is not available. In order to run spec, you must: gem install rspec'
+ abort "rake/testtask does not seem available...\n #{ex.message}"
end
ensure
+ desc "Run all tests"
task :test => [:unit_test]
end
View
@@ -1,8 +1,8 @@
# We require your library, mainly to have access to the VERSION number.
# Feel free to set $version manually.
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
-require "wlang"
-$version = WLang::VERSION.dup
+require "wlang/version"
+$version = WLang::Version.to_s
#
# This is your Gem specification. Default values are provided so that your library
@@ -80,11 +80,10 @@ Gem::Specification.new do |s|
# of the project. Entries of the manifest are interpreted as Dir[...]
# patterns so that lazy people may use wilcards like lib/**/*
#
- here = File.dirname(__FILE__)
+ here = File.expand_path(File.dirname(__FILE__))
s.files = File.readlines(File.join(here, 'Manifest.txt')).
- inject([]){|files, pattern|
- files + Dir[File.join(here, pattern.strip)]
- }
+ inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
+ collect{|x| x[(1+here.size)..-1]}
# Test files included in this gem.
#

0 comments on commit 309e839

Please sign in to comment.