Skip to content

Add Ruby 3.3 to CI #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2"]
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]

steps:
- uses: actions/checkout@master
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
ruby-version: 3.3
bundler: default
bundler-cache: true
- name: Build docs
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
weaviate-ruby (0.9.0)
faraday (>= 2.0.1, < 3.0)
graphlient (~> 0.7.0)
graphlient (>= 0.7.0, < 0.9.0)

GEM
remote: https://rubygems.org/
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,34 +144,35 @@ client.schema.create(
### Using the Objects endpoint
```ruby
# Create a new data object.
client.objects.create(
output = client.objects.create(
class_name: 'Question',
properties: {
answer: '42',
question: 'What is the meaning of life?',
category: 'philosophy'
}
)
uuid = output["id"]

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

# Get a single data object.
client.objects.get(
class_name: "Question",
id: "uuid"
id: uuid
)

# Check if a data object exists.
client.objects.exists?(
class_name: "Question",
id: "uuid"
id: uuid
)

# Perform a partial update on an object based on its uuid.
client.objects.update(
class_name: "Question",
id: "uuid",
id: uuid,
properties: {
category: "simple-math"
}
Expand All @@ -180,7 +181,7 @@ client.objects.update(
# Replace an object based on its uuid.
client.objects.replace(
class_name: "Question",
id: "uuid",
id: uuid,
properties: {
question: "What does 6 times 7 equal to?",
category: "math",
Expand All @@ -191,34 +192,35 @@ client.objects.replace(
# Delete a single data object from Weaviate.
client.objects.delete(
class_name: "Question",
id: "uuid"
id: uuid
)

# Batch create objects
client.objects.batch_create(objects: [
output = client.objects.batch_create(objects: [
{
class: "Question",
properties: {
answer: "42",
question: "What is the meaning of life?",
category: "philosophy"
answer: "42",
question: "What is the meaning of life?",
category: "philosophy"
}
}, {
class: "Question",
properties: {
answer: "42",
question: "What does 6 times 7 equal to?",
category: "math"
answer: "42",
question: "What does 6 times 7 equal to?",
category: "math"
}
}
])
uuids = output.pluck("id")

# Batch delete objects
client.objects.batch_delete(
class_name: "Question",
where: {
valueString: "uuid",
operator: "Equal",
valueStringArray: uuids,
operator: "ContainsAny",
path: ["id"]
}
)
Expand Down
2 changes: 1 addition & 1 deletion weaviate.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
# guide at: https://bundler.io/guides/creating_gem.html

spec.add_dependency "faraday", ">= 2.0.1", "< 3.0"
spec.add_dependency "graphlient", "~> 0.7.0"
spec.add_dependency "graphlient", ">= 0.7.0", "< 0.9.0"
spec.add_development_dependency "pry-byebug", "~> 3.9"
spec.add_development_dependency "yard"
spec.add_development_dependency "rdiscount" # for github-flavored markdown in yard
Expand Down