-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/spec-highlight-result
- Loading branch information
Showing
40 changed files
with
2,551 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by: https://openapi-generator.tech | ||
# | ||
|
||
*.gem | ||
*.rbc | ||
/.config | ||
/coverage/ | ||
/InstalledFiles | ||
/pkg/ | ||
/spec/reports/ | ||
/spec/examples.txt | ||
/test/tmp/ | ||
/test/version_tmp/ | ||
/tmp/ | ||
|
||
## Specific to RubyMotion: | ||
.dat* | ||
.repl_history | ||
build/ | ||
|
||
## Documentation cache and generated files: | ||
/.yardoc/ | ||
/_yardoc/ | ||
/doc/ | ||
/rdoc/ | ||
|
||
## Environment normalization: | ||
/.bundle/ | ||
/vendor/bundle | ||
/lib/bundler/man/ | ||
|
||
# for a library or gem, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# Gemfile.lock | ||
# .ruby-version | ||
# .ruby-gemset | ||
|
||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | ||
.rvmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) | ||
AllCops: | ||
TargetRubyVersion: 2.4 | ||
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop | ||
# to ignore them, so only the ones explicitly set in this file are enabled. | ||
DisabledByDefault: true | ||
Exclude: | ||
- '**/templates/**/*' | ||
- '**/vendor/**/*' | ||
- 'actionpack/lib/action_dispatch/journey/parser.rb' | ||
|
||
# Prefer &&/|| over and/or. | ||
Style/AndOr: | ||
Enabled: true | ||
|
||
# Align `when` with `case`. | ||
Layout/CaseIndentation: | ||
Enabled: true | ||
|
||
# Align comments with method definitions. | ||
Layout/CommentIndentation: | ||
Enabled: true | ||
|
||
Layout/ElseAlignment: | ||
Enabled: true | ||
|
||
Layout/EmptyLineAfterMagicComment: | ||
Enabled: true | ||
|
||
# In a regular class definition, no empty lines around the body. | ||
Layout/EmptyLinesAroundClassBody: | ||
Enabled: true | ||
|
||
# In a regular method definition, no empty lines around the body. | ||
Layout/EmptyLinesAroundMethodBody: | ||
Enabled: true | ||
|
||
# In a regular module definition, no empty lines around the body. | ||
Layout/EmptyLinesAroundModuleBody: | ||
Enabled: true | ||
|
||
Layout/FirstArgumentIndentation: | ||
Enabled: true | ||
|
||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. | ||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
# Method definitions after `private` or `protected` isolated calls need one | ||
# extra level of indentation. | ||
Layout/IndentationConsistency: | ||
Enabled: true | ||
EnforcedStyle: indented_internal_methods | ||
|
||
# Two spaces, no tabs (for indentation). | ||
Layout/IndentationWidth: | ||
Enabled: true | ||
|
||
Layout/LeadingCommentSpace: | ||
Enabled: true | ||
|
||
Layout/SpaceAfterColon: | ||
Enabled: true | ||
|
||
Layout/SpaceAfterComma: | ||
Enabled: true | ||
|
||
Layout/SpaceAroundEqualsInParameterDefault: | ||
Enabled: true | ||
|
||
Layout/SpaceAroundKeyword: | ||
Enabled: true | ||
|
||
Layout/SpaceAroundOperators: | ||
Enabled: true | ||
|
||
Layout/SpaceBeforeComma: | ||
Enabled: true | ||
|
||
Layout/SpaceBeforeFirstArg: | ||
Enabled: true | ||
|
||
Style/DefWithParentheses: | ||
Enabled: true | ||
|
||
# Defining a method with parameters needs parentheses. | ||
Style/MethodDefParentheses: | ||
Enabled: true | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
EnforcedStyle: always | ||
|
||
# Use `foo {}` not `foo{}`. | ||
Layout/SpaceBeforeBlockBraces: | ||
Enabled: true | ||
|
||
# Use `foo { bar }` not `foo {bar}`. | ||
Layout/SpaceInsideBlockBraces: | ||
Enabled: true | ||
|
||
# Use `{ a: 1 }` not `{a:1}`. | ||
Layout/SpaceInsideHashLiteralBraces: | ||
Enabled: true | ||
|
||
Layout/SpaceInsideParens: | ||
Enabled: true | ||
|
||
# Check quotes usage according to lint rule below. | ||
#Style/StringLiterals: | ||
# Enabled: true | ||
# EnforcedStyle: single_quotes | ||
|
||
# Detect hard tabs, no hard tabs. | ||
Layout/IndentationStyle: | ||
Enabled: true | ||
|
||
# Blank lines should not have any spaces. | ||
Layout/TrailingEmptyLines: | ||
Enabled: true | ||
|
||
# No trailing whitespace. | ||
Layout/TrailingWhitespace: | ||
Enabled: false | ||
|
||
# Use quotes for string literals when they are enough. | ||
Style/RedundantPercentQ: | ||
Enabled: true | ||
|
||
# Align `end` with the matching keyword or starting expression except for | ||
# assignments, where it should be aligned with the LHS. | ||
Layout/EndAlignment: | ||
Enabled: true | ||
EnforcedStyleAlignWith: variable | ||
AutoCorrect: true | ||
|
||
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. | ||
Lint/RequireParentheses: | ||
Enabled: true | ||
|
||
Style/RedundantReturn: | ||
Enabled: true | ||
AllowMultipleReturnValues: true | ||
|
||
Style/Semicolon: | ||
Enabled: true | ||
AllowAsExpressionSeparator: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
group :development, :test do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<p align="center"> | ||
<a href="https://www.algolia.com"> | ||
<img alt="Algolia for Ruby" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/ruby.png" > | ||
</a> | ||
|
||
<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your Ruby project</h4> | ||
|
||
<p align="center"> | ||
<a href="https://circleci.com/gh/algolia/algoliasearch-client-ruby"><img src="https://circleci.com/gh/algolia/algoliasearch-client-ruby.svg?style=shield" alt="CircleCI" /></a> | ||
<a href="https://rubygems.org/gems/algolia"><img src="https://badge.fury.io/rb/algolia.svg" alt="Gem Version"></a> | ||
<a href="https://rubygems.org/gems/algolia"><img src="https://img.shields.io/badge/licence-MIT-blue.svg" alt="License"></a> | ||
</p> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://www.algolia.com/doc/api-client/getting-started/install/ruby/" target="_blank">Documentation</a> • | ||
<a href="https://github.com/algolia/algoliasearch-rails" target="_blank">Rails</a> • | ||
<a href="https://discourse.algolia.com" target="_blank">Community Forum</a> • | ||
<a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> • | ||
<a href="https://github.com/algolia/algoliasearch-client-ruby/issues" target="_blank">Report a bug</a> • | ||
<a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/ruby/" target="_blank">FAQ</a> • | ||
<a href="https://www.algolia.com/support" target="_blank">Support</a> | ||
</p> | ||
|
||
## ✨ Features | ||
|
||
Thin & minimal low-level HTTP client to interact with Algolia's API | ||
|
||
## 💡 Getting Started | ||
|
||
First, install Algolia Ruby API Client via the [RubyGems](https://rubygems.org/) package manager: | ||
```bash | ||
gem install algolia | ||
``` | ||
|
||
Then, create objects on your index: | ||
|
||
|
||
```ruby | ||
client = Algolia::SearchClient.create('YourApplicationID', 'YourAPIKey') | ||
|
||
client.save_object('your_index_name', {objectID: 1, name: 'Foo'}) | ||
``` | ||
|
||
Finally, you may begin searching a object using the `search` method: | ||
```ruby | ||
objects = client.search_single_index('your_index_name', 'Foo') | ||
``` | ||
|
||
For full documentation, visit the **[Algolia Ruby API Client](https://www.algolia.com/doc/api-client/getting-started/install/ruby/)**. | ||
|
||
## ❓ Troubleshooting | ||
|
||
Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/ruby/) where you will find answers for the most common issues and gotchas with the client. | ||
|
||
## Upgrade from V1 to V2 | ||
|
||
If you were using the v1 and wish to update to v2, please follow our [Upgrade Guide](upgrade_guide.md) | ||
|
||
## 📄 License | ||
|
||
Algolia Ruby API Client is an open-sourced software licensed under the [MIT license](LICENSE.md). |
Oops, something went wrong.