active-es 0.1.0 → 0.1.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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/active_es/schema/definition.rb +4 -2
- data/lib/active_es/version.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: 92935917fe4e5815ccfa48baf7d1873886737a1d3c30b4aadda910ae6836ea5d
|
4
|
+
data.tar.gz: ca3b560293699a451120b1a2015df1c86e44ca4f3464bac28f690e827bb07626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99695c9ed67f9f7ea90dc764b001436554752bce60104543a6ac4f8bf93062e4cfd5d4358eb727184698bbe7bb6f7181f12a76f7ee06ebdb39724994036e1b7c
|
7
|
+
data.tar.gz: db7bd071efffa51c152b0b798874546ff5a191f7e8a5d07124fa2e8c841bc9f9c0ffc9cc1ab59a43397f175abb7ced27f11f84a031e1718d5a1eb7bf352e7d28
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -59,6 +59,7 @@ end
|
|
59
59
|
|
60
60
|
## dummy app
|
61
61
|
|
62
|
+
```
|
62
63
|
$ bundle exec rails runner spec/dummy/db/seeds.rb
|
63
64
|
$ bundle exec rails console
|
64
65
|
$ => Content.all
|
@@ -68,7 +69,7 @@ $ => [#<Content:0x00007fffc5e958a0 @description="description2", @id="IhrI1mgBhOP
|
|
68
69
|
#<Content:0x00007fffc5eab3f8 @description="descripnumion20", @id="JRrI1mgBhOPWXkxaf1d1", @number=20, @rank=20, @score=1.0, @title="title20">,
|
69
70
|
#<Content:0x00007fffc5eaa368 @description="description0", @id="IBrI1mgBhOPWXkxafFfP", @number=0, @rank=0, @score=1.0, @title="title0">,
|
70
71
|
#<Content:0x00007fffc5ebb618 @description="descripnumion0", @id="IxrI1mgBhOPWXkxafld1", @number=0, @rank=0, @score=1.0, @title="title0">]
|
71
|
-
|
72
|
+
```
|
72
73
|
## Development
|
73
74
|
|
74
75
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -3,8 +3,6 @@ module ActiveEs
|
|
3
3
|
module Definition
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
mattr_accessor :properties, default: {}
|
7
|
-
|
8
6
|
FieldDetaTypes = %w(
|
9
7
|
text keyword
|
10
8
|
long integer short byte
|
@@ -20,6 +18,10 @@ module ActiveEs
|
|
20
18
|
raise ArgumentError('invalid field deta types')
|
21
19
|
end
|
22
20
|
|
21
|
+
unless defined? properties
|
22
|
+
class_attribute :properties, default: {}
|
23
|
+
end
|
24
|
+
|
23
25
|
properties[field] = options
|
24
26
|
attr_accessor field
|
25
27
|
end
|
data/lib/active_es/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-es
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soartec-lab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|