influxdb-rails 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +5 -0
- data/influxdb-rails.gemspec +1 -1
- data/lib/influxdb/rails/middleware/request_subscriber.rb +9 -1
- data/lib/influxdb/rails/version.rb +1 -1
- data/spec/requests/action_controller_metrics_spec.rb +2 -1
- data/spec/support/rails5/app.rb +1 -1
- data/spec/support/rails6/app.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 613267c17473f3d84942b39e09a34d6e5797edf9bf3974426aea5d979016f5cb
|
4
|
+
data.tar.gz: afa98b412ac01fca796d23fcd80a838197c503cf76d2bfb5e921068d82db037d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af5f5e21271757564eb91176ee0339e385a56dd130e1d6236d46d3515882d00a749f0c38d1e4920dfc6a24385d838ec8c91b1d8b084015f2394e9448a3282d44
|
7
|
+
data.tar.gz: c755671a0160554f0b0012ad32afca0f760f4f98ca49df0854584009fb90c43855e1ce9238189db88482bc2d2ccc00bb06d460e4972d60c75006791c406f4a4f
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
For the full commit log, [see here](https://github.com/influxdata/influxdb-rails/commits/one-stable).
|
4
4
|
|
5
|
+
## v1.0.3, released 2021-09-15
|
6
|
+
|
7
|
+
- In case of unhandled exceptions, set status in measurements like Rails.logger does
|
8
|
+
- Require Ruby 2.5
|
9
|
+
|
5
10
|
## v1.0.2, released 2021-04-13
|
6
11
|
|
7
12
|
Fix passing booleans to custom tags.
|
data/influxdb-rails.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features|smoke)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.required_ruby_version = ">= 2.
|
25
|
+
spec.required_ruby_version = ">= 2.5.0"
|
26
26
|
|
27
27
|
spec.add_runtime_dependency "influxdb", "~> 0.6", ">= 0.6.4"
|
28
28
|
spec.add_runtime_dependency "railties", ">= 5.0"
|
@@ -16,7 +16,7 @@ module InfluxDB
|
|
16
16
|
{
|
17
17
|
method: "#{payload[:controller]}##{payload[:action]}",
|
18
18
|
hook: "process_action",
|
19
|
-
status:
|
19
|
+
status: status,
|
20
20
|
format: payload[:format],
|
21
21
|
http_method: payload[:method],
|
22
22
|
exception: payload[:exception]&.first,
|
@@ -38,6 +38,14 @@ module InfluxDB
|
|
38
38
|
configuration.client.time_precision
|
39
39
|
)
|
40
40
|
end
|
41
|
+
|
42
|
+
def status
|
43
|
+
if payload[:exception] && ::Rails::VERSION::MAJOR < 7
|
44
|
+
ActionDispatch::ExceptionWrapper.status_code_for_exception(payload[:exception].first)
|
45
|
+
else
|
46
|
+
payload[:status]
|
47
|
+
end
|
48
|
+
end
|
41
49
|
end
|
42
50
|
end
|
43
51
|
end
|
@@ -89,7 +89,8 @@ RSpec.describe "ActionController metrics", type: :request do
|
|
89
89
|
tags: a_hash_including(
|
90
90
|
method: "ExceptionsController#index",
|
91
91
|
hook: "process_action",
|
92
|
-
exception: "
|
92
|
+
exception: "ActiveRecord::RecordNotFound",
|
93
|
+
status: 404
|
93
94
|
)
|
94
95
|
)
|
95
96
|
end
|
data/spec/support/rails5/app.rb
CHANGED
data/spec/support/rails6/app.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Bruckmayer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: influxdb
|
@@ -350,14 +350,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
350
350
|
requirements:
|
351
351
|
- - ">="
|
352
352
|
- !ruby/object:Gem::Version
|
353
|
-
version: 2.
|
353
|
+
version: 2.5.0
|
354
354
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
355
355
|
requirements:
|
356
356
|
- - ">="
|
357
357
|
- !ruby/object:Gem::Version
|
358
358
|
version: '0'
|
359
359
|
requirements: []
|
360
|
-
rubygems_version: 3.1.
|
360
|
+
rubygems_version: 3.1.6
|
361
361
|
signing_key:
|
362
362
|
specification_version: 4
|
363
363
|
summary: InfluxDB bindings for Ruby on Rails.
|