libhoney 1.18.0 → 2.0.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: 33a687ebf8ae87e69cf6a53b50c4e2cd926f9938af709635d42a209ec2e6c93e
4
- data.tar.gz: fd3f558a15f872c9f63fc6451722c3e9e21b7cba5ebe8d7816ec0cb08064318b
3
+ metadata.gz: c346ba7e750c99063736cd641e10eb153f9a1326b1bf17231e7c89ad312d102a
4
+ data.tar.gz: 5f16185c3b43ce38f0323861244966ccc6df2404c5b7c05f712c530d25f193d6
5
5
  SHA512:
6
- metadata.gz: 36efc5d9734e125cd141e21dd60edbc6cf23350334bf431dead264c375dfd11b54bcf286f5509d5e97633ee4ce2d4fc689ebf5033d472237d5b6e7e2f2d0cb81
7
- data.tar.gz: 5d5147a6e9f3fc1055a94932943c5915c99f43ad550d4dd5f20955d2dad023c41a1939e6f8037b38856375a10dcdc51557b06e3d56b454296a1596c7dd62b74c
6
+ metadata.gz: 5c4ebb204f1f7fa8cbc602442d6672753d2395b53a9cbae3f4ca61e2a96fa17e54c2206c55cfdb7ec32e1349daa64f70cfffd755e957f2060ab7231791420bc5
7
+ data.tar.gz: 07be9a04ccb025acc0b9e05e0e1fea17a1bd5b694ef9ec0443b0e5638d3b9a024502e05d7d677d752920c81d36249008ed4f226f293c8f5b3dfa469c7ac5b528
data/.circleci/config.yml CHANGED
@@ -19,10 +19,10 @@ filters_publish: &filters_publish
19
19
  matrix_rubyversions: &matrix_rubyversions
20
20
  matrix:
21
21
  parameters:
22
- rubyversion: ["2.2", "2.3", "2.4", "2.5", "2.6", "2.7"]
22
+ rubyversion: ["2.4", "2.5", "2.6", "2.7", "3.0"]
23
23
 
24
24
  # Default version of ruby to use for lint and publishing
25
- default_rubyversion: &default_rubyversion "2.7"
25
+ default_rubyversion: &default_rubyversion "3.0"
26
26
 
27
27
  executors:
28
28
  ruby:
@@ -31,7 +31,7 @@ executors:
31
31
  type: string
32
32
  default: *default_rubyversion
33
33
  docker:
34
- - image: circleci/ruby:<< parameters.rubyversion >>
34
+ - image: cimg/ruby:<< parameters.rubyversion >>
35
35
  github:
36
36
  docker:
37
37
  - image: cibuilds/github:0.13.0
@@ -86,7 +86,8 @@ jobs:
86
86
  - run:
87
87
  name: install dependencies
88
88
  command: |
89
- bundle install --jobs=4 --retry=3 --path vendor/bundle
89
+ bundle config set --local path 'vendor/bundle'
90
+ bundle install --jobs=4 --retry=3
90
91
  - save_cache:
91
92
  paths:
92
93
  - ./vendor/bundle
@@ -97,6 +98,8 @@ jobs:
97
98
  - run:
98
99
  name: run tests
99
100
  command: bundle exec rake test
101
+ - store_test_results:
102
+ path: test/reports
100
103
 
101
104
  build_artifacts:
102
105
  executor:
data/.github/CODEOWNERS CHANGED
@@ -2,4 +2,4 @@
2
2
  # This file controls who is tagged for review for any given pull request.
3
3
 
4
4
  # For anything not explicitly taken by someone else:
5
- * @honeycombio/integrations-team @martin308
5
+ * @honeycombio/telemetry-team
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Bug report
3
+ about: Let us know if something is not working as expected
4
+ title: ''
5
+ labels: 'type: bug'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Thank you for taking the time to report bugs!
12
+
13
+ We love code snippets and links to repositories that reproduce the issue, but understand if you don't have the time to add them. We'll do our best with the info you provide, and might ask follow-up questions.
14
+
15
+ Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate.
16
+ --->
17
+
18
+ **Versions**
19
+
20
+ - Ruby:
21
+ - Libhoney:
22
+
23
+ **Steps to reproduce**
24
+
25
+ 1.
26
+
27
+ **Additional context**
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: 'type: enhancement'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Thank you for contributing an idea to this project!
12
+
13
+ Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate.
14
+ --->
15
+
16
+ **Is your feature request related to a problem? Please describe.**
17
+
18
+
19
+ **Describe the solution you'd like**
20
+
21
+
22
+ **Describe alternatives you've considered**
23
+
24
+
25
+ **Additional context**
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: Question/Discussion
3
+ about: General question about how things work or a discussion
4
+ title: ''
5
+ labels: 'type: discussion'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Thank you for taking the time to say hello!
12
+
13
+ Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate.
14
+ --->
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Security vulnerability report
3
+ about: Let us know if you discover a security vulnerability
4
+ title: ''
5
+ labels: 'type: security'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Thank you for taking the time to report security vulnerabilities!
12
+
13
+ Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate.
14
+ --->
15
+ **Versions**
16
+
17
+ - Ruby:
18
+ - Libhoney:
19
+
20
+ **Description**
21
+
22
+ (Please include any relevant CVE advisory links)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ Thank you for contributing to the project! 💜
3
+ Please make sure to:
4
+ - Chat with us first if this is a big change
5
+ - Open a new issue (or comment on an existing one)
6
+ - We want to make sure you don't spend time implementing something we might have to say No to
7
+ - Add unit tests
8
+ - Mention any relevant issues in the PR description (e.g. "Fixes #123")
9
+
10
+ Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate.
11
+ -->
12
+
13
+ ## Which problem is this PR solving?
14
+
15
+ -
16
+
17
+ ## Short description of the changes
18
+
19
+ -
20
+
@@ -0,0 +1,15 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ labels:
13
+ - "type: dependencies"
14
+ reviewers:
15
+ - "honeycombio/telemetry-team"
@@ -0,0 +1,14 @@
1
+ name: Apply project management flow
2
+ on:
3
+ issues:
4
+ types: [opened]
5
+ pull_request_target:
6
+ types: [opened]
7
+ jobs:
8
+ project-management:
9
+ runs-on: ubuntu-latest
10
+ name: Apply project management flow
11
+ steps:
12
+ - uses: honeycombio/oss-management-actions/projects@v1
13
+ with:
14
+ ghprojects-token: ${{ secrets.GHPROJECTS_TOKEN }}
@@ -0,0 +1,10 @@
1
+ name: Apply project labels
2
+ on: [issues, pull_request, label]
3
+ jobs:
4
+ apply-labels:
5
+ runs-on: ubuntu-latest
6
+ name: Apply common project labels
7
+ steps:
8
+ - uses: honeycombio/oss-management-actions/labels@v1
9
+ with:
10
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,26 @@
1
+ name: 'Close stale issues and PRs'
2
+ on:
3
+ schedule:
4
+ - cron: '30 1 * * *'
5
+
6
+ jobs:
7
+ stale:
8
+ name: 'Close stale issues and PRs'
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ issues: write
12
+ pull-requests: write
13
+
14
+ steps:
15
+ - uses: actions/stale@v4
16
+ with:
17
+ start-date: '2021-09-01T00:00:00Z'
18
+ stale-issue-message: 'Marking this issue as stale because it has been open 14 days with no activity. Please add a comment if this is still an ongoing issue; otherwise this issue will be automatically closed in 7 days.'
19
+ stale-pr-message: 'Marking this PR as stale because it has been open 30 days with no activity. Please add a comment if this PR is still relevant; otherwise this PR will be automatically closed in 7 days.'
20
+ close-issue-message: 'Closing this issue due to inactivity. Please see our [Honeycomb OSS Lifecyle and Practices](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md).'
21
+ close-pr-message: 'Closing this PR due to inactivity. Please see our [Honeycomb OSS Lifecyle and Practices](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md).'
22
+ days-before-issue-stale: 14
23
+ days-before-pr-stale: 30
24
+ days-before-issue-close: 7
25
+ days-before-pr-close: 7
26
+ any-of-labels: 'status: info needed,status: revision needed'
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /spec/examples.txt
10
+ /test/reports/
10
11
  /test/tmp/
11
12
  /test/version_tmp/
12
13
  /tmp/
data/.rubocop.yml CHANGED
@@ -1,31 +1,54 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.2
4
+ TargetRubyVersion: 2.4
5
+ NewCops: enable
5
6
 
6
7
  Style/Documentation:
7
8
  Enabled: false
8
9
 
10
+ Layout/BeginEndAlignment:
11
+ EnforcedStyleAlignWith: begin
12
+
13
+ Layout/EmptyLineBetweenDefs:
14
+ AllowAdjacentOneLineDefs: true
15
+
16
+ Lint/RaiseException:
17
+ Enabled: true
18
+
19
+ Lint/StructNewOverride:
20
+ Enabled: true
21
+
22
+ Style/HashEachMethods:
23
+ Enabled: true
24
+
25
+ Style/HashTransformKeys:
26
+ Enabled: true
27
+
28
+ Style/HashTransformValues:
29
+ Enabled: true
30
+
9
31
  Lint/RescueException:
10
32
  Exclude:
11
33
  - 'lib/libhoney/transmission.rb'
34
+ - 'lib/libhoney/experimental_transmission.rb'
12
35
 
13
36
  Metrics/BlockLength:
14
37
  Max: 35
15
38
 
16
39
  Metrics/ClassLength:
17
- Max: 200
40
+ Max: 300
18
41
  Exclude:
19
42
  - lib/libhoney/transmission.rb # Should this remain so large?
20
43
  - test/*
21
44
 
22
45
  Metrics/MethodLength:
23
- Max: 40
46
+ Max: 45
24
47
  Exclude:
25
48
  - lib/libhoney/transmission.rb
26
49
  - test/*
27
50
 
28
- Metrics/LineLength:
51
+ Layout/LineLength:
29
52
  Max: 115
30
53
  Exclude:
31
54
  - lib/libhoney/client.rb
data/.rubocop_todo.yml CHANGED
@@ -1,36 +1,42 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-09-24 20:37:04 -0700 using RuboCop version 0.59.2.
3
+ # on 2021-09-10 20:37:20 UTC using RuboCop version 1.12.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 3
10
- Lint/HandleExceptions:
9
+ # Offense count: 2
10
+ # Configuration parameters: AllowComments, AllowNil.
11
+ Lint/SuppressedException:
11
12
  Exclude:
12
- - 'lib/libhoney/client.rb'
13
13
  - 'lib/libhoney/transmission.rb'
14
14
 
15
- # Offense count: 7
15
+ # Offense count: 12
16
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
16
17
  Metrics/AbcSize:
17
- Max: 40
18
-
19
- # Offense count: 1
20
- # Configuration parameters: CountComments, ExcludedMethods.
21
- # ExcludedMethods: refine
22
- Metrics/BlockLength:
23
- Max: 30
18
+ Max: 38
24
19
 
25
- # Offense count: 2
20
+ # Offense count: 6
21
+ # Configuration parameters: IgnoredMethods.
26
22
  Metrics/CyclomaticComplexity:
27
23
  Max: 12
28
24
 
29
- # Offense count: 2
30
- # Configuration parameters: CountKeywordArgs.
25
+ # Offense count: 1
26
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
31
27
  Metrics/ParameterLists:
32
- Max: 12
28
+ Max: 10
33
29
 
34
- # Offense count: 1
30
+ # Offense count: 4
31
+ # Configuration parameters: IgnoredMethods.
35
32
  Metrics/PerceivedComplexity:
36
- Max: 10
33
+ Max: 11
34
+
35
+ # Offense count: 31
36
+ # Cop supports --auto-correct.
37
+ # Configuration parameters: EnforcedStyle.
38
+ # SupportedStyles: always, always_true, never
39
+ # Disabled after setting target version to 2.3
40
+ # Consider later.
41
+ Style/FrozenStringLiteralComment:
42
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,47 @@
1
- # libhoney-rb changelog
1
+ ## [2.0.0] - 2021-10-07
2
2
 
3
- ## changes pending release
3
+ ### 💥 Breaking Changes
4
+
5
+ - support dropped for Ruby 2.2 (#104) | [robbkidd](https://github.com/robbkidd)
6
+ - support dropped for Ruby 2.3 (#106) | [robbkidd](https://github.com/robbkidd)
7
+ - remove deprecated support for accepting an Array for client proxy_config (#112) | [robbkidd](https://github.com/robbkidd)
8
+
9
+ ### 🛠 Maintenance
10
+
11
+ - Change maintenance badge to maintained (#109) | [JamieDanielson](https://github.com/JamieDanielson)
12
+ - Adds Stalebot (#110) | [JamieDanielson](https://github.com/JamieDanielson)
13
+
14
+ ## [1.21.0] - 2021-09-23
15
+
16
+ ### Added
17
+
18
+ - Include Ruby runtime info in user agent (#105) | [robbkidd](https://github.com/robbkidd)
19
+
20
+ ### Maintenance
21
+
22
+ - Update http requirement from >= 2.0, < 5.0 to >= 2.0, < 6.0 (#100)
23
+ - Update spy requirement to accept any 1.x release (#102)
24
+ - Update rake requirement from ~> 12.3 to ~> 13.0 (#101)
25
+ - Add issue and PR templates (#99)
26
+ - Add OSS lifecycle badge (#98)
27
+ - Add community health files (#97)
28
+
29
+ ## 1.20.0
30
+
31
+ ### Fixes
32
+
33
+ - Handle Timeout::Error in TransmissionClient (#95) | [Adam Pohorecki](https://github.com/psyho)
34
+
35
+ ## 1.19.0
36
+
37
+ ### Improvements
38
+
39
+ - add a test_helper, Minitest reporters, & store test results in CI (#88)
40
+ - add experimental transmission with new sized-and-timed queue (#87)
41
+
42
+ ### Fixes
43
+
44
+ - Process single-error responses from the Batch API (#89)
4
45
 
5
46
  ## 1.18.0
6
47
 
@@ -0,0 +1,5 @@
1
+ # Code of Conduct
2
+
3
+ This project has adopted the Honeycomb User Community Code of Conduct to clarify expected behavior in our community.
4
+
5
+ https://www.honeycomb.io/honeycomb-user-community-code-of-conduct/
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,3 @@
1
+ # Contributing Guide
2
+
3
+ Please see our [general guide for OSS lifecycle and practices.](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md)
data/CONTRIBUTORS CHANGED
@@ -10,3 +10,4 @@ Eben Freeman <eben@honeycomb.io>
10
10
  Ryan King <ryan@theryanking.com>
11
11
  Paul Sadauskas <psadauskas@gmail.com>
12
12
  Shane Becker <veganstraightedge@gmail.com>
13
+ Adam Pohorecki <adam@pohorecki.pl>
data/OSSMETADATA ADDED
@@ -0,0 +1 @@
1
+ osslifecycle=maintained
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
- # libhoney [![CircleCI Build Status](https://circleci.com/gh/honeycombio/libhoney-rb.svg?style=svg)](https://circleci.com/gh/honeycombio/libhoney-rb) [![Gem Version](https://badge.fury.io/rb/libhoney.svg)](https://badge.fury.io/rb/libhoney)
1
+ # libhoney
2
+
3
+ [![OSS Lifecycle](https://img.shields.io/osslifecycle/honeycombio/libhoney-rb?color=success)](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md)
4
+ [![CircleCI Build Status](https://circleci.com/gh/honeycombio/libhoney-rb.svg?style=svg)](https://circleci.com/gh/honeycombio/libhoney-rb)
5
+ [![Gem Version](https://badge.fury.io/rb/libhoney.svg)](https://badge.fury.io/rb/libhoney)
2
6
 
3
7
  Ruby gem for sending events to [Honeycomb](https://www.honeycomb.io), a service for debugging your software in production.
4
8
 
5
- Requires Ruby 2.2 or greater.
9
+ Requires Ruby 2.3 or greater.
6
10
 
7
11
  - [Usage and Examples](https://docs.honeycomb.io/sdk/ruby/)
8
12
  - [API Reference](https://www.rubydoc.info/gems/libhoney)
@@ -16,15 +20,3 @@ open issues or a pull request with your change. Remember to add your name to the
16
20
  CONTRIBUTORS file!
17
21
 
18
22
  All contributions will be released under the Apache License 2.0.
19
-
20
- ### Releasing a new version
21
-
22
- CircleCI will automatically upload tagged releases to Rubygems. To release a new
23
- version, update the version using `bump`.
24
-
25
- ```
26
- bump patch # Or bump minor, etc.
27
- ```
28
-
29
- Then, after the version change has been merged into `main`, follow our usual instructions
30
- for tagging and updating the github release.
data/RELEASING.md ADDED
@@ -0,0 +1,12 @@
1
+ # Releasing
2
+
3
+ - Update the version number in `lib/libhoney/version.rb`.
4
+ - For convenience, you can run `bump --no-commit --changelog (major|minor|patch)` to perform
5
+ the version bump and to add the new version's header to the CHANGELOG. `--no-commit` because
6
+ there are more changes to make that we do manually.
7
+ - Update `CHANGELOG.md` with the changes since the last release.
8
+ - Commit changes, push, and open a release preparation pull request for review.
9
+ - Once the pull request is merged, fetch the updated `main` branch.
10
+ - Apply a tag for the new version on the merged commit: vX.Y.Z, for example v1.1.2.
11
+ - Push the new version tag up to the project repository to kick off build and artifact publishing to GitHub and the Gems registry.
12
+ - Publish the draft release in GitHub.
data/SECURITY.md ADDED
@@ -0,0 +1,3 @@
1
+ # Reporting Security Issues
2
+
3
+ If you discover a security vulnerability, please open an issue with label `type: security`.
data/SUPPORT.md ADDED
@@ -0,0 +1,3 @@
1
+ # How to Get Help
2
+
3
+ This project uses GitHub issues to track bugs, feature requests, and questions about using the project. Please search for existing issues before filing a new one.
data/example/factorial.rb CHANGED
@@ -8,7 +8,7 @@ writekey = '7aefa39399a474bd9f414a8e3f8d9691'
8
8
  dataset = 'factorial'
9
9
 
10
10
  def factorial(number)
11
- return -1 * factorial(abs(number)) if number < 0
11
+ return -1 * factorial(abs(number)) if number.negative?
12
12
  return 1 if number.zero?
13
13
 
14
14
  number * factorial(number - 1)
@@ -2,8 +2,7 @@ require 'libhoney/event'
2
2
 
3
3
  module Libhoney
4
4
  class Builder
5
- attr_accessor :writekey, :dataset, :sample_rate, :api_host
6
- attr_accessor :fields, :dyn_fields
5
+ attr_accessor :writekey, :dataset, :sample_rate, :api_host, :fields, :dyn_fields
7
6
 
8
7
  # @api private
9
8
  # @see Client#builder