reindexer 0.0.1 → 0.0.2

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +37 -38
  4. data/lib/reindexer/version.rb +1 -1
  5. metadata +8 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1356871b0a5fd7b52535aeccfd3e89321f52258f35bd2af5095364e5cfb0033
4
- data.tar.gz: bff0c1f6e1aa496457f92a882990c976969bbb6eba507f1c8d1ef3bc622e5976
3
+ metadata.gz: 9590f91459e2b8bba145cf6221d6bf079b4d74208ef55e78c58cfadbb36027e7
4
+ data.tar.gz: 534a6a414cd6e6d094fd1e048578af9316a0fb0992c1086cebfbdd25adcbeb4d
5
5
  SHA512:
6
- metadata.gz: 8b7787b34cc55fdee044122bddaabeaa6a381ccffda43e02f97e638b1d3b78f37721a9c408ba1c170575452f7fae586890326586f58cb915726c1dde5d4f6205
7
- data.tar.gz: 5b90659aa0e305003f7697d70cf5ac6f7faf7752695d9580fe0fc0549e0cef17d66d51ba6679a925aaf3915b856eae8bdd02b7f109b5dfe81aa52843b110bdb6
6
+ metadata.gz: a2a5099af92b7341f900d010b11d43cf1993fd5d13e56775cffebf006a0b7ef30c52bac55b3db4db6e75a343e37b30b6cffa7dce08c94c2df3588a9d81376a2f
7
+ data.tar.gz: 2c2cd8351d533528b3a9914acf84d40b236d47a735c45b4749836a48665a60a3c944bccd42156a7340e1862096f1b0e35b1ba883f9bc3dbcdc5bc886bbff0111
data/CHANGELOG.md CHANGED
@@ -5,4 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+ ### Changed
9
+ - Updates of README.md and gemspec
10
+
11
+ ## [0.0.2] - 2021-06-01
12
+ ### Changed
13
+ - Get rid of useless dependency
14
+
15
+ ## [0.0.1] - 2021-05-02
8
16
  ### Added
17
+ - Wrap provided arguments with the gRPC message objects
18
+ - Building and testing gem via GitHub Actions
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  [![Gem](https://img.shields.io/gem/v/reindexer.svg)](https://rubygems.org/gems/reindexer/)
2
2
  ![Reindexer](https://github.com/numbata/reindexer-ruby/actions/workflows/main.yml/badge.svg)
3
3
 
4
- # Reindexer
4
+ # Reindexer Ruby
5
5
 
6
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/reindexer`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+ gRPC client for work with [reindexer](https://github.com/Restream/reindexer). It is still in alpha state and there are a lot of works to do. So using in a prod environment is not recomended.
7
+
8
+ The gem also wraps the arguments of gRPC requests into the gRPC messages. So you should not care about the toons of nested initializations. Just give a common hash and the gem will do all the work.
7
9
 
8
10
  ## Installation
9
11
 
@@ -15,51 +17,48 @@ gem 'reindexer'
15
17
 
16
18
  And then execute:
17
19
 
18
- $ bundle
20
+ ```bash
21
+ bundle
22
+ ```
19
23
 
20
24
  Or install it yourself as:
21
25
 
22
- $ gem install reindexer
26
+ ```bash
27
+ gem install reindexer
28
+ ```
23
29
 
24
30
  ## Usage
25
31
 
26
- client = ReindexerGrpc::Client.new('grpc://reindexer:16534')
27
-
28
- client.create_database(db_name: 'test_db')
29
- client.open_namespace(db_name: 'test_db', storage_options: {ns_name: 'items'})
30
- client.add_index(db_name: 'test_db', ns_name: 'items', definition: {
31
- name: 'id',
32
- json_paths: ['id'],
33
- index_type: 'hash',
34
- field_type: 'int',
35
- options: {
36
- is_pk: true,
37
- is_array: false,
38
- is_dense: false,
39
- is_sparse: false,
40
- collate_mode: 'CollateUTF8Mode',
41
- sort_order_labled: '',
42
- config: ''
43
- },
44
- expire_after: nil
45
- })
46
-
47
- client.modify_item([
48
- {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 1, name: 'Name')},
49
- {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 2, name: 'BestName')}
50
- ])
51
- stream = client.select_sql(db_name: 'test_db', sql: 'SELECT * FROM items', output_flags: {with_rank: true})
52
-
53
-
54
- ## Development
55
-
56
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
57
-
58
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+ ```ruby
33
+ client = ReindexerGrpc::Client.new('grpc://reindexer:16534')
34
+ client.create_database(db_name: 'test_db')
35
+ client.open_namespace(db_name: 'test_db', storage_options: {ns_name: 'items'})
36
+ client.add_index(db_name: 'test_db', ns_name: 'items', definition: {
37
+ name: 'id',
38
+ json_paths: ['id'],
39
+ index_type: 'hash',
40
+ field_type: 'int',
41
+ options: {
42
+ is_pk: true,
43
+ is_array: false,
44
+ is_dense: false,
45
+ is_sparse: false,
46
+ collate_mode: 'CollateUTF8Mode',
47
+ sort_order_labled: '',
48
+ config: ''
49
+ },
50
+ expire_after: nil
51
+ })
52
+ client.modify_item([
53
+ {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 1, name: 'Name')},
54
+ {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 2, name: 'BestName')}
55
+ ])
56
+ stream = client.select_sql(db_name: 'test_db', sql: 'SELECT * FROM items', output_flags: {with_rank: true})
57
+ ```
59
58
 
60
59
  ## Contributing
61
60
 
62
- Bug reports and pull requests are welcome on GitHub at https://github.com/numbata/reindexer-ruby.
61
+ If you have any questions about Reindexer, please use [main page](https://github.com/Restream/reindexer) of Reindexer. Feel free to report issues and contribute about Reindexer Ruby at https://github.com/numbata/reindexer-ruby.
63
62
 
64
63
  ## License
65
64
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reindexer
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reindexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Subbota
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2021-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: multi_json
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.15'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.15'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: google-protobuf
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +136,7 @@ dependencies:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
138
  version: '2.2'
153
- description: A client that allows to interact with the Reindexer document-oriented
139
+ description: A gRPC-client that allows to interact with the Reindexer document-oriented
154
140
  database
155
141
  email:
156
142
  - subbota@gmail.com
@@ -176,7 +162,7 @@ metadata:
176
162
  bug_tracker_uri: https://github.com/numbata/reindexer-ruby/issues
177
163
  changelog_uri: https://github.com/numbata/reindexer-ruby/blob/master/CHANGELOG.md
178
164
  source_code_uri: https://github.com/numbata/reindexer-ruby
179
- post_install_message:
165
+ post_install_message:
180
166
  rdoc_options: []
181
167
  require_paths:
182
168
  - lib
@@ -191,8 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
177
  - !ruby/object:Gem::Version
192
178
  version: '0'
193
179
  requirements: []
194
- rubygems_version: 3.1.4
195
- signing_key:
180
+ rubygems_version: 3.2.16
181
+ signing_key:
196
182
  specification_version: 4
197
- summary: Reindexer GRPC-client
183
+ summary: Reindexer gRPC-client
198
184
  test_files: []