libhoney 1.14.7.pre.beta → 1.14.7
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 +81 -129
- data/.editorconfig +1 -1
- data/Gemfile.lock +103 -0
- data/README.md +5 -8
- data/lib/libhoney/transmission.rb +0 -22
- data/lib/libhoney/version.rb +1 -1
- data/libhoney.gemspec +1 -1
- metadata +9 -9
- data/CHANGELOG.md +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9182c33aa64ffec7a225133c5df600c7f0401998d532e425104b0a51de285cd6
|
4
|
+
data.tar.gz: e6fd1dfcef41b5dd14eae7daab692312b0854a399339fc8b26a78d27edccb2e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9acc33d465d4a1fa5c9fef63092dd8dd09feabf501831dcb5c7ee689f6ec65c54bb82ded4dd6c33459a00e237a9c2a310035d96f899d4e89fce82698d4e0722b
|
7
|
+
data.tar.gz: bbde9aa1b89a0bf1c7a684e6c5299416bcde24597fda6f12a9df5f18bba9eddbda8f3b5cbef49d9bf67883b817d82f87c463e0901b9221ff3577255b2d8f605a
|
data/.circleci/config.yml
CHANGED
@@ -1,63 +1,67 @@
|
|
1
|
-
version: 2.
|
1
|
+
version: 2.0
|
2
2
|
|
3
|
-
|
3
|
+
test_steps: &test_steps
|
4
|
+
- checkout
|
5
|
+
- run:
|
6
|
+
name: Force Bundler Version
|
7
|
+
command: |
|
8
|
+
sudo gem update --system
|
9
|
+
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
|
10
|
+
source $BASH_ENV
|
11
|
+
gem install bundler
|
12
|
+
- restore_cache:
|
13
|
+
keys:
|
14
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
15
|
+
# fallback to using the latest cache if no exact match is found
|
16
|
+
- v1-dependencies-
|
17
|
+
- run:
|
18
|
+
name: install dependencies
|
19
|
+
command: |
|
20
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
21
|
+
- save_cache:
|
22
|
+
paths:
|
23
|
+
- ./vendor/bundle
|
24
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
25
|
+
- run:
|
26
|
+
name: run rubocop
|
27
|
+
command: bundle exec rake rubocop
|
28
|
+
- run:
|
29
|
+
name: run tests
|
30
|
+
command: bundle exec rake test
|
4
31
|
|
5
|
-
#
|
6
|
-
|
32
|
+
# required as all of the jobs need to have a tag filter for some reason
|
33
|
+
tag_filters: &tag_filters
|
7
34
|
filters:
|
8
|
-
|
9
|
-
|
35
|
+
tags:
|
36
|
+
only: /.*/
|
10
37
|
|
11
|
-
|
12
|
-
|
13
|
-
filters:
|
14
|
-
tags:
|
15
|
-
only: /^v[0-9].*/
|
16
|
-
branches:
|
17
|
-
ignore: /.*/
|
18
|
-
|
19
|
-
matrix_rubyversions: &matrix_rubyversions
|
20
|
-
matrix:
|
21
|
-
parameters:
|
22
|
-
rubyversion: ["2.2", "2.3", "2.4", "2.5", "2.6", "2.7"]
|
23
|
-
|
24
|
-
# Default version of ruby to use for lint and publishing
|
25
|
-
default_rubyversion: &default_rubyversion "2.7"
|
26
|
-
|
27
|
-
executors:
|
28
|
-
ruby:
|
29
|
-
parameters:
|
30
|
-
rubyversion:
|
31
|
-
type: string
|
32
|
-
default: *default_rubyversion
|
38
|
+
jobs:
|
39
|
+
ruby-2.3:
|
33
40
|
docker:
|
34
|
-
- image: circleci/ruby
|
35
|
-
|
41
|
+
- image: circleci/ruby:2.3
|
42
|
+
steps: *test_steps
|
43
|
+
ruby-2.4:
|
36
44
|
docker:
|
37
|
-
- image:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
- image: circleci/ruby:2.4
|
46
|
+
steps: *test_steps
|
47
|
+
ruby-2.5:
|
48
|
+
docker:
|
49
|
+
- image: circleci/ruby:2.5
|
50
|
+
steps: *test_steps
|
51
|
+
ruby-2.6:
|
52
|
+
docker:
|
53
|
+
- image: circleci/ruby:2.6
|
54
|
+
steps: *test_steps
|
55
|
+
ruby-2.7:
|
56
|
+
docker:
|
57
|
+
- image: circleci/ruby:2.7
|
58
|
+
steps: *test_steps
|
59
|
+
publish:
|
60
|
+
docker:
|
61
|
+
# Just randomly pick one recent ruby version
|
62
|
+
- image: circleci/ruby:2.7
|
63
|
+
working_directory: ~/repo
|
53
64
|
steps:
|
54
|
-
- attach_workspace:
|
55
|
-
at: ~/
|
56
|
-
- run:
|
57
|
-
name: "Artifacts being published"
|
58
|
-
command: |
|
59
|
-
echo "about to publish to tag ${CIRCLE_TAG}"
|
60
|
-
ls -l ~/artifacts/*
|
61
65
|
- checkout
|
62
66
|
- run:
|
63
67
|
name: Setup Rubygems
|
@@ -65,66 +69,11 @@ commands:
|
|
65
69
|
- run:
|
66
70
|
name: Publish to Rubygems
|
67
71
|
command: |
|
68
|
-
gem
|
69
|
-
|
70
|
-
jobs:
|
71
|
-
test:
|
72
|
-
parameters:
|
73
|
-
rubyversion:
|
74
|
-
type: string
|
75
|
-
default: *default_rubyversion
|
76
|
-
executor:
|
77
|
-
name: ruby
|
78
|
-
rubyversion: "<< parameters.rubyversion >>"
|
79
|
-
steps:
|
80
|
-
- checkout
|
81
|
-
- restore_cache:
|
82
|
-
keys:
|
83
|
-
- v1-dependencies-{{ checksum "libhoney.gemspec" }}
|
84
|
-
# fallback to using the latest cache if no exact match is found
|
85
|
-
- v1-dependencies-
|
86
|
-
- run:
|
87
|
-
name: install dependencies
|
88
|
-
command: |
|
89
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
90
|
-
- save_cache:
|
91
|
-
paths:
|
92
|
-
- ./vendor/bundle
|
93
|
-
key: v1-dependencies-{{ checksum "libhoney.gemspec" }}
|
94
|
-
- run:
|
95
|
-
name: run rubocop
|
96
|
-
command: bundle exec rake rubocop
|
97
|
-
- run:
|
98
|
-
name: run tests
|
99
|
-
command: bundle exec rake test
|
100
|
-
|
101
|
-
build_artifacts:
|
102
|
-
executor:
|
103
|
-
name: ruby
|
104
|
-
steps:
|
105
|
-
- checkout
|
106
|
-
- run: mkdir -p ~/artifacts
|
107
|
-
- run: gem build libhoney.gemspec
|
108
|
-
- run: cp libhoney-*.gem ~/artifacts/
|
109
|
-
- persist_to_workspace:
|
110
|
-
root: ~/
|
111
|
-
paths:
|
112
|
-
- artifacts
|
113
|
-
- store_artifacts:
|
114
|
-
path: ~/artifacts
|
115
|
-
|
116
|
-
publish_github:
|
117
|
-
executor: github
|
118
|
-
steps:
|
119
|
-
- publish_github
|
120
|
-
|
121
|
-
publish_rubygems:
|
122
|
-
executor:
|
123
|
-
name: ruby
|
124
|
-
steps:
|
125
|
-
- publish_rubygems
|
72
|
+
gem build libhoney.gemspec
|
73
|
+
gem push "libhoney-$(git describe --tags | cut -d "v" -f 2).gem"
|
126
74
|
|
127
75
|
workflows:
|
76
|
+
version: 2
|
128
77
|
nightly:
|
129
78
|
triggers:
|
130
79
|
- schedule:
|
@@ -134,24 +83,27 @@ workflows:
|
|
134
83
|
only:
|
135
84
|
- main
|
136
85
|
jobs:
|
137
|
-
-
|
138
|
-
|
86
|
+
- ruby-2.3: *tag_filters
|
87
|
+
- ruby-2.4: *tag_filters
|
88
|
+
- ruby-2.5: *tag_filters
|
89
|
+
- ruby-2.6: *tag_filters
|
90
|
+
- ruby-2.7: *tag_filters
|
139
91
|
build:
|
140
92
|
jobs:
|
141
|
-
-
|
142
|
-
|
143
|
-
|
144
|
-
-
|
145
|
-
|
93
|
+
- ruby-2.3: *tag_filters
|
94
|
+
- ruby-2.4: *tag_filters
|
95
|
+
- ruby-2.5: *tag_filters
|
96
|
+
- ruby-2.6: *tag_filters
|
97
|
+
- ruby-2.7: *tag_filters
|
98
|
+
- publish:
|
146
99
|
requires:
|
147
|
-
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
- build_artifacts
|
100
|
+
- ruby-2.3
|
101
|
+
- ruby-2.4
|
102
|
+
- ruby-2.5
|
103
|
+
- ruby-2.6
|
104
|
+
- ruby-2.7
|
105
|
+
filters:
|
106
|
+
tags:
|
107
|
+
only: /^v.*/
|
108
|
+
branches:
|
109
|
+
ignore: /.*/
|
data/.editorconfig
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
libhoney (1.14.7)
|
5
|
+
addressable (~> 2.0)
|
6
|
+
http (>= 2.0, < 5.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
ast (2.4.0)
|
14
|
+
backports (3.16.0)
|
15
|
+
bump (0.8.0)
|
16
|
+
crack (0.4.3)
|
17
|
+
safe_yaml (~> 1.0.0)
|
18
|
+
domain_name (0.5.20190701)
|
19
|
+
unf (>= 0.0.5, < 1.0.0)
|
20
|
+
ffi (1.13.1)
|
21
|
+
ffi-compiler (1.0.1)
|
22
|
+
ffi (>= 1.0.0)
|
23
|
+
rake
|
24
|
+
hashdiff (1.0.0)
|
25
|
+
http (4.4.1)
|
26
|
+
addressable (~> 2.3)
|
27
|
+
http-cookie (~> 1.0)
|
28
|
+
http-form_data (~> 2.2)
|
29
|
+
http-parser (~> 1.2.0)
|
30
|
+
http-cookie (1.0.3)
|
31
|
+
domain_name (~> 0.5)
|
32
|
+
http-form_data (2.3.0)
|
33
|
+
http-parser (1.2.1)
|
34
|
+
ffi-compiler (>= 1.0, < 2.0)
|
35
|
+
jaro_winkler (1.5.4)
|
36
|
+
minitest (5.14.0)
|
37
|
+
multi_json (1.14.1)
|
38
|
+
mustermann (1.1.1)
|
39
|
+
ruby2_keywords (~> 0.0.1)
|
40
|
+
parallel (1.19.1)
|
41
|
+
parser (2.7.0.2)
|
42
|
+
ast (~> 2.4.0)
|
43
|
+
public_suffix (4.0.3)
|
44
|
+
rack (2.1.4)
|
45
|
+
rack-protection (2.0.8.1)
|
46
|
+
rack
|
47
|
+
rainbow (3.0.0)
|
48
|
+
rake (12.3.3)
|
49
|
+
rubocop (0.68.1)
|
50
|
+
jaro_winkler (~> 1.5.1)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 2.5, != 2.5.1.1)
|
53
|
+
rainbow (>= 2.2.2, < 4.0)
|
54
|
+
ruby-progressbar (~> 1.7)
|
55
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
56
|
+
ruby-progressbar (1.10.1)
|
57
|
+
ruby2_keywords (0.0.2)
|
58
|
+
safe_yaml (1.0.5)
|
59
|
+
sinatra (2.0.8.1)
|
60
|
+
mustermann (~> 1.0)
|
61
|
+
rack (~> 2.0)
|
62
|
+
rack-protection (= 2.0.8.1)
|
63
|
+
tilt (~> 2.0)
|
64
|
+
sinatra-contrib (2.0.8.1)
|
65
|
+
backports (>= 2.8.2)
|
66
|
+
multi_json
|
67
|
+
mustermann (~> 1.0)
|
68
|
+
rack-protection (= 2.0.8.1)
|
69
|
+
sinatra (= 2.0.8.1)
|
70
|
+
tilt (~> 2.0)
|
71
|
+
spy (1.0.0)
|
72
|
+
tilt (2.0.10)
|
73
|
+
unf (0.1.4)
|
74
|
+
unf_ext
|
75
|
+
unf_ext (0.0.7.7)
|
76
|
+
unicode-display_width (1.5.0)
|
77
|
+
webmock (3.8.1)
|
78
|
+
addressable (>= 2.3.6)
|
79
|
+
crack (>= 0.3.2)
|
80
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
81
|
+
yard (0.9.24)
|
82
|
+
yardstick (0.9.9)
|
83
|
+
yard (~> 0.8, >= 0.8.7.2)
|
84
|
+
|
85
|
+
PLATFORMS
|
86
|
+
ruby
|
87
|
+
|
88
|
+
DEPENDENCIES
|
89
|
+
bump (~> 0.5)
|
90
|
+
bundler
|
91
|
+
libhoney!
|
92
|
+
minitest (~> 5.0)
|
93
|
+
rake (~> 12.3)
|
94
|
+
rubocop (< 0.69)
|
95
|
+
sinatra
|
96
|
+
sinatra-contrib
|
97
|
+
spy
|
98
|
+
webmock (~> 3.4)
|
99
|
+
yard
|
100
|
+
yardstick (~> 0.9)
|
101
|
+
|
102
|
+
BUNDLED WITH
|
103
|
+
2.1.4
|
data/README.md
CHANGED
@@ -4,8 +4,8 @@ Ruby gem for sending events to [Honeycomb](https://www.honeycomb.io), a service
|
|
4
4
|
|
5
5
|
Requires Ruby 2.2 or greater.
|
6
6
|
|
7
|
-
-
|
8
|
-
-
|
7
|
+
- [Usage and Examples](https://docs.honeycomb.io/sdk/ruby/)
|
8
|
+
- [API Reference](https://www.rubydoc.info/gems/libhoney)
|
9
9
|
|
10
10
|
For tracing support and automatic instrumentation of Rails, Sinatra, Rack, ActiveRecord, and other frameworks, check out our [Beeline for Ruby](https://github.com/honeycombio/beeline-ruby).
|
11
11
|
|
@@ -20,11 +20,8 @@ All contributions will be released under the Apache License 2.0.
|
|
20
20
|
### Releasing a new version
|
21
21
|
|
22
22
|
CircleCI will automatically upload tagged releases to Rubygems. To release a new
|
23
|
-
version,
|
24
|
-
|
23
|
+
version, run
|
25
24
|
```
|
26
|
-
bump patch # Or bump minor, etc.
|
25
|
+
bump patch --tag # Or bump minor --tag, etc.
|
26
|
+
git push --follow-tags
|
27
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.
|
@@ -40,8 +40,6 @@ module Libhoney
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def add(event)
|
43
|
-
return unless event_valid(event)
|
44
|
-
|
45
43
|
begin
|
46
44
|
@batch_queue.enq(event, !@block_on_send)
|
47
45
|
rescue ThreadError
|
@@ -51,26 +49,6 @@ module Libhoney
|
|
51
49
|
ensure_threads_running
|
52
50
|
end
|
53
51
|
|
54
|
-
def event_valid(event)
|
55
|
-
invalid = []
|
56
|
-
invalid.push('api host') if event.api_host.nil? || event.api_host.empty?
|
57
|
-
invalid.push('write key') if event.writekey.nil? || event.writekey.empty?
|
58
|
-
invalid.push('dataset') if event.dataset.nil? || event.dataset.empty?
|
59
|
-
|
60
|
-
unless invalid.empty?
|
61
|
-
e = StandardError.new("#{self.class.name}: nil or empty required fields (#{invalid.join(', ')})"\
|
62
|
-
'. Will not attempt to send.')
|
63
|
-
Response.new(error: e).tap do |error_response|
|
64
|
-
error_response.metadata = event.metadata
|
65
|
-
enqueue_response(error_response)
|
66
|
-
end
|
67
|
-
|
68
|
-
return false
|
69
|
-
end
|
70
|
-
|
71
|
-
true
|
72
|
-
end
|
73
|
-
|
74
52
|
def send_loop
|
75
53
|
http_clients = build_http_clients
|
76
54
|
|
data/lib/libhoney/version.rb
CHANGED
data/libhoney.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'rubocop', '< 0.69'
|
30
30
|
spec.add_development_dependency 'sinatra'
|
31
31
|
spec.add_development_dependency 'sinatra-contrib'
|
32
|
-
spec.add_development_dependency 'spy'
|
32
|
+
spec.add_development_dependency 'spy'
|
33
33
|
spec.add_development_dependency 'webmock', '~> 3.4'
|
34
34
|
spec.add_development_dependency 'yard'
|
35
35
|
spec.add_development_dependency 'yardstick', '~> 0.9'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libhoney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.7
|
4
|
+
version: 1.14.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Honeycomb.io Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: spy
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: webmock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,9 +211,9 @@ files:
|
|
211
211
|
- ".gitignore"
|
212
212
|
- ".rubocop.yml"
|
213
213
|
- ".rubocop_todo.yml"
|
214
|
-
- CHANGELOG.md
|
215
214
|
- CONTRIBUTORS
|
216
215
|
- Gemfile
|
216
|
+
- Gemfile.lock
|
217
217
|
- LICENSE
|
218
218
|
- NOTICE
|
219
219
|
- README.md
|
@@ -249,9 +249,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: 2.2.0
|
250
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
251
|
requirements:
|
252
|
-
- - "
|
252
|
+
- - ">="
|
253
253
|
- !ruby/object:Gem::Version
|
254
|
-
version:
|
254
|
+
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubygems_version: 3.1.4
|
257
257
|
signing_key:
|