From a8801df610f2ce8610cd425c6168b0fe83485a6e Mon Sep 17 00:00:00 2001 From: Brandon Faloona Date: Sat, 5 Mar 2011 12:22:49 -0800 Subject: [PATCH] Misc updates - Proper Rcov rake task - exclude large performance file when building gem - Leverage .gemspec file in Gemfile --- Gemfile | 8 +------- Rakefile | 12 +++++++----- indy.gemspec | 15 ++++++++------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 7bc7bfb..857c670 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,3 @@ source "http://rubygems.org" -gem 'activesupport', '~>3.0.0' -gem 'i18n', '~>0.5.0' - -group :development, :test do - gem 'rspec', '~>2.4.0' - gem 'cucumber', '~>0.10.0' -end \ No newline at end of file +gemspec \ No newline at end of file diff --git a/Rakefile b/Rakefile index bce4f3f..e6d7f49 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,7 @@ require 'rake' require 'rspec/core' require 'rspec/core/rake_task' +require 'rcov/rcovtask' require "cucumber/rake/task" require "yard" require "city" @@ -55,14 +56,15 @@ task :flog_detail do system('find lib -name \*.rb | xargs flog -d') end -desc "Generate code coverage" -RSpec::Core::RakeTask.new(:coverage) do |t| - t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default. - t.rcov = true +# Task :rcov -- Run RCOV to Generate code coverage report +Rcov::RcovTask.new do |t| + t.libs << "lib" + t.test_files = FileList['spec/*.rb'] t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems', '-T'] + t.verbose = true end - +# Task :yard -- Generate yard + CITY docs YARD::Rake::CitydocTask.new do |t| t.files = ['features/**/*', 'lib/**/*.rb'] t.options = ['--private'] diff --git a/indy.gemspec b/indy.gemspec index 80a79f8..84b5343 100644 --- a/indy.gemspec +++ b/indy.gemspec @@ -1,6 +1,6 @@ require File.dirname(__FILE__) + "/lib/indy" -module Indy +class Indy def self.show_version_changes(version) date = "" @@ -32,7 +32,7 @@ Gem::Specification.new do |s| s.authors = ["Franklin Webber","Brandon Faloona"] s.description = %{ Indy is a log archelogy library that treats logs like data structures. Search fixed format or custom logs by field and/or time. } s.summary = "Log Search Library" - s.email = 'franklin.webber@gmail.com' + s.email = 'brandon@faloona.net' s.homepage = "http://github.com/burtlo/Indy" s.license = 'MIT' @@ -40,7 +40,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 1.8.5' s.add_dependency('activesupport', '>= 2.3.5') - s.add_development_dependency('cucumber', '>= 0.9.2') + s.add_development_dependency('cucumber', '>= 0.10.0') s.add_development_dependency('yard', '>= 0.6.4') s.add_development_dependency('cucumber-in-the-yard', '>= 1.7.7') s.add_development_dependency('rspec', '>= 2.4.0') @@ -62,11 +62,12 @@ Gem::Specification.new do |s| } - # exclusions = [File.join("performance", "large.log")] - # s.files = `git ls-files`.split("\n") - exclusions - + s.rubygems_version = "1.3.7" - s.files = `git ls-files`.split("\n") + + exclusions = [File.join("performance", "large.log")] + s.files = `git ls-files`.split("\n") - exclusions + s.extra_rdoc_files = ["README.md", "History.txt"] s.rdoc_options = ["--charset=UTF-8"] s.require_path = "lib"