Skip to content
Browse files

Conform to recent versions of bundler and rspec.

  • Loading branch information...
1 parent b25e184 commit 6059b088477f622a0d0b84a1c5a53de62f30c559 Tony Strauss committed Aug 11, 2011
Showing with 13 additions and 19 deletions.
  1. +1 −4 Gemfile
  2. +10 −13 Rakefile
  3. +2 −2 lib/rack/hoptoad.rb
View
5 Gemfile
@@ -1,9 +1,6 @@
source :gemcutter
-group :runtime do
- gem 'rack'
- gem 'toadhopper', '~>2.0.0'
-end
+gemspec
group :test do
gem 'rake'
View
23 Rakefile
@@ -1,13 +1,13 @@
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
require 'rubygems/specification'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
require 'date'
require 'bundler'
Bundler.setup(:runtime, :test)
Bundler.require(:runtime, :test)
-require 'lib/rack/hoptoad'
+require 'lib/rack/hoptoad_version'
GEM = "rack_hoptoad"
GEM_VERSION = Rack::Hoptoad::VERSION
@@ -28,16 +28,13 @@ spec = Gem::Specification.new do |s|
s.email = EMAIL
s.homepage = HOMEPAGE
- bundle = Bundler::Definition.from_gemfile("Gemfile")
- bundle.dependencies.
- select { |d| d.groups.include?(:runtime) }.
- each { |d| s.add_dependency(d.name, d.version_requirements.to_s) }
-
+ s.add_dependency('rack')
+ s.add_dependency('toadhopper', '~>2.0.0')
s.require_path = 'lib'
s.files = %w(LICENSE README.md Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
end
-Rake::GemPackageTask.new(spec) do |pkg|
+Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
@@ -52,11 +49,11 @@ task :default => 'rack_hoptoad:spec'
namespace :rack_hoptoad do
desc "Run unit specifications"
- Spec::Rake::SpecTask.new(:spec) do |t|
- t.spec_opts << %w(-fs --color)
- t.spec_opts << '--loadby' << 'random'
- t.spec_files = Dir["spec/*_spec.rb"]
+ RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = %w(-fs --color)
+ t.pattern = "spec/*_spec.rb"
+ t.rcov_opts = []
t.rcov_opts << '--exclude' << 'spec,.bundle,.rvm'
t.rcov = ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true
t.rcov_opts << '--text-summary'
View
4 lib/rack/hoptoad.rb
@@ -1,3 +1,5 @@
+require 'rack/hoptoad_version'
+
require 'rack'
require 'erb'
require 'toadhopper'
@@ -6,8 +8,6 @@ module Rack
# Catches all exceptions raised from the app it wraps and
# posts the results to hoptoad.
class Hoptoad
- VERSION = '0.1.7'
-
class Error < StandardError; end
attr_accessor :api_key, :environment_filters, :report_under, :rack_environment, :notifier_class, :failsafe

0 comments on commit 6059b08

Please sign in to comment.
Something went wrong with that request. Please try again.