redis_prometheus 0.6.0 → 0.6.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
- SHA1:
3
- metadata.gz: 057c01c6b5674330724729626b61ea92d4dbed94
4
- data.tar.gz: c593b85ae67eb4110232daca8d3bf18684afdad9
2
+ SHA256:
3
+ metadata.gz: 75e9c46488f952d2c812d23091b0404dbb42b8da00fea580a6bd89729ecc66b4
4
+ data.tar.gz: 961d40f0a53973bbcbbb5c4a00b8ea5ff74d3327ee4f9fba870353ff9ab7a4a8
5
5
  SHA512:
6
- metadata.gz: f17669ba7f08c7e57cef7e25c80a4ab512c0ee7308bd72196599ccfe2822282fc2982ef404135d6a1980fbd36aa1b29f7baa738f7a99aa7dfc2d5b29455d5967
7
- data.tar.gz: e99b4ce1fe12a2dd0a4a3702e9130ffc3c0aec8bde0dce9871e607173ba46a7bbd32bb245593e3671f4091a57e2253d2d28200bfe93bb661371c57dd62951241
6
+ metadata.gz: be7b4f411e263adae747c2f31febec8f5ce780c2047906da68d440be85261f1d534873b26c5791027e0962df6ec3d164c7ab5745526ff4f1f15262b792d9643f
7
+ data.tar.gz: f98882fa04252ec55f27ae3f5f5950d5695c0da15adf5034db029277d4f20d55c44f6596b37832279ecac5c9c2fea8fd26b143a52b6350409ec682a25434cb07
@@ -47,7 +47,7 @@ module RedisPrometheus
47
47
  end
48
48
  data[:service] = ENV["REDIS_PROMETHEUS_SERVICE"]
49
49
 
50
- next if Rails.application.config.redis_prometheus.ignored_urls.include?(data[:url])
50
+ next if defined?(Rails) && Rails.application.config.redis_prometheus.ignored_urls.include?(data[:url])
51
51
 
52
52
  response << "http_request_duration_seconds_bucket{"
53
53
  response << data.map {|k,v| "#{k}=\"#{v}\""}.join(",")
@@ -97,7 +97,7 @@ module RedisPrometheus
97
97
 
98
98
  def record(env, code, duration)
99
99
  url = "#{env["SCRIPT_NAME"]}#{env["PATH_INFO"]}"
100
- return if Rails.application.config.redis_prometheus.ignored_urls.include?(url)
100
+ return if defined?(Rails) && Rails.application.config.redis_prometheus.ignored_urls.include?(url)
101
101
 
102
102
  url.gsub!(%r{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}i, "{uuid}")
103
103
  url.gsub!(%r{/\b\d+\b}i, "{id}")
@@ -1,3 +1,3 @@
1
1
  module RedisPrometheus
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require "redis_prometheus/middleware"
2
- require "redis_prometheus/railtie"
2
+ require "redis_prometheus/railtie" if defined?(Rails)
3
3
  require "redis_prometheus/version"
4
4
 
5
5
  module RedisPrometheus
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_prometheus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubyforge_project:
97
- rubygems_version: 2.6.13
96
+ rubygems_version: 3.0.1
98
97
  signing_key:
99
98
  specification_version: 4
100
99
  summary: Capture and serve rack statistics for Prometheus in Redis