altertable 1.0.0 → 1.1.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 +4 -4
- data/.github/workflows/ci.yml +13 -1
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +52 -7
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +5 -15
- data/Rakefile +3 -1
- data/altertable.gemspec +1 -1
- data/lib/altertable/adapters.rb +3 -3
- data/lib/altertable/client.rb +14 -6
- data/lib/altertable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8e41db18f92cfe24f4683b754172ebb01eb38ba880184bdf03d1e66b8771153
|
|
4
|
+
data.tar.gz: 46ce07f124fedec9d6054b3e66e28605fb847816f787506d62b99eda97dd474b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71d0cc5553baba7918630973a66413aeb6eda1f6332977695a8ba686852748a0e9c183a244f343800d81de6535762ce1c64e61d38465b7ca05965e2b89caa3e8
|
|
7
|
+
data.tar.gz: 8b9e20155315a28c9479b4701b89fba0ec5e2ffcecfff8a19890bb841d1569effd17e6e99fac40dfdf4db73e7e290c41437da83969f6fb48ab182b0c1fcca1a0
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -7,6 +7,18 @@ on:
|
|
|
7
7
|
branches: [main]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Set up Ruby
|
|
15
|
+
uses: ruby/setup-ruby@v1
|
|
16
|
+
with:
|
|
17
|
+
ruby-version: "3.4"
|
|
18
|
+
bundler-cache: true
|
|
19
|
+
- name: Run rubocop
|
|
20
|
+
run: bundle exec rubocop
|
|
21
|
+
|
|
10
22
|
test:
|
|
11
23
|
runs-on: ubuntu-latest
|
|
12
24
|
strategy:
|
|
@@ -42,7 +54,7 @@ jobs:
|
|
|
42
54
|
run: bundle exec rake spec
|
|
43
55
|
|
|
44
56
|
typing:
|
|
45
|
-
name: "Typing
|
|
57
|
+
name: "Typing"
|
|
46
58
|
runs-on: ubuntu-latest
|
|
47
59
|
steps:
|
|
48
60
|
- uses: actions/checkout@v4
|
data/.rubocop.yml
CHANGED
|
@@ -1,18 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
plugins:
|
|
2
2
|
- rubocop-performance
|
|
3
3
|
- rubocop-rspec
|
|
4
4
|
|
|
5
5
|
AllCops:
|
|
6
6
|
NewCops: enable
|
|
7
|
+
TargetRubyVersion: 3.0
|
|
7
8
|
Exclude:
|
|
8
9
|
- 'vendor/**/*'
|
|
9
|
-
- 'spec
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Max: 120
|
|
10
|
+
- 'spec/**/*'
|
|
11
|
+
- 'bin/**/*'
|
|
12
|
+
- 'gemfiles/**/*'
|
|
13
13
|
|
|
14
14
|
Style/Documentation:
|
|
15
15
|
Enabled: false
|
|
16
|
-
|
|
17
16
|
Style/FrozenStringLiteralComment:
|
|
18
|
-
Enabled:
|
|
17
|
+
Enabled: false
|
|
18
|
+
Style/StringLiterals:
|
|
19
|
+
Enabled: false
|
|
20
|
+
Layout/LineLength:
|
|
21
|
+
Enabled: false
|
|
22
|
+
Metrics/MethodLength:
|
|
23
|
+
Enabled: false
|
|
24
|
+
Metrics/ParameterLists:
|
|
25
|
+
Enabled: false
|
|
26
|
+
Metrics/AbcSize:
|
|
27
|
+
Enabled: false
|
|
28
|
+
Metrics/CyclomaticComplexity:
|
|
29
|
+
Enabled: false
|
|
30
|
+
Metrics/PerceivedComplexity:
|
|
31
|
+
Enabled: false
|
|
32
|
+
Layout/TrailingWhitespace:
|
|
33
|
+
Enabled: false
|
|
34
|
+
Metrics/ClassLength:
|
|
35
|
+
Enabled: false
|
|
36
|
+
Gemspec/RequireMFA:
|
|
37
|
+
Enabled: false
|
|
38
|
+
Gemspec/OrderedDependencies:
|
|
39
|
+
Enabled: false
|
|
40
|
+
Gemspec/DevelopmentDependencies:
|
|
41
|
+
Enabled: false
|
|
42
|
+
Gemspec/RequiredRubyVersion:
|
|
43
|
+
Enabled: false
|
|
44
|
+
Style/IfUnlessModifier:
|
|
45
|
+
Enabled: false
|
|
46
|
+
Layout/EmptyLineAfterGuardClause:
|
|
47
|
+
Enabled: false
|
|
48
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
49
|
+
Enabled: false
|
|
50
|
+
Lint/MissingSuper:
|
|
51
|
+
Enabled: false
|
|
52
|
+
Naming/MethodParameterName:
|
|
53
|
+
Enabled: false
|
|
54
|
+
Layout/IndentationWidth:
|
|
55
|
+
Enabled: false
|
|
56
|
+
Style/Proc:
|
|
57
|
+
Enabled: false
|
|
58
|
+
Style/FetchEnvVar:
|
|
59
|
+
Enabled: false
|
|
60
|
+
Style/MutableConstant:
|
|
61
|
+
Enabled: false
|
|
62
|
+
Bundler/OrderedGems:
|
|
63
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v1.0.0...altertable/v1.1.0) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* plug rubocop ([#25](https://github.com/altertable-ai/altertable-ruby/issues/25)) ([1b375d5](https://github.com/altertable-ai/altertable-ruby/commit/1b375d5246d595972378e88bd61d56420a65ee39)), closes [#24](https://github.com/altertable-ai/altertable-ruby/issues/24)
|
|
9
|
+
|
|
3
10
|
## [1.0.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.4.0...altertable/v1.0.0) (2026-03-09)
|
|
4
11
|
|
|
5
12
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
altertable (1.
|
|
4
|
+
altertable (1.1.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -88,23 +88,13 @@ GEM
|
|
|
88
88
|
rubocop-ast (1.49.0)
|
|
89
89
|
parser (>= 3.3.7.2)
|
|
90
90
|
prism (~> 1.7)
|
|
91
|
-
rubocop-capybara (2.22.1)
|
|
92
|
-
lint_roller (~> 1.1)
|
|
93
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
94
|
-
rubocop-factory_bot (2.28.0)
|
|
95
|
-
lint_roller (~> 1.1)
|
|
96
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
97
91
|
rubocop-performance (1.26.1)
|
|
98
92
|
lint_roller (~> 1.1)
|
|
99
93
|
rubocop (>= 1.75.0, < 2.0)
|
|
100
94
|
rubocop-ast (>= 1.47.1, < 2.0)
|
|
101
|
-
rubocop-rspec (
|
|
102
|
-
|
|
103
|
-
rubocop
|
|
104
|
-
rubocop-factory_bot (~> 2.22)
|
|
105
|
-
rubocop-rspec_rails (~> 2.28)
|
|
106
|
-
rubocop-rspec_rails (2.29.1)
|
|
107
|
-
rubocop (~> 1.61)
|
|
95
|
+
rubocop-rspec (3.9.0)
|
|
96
|
+
lint_roller (~> 1.1)
|
|
97
|
+
rubocop (~> 1.81)
|
|
108
98
|
ruby-progressbar (1.13.0)
|
|
109
99
|
sorbet (0.6.12997)
|
|
110
100
|
sorbet-static (= 0.6.12997)
|
|
@@ -162,7 +152,7 @@ DEPENDENCIES
|
|
|
162
152
|
rspec (~> 3.0, >= 0)
|
|
163
153
|
rubocop (~> 1.0)
|
|
164
154
|
rubocop-performance (~> 1.0)
|
|
165
|
-
rubocop-rspec (~>
|
|
155
|
+
rubocop-rspec (~> 3.0)
|
|
166
156
|
sorbet
|
|
167
157
|
sorbet-runtime
|
|
168
158
|
tapioca
|
data/Rakefile
CHANGED
data/altertable.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
30
30
|
spec.add_development_dependency "rubocop", "~> 1.0"
|
|
31
31
|
spec.add_development_dependency "rubocop-performance", "~> 1.0"
|
|
32
|
-
spec.add_development_dependency "rubocop-rspec", "~>
|
|
32
|
+
spec.add_development_dependency "rubocop-rspec", "~> 3.0"
|
|
33
33
|
spec.add_development_dependency "testcontainers"
|
|
34
34
|
spec.add_development_dependency "rbs"
|
|
35
35
|
spec.add_development_dependency "sorbet"
|
data/lib/altertable/adapters.rb
CHANGED
|
@@ -29,7 +29,7 @@ module Altertable
|
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def post(path, body: nil, params: {}
|
|
32
|
+
def post(path, body: nil, params: {})
|
|
33
33
|
resp = @conn.post(path) do |req|
|
|
34
34
|
req.params = params
|
|
35
35
|
req.body = body
|
|
@@ -59,7 +59,7 @@ module Altertable
|
|
|
59
59
|
)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
def post(path, body: nil, params: {}
|
|
62
|
+
def post(path, body: nil, params: {})
|
|
63
63
|
resp = @client.post(path, body: body, params: params)
|
|
64
64
|
wrap_response(resp)
|
|
65
65
|
rescue HTTPX::Error => e
|
|
@@ -84,7 +84,7 @@ module Altertable
|
|
|
84
84
|
@uri = URI.parse(@base_url)
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
def post(path, body: nil, params: {}
|
|
87
|
+
def post(path, body: nil, params: {})
|
|
88
88
|
uri = URI.join(@uri, path)
|
|
89
89
|
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
90
90
|
|
data/lib/altertable/client.rb
CHANGED
|
@@ -40,8 +40,8 @@ module Altertable
|
|
|
40
40
|
environment: @environment,
|
|
41
41
|
distinct_id: distinct_id,
|
|
42
42
|
properties: {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
'$lib': "altertable-ruby",
|
|
44
|
+
'$lib_version': Altertable::VERSION
|
|
45
45
|
}.merge(properties)
|
|
46
46
|
}
|
|
47
47
|
payload[:properties]["$release"] = @release if @release
|
|
@@ -117,10 +117,18 @@ module Altertable
|
|
|
117
117
|
def handle_response(res)
|
|
118
118
|
case res.status
|
|
119
119
|
when 200..299
|
|
120
|
-
|
|
120
|
+
begin
|
|
121
|
+
JSON.parse(res.body)
|
|
122
|
+
rescue StandardError
|
|
123
|
+
{}
|
|
124
|
+
end
|
|
121
125
|
when 422
|
|
122
|
-
error_data =
|
|
123
|
-
|
|
126
|
+
error_data = begin
|
|
127
|
+
JSON.parse(res.body)
|
|
128
|
+
rescue StandardError
|
|
129
|
+
{}
|
|
130
|
+
end
|
|
131
|
+
raise ApiError.new("Unprocessable Entity: #{error_data['message']}", res.status, error_data)
|
|
124
132
|
else
|
|
125
133
|
raise ApiError.new("HTTP Error: #{res.status}", res.status)
|
|
126
134
|
end
|
|
@@ -133,7 +141,7 @@ module Altertable
|
|
|
133
141
|
AltertableError.new(error.message, error)
|
|
134
142
|
end
|
|
135
143
|
|
|
136
|
-
@on_error&.call(wrapped_error)
|
|
144
|
+
@on_error&.call(wrapped_error)
|
|
137
145
|
raise wrapped_error
|
|
138
146
|
end
|
|
139
147
|
end
|
data/lib/altertable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: altertable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Altertable
|
|
@@ -71,14 +71,14 @@ dependencies:
|
|
|
71
71
|
requirements:
|
|
72
72
|
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '
|
|
74
|
+
version: '3.0'
|
|
75
75
|
type: :development
|
|
76
76
|
prerelease: false
|
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - "~>"
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '
|
|
81
|
+
version: '3.0'
|
|
82
82
|
- !ruby/object:Gem::Dependency
|
|
83
83
|
name: testcontainers
|
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|