Repository navigation
feat: Ruby SDK update for version 29.0.0 - #79
ChiragAgg5k wants to merge 4 commits into
Conversation
🔵 Tier A · Mergeable after minor fixes
Updates the Ruby SDK to version 29.0.0 for Appwrite 2.5, refreshing generated models and services and revising examples and package documentation for the updated API. It also adds a fluent MQTT topic builder with single- and multi-level wildcard support. Latest changes: The newest commits add the
Note Not approving while a bug finding is open: Reject NUL bytes in topic levels
Fix with agent prompt### Issue 1
lib/appwrite/topic.rb:57-62
**Reject NUL bytes in topic levels**
MQTT topic filters cannot contain U+0000, but this check accepts it, so `Topic.path(["foo\0bar"])` produces a filter that an MQTT client will reject. Please reject NUL bytes along with the other invalid level characters.
### Issue 2
docs/examples/domains/get-price.md:16
**Use Ruby's nil literal in this example**
`null` is not a Ruby literal, so running this example raises `NameError` instead of making the request. The same replacement appears in the changed `domains/list-prices.md`, `mongo/update.md`, `mysql/update.md`, and `postgresql/update.md` examples; use `nil` in each.
```suggestion
period_years: nil, # optional
```
### Issue 3
docs/examples/graphql/mutation.md:15
**Escape the quotes in the GraphQL example string**
The inner double quotes around `Walter` terminate the Ruby string, making this example fail to parse. Using a single-quoted Ruby string for the GraphQL document keeps its argument quotes intact.
```suggestion
"query" => 'mutation { accountUpdateName(name: "Walter") { name } }'
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 7
⏳ Still open from earlier reviews · 2
Reviewed the commits since |
| result = domains.get_price( | ||
| domain: 'example.com', | ||
| period_years: nil, # optional | ||
| period_years: null, # optional |
There was a problem hiding this comment.
Use Ruby's nil literal in this example
null is not a Ruby literal, so running this example raises NameError instead of making the request. The same replacement appears in the changed domains/list-prices.md, mongo/update.md, mysql/update.md, and postgresql/update.md examples; use nil in each.
| period_years: null, # optional | |
| period_years: nil, # optional |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/examples/domains/get-price.md
Line: 16
Comment:
**Use Ruby's nil literal in this example**
`null` is not a Ruby literal, so running this example raises `NameError` instead of making the request. The same replacement appears in the changed `domains/list-prices.md`, `mongo/update.md`, `mysql/update.md`, and `postgresql/update.md` examples; use `nil` in each.
```suggestion
period_years: nil, # optional
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · documentation · Reply if this doesn't apply.
| result = graphql.mutation( | ||
| query: {} | ||
| query: { | ||
| "query" => "mutation { accountUpdateName(name: "Walter") { name } }" |
There was a problem hiding this comment.
Escape the quotes in the GraphQL example string
The inner double quotes around Walter terminate the Ruby string, making this example fail to parse. Using a single-quoted Ruby string for the GraphQL document keeps its argument quotes intact.
| "query" => "mutation { accountUpdateName(name: "Walter") { name } }" | |
| "query" => 'mutation { accountUpdateName(name: "Walter") { name } }' |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/examples/graphql/mutation.md
Line: 15
Comment:
**Escape the quotes in the GraphQL example string**
The inner double quotes around `Walter` terminate the Ruby string, making this example fail to parse. Using a single-quoted Ruby string for the GraphQL document keeps its argument quotes intact.
```suggestion
"query" => 'mutation { accountUpdateName(name: "Walter") { name } }'
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · documentation · Reply if this doesn't apply.
| levels.each_with_index do |level, index| | ||
| unless level.is_a?(String) | ||
| type = level.nil? ? 'null' : level.class.name | ||
| raise ArgumentError, "level at index #{index} must be a string, got #{type}" | ||
| end | ||
| raise ArgumentError, "empty level at index #{index}" if level.empty? |
There was a problem hiding this comment.
Reject NUL bytes in topic levels
MQTT topic filters cannot contain U+0000, but this check accepts it, so Topic.path(["foo\0bar"]) produces a filter that an MQTT client will reject. Please reject NUL bytes along with the other invalid level characters.
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/appwrite/topic.rb
Line: 57-62
Comment:
**Reject NUL bytes in topic levels**
MQTT topic filters cannot contain U+0000, but this check accepts it, so `Topic.path(["foo\0bar"])` produces a filter that an MQTT client will reject. Please reject NUL bytes along with the other invalid level characters.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · bug · Reply if this doesn't apply.
This PR contains updates to the SDK for version 29.0.0.
What's Changed
X-Appwrite-Response-Format: 2.5.0; responses follow the 2.5 shapesaccount.list_logs,users.list_logsand theLog/LogListmodelsorganization.create_key,list_keys,update_keyandOrganizationKeyScopes; use project keysClient#set_dev_key, theDevKeymodel andProject#dev_keysBillingPlanGroup::STARTERDedicatedDatabaseSpecificationPricingandDedicatedDatabaseSpecificationList#pricingBlockfieldsreason,project_name,region,organization_name,organization_idandbilling_planresource:params now take an arrayBackupRestoration#optionsis now a hashBillingPlan#usageandDedicatedDatabase#engineTopichelper to build MQTT topics for push messages