Skip to content

Commit

Permalink
Bundled noe's template up
Browse files Browse the repository at this point in the history
  • Loading branch information
blambeau committed Feb 25, 2011
1 parent 16b65ec commit 309e839
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
Empty file added .gemtest
Empty file.
4 changes: 1 addition & 3 deletions lib/wlang.rb
@@ -1,4 +1,5 @@
require 'wlang/loader'
require 'wlang/version'
require 'wlang/ext/string'
require 'stringio'
require 'wlang/rule'
Expand All @@ -20,9 +21,6 @@
#
module WLang

# Current version of WLang
VERSION = "0.10.2".freeze

######################################################################## About files and extensions

# Regular expression for file extensions
Expand Down
14 changes: 14 additions & 0 deletions lib/wlang/version.rb
@@ -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
1 change: 1 addition & 0 deletions tasks/debug_mail.rake
Expand Up @@ -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__)
Expand Down
5 changes: 3 additions & 2 deletions tasks/unit_test.rake
Expand Up @@ -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
Expand Down Expand Up @@ -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

11 changes: 5 additions & 6 deletions wlang.gemspec
@@ -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
Expand Down Expand Up @@ -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.
#
Expand Down

0 comments on commit 309e839

Please sign in to comment.