mnemosyne-ruby 1.7.1 → 1.8.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: ac987a42c8acad894e9ba6f4a7a8f82978a070a814f1934740e972d872319483
4
- data.tar.gz: fc1fce9f2aa11e6f01dc826a70d5130791191d4d6750a8f65239a70bd3c33c6a
3
+ metadata.gz: 460256725e443fc1e4d8524178e22e80827a2b53632d67ae9755d4d85ee5ea71
4
+ data.tar.gz: c645fc66b6a7097858f25271417265c1a1c1b51d4bebcf5d1912ca8a579fde10
5
5
  SHA512:
6
- metadata.gz: 3089578f4a14216d8f50d0aac9f2af6ef177051181629ee8f5956b5874f9396dca9723670bc5eb776b7a8cb0f24567c3a48714be5bf3b972166d9bda5371f41f
7
- data.tar.gz: bc4c72f330ba74aec138fb31dcaa4acb9c53f426cda98c34abae7780fd30c076d0d39ce6f804497b7d40a5bc5dac659df798c57ecb7f692084c56ae087d2aca3
6
+ metadata.gz: 64bb20e6b63437b403e24141a5e46612b4e2f73727d0f1b18713a0e629666ac3e047655083d3bd57d7cd69d8dd0521abbceba5991f91980c7a05da9f5b4477e9
7
+ data.tar.gz: c264ae5bbabb2a7123723cc6855290023c59312885f9ca8c763c46e7c1a98b765230f5e31022ec685dd114afce14a55ff450890a9420ea8a5b4740882e719362
data/.editorconfig ADDED
@@ -0,0 +1,8 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ charset = utf-8
7
+ trim_trailing_whitespace = true
8
+ insert_final_newline = true
data/.travis.yml CHANGED
@@ -8,32 +8,27 @@ addons:
8
8
  packages:
9
9
  - rabbitmq-server
10
10
  rvm:
11
- - 2.6.3
12
- - 2.5.5
13
- - 2.4.6
11
+ - 2.6.5
12
+ - 2.5.7
13
+ - 2.4.9
14
14
  - 2.3.8
15
15
  gemfile:
16
+ - gemfiles/rails_60.gemfile
16
17
  - gemfiles/rails_52.gemfile
17
18
  - gemfiles/rails_51.gemfile
18
19
  - gemfiles/rails_50.gemfile
19
20
  - gemfiles/rails_42.gemfile
21
+
20
22
  before_install:
21
23
  - echo yes | rvm gemset delete global
22
24
  - gem install bundler -v'~>1.0'
23
25
  script:
24
26
  - bundle exec rake rubocop
25
27
  - bundle exec rake spec
26
- jobs:
27
- include:
28
- - stage: Release
29
- rvm: 2.6.3
30
- install: skip
31
- script: skip
32
- deploy:
33
- provider: rubygems
34
- api_key:
35
- secure: s7hUPxL4RULQ398GXk6Ko/y3QtUy7bZMTzcC4sL9Opsw76IRhOY0n+c6r+S8wHH3n+cRxiLpUyXRAsLMhjd67Rn+qaBoVbEfyzZKt1EAYyskFdPf40Jlq3FjOjRjAJW+hLDYloLXqqgLIrx/ybOv0YOfKyGKmk6eBNCx9S5GPJzt15WAM4Lz+TxNuR82YhsDybcGtTtLJ1WCF5FeQ297l2OESgvikRoADhIIM3HVk6Msyqw7RwFlpoIFGPRhXZD7UmML981rxK4Gxkh5xKGJiInjzL8lYOgT3KIfSLwtp9JoDbtpKbzdIQfA8Z35aRzpLjofPFxxYsKjwmCfdKxvJf5E5hTlenrILqSIovuknHb9oNOp0aCdp52N4+B8BZl7n1muQzr1AKy/ogtkTAgmlPs5tW+qx2h6E5MU0wfy6sS0AqKtVcGaZ1u85llifY2TvYriHReBIf8vddOe6LLbDcPnaTrTnAdsk/Bx9n+Zd8A2l3vzam9RbwTjlr7ZezIY67RRknfScEO+qCt9cfdAKf57ZdpiAecDFEr9V/CdAPEBevxaoiTwzFrjO+N9BY57eGHJsPda8NwNsrBraGBgcgKOXWeg9MowfU+wWpUSbeAJDZ2zZabGRKJkXpbRNNnf3webPSaXfb9qeWrCHXXbuI8JO+PQmx6OX8IHGjqyE1E=
36
- gem: mnemosyne-ruby
37
- on:
38
- tags: true
39
- repo: mnemosyne-mon/mnemosyne-ruby
28
+
29
+ matrix:
30
+ exclude:
31
+ - rvm: 2.4.9
32
+ gemfile: gemfiles/rails_60.gemfile
33
+ - rvm: 2.3.8
34
+ gemfile: gemfiles/rails_60.gemfile
data/Appraisals CHANGED
@@ -1,3 +1,7 @@
1
+ appraise 'rails-60' do
2
+ gem 'rails', '~> 6.0.0', require: false
3
+ gem 'sqlite3', '~> 1.4', require: false
4
+ end
1
5
 
2
6
  appraise 'rails-52' do
3
7
  gem 'rails', '~> 5.2.0', require: false
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.8.0] - 2019-10-25
9
+ ### Added
10
+ - Improve compatibility with Rails 6.0
11
+
8
12
  ## [1.7.1] - 2019-06-15
9
13
  ### Fixed
10
14
  - Reworked Faraday probe to not override connection middleware stack
@@ -82,7 +86,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
82
86
  ### Added
83
87
  - Add platform identifier
84
88
 
85
- [unreleased]: https://github.com/:mnemosyne-mon/mnemosyne-ruby/compare/v1.7.1...HEAD
89
+ [Unreleased]: https://github.com/mnemosyne-mon/mnemosyne-ruby/compare/v1.8.0...HEAD
90
+ [1.8.0]: https://github.com/mnemosyne-mon/mnemosyne-ruby/compare/v1.7.1...v1.8.0
86
91
  [1.7.1]: https://github.com/mnemosyne-mon/mnemosyne-ruby/compare/v1.7.0...v1.7.1
87
92
  [1.7.0]: https://github.com/mnemosyne-mon/mnemosyne-ruby/compare/v1.6.2...v1.7.0
88
93
  [1.6.2]: https://github.com/mnemosyne-mon/mnemosyne-ruby/compare/v1.6.1...v1.6.2
@@ -6,7 +6,7 @@ gem "appraisal"
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.6"
8
8
  gem "rubocop", "~> 0.67.1"
9
- gem "timecop", "~> 0.8.0"
9
+ gem "timecop", "~> 0.9.1"
10
10
  gem "pry", require: false
11
11
  gem "pry-byebug", require: false
12
12
  gem "faraday", require: false
@@ -6,7 +6,7 @@ gem "appraisal"
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.6"
8
8
  gem "rubocop", "~> 0.67.1"
9
- gem "timecop", "~> 0.8.0"
9
+ gem "timecop", "~> 0.9.1"
10
10
  gem "pry", require: false
11
11
  gem "pry-byebug", require: false
12
12
  gem "faraday", require: false
@@ -6,7 +6,7 @@ gem "appraisal"
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.6"
8
8
  gem "rubocop", "~> 0.67.1"
9
- gem "timecop", "~> 0.8.0"
9
+ gem "timecop", "~> 0.9.1"
10
10
  gem "pry", require: false
11
11
  gem "pry-byebug", require: false
12
12
  gem "faraday", require: false
@@ -6,7 +6,7 @@ gem "appraisal"
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.6"
8
8
  gem "rubocop", "~> 0.67.1"
9
- gem "timecop", "~> 0.8.0"
9
+ gem "timecop", "~> 0.9.1"
10
10
  gem "pry", require: false
11
11
  gem "pry-byebug", require: false
12
12
  gem "faraday", require: false
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.6"
8
+ gem "rubocop", "~> 0.67.1"
9
+ gem "timecop", "~> 0.9.1"
10
+ gem "pry", require: false
11
+ gem "pry-byebug", require: false
12
+ gem "faraday", require: false
13
+ gem "msgr", require: false
14
+ gem "rails", "~> 6.0.0", require: false
15
+ gem "restify", require: false
16
+ gem "sidekiq", require: false
17
+ gem "sqlite3", "~> 1.4", require: false
18
+ gem "webmock", require: false
19
+
20
+ gemspec path: "../"
@@ -57,7 +57,7 @@ module Mnemosyne
57
57
  'amqps' => 5671
58
58
  }.freeze
59
59
 
60
- def make_amqp_uri(amqp) # rubocop:disable AbcSize
60
+ def make_amqp_uri(amqp)
61
61
  uri = URI('')
62
62
 
63
63
  uri.scheme = amqp[:scheme]
@@ -12,6 +12,7 @@ module Mnemosyne
12
12
 
13
13
  def attach_error(err)
14
14
  return unless (trace = ::Mnemosyne::Instrumenter.current_trace)
15
+
15
16
  trace.attach_error(err)
16
17
  end
17
18
  end
@@ -27,6 +27,7 @@ module Mnemosyne
27
27
  def trace(name, **kwargs)
28
28
  if (trace = current_trace)
29
29
  return yield trace if block_given?
30
+
30
31
  return trace
31
32
  end
32
33
 
@@ -86,11 +87,13 @@ module Mnemosyne
86
87
 
87
88
  def trace(*args)
88
89
  return unless (instrumenter = instance)
90
+
89
91
  instrumenter.trace(*args)
90
92
  end
91
93
 
92
94
  def current_trace
93
95
  return unless (instrumenter = instance)
96
+
94
97
  instrumenter.current_trace
95
98
  end
96
99
  end
@@ -21,7 +21,7 @@ module Mnemosyne
21
21
 
22
22
  env[:request_headers].merge!({
23
23
  'X-Mnemosyne-Transaction' => trace.transaction,
24
- 'X-Mnemosyne-Origin' => span.uuid,
24
+ 'X-Mnemosyne-Origin' => span.uuid
25
25
  }.reject {|_, v| v.nil? })
26
26
 
27
27
  @app.call(env).on_complete do |env|
@@ -28,6 +28,7 @@ module Mnemosyne
28
28
 
29
29
  def close
30
30
  return if @closed
31
+
31
32
  @closed = true
32
33
 
33
34
  begin
@@ -17,9 +17,9 @@ module Mnemosyne
17
17
 
18
18
  module Extension
19
19
  def lock!
20
- if !@handlers.include?('Mnemosyne::Middleware::Faraday')
20
+ unless @handlers.include?('Mnemosyne::Middleware::Faraday')
21
21
  if respond_to?(:is_adapter?, true) &&
22
- (idx = @handlers.find_index {|h| is_adapter?(h) })
22
+ (idx = @handlers.find_index {|h| is_adapter?(h) })
23
23
  insert(idx, ::Mnemosyne::Middleware::Faraday)
24
24
  else
25
25
  use(::Mnemosyne::Middleware::Faraday)
@@ -5,7 +5,7 @@ require 'rails'
5
5
  module Mnemosyne
6
6
  class Railtie < ::Rails::Railtie
7
7
  initializer 'mnemosyne.initialize' do |app|
8
- config = app.config_for('mnemosyne')
8
+ config = app.config_for('mnemosyne').stringify_keys
9
9
 
10
10
  ::Mnemosyne::Logging.logger = Rails.logger
11
11
 
@@ -51,6 +51,7 @@ module Mnemosyne
51
51
  def required(path)
52
52
  return unless activated?
53
53
  return unless (set = monitor.delete(path))
54
+
54
55
  set.each(&method(:activate))
55
56
  end
56
57
 
@@ -57,12 +57,13 @@ module Mnemosyne
57
57
  end
58
58
 
59
59
  Error = Struct.new(:error) do
60
- BT_REGEXP = /^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$/
60
+ BT_REGEXP = /^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$/.freeze
61
61
 
62
62
  def serialize
63
63
  {
64
64
  type: error.class.name,
65
65
  text: error.message.to_s,
66
+ cause: serialize_cause,
66
67
  stacktrace: serialize_backtrace
67
68
  }.compact
68
69
  end
@@ -78,6 +79,10 @@ module Mnemosyne
78
79
  {file: md[1], line: md[2], call: md[3], raw: md[0]}
79
80
  end
80
81
  end
82
+
83
+ def serialize_cause
84
+ self.class.new(error.cause).serialize if error.cause
85
+ end
81
86
  end
82
87
  end
83
88
  end
@@ -3,8 +3,8 @@
3
3
  module Mnemosyne
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 7
7
- PATCH = 1
6
+ MINOR = 8
7
+ PATCH = 0
8
8
  STAGE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mnemosyne-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-15 00:00:00.000000000 Z
11
+ date: 2019-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".editorconfig"
62
63
  - ".gitignore"
63
64
  - ".rspec"
64
65
  - ".rubocop.yml"
@@ -73,6 +74,7 @@ files:
73
74
  - gemfiles/rails_50.gemfile
74
75
  - gemfiles/rails_51.gemfile
75
76
  - gemfiles/rails_52.gemfile
77
+ - gemfiles/rails_60.gemfile
76
78
  - lib/mnemosyne-ruby.rb
77
79
  - lib/mnemosyne.rb
78
80
  - lib/mnemosyne/client.rb
@@ -134,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
136
  - !ruby/object:Gem::Version
135
137
  version: '0'
136
138
  requirements: []
137
- rubygems_version: 3.0.3
139
+ rubygems_version: 3.0.6
138
140
  signing_key:
139
141
  specification_version: 4
140
142
  summary: Ruby/Rails client for Mnemosyne APM