influx_reporter 1.2.1 → 1.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57bda7a3bf8991136728f85c0b41ad5fc211b67df2a63be374f9a8768ed5da7a
4
- data.tar.gz: 9d24646c7df82f1403cec4d05a0409e6399a4dd2b3709062e32aec4dd954df4f
3
+ metadata.gz: 04ee666c90d3911ad99eea3d9259118170c791b4137efaa2fa588b83cc33e61b
4
+ data.tar.gz: 6902f423ae48a616ab4cc1da244dce4b6b3dbb407db53674a16f5c5e82d6083c
5
5
  SHA512:
6
- metadata.gz: 311f468d39832e4a6b8965baec16c01a27052962677b163202ee3a9b01a7c83b69e490f95f7e142f140819836529e3a5bc03bca277c03676bc48d2edbf2a4a39
7
- data.tar.gz: 80efbae557e082df196364025fd54dfd1339e452491dd219e4ce01138a9dd7dae1d2d18b5c1eb2367b612af2116443749c236b507906ceda73645994979bbcca
6
+ metadata.gz: 7e5c2a857d5d8bb546902fe48c617f00ddd0586fffacb0437d1ea62d53abbcc2810508afbe5be361ec8bf77b24a2fcfdc1129f45046eb7914ac6f8f7d756de4b
7
+ data.tar.gz: d9c02cdd2ca1720630bbdcb653ee4447677a2723daea642435c6d2113a39bad061d687a3fded62deb3e6632a2a0338b0077d3bbfaef4d600ed09c3c898f410ca
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- eval_gemfile 'gemfiles/Gemfile.rails-5.0.x'
3
+ eval_gemfile 'gemfiles/Gemfile.rails-6.0.x'
4
4
 
5
5
  gem 'pry'
6
- gem 'ruby-debug-ide'
7
- gem 'debase'
data/README.md CHANGED
@@ -34,8 +34,8 @@ require 'influx_reporter'
34
34
 
35
35
  # set up an InfluxReporter configuration
36
36
  config = InfluxReporter::Configuration.new do |conf|
37
- conf.influx_reporter.database = 'endpoints'
38
- conf.influx_reporter.influx_db = {
37
+ conf.database = 'endpoints'
38
+ conf.influx_db = {
39
39
  host: 'influxdb.local',
40
40
  port: '8080'
41
41
  }
@@ -25,5 +25,5 @@ gem 'resque', require: false
25
25
 
26
26
  # Freeze Sidekiq to < 5 in Ruby 2.2 Gemfiles
27
27
  if RUBY_VERSION >= '2'
28
- gem 'sidekiq', (RUBY_VERSION >= '2.2.2' ? '~> 5' : '~> 4'), require: false
28
+ gem 'sidekiq', (RUBY_VERSION >= '2.5.0' ? '~> 6' : '~> 4'), require: false
29
29
  end
@@ -0,0 +1,5 @@
1
+ eval_gemfile File.expand_path('../Gemfile.base', __FILE__)
2
+
3
+ gem 'rails', '~> 6.1.0'
4
+ gem 'tzinfo-data'
5
+ gem 'sinatra'
@@ -0,0 +1,5 @@
1
+ eval_gemfile File.expand_path('../Gemfile.base', __FILE__)
2
+
3
+ gem 'rails', '~> 7.1.0'
4
+ gem 'tzinfo-data'
5
+ gem 'sinatra'
@@ -14,7 +14,7 @@ module InfluxReporter
14
14
  # @param config [InfluxReporter::Configuration]
15
15
  def initialize(config)
16
16
  @config = config
17
- @client = InfluxDB::Client.new config.database, config.influx_db.merge(time_precision: 'ns')
17
+ @client = InfluxDB::Client.new config.database, **config.influx_db.merge(time_precision: 'ns')
18
18
  @state = ClientState.new config
19
19
  end
20
20
 
@@ -85,5 +85,9 @@ module ::Kernel
85
85
  end
86
86
 
87
87
  res
88
+ rescue Exception => e
89
+ puts "Error requiring #{name}: #{e.message}"
90
+ puts e.backtrace.join("\n")
91
+ raise e
88
92
  end
89
93
  end
@@ -9,7 +9,7 @@ module InfluxReporter
9
9
  cls.send(:alias_method, :render_exception, :render_exception_with_influx_reporter)
10
10
  end
11
11
 
12
- def render_exception_with_influx_reporter(env, exception)
12
+ def render_exception_with_influx_reporter(env, exception, *args)
13
13
  begin
14
14
  InfluxReporter.report(exception, tags: { rack_env: env }) if InfluxReporter.started?
15
15
  rescue
@@ -17,7 +17,7 @@ module InfluxReporter
17
17
  ::Rails.logger.debug $ERROR_INFO.backtrace.join("\n")
18
18
  end
19
19
 
20
- render_exception_without_influx_reporter(env, exception)
20
+ render_exception_without_influx_reporter(env, exception, *args)
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfluxReporter
4
- VERSION = '1.2.1'
4
+ VERSION = '1.2.3'
5
5
  end
@@ -22,7 +22,7 @@ module InfluxReporter
22
22
  expect(http.query_string).to eq 'a=1&password=[FILTERED]'
23
23
  expect(http.cookies).to eq('user_id=1')
24
24
  expect(http.remote_host).to eq '1.2.3.4'
25
- expect(http.http_host).to eq 'example.org:80'
25
+ expect(http.http_host).to eq 'example.org'
26
26
  expect(http.user_agent).to eq 'test-agent 1.2/3'
27
27
 
28
28
  expect(http.headers).to eq('Cookie' => 'user_id=1',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: influx_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kacper Kawecki
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-12 00:00:00.000000000 Z
11
+ date: 2025-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description:
55
+ description:
56
56
  email: kacper@geniebelt.com
57
57
  executables: []
58
58
  extensions: []
@@ -77,6 +77,8 @@ files:
77
77
  - gemfiles/Gemfile.rails-4.1.x
78
78
  - gemfiles/Gemfile.rails-4.2.x
79
79
  - gemfiles/Gemfile.rails-5.0.x
80
+ - gemfiles/Gemfile.rails-6.0.x
81
+ - gemfiles/Gemfile.rails-7.1.x
80
82
  - gemfiles/Gemfile.rails-HEAD
81
83
  - influx_reporter.gemspec
82
84
  - lib/influx_reporter.rb
@@ -167,7 +169,7 @@ homepage: https://github.com/GenieBelt/influx-reporter
167
169
  licenses:
168
170
  - BSD-3-Clause
169
171
  metadata: {}
170
- post_install_message:
172
+ post_install_message:
171
173
  rdoc_options: []
172
174
  require_paths:
173
175
  - lib
@@ -182,9 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  - !ruby/object:Gem::Version
183
185
  version: '0'
184
186
  requirements: []
185
- rubyforge_project:
186
- rubygems_version: 2.7.7
187
- signing_key:
187
+ rubygems_version: 3.2.33
188
+ signing_key:
188
189
  specification_version: 4
189
190
  summary: Metrics collector for rails and InfluxDB based on Opbeat Ruby client library
190
191
  test_files: []