informant-common 1.0.1 → 1.1.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
2
  SHA256:
3
- metadata.gz: 1e5749ccc5f8f590ea7e9d677b4e7fd4f1260df6062ac4844b7cd45d1fa22e40
4
- data.tar.gz: 9f4510f43152f8d67022d7025205e0bb174afe6703b39982c5ae325a98af4d38
3
+ metadata.gz: 305b1c15c677be7f3223912403790371aeaa2983b2e58a325680797967b66cf9
4
+ data.tar.gz: e6e8b39b1bb3216621e27a78e6d2b82969e2815ed6b9abee1e6c2b28dbae947e
5
5
  SHA512:
6
- metadata.gz: bbf90e730523d4fecd04c7fc43c9b5e158274ad09df73d41de0edb53f486e2ac7fb99d8d55dd9499f2231d4d65b5742f7b69cd9ec84bb24f860b602b016e28d7
7
- data.tar.gz: b105b98f0ee873b76aa2317cc2eb41178740e54c73dea5a6ff476adf2c854607b6c68c154f20ac85ebe2b35785d5a3df49e4814610b4983515202d81a9bb8eed
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
- attr_accessor :api_token
8
-
9
- attr_writer :client_identifier
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: InformantCommon::Config.client_identifier, framework_version: nil)
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 || InformantCommon::Config.client_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
@@ -1,3 +1,3 @@
1
1
  module InformantCommon
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
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.1
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-28 00:00:00.000000000 Z
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