exceptional 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/exceptional.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{exceptional}
4
- s.version = "2.0.1"
4
+ s.version = "2.0.2"
5
5
  s.authors = ["Contrast"]
6
6
  s.summary = %q{Exceptional is the core Ruby library for communicating with http://getexceptional.com (hosted error tracking service)}
7
7
  s.description = %q{Exceptional is the core Ruby library for communicating with http://getexceptional.com (hosted error tracking service). Use it to find out about errors that happen in your live app. It captures lots of helpful information to help you fix the errors.}
data/lib/exceptional.rb CHANGED
@@ -11,7 +11,7 @@ require 'exceptional/remote'
11
11
 
12
12
  module Exceptional
13
13
  PROTOCOL_VERSION = 5
14
- VERSION = '0.2.1'
14
+ VERSION = '2.0.2'
15
15
  CLIENT_NAME = 'getexceptional-rails-plugin'
16
16
 
17
17
  def self.logger
@@ -16,7 +16,7 @@ module Exceptional
16
16
  'run_as_user' => get_username,
17
17
  'application_root_directory' => application_root,
18
18
  'language' => 'ruby',
19
- 'language_version' => "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} #{RUBY_RELEASE_DATE} #{RUBY_PLATFORM}",
19
+ 'language_version' => language_version_string,
20
20
  'framework' => framework,
21
21
  'libraries_loaded' => libraries_loaded
22
22
  }
@@ -47,6 +47,10 @@ module Exceptional
47
47
  'UNKNOWN'
48
48
  end
49
49
 
50
+ def self.language_version_string
51
+ "#{RUBY_VERSION rescue '?.?.?'} p#{RUBY_PATCHLEVEL rescue '???'} #{RUBY_RELEASE_DATE rescue '????-??-??'} #{RUBY_PLATFORM rescue '????'}"
52
+ end
53
+
50
54
  def self.get_username
51
55
  ENV['LOGNAME'] || ENV['USER'] || ENV['USERNAME'] || ENV['APACHE_RUN_USER'] || 'UNKNOWN'
52
56
  end
data/spec/bin/ginger CHANGED
@@ -7,7 +7,7 @@ rescue LoadError
7
7
  puts <<-INSTALL_GINGER
8
8
  Install ginger to test plugin against multiple environments:
9
9
 
10
- sudo gem install freelancing-god-ginger --source=http://gems.github.com
10
+ gem install ginger
11
11
 
12
12
  More details: http://github.com/freelancing-god/ginger
13
13
  INSTALL_GINGER
@@ -13,7 +13,7 @@ describe Exceptional::ControllerExceptionData, 'when no request/controller/param
13
13
  ENV['LOGNAME'] = 'bob'
14
14
  ENV['SOMEVAR'] = 'something'
15
15
  ENV['HTTP_SOMETHING'] = 'should be stripped'
16
- RAILS_ENV = 'test' unless defined?(RAILS_ENV)
16
+ ::RAILS_ENV = 'test' unless defined?(RAILS_ENV)
17
17
  Time.stub!(:now).and_return(Time.mktime(1970,1,1))
18
18
  error = Exceptional::FunkyError.new('some message')
19
19
  @data = Exceptional::ControllerExceptionData.new(error)
@@ -32,8 +32,8 @@ describe Exceptional::ControllerExceptionData, 'when no request/controller/param
32
32
  client_hash['protocol_version'].should == Exceptional::PROTOCOL_VERSION
33
33
  end
34
34
 
35
- it "generates json" do
36
- JSON.parse(@data.to_json)
35
+ it "generates parseable json" do
36
+ JSON.parse(@data.to_json)['exception']['exception_class'].should == 'Exceptional::FunkyError'
37
37
  end
38
38
 
39
39
  it "capture application_environment" do
@@ -7,8 +7,12 @@ class ScenarioWithName < Ginger::Scenario
7
7
  end
8
8
  end
9
9
 
10
+ def is_ruby_19?
11
+ RUBY_VERSION[0..2].eql?('1.9')
12
+ end
13
+
10
14
  def create_scenario(version)
11
- scenario = ScenarioWithName.new("Rails #{version}")
15
+ scenario = ScenarioWithName.new("Rails #{version} on ruby: #{[RUBY_VERSION, RUBY_PATCHLEVEL, RUBY_RELEASE_DATE, RUBY_PLATFORM].join(' ')}")
12
16
  scenario[/^active_?support$/] = version
13
17
  scenario[/^active_?record$/] = version
14
18
  scenario[/^action_?pack$/] = version
@@ -29,11 +33,14 @@ Ginger.configure do |config|
29
33
  rails_1_2_6[/^action_?controller$/] = "1.13.6"
30
34
  rails_1_2_6[/^rails$/] = "1.2.6"
31
35
 
32
- config.scenarios << rails_1_2_6
33
- config.scenarios << create_scenario("2.0.2")
34
- config.scenarios << create_scenario("2.1.2")
35
- config.scenarios << create_scenario("2.2.2")
36
- config.scenarios << create_scenario("2.3.2")
36
+ unless is_ruby_19?
37
+ config.scenarios << rails_1_2_6
38
+ config.scenarios << create_scenario("2.0.2")
39
+ config.scenarios << create_scenario("2.1.2")
40
+ config.scenarios << create_scenario("2.2.2")
41
+ config.scenarios << create_scenario("2.3.2")
42
+ end
37
43
  config.scenarios << create_scenario("2.3.3")
38
44
  config.scenarios << create_scenario("2.3.4")
45
+ config.scenarios << create_scenario("2.3.5")
39
46
  end
@@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'exceptional', 'integrati
3
3
 
4
4
  describe Exceptional, 'version number' do
5
5
  it "be available proramatically" do
6
- Exceptional::VERSION.should == '0.2.1'
6
+ Exceptional::VERSION.should == '2.0.2'
7
7
  end
8
8
  end
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptional
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contrast
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-18 00:00:00 +00:00
12
+ date: 2010-01-04 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15