altertable 1.0.0 → 1.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/.github/workflows/ci.yml +13 -1
- data/.github/workflows/semantic-pull-request.yml +16 -0
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +52 -7
- data/CHANGELOG.md +14 -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
- data/rbi/altertable.rbi +6 -6
- data/rbi/todo.rbi +5 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c5cf2ceb0732f00a0017795d33e2c28fe1b3c131bd443d3c00247eeddc88c25
|
|
4
|
+
data.tar.gz: 8941f4802ae2ee21517353ce0628420a70ffa3a823855d32d3d4daab62315b32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff9de77df94949d60e633985af119074276e334352ccce1fb510f2bb68f2acface25aaaaf256a3585118cccc3e79898386d226e3df036937f03bf0e5986ace7c
|
|
7
|
+
data.tar.gz: 0f7eafb061c8d266952cb6549c124e53fcc1b9c53e2c961fc8298eeefd91bd2b716b9cb681afcc93bf5632d20cac5e6ffbf32c93faad8849e618afd02b69512d
|
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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Semantic Pull Request
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types:
|
|
5
|
+
- opened
|
|
6
|
+
- edited
|
|
7
|
+
- synchronize
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
main:
|
|
11
|
+
name: Validate PR title
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: amannn/action-semantic-pull-request@v5
|
|
15
|
+
env:
|
|
16
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.1](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v1.1.0...altertable/v1.1.1) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **sorbet:** trigger build ([#31](https://github.com/altertable-ai/altertable-ruby/issues/31)) ([e30cbbf](https://github.com/altertable-ai/altertable-ruby/commit/e30cbbf6aa8c9264423101f69d572d25776ebff2))
|
|
9
|
+
|
|
10
|
+
## [1.1.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v1.0.0...altertable/v1.1.0) (2026-03-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 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)
|
|
16
|
+
|
|
3
17
|
## [1.0.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.4.0...altertable/v1.0.0) (2026-03-09)
|
|
4
18
|
|
|
5
19
|
|
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.1)
|
|
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
data/rbi/altertable.rbi
CHANGED
|
@@ -77,7 +77,7 @@ module Altertable
|
|
|
77
77
|
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
78
78
|
def initialize(base_url:, timeout:, headers: nil); end
|
|
79
79
|
|
|
80
|
-
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
80
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Altertable::Adapters::Response) }
|
|
81
81
|
def post(path, body: nil, params: nil, &block); end
|
|
82
82
|
end
|
|
83
83
|
|
|
@@ -85,12 +85,12 @@ module Altertable
|
|
|
85
85
|
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
86
86
|
def initialize(base_url:, timeout:, headers: nil); end
|
|
87
87
|
|
|
88
|
-
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
88
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Altertable::Adapters::Response) }
|
|
89
89
|
def post(path, body: nil, params: nil, &block); end
|
|
90
90
|
|
|
91
91
|
private
|
|
92
92
|
|
|
93
|
-
sig { params(resp: T.untyped).returns(Response) }
|
|
93
|
+
sig { params(resp: T.untyped).returns(Altertable::Adapters::Response) }
|
|
94
94
|
def wrap_response(resp); end
|
|
95
95
|
end
|
|
96
96
|
|
|
@@ -98,12 +98,12 @@ module Altertable
|
|
|
98
98
|
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
99
99
|
def initialize(base_url:, timeout:, headers: nil); end
|
|
100
100
|
|
|
101
|
-
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
101
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Altertable::Adapters::Response) }
|
|
102
102
|
def post(path, body: nil, params: nil, &block); end
|
|
103
103
|
|
|
104
104
|
private
|
|
105
105
|
|
|
106
|
-
sig { params(resp: T.untyped).returns(Response) }
|
|
106
|
+
sig { params(resp: T.untyped).returns(Altertable::Adapters::Response) }
|
|
107
107
|
def wrap_response(resp); end
|
|
108
108
|
end
|
|
109
109
|
|
|
@@ -111,7 +111,7 @@ module Altertable
|
|
|
111
111
|
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
112
112
|
def initialize(base_url:, timeout:, headers: nil); end
|
|
113
113
|
|
|
114
|
-
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
114
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Altertable::Adapters::Response) }
|
|
115
115
|
def post(path, body: nil, params: nil, &block); end
|
|
116
116
|
end
|
|
117
117
|
end
|
data/rbi/todo.rbi
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module Faraday; end
|
|
2
|
-
class Faraday::
|
|
3
|
-
class Faraday::
|
|
2
|
+
class Faraday::Error < StandardError; end
|
|
3
|
+
class Faraday::ServerError < Faraday::Error; end
|
|
4
|
+
class Faraday::ConnectionFailed < Faraday::Error; end
|
|
5
|
+
class Faraday::TimeoutError < Faraday::ServerError; end
|
|
6
|
+
|
|
4
7
|
module HTTPX; end
|
|
5
8
|
class HTTPX::Error < StandardError; end
|
|
6
9
|
class HTTPX::ErrorResponse; end
|
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.1
|
|
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
|
|
@@ -202,6 +202,7 @@ files:
|
|
|
202
202
|
- ".github/ISSUE_TEMPLATE/feature_request.yml"
|
|
203
203
|
- ".github/workflows/ci.yml"
|
|
204
204
|
- ".github/workflows/release-please.yml"
|
|
205
|
+
- ".github/workflows/semantic-pull-request.yml"
|
|
205
206
|
- ".gitmodules"
|
|
206
207
|
- ".release-please-manifest.json"
|
|
207
208
|
- ".rubocop.yml"
|