libhoney 1.15.0 → 1.16.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: 26ab54ab7ffb098ee3f1b41b211ca8a1295de834e00c296711fc049a6a9b858e
4
- data.tar.gz: 695db353c2c36287e60db383567021b0f35ed11a7472ab0698d8d74832eaf906
3
+ metadata.gz: 9034a56adcdd87d45a5d7602caa9add401b713cb52ba258d0383835b30304ef5
4
+ data.tar.gz: 4db352186d89946e6121ace449f69d869175ce99cb3910084b35491bbbbc26a8
5
5
  SHA512:
6
- metadata.gz: 618e014df070b756a691879c2fb10412ddff2a8224fbfc853983fc0c9b38546366abe23c869c9bc9b65acf9178751ca352bfe331c9904dbec733483c82711ece
7
- data.tar.gz: 40f9950ceb87f8512c60cf4328aa90421b3242068826aab54ee858717529de348d34a9d862854e00ca36c384cc0ed6c7e9f4fdec51af1c51c8bff7e3d5b1bcf3
6
+ metadata.gz: fce68faca7e1353f8d01bc2329fcb9d3157cdb38cedbdd75f451b2c2896d8119f2651b68eebcf8b5961b696c53f00f6a6a855d40fabfa9039d07e948a5a70683
7
+ data.tar.gz: 3e9433a4e07bf24f0db174c87f2b8074cd51c1dacedfb5cf3bb403ed444f0403b81aa66ae9f3c2401f119a39edfebc53aba89246c3361719be7265cf0eabd5ca
data/.gitignore CHANGED
@@ -52,3 +52,5 @@ build-iPhoneSimulator/
52
52
  # vim stuff
53
53
  *.swp
54
54
  *.swo
55
+
56
+ Gemfile.lock
@@ -1,12 +1,22 @@
1
1
  # libhoney-rb changelog
2
2
 
3
+ ## 1.16.0
4
+
5
+ ### Fixes:
6
+
7
+ - Don't moneypatch Class (#70)
8
+
9
+ ### Maintenance:
10
+
11
+ - Add lockfile to gitignore (#71)
12
+
3
13
  ## 1.15.0
4
14
 
5
- Improvements:
15
+ ### Improvements:
6
16
 
7
17
  - Do not attempt to send invalid events (#67)
8
18
 
9
- Maintenance:
19
+ ### Maintenance:
10
20
 
11
21
  - Modernize circle, include github publishing (#64)
12
22
  - Update .editorconfig to add new lines to end of files (#68)
@@ -1,31 +1,10 @@
1
1
  require 'time'
2
2
  require 'json'
3
3
  require 'http'
4
+ require 'forwardable'
4
5
 
5
6
  require 'libhoney/null_transmission'
6
7
 
7
- # Define a few additions that proxy access through Client's builder. Makes Client much tighter.
8
- class Class
9
- def builder_attr_accessor(*args)
10
- args.each do |arg|
11
- class_eval("def #{arg};@builder.#{arg};end", __FILE__, __LINE__)
12
- class_eval("def #{arg}=(val);@builder.#{arg}=val;end", __FILE__, __LINE__)
13
- end
14
- end
15
-
16
- def builder_attr_reader(*args)
17
- args.each do |arg|
18
- class_eval("def #{arg};@builder.#{arg};end", __FILE__, __LINE__)
19
- end
20
- end
21
-
22
- def builder_attr_writer(*args)
23
- args.each do |arg|
24
- class_eval("def #{arg}=(val);@builder.#{arg}=val;end", __FILE__, __LINE__)
25
- end
26
- end
27
- end
28
-
29
8
  module Libhoney
30
9
  ##
31
10
  # This is a library to allow you to send events to Honeycomb from within your
@@ -52,6 +31,8 @@ module Libhoney
52
31
  # evt.send
53
32
  #
54
33
  class Client
34
+ extend Forwardable
35
+
55
36
  API_HOST = 'https://api.honeycomb.io/'.freeze
56
37
 
57
38
  # Instantiates libhoney and prepares it to send events to Honeycomb.
@@ -124,19 +105,12 @@ module Libhoney
124
105
  @proxy_config = proxy_config
125
106
  end
126
107
 
127
- builder_attr_accessor :writekey, :dataset, :sample_rate, :api_host
128
-
129
108
  attr_reader :block_on_send, :block_on_responses, :max_batch_size,
130
109
  :send_frequency, :max_concurrent_batches,
131
110
  :pending_work_capacity, :responses
132
111
 
133
- def event
134
- @builder.event
135
- end
136
-
137
- def builder(fields = {}, dyn_fields = {})
138
- @builder.builder(fields, dyn_fields)
139
- end
112
+ def_delegators :@builder, :event, :writekey, :writekey=, :dataset, :dataset=,
113
+ :sample_rate, :sample_rate=, :api_host, :api_host=, :builder
140
114
 
141
115
  # Nuke the queue and wait for inflight requests to complete before returning.
142
116
  # If you set drain=false, all queued requests will be dropped on the floor.
@@ -1,3 +1,3 @@
1
1
  module Libhoney
2
- VERSION = '1.15.0'.freeze
2
+ VERSION = '1.16.0'.freeze
3
3
  end
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.15.0
4
+ version: 1.16.0
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-11-06 00:00:00.000000000 Z
11
+ date: 2020-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bump