Permalink
Browse files

Use Bundler gem conventions.

Use stable version of shoulda-context. Remove rdoc-related code.
  • Loading branch information...
1 parent 22740fd commit 26fb35aae9929c7250aa8cb75570bf0ea18e02c6 @gabebw gabebw committed Nov 12, 2011
Showing with 26 additions and 62 deletions.
  1. +7 −5 Gemfile
  2. +2 −32 Rakefile
  3. +1 −2 gemfiles/3.0.gemfile
  4. +1 −2 gemfiles/3.1.gemfile
  5. +15 −21 shoulda-matchers.gemspec
View
12 Gemfile
@@ -1,12 +1,14 @@
source 'http://rubygems.org'
gemspec
-gem 'rake', '~> 0.9.2'
# For test Rails application
+gem 'shoulda-context', '~> 1.0.0'
gem 'sqlite3', :platform => :ruby
-gem 'activerecord-jdbc-adapter', :platform => :jruby
+
+# Can't wrap in platform :jruby do...end block because appraisal doesn't support
+# it
+gem 'activerecord-jdbc-adapter', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
-gem 'jdbc-sqlite3', :platform => :jruby
-gem 'jruby-openssl', :platform => :jruby
-gem 'shoulda-context', '~> 1.0.0.beta1'
+gem 'jdbc-sqlite3', :platform => :jruby
+gem 'jruby-openssl', :platform => :jruby
View
34 Rakefile
@@ -1,46 +1,16 @@
-require 'rubygems'
-require 'bundler/setup'
-require 'rake'
-require 'rdoc/task'
-require 'rubygems/package_task'
+require 'bundler'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'appraisal'
-$LOAD_PATH.unshift("lib")
-require 'shoulda/matchers/version'
-
-Rake::RDocTask.new { |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
- rdoc.options << '--line-numbers'
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
- rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
-}
+Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new do |t|
t.pattern = "spec/**/*_spec.rb"
t.rspec_opts = '--color --format progress'
t.verbose = false
end
-desc "Run code-coverage analysis using rcov"
-RSpec::Core::RakeTask.new(:coverage) do |t|
- t.rspec_opts = '--color --format progress'
- t.rcov = true
- t.rcov_opts = %{--exclude osx\/objc,spec,gems\/ --failure-threshold 100}
- t.pattern = "spec/**/*_spec.rb"
-end
-
-eval("$specification = begin; #{IO.read('shoulda-matchers.gemspec')}; end")
-Gem::PackageTask.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]
-
Cucumber::Rake::Task.new do |t|
t.fork = false
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
View
3 gemfiles/3.0.gemfile
@@ -2,13 +2,12 @@
source "http://rubygems.org"
-gem "rake", "~> 0.9.2"
+gem "shoulda-context", "~> 1.0.0"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
-gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.0.10"
gemspec :path=>"../"
View
3 gemfiles/3.1.gemfile
@@ -2,13 +2,12 @@
source "http://rubygems.org"
-gem "rake", "~> 0.9.2"
+gem "shoulda-context", "~> 1.0.0"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
-gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.1.0"
gem "uglifier"
gem "jquery-rails"
View
36 shoulda-matchers.gemspec
@@ -2,31 +2,25 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
require 'shoulda/matchers/version'
Gem::Specification.new do |s|
- s.name = %q{shoulda-matchers}
- s.version = Shoulda::Matchers::VERSION.dup
+ s.name = "shoulda-matchers"
+ s.version = Shoulda::Matchers::VERSION.dup
+ s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak",
+ "Matt Jankowski", "Stafford Brunk"]
+ s.date = Time.now.strftime("%Y-%m-%d")
+ s.email = "support@thoughtbot.com"
+ s.homepage = "http://thoughtbot.com/community/"
+ s.summary = "Making tests easy on the fingers and eyes"
+ s.description = "Making tests easy on the fingers and eyes"
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak",
- "Matt Jankowski", "Stafford Brunk"]
- s.date = Time.now.strftime("%Y-%m-%d")
- s.email = %q{support@thoughtbot.com}
- s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]
- s.files = Dir["[A-Z]*", "{bin,lib,rails,test}/**/*"]
- s.homepage = %q{http://thoughtbot.com/community/}
- s.rdoc_options = ["--line-numbers", "--main", "README.rdoc"]
+ 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.rubygems_version = %q{1.3.5}
- s.summary = %q{Making tests easy on the fingers and eyes}
- s.description = %q{Making tests easy on the fingers and eyes}
s.add_development_dependency("mocha", "~> 0.9.10")
- s.add_development_dependency("rspec-rails", "~> 2.6.1.beta1")
+ s.add_development_dependency("rspec-rails", "~> 2.6.1")
s.add_development_dependency("cucumber", "~> 0.10.0")
- s.add_development_dependency("appraisal", "~> 0.3.4")
s.add_development_dependency("aruba")
-
- if s.respond_to? :specification_version then
- s.specification_version = 3
- else
- end
+ s.add_development_dependency("appraisal", "~> 0.4.0")
+ s.add_development_dependency("rake", "~> 0.9.2")
end

0 comments on commit 26fb35a

Please sign in to comment.