Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Bundler gem conventions.

  • Loading branch information...
commit a489eb7220e2a283f7db036d3a7f0191424aaab7 1 parent 9557425
@gabebw gabebw authored
Showing with 23 additions and 54 deletions.
  1. +4 −31 Rakefile
  2. +19 −23 shoulda-context.gemspec
View
35 Rakefile
@@ -1,44 +1,17 @@
-require 'rubygems'
-require 'bundler/setup'
+require 'bundler'
require 'rake'
require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
+
+Bundler::GemHelper.install_tasks
$LOAD_PATH.unshift("lib")
load 'tasks/shoulda.rake'
-test_files_pattern = 'test/**/*_test.rb'
Rake::TestTask.new do |t|
t.libs << 'lib' << 'test'
- t.pattern = test_files_pattern
+ t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
-Rake::RDocTask.new { |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "shoulda-context -- Context framework for Test::Unit"
- rdoc.options << '--line-numbers'
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
- rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
-}
-
-desc "Run code-coverage analysis using rcov"
-task :coverage do
- rm_rf "coverage"
- files = Dir[test_files_pattern]
- system "rcov --rails --sort coverage -Ilib #{files.join(' ')}"
-end
-
-eval("$specification = begin; #{IO.read('shoulda-context.gemspec')}; end")
-Rake::GemPackageTask.new $specification do |pkg|
- pkg.need_tar = true
- pkg.need_zip = true
-end
-
-desc "Clean files generated by rake tasks"
-task :clobber => [:clobber_rdoc, :clobber_package]
-
desc 'Default: run tests'
task :default => [:test]
-
View
42 shoulda-context.gemspec
@@ -1,31 +1,27 @@
+# -*- encoding: utf-8 -*-
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
require 'shoulda/context/version'
Gem::Specification.new do |s|
- s.name = %q{shoulda-context}
- s.version = Shoulda::Context::VERSION.dup
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["thoughtbot, inc.", "Tammer Saleh", "Joe Ferris",
- "Ryan McGeary", "Dan Croak", "Matt Jankowski"]
- s.date = Time.now.strftime("%Y-%m-%d")
- s.email = %q{support@thoughtbot.com}
- s.executables = ["convert_to_should_syntax"]
- s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]
- s.files = Dir["[A-Z]*", "{bin,lib,rails,test}/**/*", "init.rb"]
- s.homepage = %q{http://thoughtbot.com/community/}
- s.rdoc_options = ["--line-numbers", "--main", "README.rdoc"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Context framework extracted from Shoulda}
+ s.name = %q{shoulda-context}
+ s.version = Shoulda::Context::VERSION.dup
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["thoughtbot, inc.", "Tammer Saleh", "Joe Ferris",
+ "Ryan McGeary", "Dan Croak", "Matt Jankowski"]
+ s.email = %q{support@thoughtbot.com}
+ s.homepage = %q{http://thoughtbot.com/community/}
+ s.summary = %q{Context framework extracted from Shoulda}
s.description = %q{Context framework extracted from Shoulda}
- s.add_development_dependency "mocha", "~> 0.9.10"
- s.add_development_dependency "rake"
- s.add_development_dependency "test-unit", "~> 2.0"
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]
+ s.rdoc_options = ["--line-numbers", "--main", "README.rdoc"]
- if s.respond_to? :specification_version then
- s.specification_version = 3
- else
- end
+ s.add_development_dependency("mocha", "~> 0.9.10")
+ s.add_development_dependency("rake")
+ s.add_development_dependency("test-unit", "~> 2.0")
end
Please sign in to comment.
Something went wrong with that request. Please try again.