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 +4 -4
- data/.circleci/config.yml +7 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
- data/.github/ISSUE_TEMPLATE/question-discussion.md +14 -0
- data/.github/ISSUE_TEMPLATE/security-vulnerability-report.md +22 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/add-to-project.yml +14 -0
- data/.github/workflows/apply-labels.yml +10 -0
- data/.github/workflows/stale.yml +26 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +27 -4
- data/.rubocop_todo.yml +24 -18
- data/CHANGELOG.md +43 -2
- data/CODE_OF_CONDUCT.md +5 -0
- data/CONTRIBUTING.md +3 -0
- data/CONTRIBUTORS +1 -0
- data/OSSMETADATA +1 -0
- data/README.md +6 -14
- data/RELEASING.md +12 -0
- data/SECURITY.md +3 -0
- data/SUPPORT.md +3 -0
- data/example/factorial.rb +1 -1
- data/lib/libhoney/builder.rb +1 -2
- data/lib/libhoney/client.rb +70 -56
- data/lib/libhoney/experimental_transmission.rb +107 -0
- data/lib/libhoney/log_client.rb +1 -1
- data/lib/libhoney/mock_transmission.rb +1 -1
- data/lib/libhoney/null_transmission.rb +2 -0
- data/lib/libhoney/queueing/LICENSE.txt +23 -0
- data/lib/libhoney/queueing/sized_queue_with_timeout.rb +176 -0
- data/lib/libhoney/queueing.rb +1 -0
- data/lib/libhoney/transmission.rb +109 -48
- data/lib/libhoney/version.rb +1 -1
- data/libhoney.gemspec +7 -5
- metadata +63 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c346ba7e750c99063736cd641e10eb153f9a1326b1bf17231e7c89ad312d102a
|
4
|
+
data.tar.gz: 5f16185c3b43ce38f0323861244966ccc6df2404c5b7c05f712c530d25f193d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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 "
|
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:
|
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
|
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
@@ -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
data/.rubocop.yml
CHANGED
@@ -1,31 +1,54 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
-
TargetRubyVersion: 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:
|
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:
|
46
|
+
Max: 45
|
24
47
|
Exclude:
|
25
48
|
- lib/libhoney/transmission.rb
|
26
49
|
- test/*
|
27
50
|
|
28
|
-
|
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
|
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:
|
10
|
-
|
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:
|
15
|
+
# Offense count: 12
|
16
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
16
17
|
Metrics/AbcSize:
|
17
|
-
Max:
|
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:
|
20
|
+
# Offense count: 6
|
21
|
+
# Configuration parameters: IgnoredMethods.
|
26
22
|
Metrics/CyclomaticComplexity:
|
27
23
|
Max: 12
|
28
24
|
|
29
|
-
# Offense count:
|
30
|
-
# Configuration parameters: CountKeywordArgs.
|
25
|
+
# Offense count: 1
|
26
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
31
27
|
Metrics/ParameterLists:
|
32
|
-
Max:
|
28
|
+
Max: 10
|
33
29
|
|
34
|
-
# Offense count:
|
30
|
+
# Offense count: 4
|
31
|
+
# Configuration parameters: IgnoredMethods.
|
35
32
|
Metrics/PerceivedComplexity:
|
36
|
-
Max:
|
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
|
-
|
1
|
+
## [2.0.0] - 2021-10-07
|
2
2
|
|
3
|
-
|
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
|
|
data/CODE_OF_CONDUCT.md
ADDED
data/CONTRIBUTING.md
ADDED
data/CONTRIBUTORS
CHANGED
data/OSSMETADATA
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
osslifecycle=maintained
|
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
# 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.
|
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
data/SUPPORT.md
ADDED
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
|
11
|
+
return -1 * factorial(abs(number)) if number.negative?
|
12
12
|
return 1 if number.zero?
|
13
13
|
|
14
14
|
number * factorial(number - 1)
|
data/lib/libhoney/builder.rb
CHANGED
@@ -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
|