Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Upgrade to Airbrake #3

Merged
merged 7 commits into from

2 participants

@TonyStrauss
Collaborator

Hoptoad's name is changing to Airbrake, along with the service endpoints. This necessitates upgrading to a more recent version of toadhopper.

In the process, I also upgraded to a more recent version of bundler and altered the way that the Rakefile/Gemfile works; now, the Gemfile will source dependencies from the gemspec, rather than the other way around.

@atmos
Owner

Hey Tony,

I don't actually use rack_hoptoad anymore. Do you want to maintain this and release it as rack_airbrake or something similar?

@TonyStrauss
Collaborator
@TonyStrauss TonyStrauss merged commit ba9a670 into atmos:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 11, 2011
  1. Upgrade to most recent toadhopper, in order to conform to Hoptoad's n…

    Tony Strauss authored
    …ame change to Airbrake.
  2. Bump version.

    Tony Strauss authored
  3. Mention Airbrake in the README.

    Tony Strauss authored
  4. Conform to recent versions of bundler and rspec.

    Tony Strauss authored
  5. Fix Rakefile issue.

    Tony Strauss authored
  6. Add the gemspec to hoptoad.

    Tony Strauss authored
  7. Fix gemspec.

    Tony Strauss authored
This page is out of date. Refresh to see the latest.
View
9 Gemfile
@@ -1,18 +1,15 @@
source :gemcutter
-group :runtime do
- gem 'rack'
- gem 'toadhopper', '~>1.0.1'
-end
+gemspec
group :test do
gem 'rake'
- gem 'rspec', :require => 'spec'
+ gem 'rspec'
if RUBY_VERSION =~ /^1\.9/
gem 'ruby-debug19'
else
gem 'ruby-debug'
end
gem 'rcov'
- gem 'bundler', '~>0.9.12'
+ gem 'bundler', '>= 1.0.0'
end
View
2  README.md
@@ -1,7 +1,7 @@
rack_hoptoad
============
-A gem that provides exception notifications to [hoptoad](http://hoptoadapp.com) as rack middleware.
+A gem that provides exception notifications to [hoptoad](http://hoptoadapp.com)/[airbrake](http://airbrakeapp.com) as rack middleware.
Usage
=====
View
26 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,17 +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}/**/*")
+ s.files = %w(LICENSE README.md Rakefile TODO) + Dir.glob("{lib,specs}/**/*.rb") + ["#{GEM}.gemspec"]
end
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
+Gem::PackageTask.new(spec) do |pkg|
end
desc "create a gemspec file"
@@ -52,11 +48,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.6'
-
class Error < StandardError; end
attr_accessor :api_key, :environment_filters, :report_under, :rack_environment, :notifier_class, :failsafe
View
5 lib/rack/hoptoad_version.rb
@@ -0,0 +1,5 @@
+module Rack
+ class Hoptoad
+ VERSION = '0.1.7'
+ end
+end
View
33 rack_hoptoad.gemspec
@@ -0,0 +1,33 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{rack_hoptoad}
+ s.version = "0.1.7"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Corey Donohoe"]
+ s.date = %q{2011-08-11}
+ s.description = %q{A gem that provides hoptoad notifications from rack}
+ s.email = %q{atmos@atmos.org}
+ s.extra_rdoc_files = ["LICENSE", "TODO"]
+ s.files = ["LICENSE", "README.md", "Rakefile", "TODO", "lib/rack/hoptoad.rb", "lib/rack/hoptoad_version.rb", "rack_hoptoad.gemspec"]
+ s.homepage = %q{http://github.com/atmos/rack_hoptoad}
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.5.0}
+ s.summary = %q{A gem that provides hoptoad notifications from rack}
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<rack>, [">= 0"])
+ s.add_runtime_dependency(%q<toadhopper>, ["~> 2.0.0"])
+ else
+ s.add_dependency(%q<rack>, [">= 0"])
+ s.add_dependency(%q<toadhopper>, ["~> 2.0.0"])
+ end
+ else
+ s.add_dependency(%q<rack>, [">= 0"])
+ s.add_dependency(%q<toadhopper>, ["~> 2.0.0"])
+ end
+end
Something went wrong with that request. Please try again.