tracer_client 0.2.1 → 0.3.0

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
- SHA1:
3
- metadata.gz: 7755523f43d6f934413bb91489c80d0c0be83c83
4
- data.tar.gz: 23e28381031bb55dfc2727b9b07ef151b9a27d86
2
+ SHA256:
3
+ metadata.gz: 27e8a38c35fbc109f95ba7c54fac9bf0c65ff8ea905a19fe7e5a1a3349142bfa
4
+ data.tar.gz: 9db1743872444e3c627edc9fb0316e70418c82e793188814c28985ff5ed47f9e
5
5
  SHA512:
6
- metadata.gz: 6089c984fbd014c587801aa71467637e066f7840fb0980de62fccef541a33d02f577f8a9d15ee82cdb97c0baf4f6a56242fbc5c31a07af3f1d474c87f015bd7c
7
- data.tar.gz: c37893ac6ceed187eafef56226aee115762c4bacc26ac41b38df461cd91171a646eb11ac1777004aef596919d6b57f89ee1d042a9710623e11ce1110255cc9e5
6
+ metadata.gz: 1fc14f7cef21d4a2d81d5957e73cdefac8a28b814d5e119cfce291c81d64e1295e8a4508f0d9f725c1f8eab17587fa6a6b6b319faebbf6971b6d913b32657976
7
+ data.tar.gz: 8cbbf8218a0c5a767c75c98676bf304defd1ba4d534a930ba637a0418ef1dc96f55045b8df16a5fd90dbad5aa9972615deb4622d0af59a21c894d1d25470368e
data/README.md CHANGED
@@ -46,6 +46,16 @@ rescue => e
46
46
  end
47
47
  ```
48
48
 
49
+ To cancel sending log messages in production mode you should use the environment variable NO_TRACER with a truthy value (true, TRUE, 1, etc).
50
+ ```ruby
51
+ ENV['NO_TRACER'] - true
52
+ ```
53
+
54
+ In a development mode sending messages is disabled by default. Sending messages can be re-enabled using a TRACER environment variable with a truthy value.
55
+ ```ruby
56
+ ENV['TRACER'] - true
57
+ ```
58
+
49
59
  ## Development
50
60
 
51
61
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -3,3 +3,4 @@ require 'tracer_client/server'
3
3
  require 'tracer_client/client'
4
4
  require 'tracer_client/log'
5
5
  require 'tracer_client/changes'
6
+ require 'wannabe_bool'
@@ -132,7 +132,8 @@ module Log
132
132
 
133
133
 
134
134
  def self.log?(severity)
135
- Settings.log.severity_level.nil? || enabled_severity?(severity, Settings.log.severity_level)
135
+ (Rails.env.production? && !ENV['NO_TRACER'].to_b || ENV['TRACER'].to_b) &&
136
+ (Settings.log.severity_level.nil? || enabled_severity?(severity, Settings.log.severity_level))
136
137
  end
137
138
 
138
139
  def self.enabled_severity?(message_severity, configured_severity)
@@ -4,7 +4,7 @@ module Tracer
4
4
  module Server
5
5
 
6
6
  def self.log(notice_hash)
7
- send("http://#{Settings.tracer.host}:#{Settings.tracer.port}/api/v3/projects/#{Settings.tracer.project}/notices?api_key=#{Settings.tracer.api_key}", notice_hash)
7
+ send("http://#{Settings.tracer.host}:#{Settings.tracer.port}/api/v3/project/#{Settings.tracer.project}/notices?api_key=#{Settings.tracer.api_key}", notice_hash)
8
8
  end
9
9
 
10
10
 
@@ -33,4 +33,4 @@ module Tracer
33
33
  end
34
34
 
35
35
  end
36
- end
36
+ end
@@ -1,3 +1,3 @@
1
1
  module TracerClient
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -19,9 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'config', '~> 1.0'
23
- spec.add_dependency 'rails', '~> 5.0'
22
+ spec.add_dependency 'config', '>= 1.0'
23
+ spec.add_dependency 'rails', '>= 5.0'
24
+ spec.add_dependency 'wannabe_bool', '>= 0.7'
24
25
 
25
- spec.add_development_dependency 'bundler', '~> 1.10'
26
- spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'bundler', '>= 1.10'
27
+ spec.add_development_dependency 'rake', '>= 10.0'
27
28
  end
metadata CHANGED
@@ -1,69 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracer_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serge Galanin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-16 00:00:00.000000000 Z
11
+ date: 2020-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: config
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: wannabe_bool
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0.7'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0.7'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '1.10'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '1.10'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '10.0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '10.0'
69
83
  description: Log errors and objects changes to Tracer.
@@ -117,8 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
131
  - !ruby/object:Gem::Version
118
132
  version: '0'
119
133
  requirements: []
120
- rubyforge_project:
121
- rubygems_version: 2.6.11
134
+ rubygems_version: 3.0.6
122
135
  signing_key:
123
136
  specification_version: 4
124
137
  summary: Tracer API