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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a948a48926a07e5143226cb67f08e420dbf8d822b13db1ee0c519eb31c12d18e
4
- data.tar.gz: ced3c9bdf36ddfd6e75dbd97f2ce6b49824722bc98148dd453193357cecc981d
3
+ metadata.gz: 92935917fe4e5815ccfa48baf7d1873886737a1d3c30b4aadda910ae6836ea5d
4
+ data.tar.gz: ca3b560293699a451120b1a2015df1c86e44ca4f3464bac28f690e827bb07626
5
5
  SHA512:
6
- metadata.gz: 4fd5087146de2c8170f0b8eeb74f08fdd54624c0aa2950cfe99492a1e8ed9d9ffd531543baf8fa84734747dd6d4fd4063b0554339eb096838a968308cecf8af2
7
- data.tar.gz: 152ab98507a3aa691b97b5bd0af55f1e2b8503dcd8f11de0a8f4a96d033622fa8861d2d8198185fd7b458462b6b4f5a2bc6bd9d52cc070a7a2443f0a93fd39b8
6
+ metadata.gz: 99695c9ed67f9f7ea90dc764b001436554752bce60104543a6ac4f8bf93062e4cfd5d4358eb727184698bbe7bb6f7181f12a76f7ee06ebdb39724994036e1b7c
7
+ data.tar.gz: db7bd071efffa51c152b0b798874546ff5a191f7e8a5d07124fa2e8c841bc9f9c0ffc9cc1ab59a43397f175abb7ced27f11f84a031e1718d5a1eb7bf352e7d28
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active-es (0.1.0)
4
+ active-es (0.1.1)
5
5
  elasticsearch (~> 6.0)
6
6
  rails (>= 4.0)
7
7
 
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
@@ -1,3 +1,3 @@
1
1
  module ActiveEs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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 00:00:00.000000000 Z
11
+ date: 2019-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails