yeller_ruby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 451dd659c12b2ed199b4bcfc8fcb5572a5d2dcaf
4
- data.tar.gz: 99a54312a14d82b0023754adcfd169ebda6ddb00
3
+ metadata.gz: 309eea40e39b4c443053435583fbcbbfbef21b9d
4
+ data.tar.gz: 4c67f3c2a579396f9b3ea7ba6a9748771e8862b4
5
5
  SHA512:
6
- metadata.gz: 3e7a777043452570dd959ca2ce1745245995e9c65d32ff95c1507fe3b018d25042b8462fae410f5f5bf3cc5bc0a3369ac8b5a8a3b6790cc172de23b4f08154e0
7
- data.tar.gz: f1f06a77f38042624f34a7e1971767317fa46d52676143ded088787df8a699ac4badf4ebb7e63550db885efbae2b1a7d0b88e7cdf49370f49e35789cdafe0fb4
6
+ metadata.gz: 6001f94015b5739ec2f79ceba94aee0ed279f851cb0e39087e8282c7cd844d018ee674d4608c68f7074a0c4cf03e4ec98f354974592ef9278c0f370821d7a333
7
+ data.tar.gz: b756482a561c1ae6bc6e2b02a04d7422a88459b88245f772d6aef10aecccd3114c71728a136e8405efcce5a904db441d200090ae43fbb53e23ddfaef9518a0cd
data/lib/yeller/client.rb CHANGED
@@ -35,6 +35,10 @@ module Yeller
35
35
  next_server.client.request(post)
36
36
  end
37
37
 
38
+ def enabled?
39
+ true
40
+ end
41
+
38
42
  private
39
43
 
40
44
  def next_server
@@ -2,5 +2,9 @@ module Yeller
2
2
  class IgnoringClient
3
3
  def report(*_)
4
4
  end
5
+
6
+ def enabled?
7
+ false
8
+ end
5
9
  end
6
10
  end
data/lib/yeller/rack.rb CHANGED
@@ -11,6 +11,11 @@ module Yeller
11
11
  @client.report(exception, options)
12
12
  end
13
13
 
14
+ def self.enabled?
15
+ return false unless @client
16
+ @client.enabled?
17
+ end
18
+
14
19
  def initialize(app)
15
20
  @app = app
16
21
  end
data/lib/yeller/rails.rb CHANGED
@@ -11,6 +11,10 @@ module Yeller
11
11
  end
12
12
  end
13
13
 
14
+ def self.enabled?
15
+ Yeller::Rack.enabled?
16
+ end
17
+
14
18
  module ActionControllerCatchingHooks
15
19
  def self.included(base)
16
20
  base.send(:alias_method, :render_exception_without_yeller, :render_exception)
@@ -17,6 +17,7 @@ module Yeller
17
17
  options[:"application-environment"] ||
18
18
  ENV['RAILS_ENV'] ||
19
19
  ENV['RACK_ENV'] ||
20
+ ((defined?(::Rails) && Rails.respond_to?(:env)) ? Rails.env.to_s : nil) ||
20
21
  PRODUCTION
21
22
  end
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module Yeller
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeller_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Crayford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,14 +42,14 @@ dependencies:
42
42
  name: yajl-ruby
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.2.0
55
55
  description: A Ruby/Rack/Rails client for yellerapp.com