rom-elasticsearch 0.2.0 → 0.2.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647ee55a0a3fab8ec9b20787922a1b94e4254ed54a9eacff365bfc9516662523
|
4
|
+
data.tar.gz: b522b81b7944c512495062ba3dd6243c7da932ca39b0efbec8935c6027df6fdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d717a78441c7777e2871fb177dcafdde2420ba039a358aaa9403d1aa0bad4a9d6e7936e1446f44ce0b4ee5dc7b1c0d92853816a470b3a25c03ebe046c5a6d767
|
7
|
+
data.tar.gz: '0379f5ac4de1ede62a6cf21cd5412595bb18674a537a84672b91f667f1179420fcd9d4a30b3220f413eb6215e0e7abaa55cc2c1487b109a32bf648ea71816346'
|
data/CHANGELOG.md
CHANGED
@@ -1,20 +1,28 @@
|
|
1
|
-
|
1
|
+
# v0.2.1 2018-02-06
|
2
2
|
|
3
|
-
|
3
|
+
### Fixed
|
4
|
+
|
5
|
+
* Using `read` types in schemas no longer breaks indexing (solnic)
|
6
|
+
|
7
|
+
[Compare v0.2.0...v0.2.1](https://github.com/rom-rb/rom-elasticsearch/compare/v0.2.0...v0.2.1)
|
8
|
+
|
9
|
+
# v0.2.0 2018-01-23
|
10
|
+
|
11
|
+
### Added
|
4
12
|
|
5
13
|
* `Relation#order` which sets `:sort` (solnic)
|
6
14
|
* `Relation#page` which sets `:from` offset (solnic)
|
7
15
|
* `Relation#per_page` which sets `:size` (solnic)
|
8
16
|
* `Relation#call` returns custom `ROM::Elasticsearch::Relation::Loaded` object, which provides access to `#total_hits` and raw client response (solnic)
|
9
17
|
|
10
|
-
[Compare v0.1.1...v0.2.0](https://github.com/rom-rb/rom/compare/v0.1.1...v0.2.0)
|
18
|
+
[Compare v0.1.1...v0.2.0](https://github.com/rom-rb/rom-elasticsearch/compare/v0.1.1...v0.2.0)
|
11
19
|
|
12
|
-
|
20
|
+
# v0.1.1 2017-11-18
|
13
21
|
|
14
|
-
|
22
|
+
### Changed
|
15
23
|
|
16
24
|
* Connection URI is passed directly to the ES client now (solnic)
|
17
25
|
|
18
|
-
|
26
|
+
# v0.1.0 2017-11-17
|
19
27
|
|
20
28
|
First public release
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
RSpec.describe ROM::Elasticsearch::Relation, '.schema' do
|
2
|
+
subject(:relation) { relations[:users] }
|
3
|
+
|
4
|
+
include_context 'setup'
|
5
|
+
|
6
|
+
before do
|
7
|
+
conf.relation(:users) do
|
8
|
+
schema(:users) do
|
9
|
+
attribute :id, ROM::Elasticsearch::Types::ID
|
10
|
+
attribute :name, ROM::Elasticsearch::Types.Text, read: ROM::Types.Constructor(Symbol, &:to_sym)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'defines read/write types' do
|
16
|
+
relation.create_index
|
17
|
+
|
18
|
+
relation.command(:create).call(id: 1, name: 'Jane')
|
19
|
+
|
20
|
+
user = relation.get(1).one
|
21
|
+
|
22
|
+
expect(user[:id]).to be(1)
|
23
|
+
expect(user[:name]).to be(:Jane)
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hannes Nevalainen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rom-core
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- LICENSE.txt
|
101
101
|
- README.md
|
102
102
|
- Rakefile
|
103
|
+
- docker-compose.yml
|
103
104
|
- lib/rom-elasticsearch.rb
|
104
105
|
- lib/rom/elasticsearch.rb
|
105
106
|
- lib/rom/elasticsearch/attribute.rb
|
@@ -116,6 +117,7 @@ files:
|
|
116
117
|
- lib/rom/elasticsearch/version.rb
|
117
118
|
- rom-elasticsearch.gemspec
|
118
119
|
- spec/integration/rom/elasticsearch/relation/command_spec.rb
|
120
|
+
- spec/integration/rom/elasticsearch/relation/schema_spec.rb
|
119
121
|
- spec/shared/setup.rb
|
120
122
|
- spec/shared/unit/user_fixtures.rb
|
121
123
|
- spec/shared/unit/users.rb
|
@@ -167,6 +169,7 @@ specification_version: 4
|
|
167
169
|
summary: ROM adapter for Elasticsearch
|
168
170
|
test_files:
|
169
171
|
- spec/integration/rom/elasticsearch/relation/command_spec.rb
|
172
|
+
- spec/integration/rom/elasticsearch/relation/schema_spec.rb
|
170
173
|
- spec/shared/setup.rb
|
171
174
|
- spec/shared/unit/user_fixtures.rb
|
172
175
|
- spec/shared/unit/users.rb
|