newrelic_tag 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ class NewrelicTag
46
46
 
47
47
  def enabled?
48
48
  @enabled = begin
49
- environment_allowed? && has_tag?
49
+ environment_allowed? && newrelic_allowed? && has_tag?
50
50
  rescue => e
51
51
  puts "Error reading NewRelic tag: #{e}"
52
52
  false
@@ -61,9 +61,13 @@ class NewrelicTag
61
61
  def environment_allowed?
62
62
  self.class.allowed_environments.include?(environment)
63
63
  end
64
-
64
+
65
65
  private
66
66
 
67
+ def newrelic_allowed?
68
+ ENV['NEWRELIC_ENABLE'].to_s !~ /false|off|no/i
69
+ end
70
+
67
71
  def environment
68
72
  ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
69
73
  end
@@ -2,7 +2,7 @@ class NewrelicTag
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_tag
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Griffin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-10 00:00:00 -04:00
18
+ date: 2012-03-07 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -45,10 +45,10 @@ files:
45
45
  - LICENSE
46
46
  - lib/newrelic_tag/version.rb
47
47
  - lib/newrelic_tag.rb
48
- has_rdoc: true
48
+ has_rdoc: false
49
49
  homepage: http://github.com/Viximo/newrelic_tag
50
- licenses: []
51
-
50
+ licenses:
51
+ - MIT
52
52
  post_install_message:
53
53
  rdoc_options: []
54
54