informant-common 1.0.1 → 1.1.0
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.
- checksums.yaml +4 -4
- data/lib/informant-common/config.rb +3 -6
- data/lib/informant-common/event/agent_info.rb +2 -2
- data/lib/informant-common/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 305b1c15c677be7f3223912403790371aeaa2983b2e58a325680797967b66cf9
|
|
4
|
+
data.tar.gz: e6e8b39b1bb3216621e27a78e6d2b82969e2815ed6b9abee1e6c2b28dbae947e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cc6d1543811b1ecd81e4cb59d98727caa3b0f6b2a61ef2a81b541d5214d51b2c1aaf6f1052d084dc12495b3e3dd7154d45410e07622971f24464298b28bb19a
|
|
7
|
+
data.tar.gz: d0c0afce4cc65bbd2993086f1ea4388999e97d3c1863cc69825088b84dfaec2f0c564d154481dea3ba1a1577a991f07614b6d5b484ac8a313d8c9dd19ed7a7b2
|
|
@@ -4,13 +4,10 @@ module InformantCommon
|
|
|
4
4
|
@instance ||= InformantCommon::Config.new
|
|
5
5
|
end
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def client_identifier
|
|
11
|
-
@client_identifier ||= "informant-common-#{InformantCommon::VERSION}"
|
|
7
|
+
attr_writer :api_token
|
|
8
|
+
def api_token
|
|
9
|
+
@api_token ||= ENV['INFORMANT_API_KEY']
|
|
12
10
|
end
|
|
13
|
-
alias agent_identifier client_identifier
|
|
14
11
|
|
|
15
12
|
def enabled?
|
|
16
13
|
!api_token.nil? && api_token != ''
|
|
@@ -3,14 +3,14 @@ module InformantCommon
|
|
|
3
3
|
class AgentInfo < InformantCommon::Event::Base
|
|
4
4
|
attr_accessor :agent_identifier, :framework_version
|
|
5
5
|
|
|
6
|
-
def initialize(agent_identifier:
|
|
6
|
+
def initialize(agent_identifier: nil, framework_version: nil)
|
|
7
7
|
self.agent_identifier = agent_identifier
|
|
8
8
|
self.framework_version = framework_version
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def as_json(*_args)
|
|
12
12
|
{
|
|
13
|
-
agent_identifier: agent_identifier
|
|
13
|
+
agent_identifier: agent_identifier,
|
|
14
14
|
framework_version: framework_version,
|
|
15
15
|
runtime_version: "ruby-#{RUBY_VERSION}",
|
|
16
16
|
mongoid_version: defined?(Mongoid) ? Mongoid::VERSION : nil
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: informant-common
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Informant, LLC
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-05-
|
|
12
|
-
dependencies:
|
|
11
|
+
date: 2020-05-30 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: appraisal
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
13
27
|
description: This gem contains the common components for reporting data to the Informant.
|
|
14
28
|
email:
|
|
15
29
|
- support@informantapp.com
|