simple_segment 1.5.0 → 1.6.0

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: 6e5090db1c874309f4cd0c4fef0cef16fc261eb9f41cc25e05bc653195199b1b
4
- data.tar.gz: a36a26d72fd87df85236fb5b306e6c66dd9e64f1b65acb1f4b25ced8d7b655fd
3
+ metadata.gz: 567e3da4a8a550ac76f933eabcae572a8a94a8701fc023d602710aaca3456882
4
+ data.tar.gz: 59442630ea7d7fd5732072d1e469c7d7a55f60b904c7ac0df119d96033ec8df8
5
5
  SHA512:
6
- metadata.gz: 4d9930d8f661b02fbdba7c513c0a5f424eeea901597059a8570518d1f719cc026cc24f1bd6c3a88508526198557929f8f7f3185f9f9408683c1b571cfc58e195
7
- data.tar.gz: 1b34511c0bdd1960627e797c4a41802863cbaa15f67f53b8a3e583c3b3f95dd75b4b63d137e0e967c04cabee65853d5d96f6612f2a9a30c517af88cec782a499
6
+ metadata.gz: 3f34457b3c44c21f2facb1501c9816e4f32c473f2a97d9714ef3e369e208d1ea2126c16ab3edd5b616255f362f1ced0f91a381c202936d288ef8c13ca849edb8
7
+ data.tar.gz: 372e29b2895a5b0a8f3fe7e0e77bd19c0bf58fd9ac20d5697cfee4c029eae15174e4fca3daef9b4b8327e0957fce488af6066bf252097b21f76d221d9523313a
@@ -10,9 +10,9 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  strategy:
12
12
  matrix:
13
- ruby: ['3.1', '3.0', '2.7']
13
+ ruby: ['3.4', '3.3', '3.2']
14
14
  steps:
15
- - uses: actions/checkout@v3
15
+ - uses: actions/checkout@v4
16
16
  - name: Set up Ruby ${{ matrix.ruby }}
17
17
  uses: ruby/setup-ruby@v1
18
18
  with:
data/.rubocop.yml CHANGED
@@ -16,3 +16,6 @@ Style/Documentation:
16
16
 
17
17
  Gemspec/RequiredRubyVersion:
18
18
  Enabled: false
19
+
20
+ Gemspec/DevelopmentDependencies:
21
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.6.0] - 2025-12-03
10
+
11
+ ### Changed
12
+ - Use millisecond precision for `timestamp` and `sentAt` fields https://github.com/whatthewhat/simple_segment/pull/42 by [@marcboquet](https://github.com/marcboquet)
13
+
9
14
  ## [1.5.0] - 2022-12-06
10
15
 
11
16
  ### Changed
@@ -45,7 +50,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
45
50
  ### Changed
46
51
  - Date properties are now automatically converted to ISO 8601 to be consistent with the official client https://github.com/whatthewhat/simple_segment/pull/19 by @juanramoncg
47
52
 
48
- [Unreleased]: https://github.com/whatthewhat/simple_segment/compare/v1.5.0...HEAD
53
+ [Unreleased]: https://github.com/whatthewhat/simple_segment/compare/v1.6.0...HEAD
54
+ [1.6.0]: https://github.com/whatthewhat/simple_segment/compare/v1.5.0...v1.6.0
49
55
  [1.5.0]: https://github.com/whatthewhat/simple_segment/compare/v1.4.0...v1.5.0
50
56
  [1.4.0]: https://github.com/whatthewhat/simple_segment/compare/v1.3.0...v1.4.0
51
57
  [1.3.0]: https://github.com/whatthewhat/simple_segment/compare/v1.2.0...v1.3.0
data/README.md CHANGED
@@ -17,9 +17,9 @@ The gem supports all existing functionality of analytics-ruby:
17
17
  - `analytics.alias(...)`
18
18
  - `analytics.flush` (no op for backwards compatibility with the official gem)
19
19
 
20
- In addition it offers the ability to manually batch events with [analytics.batch](#batching).
20
+ In addition, it offers the ability to manually batch events with [analytics.batch](#batching).
21
21
 
22
- The plan is to be an drop in replacement for the official gem, so if you find inconsistencies with `analytics-ruby` feel free to file an issue.
22
+ The plan is to be a drop-in replacement for the official gem, so if you find inconsistencies with `analytics-ruby` feel free to file an issue.
23
23
 
24
24
  ## Installation
25
25
 
@@ -44,9 +44,7 @@ module SimpleSegment
44
44
  end
45
45
 
46
46
  def commit
47
- if payload[:batch].length.zero?
48
- raise ArgumentError, 'A batch must contain at least one action'
49
- end
47
+ raise ArgumentError, 'A batch must contain at least one action' if payload[:batch].empty?
50
48
 
51
49
  Request.new(client).post('/v1/batch', payload)
52
50
  end
@@ -36,7 +36,7 @@ module SimpleSegment
36
36
  context: context,
37
37
  integrations: options[:integrations],
38
38
  timestamp: timestamp(options.fetch(:timestamp, current_time)),
39
- sentAt: current_time.iso8601,
39
+ sentAt: current_time.iso8601(3),
40
40
  messageId: options[:message_id]
41
41
  }
42
42
  end
@@ -48,9 +48,9 @@ module SimpleSegment
48
48
 
49
49
  def timestamp(timestamp)
50
50
  if timestamp.respond_to?(:iso8601)
51
- timestamp.iso8601
51
+ timestamp.iso8601(3)
52
52
  else
53
- Time.iso8601(timestamp).iso8601
53
+ Time.iso8601(timestamp).iso8601(3)
54
54
  end
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleSegment
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.0'
5
5
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'pry'
25
25
  spec.add_development_dependency 'rake', '>= 10.0'
26
26
  spec.add_development_dependency 'rspec', '~> 3.0'
27
- spec.add_development_dependency 'rubocop', '1.23.0'
27
+ spec.add_development_dependency 'rubocop', '1.65.0'
28
28
  spec.add_development_dependency 'timecop', '~> 0.9.5'
29
29
  spec.add_development_dependency 'webmock', '~> 3.7'
30
30
  spec.metadata = {
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_segment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Topolskiy
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-12-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -72,14 +71,14 @@ dependencies:
72
71
  requirements:
73
72
  - - '='
74
73
  - !ruby/object:Gem::Version
75
- version: 1.23.0
74
+ version: 1.65.0
76
75
  type: :development
77
76
  prerelease: false
78
77
  version_requirements: !ruby/object:Gem::Requirement
79
78
  requirements:
80
79
  - - '='
81
80
  - !ruby/object:Gem::Version
82
- version: 1.23.0
81
+ version: 1.65.0
83
82
  - !ruby/object:Gem::Dependency
84
83
  name: timecop
85
84
  requirement: !ruby/object:Gem::Requirement
@@ -118,7 +117,6 @@ extra_rdoc_files: []
118
117
  files:
119
118
  - ".github/workflows/ci.yml"
120
119
  - ".gitignore"
121
- - ".hound.yml"
122
120
  - ".rspec"
123
121
  - ".rubocop.yml"
124
122
  - CHANGELOG.md
@@ -149,7 +147,6 @@ licenses:
149
147
  - MIT
150
148
  metadata:
151
149
  rubygems_mfa_required: 'true'
152
- post_install_message:
153
150
  rdoc_options: []
154
151
  require_paths:
155
152
  - lib
@@ -164,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
161
  - !ruby/object:Gem::Version
165
162
  version: '0'
166
163
  requirements: []
167
- rubygems_version: 3.1.6
168
- signing_key:
164
+ rubygems_version: 3.6.9
169
165
  specification_version: 4
170
166
  summary: A simple synchronous API client for segment.io.
171
167
  test_files: []
data/.hound.yml DELETED
@@ -1,3 +0,0 @@
1
- rubocop:
2
- config_file: .rubocop.yml
3
- version: 0.75.0