Skip to content

Commit 2365fa3

Browse files
Merge pull request #53 from cameronmccord2/add_ruby_33_to_ci
Add Ruby 3.3 to CI
2 parents c6b291b + 0aeed23 commit 2365fa3

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
ruby: ["2.7", "3.0", "3.1", "3.2"]
15+
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
1616

1717
steps:
1818
- uses: actions/checkout@master
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Ruby
3838
uses: ruby/setup-ruby@v1
3939
with:
40-
ruby-version: 3.2
40+
ruby-version: 3.3
4141
bundler: default
4242
bundler-cache: true
4343
- name: Build docs

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PATH
33
specs:
44
weaviate-ruby (0.9.0)
55
faraday (>= 2.0.1, < 3.0)
6-
graphlient (~> 0.7.0)
6+
graphlient (>= 0.7.0, < 0.9.0)
77

88
GEM
99
remote: https://rubygems.org/

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,34 +144,35 @@ client.schema.create(
144144
### Using the Objects endpoint
145145
```ruby
146146
# Create a new data object.
147-
client.objects.create(
147+
output = client.objects.create(
148148
class_name: 'Question',
149149
properties: {
150150
answer: '42',
151151
question: 'What is the meaning of life?',
152152
category: 'philosophy'
153153
}
154154
)
155+
uuid = output["id"]
155156

156157
# Lists all data objects in reverse order of creation.
157158
client.objects.list()
158159

159160
# Get a single data object.
160161
client.objects.get(
161162
class_name: "Question",
162-
id: "uuid"
163+
id: uuid
163164
)
164165

165166
# Check if a data object exists.
166167
client.objects.exists?(
167168
class_name: "Question",
168-
id: "uuid"
169+
id: uuid
169170
)
170171

171172
# Perform a partial update on an object based on its uuid.
172173
client.objects.update(
173174
class_name: "Question",
174-
id: "uuid",
175+
id: uuid,
175176
properties: {
176177
category: "simple-math"
177178
}
@@ -180,7 +181,7 @@ client.objects.update(
180181
# Replace an object based on its uuid.
181182
client.objects.replace(
182183
class_name: "Question",
183-
id: "uuid",
184+
id: uuid,
184185
properties: {
185186
question: "What does 6 times 7 equal to?",
186187
category: "math",
@@ -191,34 +192,35 @@ client.objects.replace(
191192
# Delete a single data object from Weaviate.
192193
client.objects.delete(
193194
class_name: "Question",
194-
id: "uuid"
195+
id: uuid
195196
)
196197

197198
# Batch create objects
198-
client.objects.batch_create(objects: [
199+
output = client.objects.batch_create(objects: [
199200
{
200201
class: "Question",
201202
properties: {
202-
answer: "42",
203-
question: "What is the meaning of life?",
204-
category: "philosophy"
203+
answer: "42",
204+
question: "What is the meaning of life?",
205+
category: "philosophy"
205206
}
206207
}, {
207208
class: "Question",
208209
properties: {
209-
answer: "42",
210-
question: "What does 6 times 7 equal to?",
211-
category: "math"
210+
answer: "42",
211+
question: "What does 6 times 7 equal to?",
212+
category: "math"
212213
}
213214
}
214215
])
216+
uuids = output.pluck("id")
215217

216218
# Batch delete objects
217219
client.objects.batch_delete(
218220
class_name: "Question",
219221
where: {
220-
valueString: "uuid",
221-
operator: "Equal",
222+
valueStringArray: uuids,
223+
operator: "ContainsAny",
222224
path: ["id"]
223225
}
224226
)

weaviate.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
3636
# guide at: https://bundler.io/guides/creating_gem.html
3737

3838
spec.add_dependency "faraday", ">= 2.0.1", "< 3.0"
39-
spec.add_dependency "graphlient", "~> 0.7.0"
39+
spec.add_dependency "graphlient", ">= 0.7.0", "< 0.9.0"
4040
spec.add_development_dependency "pry-byebug", "~> 3.9"
4141
spec.add_development_dependency "yard"
4242
spec.add_development_dependency "rdiscount" # for github-flavored markdown in yard

0 commit comments

Comments
 (0)