mnemosyne-ruby 1.3.0 → 1.4.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
  SHA1:
3
- metadata.gz: 0dd6477917eee07e244adbce53f2f07b23ee2a8a
4
- data.tar.gz: 6bfaf7fa6a1a5beb52ccedc769ceb72483dd7d1e
3
+ metadata.gz: f103ee3a06a19eb605a3cb19a97976320cc8db02
4
+ data.tar.gz: 0855a77a9efbc497bb2173f857db77fd553b9dea
5
5
  SHA512:
6
- metadata.gz: 3cf8bf8db8c95be6c4a40e7ad68d7303a49737c46f405d6bb67e282b7bf32371038d8a0c274df94f4476158605fd5470308f13af0b3fedc480a3af3df294aa38
7
- data.tar.gz: 24fbef4b46867c7511611e1152cdd4ddd5616ffb2f7a7434332ed57288fc5fbaf8f7d16cef65b69f55c5efebd57891a7b831135a972f539a4746a6f8859ea305
6
+ metadata.gz: fa7337ed893bc22a9e369c9467adb7235afa212ea9e849a28a1d6ed8b4cc8720c9c8709d751422020cce783e3735d79694146c535d05a89f9e1bea85edd60790
7
+ data.tar.gz: 19c6b5de13c46b243a5f22c76548b812c360a88dff16ba59d13d9e0cecfe921149b063e6f4f6ce3ddb6b31ce4b0d43516c0b9ebf84267077587cc5abce4c108d
data/.rubocop.yml CHANGED
@@ -4,35 +4,37 @@ AllCops:
4
4
  Rails:
5
5
  Enabled: false
6
6
 
7
- Style/AlignParameters:
8
- EnforcedStyle: with_fixed_indentation
9
7
 
10
- Style/BracesAroundHashParameters:
11
- EnforcedStyle: context_dependent
8
+ Layout/AlignParameters:
9
+ EnforcedStyle: with_fixed_indentation
12
10
 
13
- Style/SpaceInsideHashLiteralBraces:
14
- EnforcedStyle: no_space
11
+ Layout/CaseIndentation:
12
+ EnforcedStyle: end
13
+ SupportedStyles:
14
+ - case
15
+ - end
16
+ IndentOneStep: true
15
17
 
16
- Style/RaiseArgs:
17
- EnforcedStyle: compact
18
+ Layout/MultilineMethodCallIndentation:
19
+ EnforcedStyle: indented
18
20
 
19
- Style/SpaceInsideBlockBraces:
21
+ Layout/SpaceInsideBlockBraces:
20
22
  EnforcedStyle: space
21
23
  EnforcedStyleForEmptyBraces: no_space
22
24
  SpaceBeforeBlockParameters: false
23
25
 
24
- Style/SignalException:
25
- EnforcedStyle: only_raise
26
+ Layout/SpaceInsideHashLiteralBraces:
27
+ EnforcedStyle: no_space
26
28
 
27
- Style/CaseIndentation:
28
- EnforcedStyle: end
29
- SupportedStyles:
30
- - case
31
- - end
32
- IndentOneStep: true
33
29
 
34
- Style/MultilineMethodCallIndentation:
35
- EnforcedStyle: indented
30
+ Style/BracesAroundHashParameters:
31
+ EnforcedStyle: context_dependent
32
+
33
+ Style/RaiseArgs:
34
+ EnforcedStyle: compact
35
+
36
+ Style/SignalException:
37
+ EnforcedStyle: only_raise
36
38
 
37
39
  Style/Semicolon:
38
40
  Exclude:
@@ -42,6 +44,7 @@ Style/RescueModifier:
42
44
  Exclude:
43
45
  - '**/*_spec.rb'
44
46
 
47
+
45
48
  Metrics/LineLength:
46
49
  Exclude:
47
50
  - 'mnemosyne.gemspec'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0
4
+
5
+ * Add global `#attach_error` for manual error reporting
6
+
3
7
  ## 1.3.0
4
8
 
5
9
  * Add exception serialization to trace and protocol
data/Gemfile CHANGED
@@ -5,6 +5,11 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in mnemosyne.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.6'
10
+ gem 'rubocop', '~> 0.50.0'
11
+ gem 'timecop', '~> 0.8.0'
12
+
8
13
  group :development, :test do
9
14
  gem 'pry', require: false
10
15
  gem 'pry-byebug', require: false
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'bundler/gem_tasks'
3
4
  require 'rspec/core/rake_task'
4
5
  require 'rubocop/rake_task'
@@ -9,4 +10,4 @@ RuboCop::RakeTask.new(:rubocop) do |task|
9
10
  task.fail_on_error = false
10
11
  end
11
12
 
12
- task default: [:rubocop, :spec]
13
+ task default: %i[rubocop spec]
@@ -9,5 +9,10 @@ module Mnemosyne
9
9
  yield
10
10
  end
11
11
  end
12
+
13
+ def attach_error(err)
14
+ return unless (trace = ::Mnemosyne::Instrumenter.current_trace)
15
+ trace.attach_error(err)
16
+ end
12
17
  end
13
18
  end
@@ -69,7 +69,7 @@ module Mnemosyne
69
69
 
70
70
  @instance = new(config: config, client: client)
71
71
  end
72
- rescue => err
72
+ rescue StandardError => err
73
73
  ::Mnemosyne::Logging.logger.warn(Mnemosyne) do
74
74
  "Unable to start instrumenter: #{err}"
75
75
  end
@@ -22,7 +22,7 @@ module Mnemosyne
22
22
  trace.start! if trace
23
23
 
24
24
  yield
25
- rescue StandardError, LoadError, SyntaxError => err # rubocop:disable RescueException
25
+ rescue StandardError, LoadError, SyntaxError => err
26
26
  trace.attach_error(err)
27
27
  raise
28
28
  ensure
@@ -28,8 +28,8 @@ module Mnemosyne
28
28
  @finish = ::Mnemosyne::Clock.tick
29
29
 
30
30
  if oneshot
31
- @start = @finish unless @start
32
- @type = :oneshot
31
+ @start ||= @finish
32
+ @type = :oneshot
33
33
  end
34
34
 
35
35
  self
@@ -3,7 +3,7 @@
3
3
  module Mnemosyne
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 3
6
+ MINOR = 4
7
7
  PATCH = 0
8
8
  STAGE = nil
9
9
 
@@ -1,5 +1,5 @@
1
- # coding: utf-8
2
1
  # frozen_string_literal: true
2
+
3
3
  lib = File.expand_path('../lib', __FILE__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'mnemosyne/version'
@@ -10,23 +10,20 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['Jan Graichen']
11
11
  spec.email = ['jgraichen@altimos.de']
12
12
 
13
- spec.summary = 'Ruby/Rails client for Mnemosynce'
13
+ spec.summary = 'Ruby/Rails client for Mnemosyne APM'
14
14
  spec.homepage = 'http://github.com/jgraichen/mnemosyne-ruby'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
18
  f.match(%r{^(test|spec|features)/})
19
19
  end
20
+
20
21
  spec.bindir = 'bin'
21
- spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
22
- spec.require_paths = %w(lib)
22
+ spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
23
+ spec.require_paths = %w[lib]
23
24
 
24
25
  spec.add_runtime_dependency 'bunny'
25
26
  spec.add_runtime_dependency 'activesupport', '>= 4'
26
27
 
27
28
  spec.add_development_dependency 'bundler', '~> 1.11'
28
- spec.add_development_dependency 'rake', '~> 10.0'
29
- spec.add_development_dependency 'rspec', '~> 3.0'
30
- spec.add_development_dependency 'timecop', '~> 0.8.0'
31
- spec.add_development_dependency 'rubocop', '~> 0.47.1'
32
29
  end
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.3.0
4
+ version: 1.4.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: 2017-10-01 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -52,62 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.11'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '10.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '10.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: timecop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.8.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.8.0
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.47.1
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.47.1
111
55
  description:
112
56
  email:
113
57
  - jgraichen@altimos.de
@@ -182,8 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
126
  version: '0'
183
127
  requirements: []
184
128
  rubyforge_project:
185
- rubygems_version: 2.6.13
129
+ rubygems_version: 2.6.14
186
130
  signing_key:
187
131
  specification_version: 4
188
- summary: Ruby/Rails client for Mnemosynce
132
+ summary: Ruby/Rails client for Mnemosyne APM
189
133
  test_files: []