algoliasearch-rails 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.MD +4 -0
- data/README.md +10 -33
- data/lib/algoliasearch/configuration.rb +2 -1
- data/lib/algoliasearch/version.rb +1 -1
- data/spec/utilities_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e330655018646114452e35b60f4abfa3b254655b88b3028e4c5157f029be2ca
|
4
|
+
data.tar.gz: 94889786577b906e218d3c8b253b521201d3ca64da20b9c510a81fc30a01c01a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4affa94cd09f68fa4524c7e1199d68af6ca84aeea272f2f6e05bb3abd1a0c644f84e6f4c35be35cb621a7c30fd7cea669f09f4e8725459ce21195f1801fe406c
|
7
|
+
data.tar.gz: 8b690f23e9fce5b8f0f82b0793947d8a9569dbf7ed3dad2f91c3febe2244341aa6a5756726c4166bd73441e1af67f0c0ec3a6237d9e6ed70b4486b367635094c
|
data/CHANGELOG.MD
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.1.1...master)
|
4
4
|
|
5
|
+
## [2.1.2](https://github.com/algolia/algoliasearch-rails/compare/2.1.2...2.1.1)
|
6
|
+
### Fixed
|
7
|
+
- Error with keys that got symbolized by default [`#403`](https://github.com/algolia/algoliasearch-rails/pull/403)
|
8
|
+
|
5
9
|
## [2.1.1](https://github.com/algolia/algoliasearch-rails/compare/2.1.1...2.1.0)
|
6
10
|
### Fixed
|
7
11
|
- Error with Ruby 3 in regards to default splat behavior [`#400`](https://github.com/algolia/algoliasearch-rails/pull/400)
|
data/README.md
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
<p align="center">
|
2
2
|
<a href="https://www.algolia.com">
|
3
|
-
<img alt="Algolia for Rails" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/rails.png"
|
3
|
+
<img alt="Algolia for Rails" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/rails.png"/>
|
4
4
|
</a>
|
5
|
+
</p>
|
5
6
|
|
6
|
-
|
7
|
+
<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your Rails project</h4>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</p>
|
9
|
+
<p align="center">
|
10
|
+
<a href="https://circleci.com/gh/algolia/algoliasearch-rails"><img src="https://circleci.com/gh/algolia/algoliasearch-rails.svg?style=shield" alt="CircleCI" /></a>
|
11
|
+
<a href="http://badge.fury.io/rb/algoliasearch-rails"><img src="https://badge.fury.io/rb/algoliasearch-rails.svg" alt="Gem Version"/></a>
|
12
|
+
<a href="https://codeclimate.com/github/algolia/algoliasearch-rails"><img src="https://codeclimate.com/github/algolia/algoliasearch-rails.svg" alt="Code Climate"/></a>
|
13
|
+
<img src="https://img.shields.io/badge/ActiveRecord-yes-blue.svg?style=flat-square" alt="ActiveRecord"/>
|
14
|
+
<img src="https://img.shields.io/badge/Mongoid-yes-blue.svg?style=flat-square" alt="Mongoid"/>
|
15
|
+
<img src="https://img.shields.io/badge/Sequel-yes-blue.svg?style=flat-square" alt="Sequel"/>
|
16
16
|
</p>
|
17
17
|
|
18
18
|
<p align="center">
|
@@ -1160,29 +1160,6 @@ class User < ActiveRecord::Base
|
|
1160
1160
|
end
|
1161
1161
|
```
|
1162
1162
|
|
1163
|
-
Or you may want to mock Algolia's API calls. We provide a [WebMock](https://github.com/bblimke/webmock) sample configuration that you can use including `algolia/webmock`:
|
1164
|
-
|
1165
|
-
```ruby
|
1166
|
-
require 'algolia/webmock'
|
1167
|
-
|
1168
|
-
describe 'With a mocked client' do
|
1169
|
-
|
1170
|
-
before(:each) do
|
1171
|
-
WebMock.enable!
|
1172
|
-
end
|
1173
|
-
|
1174
|
-
it "shouldn't perform any API calls here" do
|
1175
|
-
User.create(name: 'My Indexed User') # mocked, no API call performed
|
1176
|
-
User.search('').should == {} # mocked, no API call performed
|
1177
|
-
end
|
1178
|
-
|
1179
|
-
after(:each) do
|
1180
|
-
WebMock.disable!
|
1181
|
-
end
|
1182
|
-
|
1183
|
-
end
|
1184
|
-
```
|
1185
|
-
|
1186
1163
|
|
1187
1164
|
## ❓ Troubleshooting
|
1188
1165
|
|
@@ -10,7 +10,8 @@ module AlgoliaSearch
|
|
10
10
|
|
11
11
|
def configuration=(configuration)
|
12
12
|
@@configuration = configuration.merge(
|
13
|
-
:user_agent => "Algolia for Rails (#{AlgoliaSearch::VERSION}); Rails (#{Rails::VERSION::STRING})"
|
13
|
+
:user_agent => "Algolia for Rails (#{AlgoliaSearch::VERSION}); Rails (#{Rails::VERSION::STRING})",
|
14
|
+
:symbolize_keys => false
|
14
15
|
)
|
15
16
|
end
|
16
17
|
|
data/spec/utilities_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
2
2
|
|
3
|
-
AlgoliaSearch.configuration = { :application_id => ENV['ALGOLIA_APPLICATION_ID'], :api_key => ENV['ALGOLIA_API_KEY']
|
3
|
+
AlgoliaSearch.configuration = { :application_id => ENV['ALGOLIA_APPLICATION_ID'], :api_key => ENV['ALGOLIA_API_KEY'] }
|
4
4
|
|
5
5
|
describe AlgoliaSearch::Utilities do
|
6
6
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|