Skip to content

Commit dd56d3d

Browse files
authored
Merge pull request #18 from appwrite/dev
Fix between query output
2 parents d15edcf + 05167f0 commit dd56d3d

18 files changed

+345
-80
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Ruby SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

appwrite.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |spec|
22

33
spec.name = 'appwrite'
4-
spec.version = '10.0.0'
4+
spec.version = '10.1.0'
55
spec.license = 'BSD-3-Clause'
66
spec.summary = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API'
77
spec.author = 'Appwrite Team'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_builds()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_databases()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_deletes()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_mails()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_messaging()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
9+
10+
health = Health.new(client)
11+
12+
response = health.get_queue_migrations()
13+
14+
puts response.inspect

lib/appwrite/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def initialize
1515
'x-sdk-name'=> 'Ruby',
1616
'x-sdk-platform'=> 'server',
1717
'x-sdk-language'=> 'ruby',
18-
'x-sdk-version'=> '10.0.0',
18+
'x-sdk-version'=> '10.1.0',
1919
'X-Appwrite-Response-Format' => '1.4.0'
2020
}
2121
@endpoint = 'https://HOSTNAME/v1'

lib/appwrite/query.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def is_not_null(attribute)
3434
end
3535

3636
def between(attribute, start, ending)
37-
return add_query(attribute, "between", [start, ending])
37+
return "between(\"#{attribute}\", #{parse_values(start)}, #{parse_values(ending)})"
3838
end
3939

4040
def starts_with(attribute, value)
@@ -81,13 +81,13 @@ def offset(offset)
8181

8282
def add_query(attribute, method, value)
8383
if value.is_a?(Array)
84-
"#{method}(\"#{attribute}\", [#{value.map {|item| parseValues(item)}.join(',')}])"
84+
"#{method}(\"#{attribute}\", [#{value.map {|item| parse_values(item)}.join(',')}])"
8585
else
86-
return "#{method}(\"#{attribute}\", [#{parseValues(value)}])"
86+
return "#{method}(\"#{attribute}\", [#{parse_values(value)}])"
8787
end
8888
end
8989

90-
def parseValues(value)
90+
def parse_values(value)
9191
return value.is_a?(String) ? "\"#{value}\"" : value
9292
end
9393
end

0 commit comments

Comments
 (0)