esse-rspec 0.0.2 → 0.0.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/lib/esse/rspec/class_methods.rb +10 -2
- data/lib/esse/rspec/version.rb +1 -1
- data/lib/esse/rspec.rb +4 -2
- data/lib/esse-rspec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edf7cd6ae62013f70d49d21f5e633f90b07cb4331b7f3573d1614d0e74e26ec2
|
4
|
+
data.tar.gz: df206c8c7f5c749dfda9ed95bf8b04ee7fdf04d215a356760a936a0069be3660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 320944994296eca28470899960df56a72aefea1ef1137e46ce8de30a519eeb505dc531103fdea416b8c67badb9a6843d12240a6dc337a1132797f33a075e356c
|
7
|
+
data.tar.gz: 2ab0182c6862f3e7745fadaf136be9f397dc2bda626c29fbff879830585d1e545dd28df4fd7be93eebdec23e934a216198ab36b988c610807ea77d2fedfdf8b0
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 0.0.4 - 2023-11-15
|
8
|
+
* The `cluster_id` argument of `stub_esse_search` is useless when the given index is a Esse::Index. Cluster id is now optional.
|
9
|
+
|
10
|
+
|
11
|
+
## 0.0.3 - 2023-11-15
|
12
|
+
It should not automatically require `esse/rspec` anymore. You should require it manually in your `spec_helper.rb` file.
|
13
|
+
|
7
14
|
## 0.0.2 - 2023-11-15
|
8
15
|
* Whitelist rspec >= 3.0.0
|
9
16
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -17,8 +17,16 @@ module Esse
|
|
17
17
|
stub_const(Esse::Hstring.new(name).camelize.to_s, klass)
|
18
18
|
end
|
19
19
|
|
20
|
-
def stub_esse_search(
|
21
|
-
cluster = Esse.
|
20
|
+
def stub_esse_search(*cluster_and_indexes, **definition)
|
21
|
+
cluster = if Esse.config.cluster_ids.include?(cluster_and_indexes.first)
|
22
|
+
Esse.cluster(cluster_and_indexes.shift)
|
23
|
+
elsif cluster_and_indexes.first.is_a?(Esse::Index)
|
24
|
+
cluster_and_indexes.first.cluster
|
25
|
+
else
|
26
|
+
Esse.cluster
|
27
|
+
end
|
28
|
+
|
29
|
+
indexes = cluster_and_indexes
|
22
30
|
transport = cluster.api
|
23
31
|
definition[:index] ||= Esse::Search::Query.normalize_indices(*indexes)
|
24
32
|
response = yield
|
data/lib/esse/rspec/version.rb
CHANGED
data/lib/esse/rspec.rb
CHANGED
data/lib/esse-rspec.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
2
|
+
#
|
3
|
+
# does nothing, user should require `esse/rspec` manually instead
|