esse 0.0.5 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/exec/esse +3 -1
  3. data/lib/esse/backend/index/aliases.rb +7 -3
  4. data/lib/esse/backend/index/close.rb +6 -3
  5. data/lib/esse/backend/index/create.rb +19 -8
  6. data/lib/esse/backend/index/delete.rb +13 -8
  7. data/lib/esse/backend/index/documents.rb +2 -2
  8. data/lib/esse/backend/index/existance.rb +1 -1
  9. data/lib/esse/backend/index/open.rb +6 -3
  10. data/lib/esse/backend/index/refresh.rb +2 -2
  11. data/lib/esse/backend/index/reset.rb +2 -4
  12. data/lib/esse/backend/index/update.rb +37 -12
  13. data/lib/esse/backend/index.rb +5 -1
  14. data/lib/esse/backend/index_type/documents.rb +7 -7
  15. data/lib/esse/cli/event_listener.rb +87 -0
  16. data/lib/esse/cli/generate.rb +7 -3
  17. data/lib/esse/cli/index/base_operation.rb +76 -0
  18. data/lib/esse/cli/index/close.rb +26 -0
  19. data/lib/esse/cli/index/create.rb +26 -0
  20. data/lib/esse/cli/index/delete.rb +26 -0
  21. data/lib/esse/cli/index/open.rb +26 -0
  22. data/lib/esse/cli/index/reset.rb +26 -0
  23. data/lib/esse/cli/index/update_aliases.rb +32 -0
  24. data/lib/esse/cli/index/update_mapping.rb +33 -0
  25. data/lib/esse/cli/index/update_settings.rb +26 -0
  26. data/lib/esse/cli/index.rb +70 -2
  27. data/lib/esse/cli/templates/config.rb.erb +20 -0
  28. data/lib/esse/cli/templates/index.rb.erb +74 -9
  29. data/lib/esse/cli/templates/type_collection.rb.erb +41 -0
  30. data/lib/esse/cli/templates/{mappings.json → type_mappings.json} +0 -0
  31. data/lib/esse/cli/templates/{serializer.rb.erb → type_serializer.rb.erb} +9 -4
  32. data/lib/esse/cli.rb +75 -3
  33. data/lib/esse/cluster.rb +18 -2
  34. data/lib/esse/config.rb +39 -5
  35. data/lib/esse/core.rb +15 -33
  36. data/lib/esse/errors.rb +47 -0
  37. data/lib/esse/events/bus.rb +103 -0
  38. data/lib/esse/events/event.rb +64 -0
  39. data/lib/esse/events/publisher.rb +119 -0
  40. data/lib/esse/events.rb +49 -0
  41. data/lib/esse/index/backend.rb +2 -1
  42. data/lib/esse/index/base.rb +4 -6
  43. data/lib/esse/index/mappings.rb +2 -3
  44. data/lib/esse/index/settings.rb +7 -8
  45. data/lib/esse/index.rb +2 -1
  46. data/lib/esse/index_mapping.rb +2 -2
  47. data/lib/esse/index_setting.rb +8 -4
  48. data/lib/esse/index_type/actions.rb +2 -1
  49. data/lib/esse/index_type/backend.rb +2 -1
  50. data/lib/esse/index_type/mappings.rb +2 -2
  51. data/lib/esse/index_type.rb +6 -1
  52. data/lib/esse/logging.rb +19 -0
  53. data/lib/esse/object_document_mapper.rb +96 -0
  54. data/lib/esse/primitives/hash_utils.rb +29 -0
  55. data/lib/esse/primitives/hstring.rb +4 -3
  56. data/lib/esse/primitives/output.rb +64 -0
  57. data/lib/esse/primitives.rb +1 -0
  58. data/lib/esse/template_loader.rb +1 -1
  59. data/lib/esse/version.rb +1 -1
  60. data/lib/esse.rb +12 -3
  61. metadata +106 -22
  62. data/.gitignore +0 -12
  63. data/.rubocop.yml +0 -128
  64. data/.tool-versions +0 -1
  65. data/.yardopts +0 -2
  66. data/CHANGELOG.md +0 -0
  67. data/Gemfile +0 -7
  68. data/Gemfile.lock +0 -62
  69. data/LICENSE.txt +0 -21
  70. data/README.md +0 -52
  71. data/Rakefile +0 -4
  72. data/bin/console +0 -22
  73. data/bin/setup +0 -8
  74. data/esse.gemspec +0 -40
  75. data/lib/esse/index_type/serializer.rb +0 -87
@@ -3,8 +3,12 @@
3
3
  module Esse
4
4
  # https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices.html
5
5
  class IndexSetting
6
- def initialize(body: {}, paths: [], globals: {})
7
- @globals = globals || {}
6
+ # @param [Hash] options
7
+ # @option options [Proc] :globals A proc that will be called to load global settings
8
+ # @option options [Array] :paths A list of paths to load settings from
9
+ # @option options [Hash] :body A hash of settings to override
10
+ def initialize(body: {}, paths: [], globals: nil)
11
+ @globals = globals || -> { {} }
8
12
  @paths = Array(paths)
9
13
  @settings = body
10
14
  end
@@ -19,14 +23,14 @@ module Esse
19
23
  # end
20
24
  # end
21
25
  #
22
- def as_json
26
+ def to_h
23
27
  return @settings unless @settings.empty?
24
28
 
25
29
  from_template || @settings
26
30
  end
27
31
 
28
32
  def body
29
- @globals.merge(as_json)
33
+ HashUtils.deep_merge(@globals.call, to_h)
30
34
  end
31
35
 
32
36
  protected
@@ -3,7 +3,8 @@
3
3
  module Esse
4
4
  class IndexType
5
5
  module ClassMethods
6
- def action(name, options = {}, &block); end
6
+ def action(name, options = {}, &block)
7
+ end
7
8
  end
8
9
 
9
10
  extend ClassMethods
@@ -3,9 +3,10 @@
3
3
  module Esse
4
4
  class IndexType
5
5
  module ClassMethods
6
- def backend
6
+ def elasticsearch
7
7
  Esse::Backend::IndexType.new(self)
8
8
  end
9
+ alias_method :backend, :elasticsearch
9
10
  end
10
11
 
11
12
  extend ClassMethods
@@ -7,9 +7,9 @@ module Esse
7
7
  # This method is only used to define mapping
8
8
  def mappings(hash = {}, &block)
9
9
  @mapping = Esse::IndexMapping.new(body: hash, paths: template_dirs, filenames: mapping_filenames)
10
- return unless block_given?
10
+ return unless block
11
11
 
12
- @mapping.define_singleton_method(:as_json, &block)
12
+ @mapping.define_singleton_method(:to_h, &block)
13
13
  end
14
14
 
15
15
  # This is the actually content that will be passed through the ES api
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'object_document_mapper'
4
+
3
5
  module Esse
6
+ # Type is actually deprecated. Elasticsearch today uses _doc instead of type
7
+ # And in upcoming release it will be totally removed.
8
+ # But I want to keep compatibility with old versions of es.
4
9
  class IndexType
5
10
  require_relative 'index_type/actions'
6
11
  require_relative 'index_type/mappings'
7
- require_relative 'index_type/serializer'
8
12
  require_relative 'index_type/backend'
13
+ extend ObjectDocumentMapper
9
14
  end
10
15
  end
@@ -0,0 +1,19 @@
1
+ require 'logger'
2
+
3
+ module Esse
4
+ module Logging
5
+ def self.included(base)
6
+ base.extend(ClassMethods)
7
+ end
8
+
9
+ module ClassMethods
10
+ def logger
11
+ @logger ||= ::Logger.new($stdout)
12
+ end
13
+
14
+ def logger=(log)
15
+ @logger = log || ::Logger.new(File::NULL)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Esse
4
+ module ObjectDocumentMapper
5
+ # Convert ruby object to json. Arguments will be same of passed through the
6
+ # collection. It's allowed a block or a class with the `to_h` instance method.
7
+ # Example with block
8
+ # serializer do |model, **context|
9
+ # {
10
+ # id: model.id,
11
+ # admin: context[:is_admin],
12
+ # }
13
+ # end
14
+ # Example with serializer class
15
+ # serializer UserSerializer
16
+ def serializer(klass = nil, &block)
17
+ if block
18
+ @serializer_proc = block
19
+ elsif klass.is_a?(Class) && klass.instance_methods.include?(:to_h)
20
+ @serializer_proc = proc { |*args, **kwargs| klass.new(*args, **kwargs).to_h }
21
+ elsif klass.is_a?(Class) && klass.instance_methods.include?(:as_json) # backward compatibility
22
+ @serializer_proc = proc { |*args, **kwargs| klass.new(*args, **kwargs).as_json }
23
+ elsif klass.is_a?(Class) && klass.instance_methods.include?(:call)
24
+ @serializer_proc = proc { |*args, **kwargs| klass.new(*args, **kwargs).call }
25
+ else
26
+ msg = format('%<arg>p is not a valid serializer. The serializer should ' \
27
+ 'respond with `to_h` instance method.', arg: klass,)
28
+ raise ArgumentError, msg
29
+ end
30
+ end
31
+
32
+ def serialize(model, *args, **kwargs)
33
+ unless @serializer_proc
34
+ raise NotImplementedError, format('there is no serializer defined for the %<k>p index', k: to_s)
35
+ end
36
+
37
+ @serializer_proc.call(model, *args, **kwargs)
38
+ end
39
+
40
+ # Used to define the source of data. A block is required. And its
41
+ # content should yield an array of each object that should be serialized.
42
+ # The list of arguments will be passed throught the serializer method.
43
+ #
44
+ # Here is an example of how this should work:
45
+ # collection do |conditions, &block|
46
+ # User.where(conditions).find_in_batches(batch_size: 5000) do |batch|
47
+ # block.call(batch, conditions)
48
+ # end
49
+ # end
50
+ def collection(collection_class = nil, &block)
51
+ raise ArgumentError, 'a collection class or a block is required' if block.nil? && collection_class.nil?
52
+
53
+ if block.nil? && collection_class.is_a?(Class) && !collection_class.include?(Enumerable)
54
+ msg = '%<arg>p is not a valid collection class.' \
55
+ ' Collections should implement the Enumerable interface'
56
+ raise ArgumentError, format(msg, arg: collection_class)
57
+ end
58
+
59
+ @collection_proc = collection_class || block
60
+ end
61
+
62
+ # Used to fetch all batch of data defined on the collection model.
63
+ # Arguments can be anything. They will just be passed through the block.
64
+ # Useful when the collection depends on scope or any other conditions
65
+ # Example
66
+ # each_batch(active: true) do |data, _opts|
67
+ # puts data.size
68
+ # end
69
+ def each_batch(*args, **kwargs, &block)
70
+ unless @collection_proc
71
+ raise NotImplementedError, format('there is no collection defined for the %<k>p index', k: to_s)
72
+ end
73
+
74
+ case @collection_proc
75
+ when Class
76
+ @collection_proc.new(*args, **kwargs).each(&block)
77
+ else
78
+ @collection_proc.call(*args, **kwargs, &block)
79
+ end
80
+ rescue LocalJumpError
81
+ raise(SyntaxError, 'block must be explicitly declared in the collection definition')
82
+ end
83
+
84
+ # Wrap collection data into serialized batches
85
+ #
86
+ # @param args [*Object] Any argument is allowed here. The collection will be called with same arguments.
87
+ # And the serializer will be initialized with those arguments too.
88
+ # @yield [Array, *Object] serialized collection and method arguments
89
+ def each_serialized_batch(*args, **kwargs, &block)
90
+ each_batch(*args, **kwargs) do |batch|
91
+ entries = batch.map { |entry| serialize(entry, *args, **kwargs) }.compact
92
+ block.call(entries, *args, **kwargs)
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,29 @@
1
+ require 'forwardable'
2
+
3
+ module Esse
4
+ # The idea here is to add useful methods to the ruby standard objects without
5
+ # monkey patching them
6
+ module HashUtils
7
+ module_function
8
+
9
+ def deep_merge(target, source)
10
+ target.merge(source) do |key, oldval, newval|
11
+ if oldval.is_a?(Hash) && newval.is_a?(Hash)
12
+ deep_merge(oldval, newval)
13
+ else
14
+ newval
15
+ end
16
+ end
17
+ end
18
+
19
+ def deep_merge!(target, source)
20
+ target.merge!(source) do |key, oldval, newval|
21
+ if oldval.is_a?(Hash) && newval.is_a?(Hash)
22
+ deep_merge!(oldval, newval)
23
+ else
24
+ newval
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -9,7 +9,7 @@ module Esse
9
9
  class Hstring
10
10
  extend Forwardable
11
11
 
12
- def_delegators :@value, :==, :eq, :to_s, :inspect, :sub, :capitalize
12
+ def_delegators :@value, :==, :eq, :to_s, :to_sym, :inspect, :sub, :capitalize
13
13
  attr_reader :value
14
14
 
15
15
  def self.def_conventional(bang_method, conv_method = nil)
@@ -54,18 +54,19 @@ module Esse
54
54
  def_conventional :demodulize!
55
55
 
56
56
  def modulize!
57
- @value = @value.split(%r{\:\:|\\|/}).map { |part| self.class.new(part).camelize.to_s }.join('::')
57
+ @value = @value.split(%r{::|\\|/}).map { |part| self.class.new(part).camelize.to_s }.join('::')
58
58
  self
59
59
  end
60
60
  def_conventional :modulize!
61
61
 
62
62
  def underscore!
63
63
  @value = @value
64
- .sub(/^\:\:/, '')
64
+ .sub(/^::/, '')
65
65
  .gsub('::', '/')
66
66
  .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
67
67
  .gsub(/([a-z\d])([A-Z])/, '\1_\2')
68
68
  .tr('-', '_')
69
+ .tr('.', '_')
69
70
  .gsub(/\s/, '_')
70
71
  .gsub(/__+/, '_')
71
72
  .downcase
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'rainbow'
5
+ rescue LoadError
6
+ end
7
+
8
+ module Esse
9
+ module Output
10
+ module_function
11
+
12
+ def formatted_runtime(number)
13
+ colorize(sprintf('%.3f ms', number), :lightgray)
14
+ end
15
+
16
+ def runtime_padding(number, extra = 2)
17
+ ' ' * (extra + sprintf('%.3f ms', number).size)
18
+ end
19
+
20
+ def colorize(text, *attributes)
21
+ if defined? Rainbow
22
+ attributes.reduce(Rainbow(text)) { |p, a| p.public_send(a) }
23
+ else
24
+ text
25
+ end
26
+ end
27
+
28
+ def print_error(message_or_error, backtrace: false, **options)
29
+ options[:level] ||= :error
30
+ message = message_or_error.to_s
31
+
32
+ print_message(message, output: :stderr, **options)
33
+
34
+ if message_or_error.is_a?(Exception) && backtrace
35
+ limit = backtrace.is_a?(Integer) ? backtrace : -1
36
+ print_backtrace(message_or_error, limit: limit, level: options[:level])
37
+ end
38
+ end
39
+
40
+ def print_backtrace(error, limit: -1, **options)
41
+ return unless error.respond_to?(:backtrace)
42
+ return if error.backtrace.nil?
43
+
44
+ error.backtrace[0..limit].each { |frame| print_error(frame, **options) }
45
+ end
46
+
47
+ def print_message(message, level: :info, output: $stdout, newline: true, **fields)
48
+ output = \
49
+ case output
50
+ when :stdout, 'stdout'
51
+ $stdout
52
+ when :stderr, 'stderr'
53
+ $stderr
54
+ when IO, StringIO
55
+ output
56
+ else
57
+ raise ArgumentError, "Invalid output #{output.inspect}"
58
+ end
59
+
60
+ message = format(message, **fields)
61
+ newline ? output.puts(message) : output.print(message)
62
+ end
63
+ end
64
+ end
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'primitives/hstring'
4
+ require_relative 'primitives/hash_utils'
@@ -24,7 +24,7 @@ module Esse
24
24
  path = nil
25
25
  @directories.each do |dir|
26
26
  patterns.find do |pattern|
27
- path = Dir[dir.join("#{pattern}.{#{@extensions.join(',')}}")].first
27
+ path = Dir[dir.join("#{pattern}.{#{@extensions.join(",")}}")].first
28
28
  break if path
29
29
  end
30
30
  break if path
data/lib/esse/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esse
4
- VERSION = '0.0.5'
4
+ VERSION = '0.1.1'
5
5
  end
data/lib/esse.rb CHANGED
@@ -1,10 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'esse/index'
3
+ require_relative 'esse/core'
4
+ require_relative 'esse/errors'
5
+ require_relative 'esse/index'
4
6
 
5
7
  module Esse
6
8
  SETTING_ROOT_KEY = 'settings'
7
9
  MAPPING_ROOT_KEY = 'mappings'
8
-
9
- class Error < StandardError; end
10
+ CLI_IGNORE_OPTS = %i[
11
+ require
12
+ silent
13
+ ].freeze
14
+ CLI_CONFIG_PATHS = %w[
15
+ Essefile
16
+ config/esse.rb
17
+ config/initializers/esse.rb
18
+ ].freeze
10
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exec
10
10
  cert_chain: []
11
- date: 2020-08-05 00:00:00.000000000 Z
11
+ date: 2022-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elasticsearch
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.19'
55
55
  - !ruby/object:Gem::Dependency
56
- name: dotenv
56
+ name: awesome_print
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: awesome_print
70
+ name: dotenv
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webmock
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.14'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.14'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: yard
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -136,28 +150,78 @@ dependencies:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
152
  version: 0.9.20
153
+ - !ruby/object:Gem::Dependency
154
+ name: standard
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.3'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.3'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.20'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.20'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-performance
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.11'
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 1.11.5
191
+ type: :development
192
+ prerelease: false
193
+ version_requirements: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - "~>"
196
+ - !ruby/object:Gem::Version
197
+ version: '1.11'
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: 1.11.5
201
+ - !ruby/object:Gem::Dependency
202
+ name: rubocop-rspec
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - "~>"
206
+ - !ruby/object:Gem::Version
207
+ version: '2.4'
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - "~>"
213
+ - !ruby/object:Gem::Version
214
+ version: '2.4'
139
215
  description: All the elegance of ruby with the elasticsearch flexibility. This gem
140
216
  is a pretty simple but excential helpers to deal with mapping, indexing, serialization
141
217
  and search.
142
218
  email:
143
219
  - mgzmaster@gmail.com
144
- executables: []
220
+ executables:
221
+ - esse
145
222
  extensions: []
146
223
  extra_rdoc_files: []
147
224
  files:
148
- - ".gitignore"
149
- - ".rubocop.yml"
150
- - ".tool-versions"
151
- - ".yardopts"
152
- - CHANGELOG.md
153
- - Gemfile
154
- - Gemfile.lock
155
- - LICENSE.txt
156
- - README.md
157
- - Rakefile
158
- - bin/console
159
- - bin/setup
160
- - esse.gemspec
161
225
  - exec/esse
162
226
  - lib/esse.rb
163
227
  - lib/esse/backend/index.rb
@@ -175,14 +239,31 @@ files:
175
239
  - lib/esse/backend/index_type/documents.rb
176
240
  - lib/esse/cli.rb
177
241
  - lib/esse/cli/base.rb
242
+ - lib/esse/cli/event_listener.rb
178
243
  - lib/esse/cli/generate.rb
179
244
  - lib/esse/cli/index.rb
245
+ - lib/esse/cli/index/base_operation.rb
246
+ - lib/esse/cli/index/close.rb
247
+ - lib/esse/cli/index/create.rb
248
+ - lib/esse/cli/index/delete.rb
249
+ - lib/esse/cli/index/open.rb
250
+ - lib/esse/cli/index/reset.rb
251
+ - lib/esse/cli/index/update_aliases.rb
252
+ - lib/esse/cli/index/update_mapping.rb
253
+ - lib/esse/cli/index/update_settings.rb
254
+ - lib/esse/cli/templates/config.rb.erb
180
255
  - lib/esse/cli/templates/index.rb.erb
181
- - lib/esse/cli/templates/mappings.json
182
- - lib/esse/cli/templates/serializer.rb.erb
256
+ - lib/esse/cli/templates/type_collection.rb.erb
257
+ - lib/esse/cli/templates/type_mappings.json
258
+ - lib/esse/cli/templates/type_serializer.rb.erb
183
259
  - lib/esse/cluster.rb
184
260
  - lib/esse/config.rb
185
261
  - lib/esse/core.rb
262
+ - lib/esse/errors.rb
263
+ - lib/esse/events.rb
264
+ - lib/esse/events/bus.rb
265
+ - lib/esse/events/event.rb
266
+ - lib/esse/events/publisher.rb
186
267
  - lib/esse/index.rb
187
268
  - lib/esse/index/actions.rb
188
269
  - lib/esse/index/backend.rb
@@ -199,9 +280,12 @@ files:
199
280
  - lib/esse/index_type/actions.rb
200
281
  - lib/esse/index_type/backend.rb
201
282
  - lib/esse/index_type/mappings.rb
202
- - lib/esse/index_type/serializer.rb
283
+ - lib/esse/logging.rb
284
+ - lib/esse/object_document_mapper.rb
203
285
  - lib/esse/primitives.rb
286
+ - lib/esse/primitives/hash_utils.rb
204
287
  - lib/esse/primitives/hstring.rb
288
+ - lib/esse/primitives/output.rb
205
289
  - lib/esse/template_loader.rb
206
290
  - lib/esse/version.rb
207
291
  homepage: https://github.com/marcosgz/esse
@@ -226,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
310
  - !ruby/object:Gem::Version
227
311
  version: '0'
228
312
  requirements: []
229
- rubygems_version: 3.0.3
313
+ rubygems_version: 3.0.3.1
230
314
  signing_key:
231
315
  specification_version: 4
232
316
  summary: Pure Ruby toolkit based on official elasticsearch-ruby library. (No! It isn't
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /.rspec_status
9
- /tmp/
10
- esse-*.gem
11
- /app
12
- /.env