rspec_honeycomb_formatter 0.2.0 → 0.2.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
2
  SHA256:
3
- metadata.gz: 3000213c71bcad9cc66828a8c2d33fe4eb4c56a2e2bcda42532f48f19ba52d79
4
- data.tar.gz: 676ff241add28e74215fe45da3af3aea8548bf43e2a1e0d6ce2c484b22076c5c
3
+ metadata.gz: 84c7049e711da6cf0319610e15ac8aef3d8eb5e8207270ce61e98b0cbcf7331b
4
+ data.tar.gz: f3dbc85834e3b731fb6ed79b2656af008cf75b21e16301a55a888e1825d89ed5
5
5
  SHA512:
6
- metadata.gz: 52757a1671f53829b6b9d507634ba0bdbfbc09cafe1a18451a4275f51802c0829ed3e50ca4054e171e1e98206f15e56aac9cf6d736fc5eb111ae5fb988d04b08
7
- data.tar.gz: d332f0ca059be8b0d0cf086bd19c7ca319d005bc7ff51263ec7bfefde594a9563e9491a507af2e9e645e2118c811e732fc634029fcc37d8a1d23ffeff4e3401b
6
+ metadata.gz: 7f70d33175c126e78bfd3d6efdaeae6f5f79342222c6a8894cb3bc79b84d414a46cd891a33d49f99c61e8530222be4cef4b5438cb3a17e31b456b56a8b5080cf
7
+ data.tar.gz: 01cc0b7f1f45f00d7e15d8dceabf3ec5a79cdd2307a6be8ee803e77a41a331c314b840194de80cb22d39982905461356aeb4eb5461c228242d32c9b0c33dd18c
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # don't commit Gemfile.lock in libraries
14
+ /Gemfile.lock
@@ -140,3 +140,16 @@ Style/SymbolArray:
140
140
  # Enforce LF line endings, even when on Windows
141
141
  Layout/EndOfLine:
142
142
  EnforcedStyle: lf
143
+
144
+ # rubocop 0.80 additional rules
145
+ Style/HashEachMethods:
146
+ Description: unsafe transform of a pattern we rarely encounter
147
+ Enabled: true
148
+
149
+ Style/HashTransformKeys:
150
+ Description: unsafe transform of a pattern we rarely encounter
151
+ Enabled: false
152
+
153
+ Style/HashTransformValues:
154
+ Description: unsafe transform of a pattern we rarely encounter
155
+ Enabled: false
@@ -2,7 +2,16 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/puppetlabs/rspec_honeycomb_formatter/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/puppetlabs/rspec_honeycomb_formatter/compare/v0.1.0...HEAD)
5
+ [Full Changelog](https://github.com/puppetlabs/rspec_honeycomb_formatter/compare/v0.2.0...HEAD)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Fix missing message\_lines method [\#10](https://github.com/puppetlabs/rspec_honeycomb_formatter/pull/10) ([DavidS](https://github.com/DavidS))
10
+ - \(\(IAC-658\) suppress libhoney warning and other infastructure fixes [\#9](https://github.com/puppetlabs/rspec_honeycomb_formatter/pull/9) ([DavidS](https://github.com/DavidS))
11
+
12
+ ## [v0.2.0](https://github.com/puppetlabs/rspec_honeycomb_formatter/tree/v0.2.0) (2020-03-24)
13
+
14
+ [Full Changelog](https://github.com/puppetlabs/rspec_honeycomb_formatter/compare/v0.1.0...v0.2.0)
6
15
 
7
16
  **Implemented enhancements:**
8
17
 
data/Gemfile CHANGED
@@ -5,8 +5,8 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in rspec_honeycomb_formatter.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'github_changelog_generator'
8
9
  gem 'rake', '~> 13.0'
9
10
  gem 'rspec', '~> 3.0'
10
11
  gem 'rubocop'
11
12
  gem 'rubocop-rspec'
12
- gem 'github_changelog_generator'
@@ -5,6 +5,11 @@ require 'rspec/core/formatters'
5
5
  require 'honeycomb-beeline'
6
6
 
7
7
  Honeycomb.configure do |config|
8
+ # override client if no configuration is provided, so that the pesky libhoney warning about lack of configuration is not shown
9
+ # except when we set HONEYCOMB_DEBUG to true - in which case we want to see the output locally
10
+ unless (ENV['HONEYCOMB_WRITEKEY'] && ENV['HONEYCOMB_DATASET']) || ENV['HONEYCOMB_DEBUG'] == 'true'
11
+ config.client = Libhoney::NullClient.new
12
+ end
8
13
  end
9
14
  unless Honeycomb.current_span
10
15
  process_span = Honeycomb.start_span(name: File.basename($PROGRAM_NAME), serialized_trace: ENV['HTTP_X_HONEYCOMB_TRACE'])
@@ -83,7 +88,7 @@ class RSpecHoneycombFormatter
83
88
  @example_span.add_field('rspec.result', 'failed')
84
89
  @example_span.add_field('name', notification.example.description)
85
90
  @example_span.add_field('rspec.description', notification.example.description)
86
- @example_span.add_field('rspec.message', strip_ansi(notification.message_lines.join("\n")))
91
+ @example_span.add_field('rspec.message', strip_ansi(notification.fully_formatted(0, RSpec::Core::Notifications::NullColorizer)))
87
92
  @example_span.add_field('rspec.backtrace', notification.formatted_backtrace.join("\n"))
88
93
  @example_span.send
89
94
  end
@@ -92,8 +97,16 @@ class RSpecHoneycombFormatter
92
97
  @example_span.add_field('rspec.result', 'pending')
93
98
  @example_span.add_field('name', notification.example.description)
94
99
  @example_span.add_field('rspec.description', notification.example.description)
95
- @example_span.add_field('rspec.message', strip_ansi(notification.message_lines.join("\n")))
96
- @example_span.add_field('rspec.backtrace', notification.formatted_backtrace.join("\n"))
100
+
101
+ case notification
102
+ when RSpec::Core::Notifications::FailedExampleNotification
103
+ @example_span.add_field('rspec.message', strip_ansi(notification.fully_formatted(0, RSpec::Core::Notifications::NullColorizer)))
104
+ @example_span.add_field('rspec.backtrace', notification.formatted_backtrace.join("\n"))
105
+ when RSpec::Core::Notifications::SkippedExampleNotification
106
+ @example_span.add_field('rspec.message', strip_ansi(notification.fully_formatted(0, RSpec::Core::Notifications::NullColorizer)))
107
+ else
108
+ @example_span.add_field('rspec.result', notification.class)
109
+ end
97
110
  @example_span.send
98
111
  end
99
112
 
@@ -102,7 +115,7 @@ class RSpecHoneycombFormatter
102
115
  end
103
116
 
104
117
  def message(notification)
105
- puts "message: #{notification}"
118
+ # puts "message: #{notification}"
106
119
  end
107
120
 
108
121
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RSpecHoneycombFormatter
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_honeycomb_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Schmitt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-03-24 00:00:00.000000000 Z
12
+ date: 2020-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: honeycomb-beeline
@@ -54,7 +54,6 @@ files:
54
54
  - ".travis.yml"
55
55
  - CHANGELOG.md
56
56
  - Gemfile
57
- - Gemfile.lock
58
57
  - LICENSE
59
58
  - README.md
60
59
  - Rakefile
@@ -1,120 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rspec_honeycomb_formatter (0.2.0)
5
- honeycomb-beeline
6
- rspec-core (~> 3.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (6.0.2.2)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
17
- addressable (2.7.0)
18
- public_suffix (>= 2.0.2, < 5.0)
19
- ast (2.4.0)
20
- concurrent-ruby (1.1.6)
21
- diff-lcs (1.3)
22
- domain_name (0.5.20190701)
23
- unf (>= 0.0.5, < 1.0.0)
24
- faraday (0.17.3)
25
- multipart-post (>= 1.2, < 3)
26
- faraday-http-cache (2.0.0)
27
- faraday (~> 0.8)
28
- ffi (1.12.2)
29
- ffi-compiler (1.0.1)
30
- ffi (>= 1.0.0)
31
- rake
32
- github_changelog_generator (1.15.0)
33
- activesupport
34
- faraday-http-cache
35
- multi_json
36
- octokit (~> 4.6)
37
- rainbow (>= 2.2.1)
38
- rake (>= 10.0)
39
- retriable (~> 3.0)
40
- honeycomb-beeline (2.0.0)
41
- libhoney (~> 1.14, >= 1.14.2)
42
- http (4.3.0)
43
- addressable (~> 2.3)
44
- http-cookie (~> 1.0)
45
- http-form_data (~> 2.2)
46
- http-parser (~> 1.2.0)
47
- http-cookie (1.0.3)
48
- domain_name (~> 0.5)
49
- http-form_data (2.3.0)
50
- http-parser (1.2.1)
51
- ffi-compiler (>= 1.0, < 2.0)
52
- i18n (1.8.2)
53
- concurrent-ruby (~> 1.0)
54
- jaro_winkler (1.5.4)
55
- libhoney (1.14.4)
56
- addressable (~> 2.0)
57
- http (>= 2.0, < 5.0)
58
- minitest (5.14.0)
59
- multi_json (1.14.1)
60
- multipart-post (2.1.1)
61
- octokit (4.17.0)
62
- faraday (>= 0.9)
63
- sawyer (~> 0.8.0, >= 0.5.3)
64
- parallel (1.19.1)
65
- parser (2.7.0.5)
66
- ast (~> 2.4.0)
67
- public_suffix (4.0.3)
68
- rainbow (3.0.0)
69
- rake (13.0.1)
70
- retriable (3.1.2)
71
- rexml (3.2.4)
72
- rspec (3.9.0)
73
- rspec-core (~> 3.9.0)
74
- rspec-expectations (~> 3.9.0)
75
- rspec-mocks (~> 3.9.0)
76
- rspec-core (3.9.1)
77
- rspec-support (~> 3.9.1)
78
- rspec-expectations (3.9.1)
79
- diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.9.0)
81
- rspec-mocks (3.9.1)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.9.0)
84
- rspec-support (3.9.2)
85
- rubocop (0.80.1)
86
- jaro_winkler (~> 1.5.1)
87
- parallel (~> 1.10)
88
- parser (>= 2.7.0.1)
89
- rainbow (>= 2.2.2, < 4.0)
90
- rexml
91
- ruby-progressbar (~> 1.7)
92
- unicode-display_width (>= 1.4.0, < 1.7)
93
- rubocop-rspec (1.38.1)
94
- rubocop (>= 0.68.1)
95
- ruby-progressbar (1.10.1)
96
- sawyer (0.8.2)
97
- addressable (>= 2.3.5)
98
- faraday (> 0.8, < 2.0)
99
- thread_safe (0.3.6)
100
- tzinfo (1.2.6)
101
- thread_safe (~> 0.1)
102
- unf (0.1.4)
103
- unf_ext
104
- unf_ext (0.0.7.6)
105
- unicode-display_width (1.6.1)
106
- zeitwerk (2.3.0)
107
-
108
- PLATFORMS
109
- ruby
110
-
111
- DEPENDENCIES
112
- github_changelog_generator
113
- rake (~> 13.0)
114
- rspec (~> 3.0)
115
- rspec_honeycomb_formatter!
116
- rubocop
117
- rubocop-rspec
118
-
119
- BUNDLED WITH
120
- 2.1.4