callcounter 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/callcounter/capturer.rb +2 -2
- data/lib/callcounter/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70bca5d8cccd13dc7e49b588c2da40b4ca0312b04732ca21d4a28f1265d9deed
|
|
4
|
+
data.tar.gz: 0ab8f77ab9fb23395bd28a479dbb16f3223ec20695514d73eaee5832c2f2c79d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77436a39409401c6781d2ad2c82ed52737a4fcaaea40bca81a98cbb2f4e110df81d54298e1d3786ff2c59449959b74a26be667a6284b8afbdada373e41bd07d2
|
|
7
|
+
data.tar.gz: ea6c438f1f8d8abc6edbfa1c70cbb28c6113054da09ea2eaac0636fcf2dcea00ac845c5a7c6ee9a838253546fded12d19f531d1ed7081e2a6c0b4fca1e11259c
|
data/README.md
CHANGED
|
@@ -33,7 +33,7 @@ For example, the default lambda is shown below:
|
|
|
33
33
|
Callcounter.configure do |config|
|
|
34
34
|
config.project_token = '' # TODO: fill with your unique project token
|
|
35
35
|
config.track = lambda { |request|
|
|
36
|
-
|
|
36
|
+
request.hostname.start_with?('api') || request.path.start_with?('/api')
|
|
37
37
|
}
|
|
38
38
|
end
|
|
39
39
|
```
|
data/lib/callcounter/capturer.rb
CHANGED
|
@@ -51,10 +51,10 @@ module Callcounter
|
|
|
51
51
|
def send_buffer
|
|
52
52
|
http = Net::HTTP.new('api.callcounter.eu', 443)
|
|
53
53
|
http.use_ssl = true
|
|
54
|
-
track = Net::HTTP::Post.new('/api/v1/events')
|
|
54
|
+
track = Net::HTTP::Post.new('/api/v1/events/batch')
|
|
55
55
|
track['content-type'] = 'application/json'
|
|
56
56
|
track['user-agent'] = "callcounter-gem (#{Callcounter::VERSION})"
|
|
57
|
-
track.body = { project_token: project_token, events: @buffer }.to_json
|
|
57
|
+
track.body = { batch: { project_token: project_token, events: @buffer } }.to_json
|
|
58
58
|
|
|
59
59
|
http.request(track)
|
|
60
60
|
|
data/lib/callcounter/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: callcounter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Webindie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-04-
|
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Callcounter is a service that helps API providers with debugging and
|
|
14
14
|
optimising the usage of their APIs.
|
|
@@ -35,9 +35,9 @@ require_paths:
|
|
|
35
35
|
- lib
|
|
36
36
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 2.
|
|
40
|
+
version: 2.5.0
|
|
41
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
42
|
requirements:
|
|
43
43
|
- - ">="
|