algolia 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/CONTRIBUTING.MD +184 -0
- data/README.md +0 -4
- data/lib/algolia/search_client.rb +1 -1
- data/lib/algolia/version.rb +1 -1
- data/test/algolia/integration/search_client_test.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2ba367e6308158bc455c60a0d0a5c16fbb1ed4565aaa3a6b8d4cca3e16f0c0d
|
4
|
+
data.tar.gz: af53995633ba454c929265d5d81d311c67a99fcdd76e8eeec51f98aa8e89f778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 896b3821ad99f02449f652090c6b4249a932d454bd03e58879c2fad030d6179480b208c36bd07003dd3c58f96cd7630e28aa1afa026cc83f907a3bcf015f2f02
|
7
|
+
data.tar.gz: bdc286d0c8df062b33fc6d25fd6d3d4348dc82cce74703d26a12d8374a91c5e378e3d7f03ff2d617a76beab88828a8004d3457997394df2a9832277ca308f411
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
-
## [Unreleased](https://github.com/algolia/algoliasearch-client-ruby/compare/2.0.
|
3
|
+
## [Unreleased](https://github.com/algolia/algoliasearch-client-ruby/compare/2.0.4...master)
|
4
|
+
|
5
|
+
## [2.0.4](https://github.com/algolia/algoliasearch-client-ruby/compare/2.0.3...2.0.4) (2021-01-05)
|
6
|
+
|
7
|
+
### Fix
|
8
|
+
- `app_api_key`: send opts with waitable method
|
4
9
|
|
5
10
|
## [2.0.3](https://github.com/algolia/algoliasearch-client-ruby/compare/2.0.2...2.0.3) (2020-11-24)
|
6
11
|
|
data/CONTRIBUTING.MD
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<a href="https://www.algolia.com">
|
3
|
+
<img alt="Algolia for Ruby" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/ruby.png" >
|
4
|
+
</a>
|
5
|
+
</p>
|
6
|
+
|
7
|
+
Hello and welcome to the contributing guide for algolia gem. Thanks for considering participating in our project 🙇
|
8
|
+
|
9
|
+
If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [community forum](https://discourse.algolia.com/) or to [open an issue](https://github.com/algolia/algoliasearch-client-ruby/issues).
|
10
|
+
|
11
|
+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN TocDown TO UPDATE -->
|
12
|
+
<!-- TocDown Begin -->
|
13
|
+
* [Reporting an issue](#reporting-an-issue)
|
14
|
+
* [The code contribution process](#the-code-contribution-process)
|
15
|
+
* [Commit conventions](#commit-conventions)
|
16
|
+
* [Branch organization](#branch-organization)
|
17
|
+
* [Requirements](#requirements)
|
18
|
+
* [Code structure](#code-structure)
|
19
|
+
* [The source algolia folder](#the-source-algolia-folder)
|
20
|
+
* [Tests](#tests)
|
21
|
+
* [Linting](#linting)
|
22
|
+
<!-- TocDown End -->
|
23
|
+
|
24
|
+
## Reporting an issue
|
25
|
+
|
26
|
+
Opening an issue is very effective way to contribute because other users might also be impacted. We'll make sure to fix it quickly if it's technically feasible and doesn't have important side effects for other users.
|
27
|
+
|
28
|
+
Before reporting an issue, first check that there is not an already open issue for the same topic using the [issues page](https://github.com/algolia/algoliasearch-client-ruby/issues). Don't hesitate to thumb up an issue that corresponds to the problem you have.
|
29
|
+
|
30
|
+
It would be very helpful if you're able to add a test case that reproduces the issue. This could help us solve the issue faster.
|
31
|
+
|
32
|
+
## The code contribution process
|
33
|
+
|
34
|
+
The algolia gem is developed in Ruby ≥ 2.2.
|
35
|
+
|
36
|
+
For any code contribution, you need to:
|
37
|
+
|
38
|
+
- Fork and clone the project
|
39
|
+
- Create a new branch for what you want to solve (fix/_issue-number_, feat/_name-of-the-feature_)
|
40
|
+
- Make your changes
|
41
|
+
- Open a pull request
|
42
|
+
|
43
|
+
Depending on what you're working on, you might consider different [base branches](#branch-organization).
|
44
|
+
|
45
|
+
Then:
|
46
|
+
|
47
|
+
- Peer review of the pull request (by at least one of the core contributors)
|
48
|
+
- Automatic checks ([tests](#tests), [commits](#commit-conventions), [linters](#linting))
|
49
|
+
- When everything is green, one of the core contributors will merge your contribution 🚀
|
50
|
+
|
51
|
+
## Commit conventions
|
52
|
+
|
53
|
+
This project follows the [conventional changelog](https://conventionalcommits.org/) approach. This means that all commit messages should be formatted using the following scheme:
|
54
|
+
|
55
|
+
```
|
56
|
+
type(scope): description
|
57
|
+
```
|
58
|
+
|
59
|
+
In most cases, we use the following types:
|
60
|
+
|
61
|
+
- `fix`: for any resolution of an issue (identified or not)
|
62
|
+
- `feat`: for any new feature
|
63
|
+
- `refactor`: for any code change that neither adds a feature nor fixes an issue
|
64
|
+
- `docs`: for any documentation change or addition
|
65
|
+
- `chore`: for anything that is not related to the library itself (doc, tooling)
|
66
|
+
|
67
|
+
Even though the scope is optional, we try to fill it in as it helps us better understand the impact of a change. We either use the name of the widget/connector/component impacted or we use impact topic (e.g. `docs`, `tooling`, `deps`, `ci`).
|
68
|
+
|
69
|
+
Finally, if your work is based on an issue on GitHub, please fill in the dedicated line in the PR template (read "[Closing issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords)").
|
70
|
+
|
71
|
+
Some examples of valid commit messages (used as first lines):
|
72
|
+
|
73
|
+
> - feat(account-client): add method XXX
|
74
|
+
> - chore(deps): update dependency XXX to v3.0.7
|
75
|
+
> - fix(search_user_ids): rename parameter clusterName
|
76
|
+
> - chore: reword contributions guides
|
77
|
+
|
78
|
+
## Branch organization
|
79
|
+
|
80
|
+
The project is based on the classic GitHub flow:
|
81
|
+
|
82
|
+
- `master` for the current version being worked on – Pull requests for bugs and feature related to the current major version should be created against this branch
|
83
|
+
- `vX` for each major version (`X` being a number) – Pull requests for critical bug fixes should be created against this branch
|
84
|
+
|
85
|
+
Most of the time, your pull requests should target the `master` branch.
|
86
|
+
|
87
|
+
_Note that no new features will be developed or backported for the `vX` branches._
|
88
|
+
|
89
|
+
## Requirements
|
90
|
+
|
91
|
+
To run this project, you will need:
|
92
|
+
|
93
|
+
- Ruby ≥ 2.2
|
94
|
+
- [Bundler](https://bundler.io/)
|
95
|
+
|
96
|
+
## Use the Dockerfile
|
97
|
+
|
98
|
+
If you want to contribute to this project without installing all its dependencies, you can use our Docker image.
|
99
|
+
Please check our [dedicated guide](DOCKER_README.MD) to learn more.
|
100
|
+
|
101
|
+
## Code structure
|
102
|
+
|
103
|
+
Here are the main files and folders of the project
|
104
|
+
|
105
|
+
```
|
106
|
+
▸ lib/algolia/ << standalone clients and helpers classes
|
107
|
+
▸ lib/test/ << gathers the unit and integration tests
|
108
|
+
.rubocop.yml << contains the rule used for the linter
|
109
|
+
algolia.gemspec << gemspec file
|
110
|
+
CHANGELOG.md << changelog file
|
111
|
+
CONTRIBUTING.md << this file
|
112
|
+
Gemfile << dependencies needed to run the project locally
|
113
|
+
Rakefile << defines the different tasks to lint/test the project
|
114
|
+
README.md << the introduction of the project
|
115
|
+
```
|
116
|
+
|
117
|
+
### The lib/algolia folder
|
118
|
+
|
119
|
+
```
|
120
|
+
▸ lib/algolia/
|
121
|
+
▸ config/ << the configurations associated with each clients
|
122
|
+
▸ enums/ << enumerables used accross the lib
|
123
|
+
▸ http/ << the http layer logic
|
124
|
+
▸ iterators/ << the iterators used for the browsing methods
|
125
|
+
▸ responses/ << the waitable responses
|
126
|
+
▸ transport/ << the transport layer logic
|
127
|
+
```
|
128
|
+
|
129
|
+
## Tests
|
130
|
+
|
131
|
+
Our unit and integration tests are written with [Minitest](https://github.com/seattlerb/minitest), in the `test` syntax.
|
132
|
+
|
133
|
+
To run all the tests at once:
|
134
|
+
|
135
|
+
```sh
|
136
|
+
bundle exec rake test:all
|
137
|
+
```
|
138
|
+
|
139
|
+
To run only the unit tests:
|
140
|
+
|
141
|
+
```sh
|
142
|
+
bundle exec rake test:unit
|
143
|
+
```
|
144
|
+
|
145
|
+
To run only the integration tests:
|
146
|
+
|
147
|
+
```sh
|
148
|
+
bundle exec rake test:integration
|
149
|
+
```
|
150
|
+
|
151
|
+
We ask that for each fix or feature submitted, you add at least one test demonstrating its behaviour. As you will need to use your own Algolia credentials to run them, we advise you to keep them short and use a small dataset, as well as using a mock requester anytime it's possible. If you encounter huge data overload because of testing, please reach out to [our support team](support@algolia.com).
|
152
|
+
|
153
|
+
## Linting
|
154
|
+
|
155
|
+
Linters help us maintain a consistent code base.
|
156
|
+
|
157
|
+
If your editor support them, then you will see the errors directly there. You can also run them using your command line:
|
158
|
+
|
159
|
+
```sh
|
160
|
+
rake rubocop
|
161
|
+
```
|
162
|
+
|
163
|
+
However, we recommend that you use in your workflow pre-commit hooks, to avoid submitting code that might not pass the linting task setup in the CI. To use them,
|
164
|
+
first download the gem `git-precommit`
|
165
|
+
|
166
|
+
```sh
|
167
|
+
gem install git-precommit
|
168
|
+
```
|
169
|
+
|
170
|
+
Then copy-paste the following content in a file called `pre-commit` in `.git/hooks/`
|
171
|
+
|
172
|
+
```sh
|
173
|
+
#!/usr/bin/env sh
|
174
|
+
|
175
|
+
function unstaged_changes {
|
176
|
+
! git diff --quiet
|
177
|
+
}
|
178
|
+
|
179
|
+
if unstaged_changes; then
|
180
|
+
git stash save --keep-index "Performing partial commit against `git rev-parse HEAD`"
|
181
|
+
fi
|
182
|
+
|
183
|
+
exec time bundle exec rake precommit
|
184
|
+
```
|
data/README.md
CHANGED
@@ -59,10 +59,6 @@ Encountering an issue? Before reaching out to support, we recommend heading to o
|
|
59
59
|
|
60
60
|
If you were using the v1 and wish to update to v2, please follow our [Upgrade Guide](upgrade_guide.md)
|
61
61
|
|
62
|
-
## Use the Dockerfile
|
63
|
-
|
64
|
-
If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our [dedicated guide](DOCKER_README.MD) to learn more.
|
65
|
-
|
66
62
|
## 📄 License
|
67
63
|
|
68
64
|
Algolia Ruby API Client is an open-sourced software licensed under the [MIT license](LICENSE.md).
|
data/lib/algolia/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algolia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -200,6 +200,7 @@ files:
|
|
200
200
|
- ".rubocop_todo.yml"
|
201
201
|
- CHANGELOG.md
|
202
202
|
- CODE_OF_CONDUCT.md
|
203
|
+
- CONTRIBUTING.MD
|
203
204
|
- DOCKER_README.MD
|
204
205
|
- Dockerfile
|
205
206
|
- Gemfile
|
@@ -303,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
304
|
- !ruby/object:Gem::Version
|
304
305
|
version: '0'
|
305
306
|
requirements: []
|
306
|
-
rubygems_version: 3.
|
307
|
+
rubygems_version: 3.1.4
|
307
308
|
signing_key:
|
308
309
|
specification_version: 4
|
309
310
|
summary: A simple Ruby client for the algolia.com REST API
|