elos 1.0.13 → 1.0.15

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
  SHA1:
3
- metadata.gz: 306f795d5ea0e638105459865f4d4f222ca9bd31
4
- data.tar.gz: 678c7a91bb3d15043b8999b86411c73744f1baa7
3
+ metadata.gz: 9cf2bc287e992f03d0afcaa228fc7ead666b8d0f
4
+ data.tar.gz: adfe6d6e33a2fef9d0c1225ef13bedac2d49ab49
5
5
  SHA512:
6
- metadata.gz: 874ff50acf8ed9c30aedb9423d96c4fa4048f7e16e267436f02d91f8d0b9ce7718e9fc68ce1e051a04c02a152af2818aeaf617680bbc11441aca757359d8f0a7
7
- data.tar.gz: 2f58762b8ad62a697ee1433d051f25220744b54eb5b63bc654701c3ed3ab447be51ad87be6db76285dc935bd5ee49f95303b50f2b65f5ab412d9caae747d703c
6
+ metadata.gz: a8203a186fc14e29b1af9706db3ca037f2c57e9bd8a1f5eefc5db8b4c0d590c8ed32d71aeb970b321b09d4dc57a2857622e03969143958e685af80318c60b860
7
+ data.tar.gz: 83d3a06ea8e39d1706f0ee81fb5dfd504ba62152f120088b0ca38d176dfba2fe4ae6165a8bd035e38ab5b6f43ddd50b96ee22c86646b8ccc325b5cb73e825532
@@ -9,7 +9,7 @@ module Elos::Configuration
9
9
  def config(host: nil, env: nil, settings: {})
10
10
  host ||= 'localhost:9200'
11
11
  self.client = ::Elasticsearch::Client.new(host: host)
12
- self.env = env
12
+ self.env = env.to_s
13
13
  self.settings = settings
14
14
  end
15
15
  end
@@ -0,0 +1,19 @@
1
+ module Elos::Helpers
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ cattr_accessor :index_classes
6
+
7
+ self.index_classes = []
8
+ end
9
+
10
+ class_methods do
11
+ def reindex
12
+ index_classes.each { |klass| klass.reindex }
13
+ end
14
+
15
+ def unindex
16
+ index_classes.each { |klass| klass.unindex }
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ module Elos::Index::Registration
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ Elos.index_classes << self
6
+ end
7
+ end
data/lib/elos/index.rb CHANGED
@@ -1,16 +1,19 @@
1
1
  module Elos::Index
2
2
  extend ActiveSupport::Concern
3
3
 
4
- include Elos::Index::Core
5
- include Elos::Index::Properties
6
- include Elos::Index::Mappings
7
- include Elos::Index::RawHelpers
8
- include Elos::Index::Refreshable
9
- include Elos::Index::Indexable
10
- include Elos::Index::Reindexable
11
- include Elos::Index::Unindexable
12
- include Elos::Index::Searchable
13
- include Elos::Index::Locatable
14
- include Elos::Index::Subscribable
15
- include Elos::Index::Model
4
+ included do
5
+ include Elos::Index::Core
6
+ include Elos::Index::Registration
7
+ include Elos::Index::Properties
8
+ include Elos::Index::Mappings
9
+ include Elos::Index::RawHelpers
10
+ include Elos::Index::Refreshable
11
+ include Elos::Index::Indexable
12
+ include Elos::Index::Reindexable
13
+ include Elos::Index::Unindexable
14
+ include Elos::Index::Searchable
15
+ include Elos::Index::Locatable
16
+ include Elos::Index::Subscribable
17
+ include Elos::Index::Model
18
+ end
16
19
  end
@@ -17,7 +17,5 @@ class Elos::QueryBuilder::Base
17
17
 
18
18
  protected
19
19
 
20
- def params
21
- @params
22
- end
20
+ attr_reader :params
23
21
  end
data/lib/elos/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Elos
2
- VERSION = '1.0.13'
2
+ VERSION = '1.0.15'
3
3
  end
data/lib/elos.rb CHANGED
@@ -2,4 +2,5 @@ require_relative 'initialize'
2
2
 
3
3
  class Elos
4
4
  include Elos::Configuration
5
+ include Elos::Helpers
5
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elos
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-31 00:00:00.000000000 Z
11
+ date: 2015-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -149,6 +149,7 @@ files:
149
149
  - lib/elos/data_object.rb
150
150
  - lib/elos/errors/not_found.rb
151
151
  - lib/elos/errors/validation_failed.rb
152
+ - lib/elos/helpers.rb
152
153
  - lib/elos/index.rb
153
154
  - lib/elos/index/core.rb
154
155
  - lib/elos/index/indexable.rb
@@ -161,6 +162,7 @@ files:
161
162
  - lib/elos/index/properties.rb
162
163
  - lib/elos/index/raw_helpers.rb
163
164
  - lib/elos/index/refreshable.rb
165
+ - lib/elos/index/registration.rb
164
166
  - lib/elos/index/reindexable.rb
165
167
  - lib/elos/index/searchable.rb
166
168
  - lib/elos/index/subscribable.rb