rain_catcher 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 21d83997891c531894ed0950c5d677d327f0cb3e8c38e594c691b6982e1a58b8
4
- data.tar.gz: 404ae934f248a392261b66a8d8a9bea24542e34299a1007cfe1e0f1d3e8bd2e5
3
+ metadata.gz: f5a8179b67bd0e585a9628916d516553f49c3b1c0023c469cdad1039a039f3e7
4
+ data.tar.gz: c1dfc52ef6467aead13a9028f51d076c94e0afbb212262d59e6a9c4b1c830ccb
5
5
  SHA512:
6
- metadata.gz: b8f8581204db2aa49eb41dee8d27e809e8194999173a2f26d5b77048232c2a226d24e24167ff0fbf001d82e0ee00bc14ef18e34ac09aa1a7a4c1b5a084205d77
7
- data.tar.gz: 84bef156e860e96c468017f4bae93c6b35dff7c3a3b51027ad4b6738ad67233b3655bb4dad5f080d4a1a07f7311cdb82fc8a3ac0065c59f88fcf5c46da452751
6
+ metadata.gz: 792732e90285d60a51980e97d1fd0e01b64248114020d721c93ca5b92bc4d555063ef6fb4621b83d65c78fc37a7ccac96e5796266f43e63a8f76231177aead42
7
+ data.tar.gz: c029628b26fabe140bb3ca97d06dc655e77f1734e117a14503cf66383995eee9ac1e24a8a92b46a4b00045f18f8eefb14796982e6f5d2b72626d80a1812d5afe
data/Gemfile.lock CHANGED
@@ -52,8 +52,8 @@ DEPENDENCIES
52
52
  rain_catcher!
53
53
  rake (~> 10.0)
54
54
  rspec (~> 3.0)
55
- rubocop
56
- strong_versions
55
+ rubocop (~> 0.69.0)
56
+ strong_versions (~> 0.3.2)
57
57
 
58
58
  BUNDLED WITH
59
59
  2.0.1
data/README.md CHANGED
@@ -25,3 +25,12 @@ When each request is processed, if the configured interval has elapsed then a lo
25
25
  |-|-|-|
26
26
  | `RAIN_CATCHER_LOG_INTERVAL` | 30 | Minimum number of seconds between each log entry |
27
27
  | `RAIN_CATCHER_LOG_LEVEL` | INFO | Log level to use for log entries |
28
+ | `RAIN_CATCHER_APPLICATION_NAME` | [inferred from Rails] | Application identifier which will be included in all log entries |
29
+
30
+ ## Log Structure
31
+
32
+ Log entries are output as _JSON_. For example:
33
+
34
+ ```json
35
+ {"active":5,"queued":2,"source":"rain_catcher","application":"myapp","environment":"production"}
36
+ ```
@@ -22,7 +22,11 @@ module RainCatcher
22
22
  end
23
23
 
24
24
  def queue_data
25
- Raindrops::ListenStats.new(0, 0).to_h.merge(source: 'rain_catcher')
25
+ Raindrops::ListenStats.new(0, 0).to_h.merge(
26
+ source: 'rain_catcher',
27
+ application: application_name,
28
+ environment: Rails.env.to_s
29
+ )
26
30
  end
27
31
 
28
32
  def elapsed?
@@ -39,5 +43,12 @@ module RainCatcher
39
43
  def level
40
44
  @level ||= ENV.fetch('RAIN_CATCHER_LOG_LEVEL', 'INFO').downcase.to_sym
41
45
  end
46
+
47
+ def application_name
48
+ @application_name ||= ENV.fetch(
49
+ 'RAIN_CATCHER_APPLICATION_NAME',
50
+ Rails.application.class.name.split('::').first.downcase
51
+ )
52
+ end
42
53
  end
43
54
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RainCatcher
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
Binary file
data/rain_catcher.gemspec CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'bundler', '~> 2.0'
27
27
  spec.add_development_dependency 'rake', '~> 10.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.0'
29
- spec.add_development_dependency 'rubocop'
30
- spec.add_development_dependency 'strong_versions'
29
+ spec.add_development_dependency 'rubocop', '~> 0.69.0'
30
+ spec.add_development_dependency 'strong_versions', '~> 0.3.2'
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rain_catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
@@ -56,30 +56,30 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.69.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.69.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: strong_versions
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.3.2
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.3.2
83
83
  description: Rails application statistic logging with Raindrops
84
84
  email:
85
85
  - robertanthonyfarrell@gmail.com
@@ -98,6 +98,7 @@ files:
98
98
  - lib/rain_catcher.rb
99
99
  - lib/rain_catcher/railtie.rb
100
100
  - lib/rain_catcher/version.rb
101
+ - rain_catcher-0.1.0.gem
101
102
  - rain_catcher.gemspec
102
103
  homepage: https://github.com/bobf/rain_catcher
103
104
  licenses: []