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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c162b867a3b3a0050d698462603b089142c29460c49254bae7e78705eef1b0ff
4
- data.tar.gz: 8613f4d81bf8e88f3bf083dd7360ab8e7255ecacc1fac0e4d74ff555fadfb579
3
+ metadata.gz: 70bca5d8cccd13dc7e49b588c2da40b4ca0312b04732ca21d4a28f1265d9deed
4
+ data.tar.gz: 0ab8f77ab9fb23395bd28a479dbb16f3223ec20695514d73eaee5832c2f2c79d
5
5
  SHA512:
6
- metadata.gz: a0513ed8e497d09a4c5c14735415b5b054546cf0bccbfa86e6e006420852f1c1107a9cc50b7bdc6781dfcd4e9f892c66f36ec2f801fc36e9ead53b8ed4416b3c
7
- data.tar.gz: 7f0d38080e754246ca32f73f2cd2ff7a37e1bd9ca5737fdb8a21143d8effd8dca48a79c0a396a00b53b8c229e076f51c1eea125ea7f6bce0f6f0f5fdb640f97d
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
- return request.hostname.start_with?('api') || request.path.start_with?('/api')
36
+ request.hostname.start_with?('api') || request.path.start_with?('/api')
37
37
  }
38
38
  end
39
39
  ```
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Callcounter
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
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.0
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-23 00:00:00.000000000 Z
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.4.0
40
+ version: 2.5.0
41
41
  required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - ">="