This repository has been archived by the owner on Nov 17, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
93 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
.DS_Store | ||
nbproject | ||
.idea | ||
pkg | ||
doc | ||
coverage | ||
Manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,52 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
desc 'Default: run unit tests.' | ||
task :default => :test | ||
|
||
desc 'Test the helperful plugin.' | ||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.libs << 'test' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = true | ||
require 'echoe' | ||
|
||
$:.unshift(File.dirname(__FILE__) + "/lib") | ||
require 'helperful' | ||
|
||
|
||
PKG_NAME = ENV['PKG_NAME'] || Helperful::GEM | ||
PKG_VERSION = ENV['PKG_VERSION'] || Helperful::VERSION | ||
PKG_SUMMARY = "A collection of useful Rails helpers." | ||
PKG_FILES = FileList.new("{lib,rails,tasks,test}/**/*") do |files| | ||
files.include %w(*.{rdoc,rb}) | ||
files.include %w(Rakefile) | ||
end | ||
RUBYFORGE_PROJECT = nil | ||
|
||
if ENV['SNAPSHOT'].to_i == 1 | ||
PKG_VERSION << "." << Time.now.utc.strftime("%Y%m%d%H%M%S") | ||
end | ||
|
||
|
||
Echoe.new(PKG_NAME, PKG_VERSION) do |p| | ||
p.author = "Simone Carletti" | ||
p.email = "weppos@weppos.net" | ||
p.summary = PKG_SUMMARY | ||
p.description = <<-EOD | ||
Helperful aims to be a collection of useful and reusable Rails helpers. | ||
EOD | ||
p.url = "http://code.simonecarletti.com/helperful" | ||
p.project = RUBYFORGE_PROJECT | ||
|
||
p.need_zip = true | ||
p.rcov_options = ["--main << README.rdoc -x Rakefile -x mocha -x rcov"] | ||
p.rdoc_pattern = /^(lib|CHANGELOG.rdoc|README.rdoc|LICENSE.rdoc)/ | ||
|
||
p.development_dependencies += ["rake >=0.8", | ||
"echoe >=3.1", | ||
"mocha >=0.9"] | ||
end | ||
|
||
|
||
desc 'Generate documentation for the helperful plugin.' | ||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'Helperful' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
begin | ||
require 'code_statistics' | ||
desc "Show library's code statistics" | ||
task :stats do | ||
CodeStatistics.new(["Helperful", "lib"], | ||
["Tests", "test"]).to_s | ||
end | ||
rescue LoadError | ||
puts "CodeStatistics (Rails) is not available" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# = Helperful | ||
# | ||
# A collection of useful Rails helpers. | ||
# | ||
# | ||
# Category:: Rails | ||
# Package:: Helperful | ||
# Author:: Simone Carletti <weppos@weppos.net> | ||
# Copyright:: 2007-2008 The Authors | ||
# License:: MIT License | ||
# | ||
#-- | ||
# | ||
#++ | ||
|
||
|
||
module Helperful | ||
|
||
module Version | ||
MAJOR = 0 | ||
MINOR = 2 | ||
TINY = 0 | ||
|
||
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end | ||
|
||
VERSION = Version::STRING | ||
STATUS = 'alpha' | ||
BUILD = ''.match(/(\d+)/).to_a.first | ||
|
||
end |