es_experiment 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 72fdbaf4f4099b8651f5b94f9ea1833ab933a6d37eb7b02f1c4003cb41cd84f8
4
+ data.tar.gz: b57c29084cb8b12afc034317487c2738f0718bb72ad2ce9ca1b3a682bfdc2174
5
+ SHA512:
6
+ metadata.gz: cce4223f3859e0c7d22bb81eeeb7e41b50c56a7d883895ee065f9b00587f408b5096949403a9ac2a791f22339a7ba1d530e64172671e94ac43d0e2e7c6218a56
7
+ data.tar.gz: df59e644f5cf865c5b07875fdd4580d183e60634593291187a6f6b22c3f06986e2eed9ae91913e213132fa920cc35fbbd4875c2da51b777b46fbb8a407a57863
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 2.0.2
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at caio.penhalver@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in es_experiment.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,80 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ es_experiment (0.1.0)
5
+ elasticsearch
6
+ oj
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.0)
12
+ coderay (1.1.2)
13
+ diff-lcs (1.3)
14
+ docile (1.3.2)
15
+ elasticsearch (7.3.0)
16
+ elasticsearch-api (= 7.3.0)
17
+ elasticsearch-transport (= 7.3.0)
18
+ elasticsearch-api (7.3.0)
19
+ multi_json
20
+ elasticsearch-transport (7.3.0)
21
+ faraday
22
+ multi_json
23
+ faraday (0.15.4)
24
+ multipart-post (>= 1.2, < 3)
25
+ jaro_winkler (1.5.3)
26
+ json (2.2.0)
27
+ method_source (0.9.2)
28
+ multi_json (1.13.1)
29
+ multipart-post (2.1.1)
30
+ oj (3.8.1)
31
+ parallel (1.17.0)
32
+ parser (2.6.3.0)
33
+ ast (~> 2.4.0)
34
+ pry (0.12.2)
35
+ coderay (~> 1.1.0)
36
+ method_source (~> 0.9.0)
37
+ rainbow (3.0.0)
38
+ rake (10.5.0)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.2)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.4)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.1)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.2)
52
+ rubocop (0.74.0)
53
+ jaro_winkler (~> 1.5.1)
54
+ parallel (~> 1.10)
55
+ parser (>= 2.6)
56
+ rainbow (>= 2.2.2, < 4.0)
57
+ ruby-progressbar (~> 1.7)
58
+ unicode-display_width (>= 1.4.0, < 1.7)
59
+ ruby-progressbar (1.10.1)
60
+ simplecov (0.17.0)
61
+ docile (~> 1.1)
62
+ json (>= 1.8, < 3)
63
+ simplecov-html (~> 0.10.0)
64
+ simplecov-html (0.10.2)
65
+ unicode-display_width (1.6.0)
66
+
67
+ PLATFORMS
68
+ ruby
69
+
70
+ DEPENDENCIES
71
+ bundler (~> 2.0)
72
+ es_experiment!
73
+ pry
74
+ rake (~> 10.0)
75
+ rspec (~> 3.0)
76
+ rubocop
77
+ simplecov
78
+
79
+ BUNDLED WITH
80
+ 2.0.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Caio Penhalver
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # EsExperiment
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/es_experiment`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'es_experiment'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install es_experiment
22
+
23
+ ## Usage
24
+
25
+
26
+ ### Setup
27
+ On your spec_helper or rails_helper file include the code below with the configuration for your application.
28
+
29
+ ```ruby
30
+ EsExperiment.configure do |config|
31
+ config.connection_tries = 3
32
+ config.time_between_connection_tries = 3
33
+ config.documents_path = 'spec/fixtures/factories/'
34
+ config.schema_path = 'spec/fixtures/schema.json'
35
+ config.url = 'localhost:9200'
36
+ config.index = 'profissionais'
37
+ end
38
+ ```
39
+ ### How to use
40
+
41
+ #### Simple use
42
+ For example, if you have a json file named `user.json` in the directory `spec/fixtures/factories/`
43
+ ```json
44
+ {
45
+ "user_id": 999,
46
+ "name": "Fulando",
47
+ "address": {
48
+ "street": "First avenue"
49
+ }
50
+ }
51
+ ```
52
+ You can index this doc like this:
53
+ ```Ruby
54
+ EsExperiment.create(:user)
55
+ ```
56
+ Also, it's possible to change values before indexing the doc:
57
+ ```Ruby
58
+ EsExperiment.create(:user, fields: { user_id: 123, 'address.street': 'Portland St.'})
59
+ ```
60
+
61
+ #### Document with children docs
62
+ TODO: Write usage instructions here
63
+
64
+ ## Development
65
+
66
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `docker-compose up` after that `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
67
+
68
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
69
+
70
+ ## Contributing
71
+
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/es_experiment. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
73
+
74
+ ## License
75
+
76
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
77
+
78
+ ## Code of Conduct
79
+
80
+ Everyone interacting in the EsExperiment project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/es_experiment/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'es_experiment'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,23 @@
1
+ version: '3'
2
+ services:
3
+ elasticsearch:
4
+ image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
5
+ environment:
6
+ - cluster.name=pesquisa-profissionais
7
+ - http.cors.enabled=true
8
+ - http.cors.allow-origin=*
9
+ - discovery.type=single-node
10
+ - xpack.security.enabled=false
11
+ - xpack.monitoring.enabled=false
12
+ - xpack.graph.enabled=false
13
+ - xpack.watcher.enabled=false
14
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
15
+ ports:
16
+ - 9200:9200
17
+ - 9300:9300
18
+ volumes:
19
+ - esdata1:/usr/share/elasticsearch/data
20
+
21
+ volumes:
22
+ esdata1:
23
+ driver: local
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'es_experiment/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'es_experiment'
9
+ spec.version = EsExperiment::VERSION
10
+ spec.authors = ['Caio Penhalver']
11
+ spec.email = ['caio.penhalver@vagas.com.br']
12
+
13
+ spec.summary = 'Library that helps create and index documents in Elasticsearch'
14
+ spec.description = 'Library that helps create and index documents in Elasticsearch'
15
+ spec.homepage = 'https://github.com/VAGAScom'
16
+ spec.license = 'MIT'
17
+
18
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
19
+
20
+ spec.metadata['homepage_uri'] = 'https://github.com/VAGAScom'
21
+ spec.metadata['source_code_uri'] = 'https://github.com/VAGAScom'
22
+ spec.metadata['changelog_uri'] = 'https://github.com/VAGAScom'
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
28
+ end
29
+ spec.bindir = 'exe'
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ['lib']
32
+
33
+ spec.add_development_dependency 'bundler', '~> 2.0'
34
+ spec.add_development_dependency 'pry'
35
+ spec.add_development_dependency 'rake', '~> 10.0'
36
+ spec.add_development_dependency 'rspec', '~> 3.0'
37
+ spec.add_development_dependency 'rubocop'
38
+ spec.add_development_dependency 'simplecov'
39
+
40
+ spec.add_dependency 'elasticsearch'
41
+ spec.add_dependency 'oj'
42
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'elasticsearch'
4
+ require 'singleton'
5
+ require 'oj'
6
+
7
+ require 'es_experiment/version'
8
+ require 'es_experiment/actions'
9
+ require 'es_experiment/config'
10
+ require 'es_experiment/documents'
11
+ require 'es_experiment/client'
12
+
13
+ module EsExperiment
14
+ extend EsExperiment::Actions
15
+
16
+ class << self
17
+ def reset_index
18
+ delete_index
19
+ create_index
20
+ end
21
+
22
+ def configure
23
+ yield EsExperiment::Config.instance
24
+ end
25
+ end
26
+
27
+ class Error < StandardError; end
28
+ # Your code goes here...
29
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'actions/create'
4
+ require_relative 'actions/create_list'
5
+ require_relative 'actions/create_index'
6
+ require_relative 'actions/delete_index'
7
+
8
+ module EsExperiment::Actions
9
+ include EsExperiment::Actions::Create
10
+ include EsExperiment::Actions::CreateList
11
+ include EsExperiment::Actions::CreateIndex
12
+ include EsExperiment::Actions::DeleteIndex
13
+
14
+ private
15
+
16
+ def client
17
+ EsExperiment::Client.instance.connection(config)
18
+ end
19
+
20
+ def config
21
+ EsExperiment::Config.instance
22
+ end
23
+
24
+ def documents
25
+ EsExperiment::Documents.instance.load(config)
26
+ end
27
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EsExperiment::Actions
4
+ module Create
5
+ def create(name, options = {})
6
+ client.index params(name, options)
7
+ end
8
+
9
+ private
10
+
11
+ def params(name, options)
12
+ { index: config.index,
13
+ type: options[:type] || '_doc',
14
+ id: options[:id],
15
+ body: doc(name, options),
16
+ version: options[:version],
17
+ version_type: options[:version_type],
18
+ routing: options[:routing],
19
+ refresh: true }.compact
20
+ end
21
+
22
+ def doc(name, options)
23
+ doc = documents.get(name)
24
+ update(doc, options[:fields]) unless options[:fields].nil?
25
+ doc
26
+ end
27
+
28
+ # rubocop:disable Security/Eval
29
+ def update(doc, fields)
30
+ fields.each do |full_key, value|
31
+ eval <<-RUBY, binding, __FILE__, __LINE__ + 1
32
+ doc#{parse_key(full_key)} = #{parse_value(value)}
33
+ RUBY
34
+ end
35
+ end
36
+ # rubocop:enable Security/Eval
37
+
38
+ def parse_key(full_key)
39
+ full_key
40
+ .to_s
41
+ .split('.')
42
+ .map { |key| "['#{key}']" }
43
+ .join
44
+ end
45
+
46
+ def parse_value(value)
47
+ return "'#{value}'" if value.is_a? String
48
+
49
+ value
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EsExperiment::Actions
4
+ module CreateIndex
5
+ def create_index
6
+ client.indices.create index: config.index, body: config.schema
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EsExperiment::Actions
4
+ module CreateList
5
+ def create_list(name)
6
+ docs = documents.get(name)
7
+ docs = docs.map do |doc|
8
+ { index: { _index: config.index, _type: '_doc', data: doc } }
9
+ end
10
+ client.bulk(body: docs, refresh: true)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EsExperiment::Actions
4
+ module DeleteIndex
5
+ def delete_index
6
+ client.indices.delete index: [config.index], ignore: 404
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EsExperiment::Client
4
+ include Singleton
5
+
6
+ def connection(config, tries = 0)
7
+ return @conn if @conn&.cluster&.health
8
+
9
+ conn = Elasticsearch::Client.new(host: config.url)
10
+ conn.cluster.health
11
+ @conn = conn
12
+ rescue Faraday::ConnectionFailed
13
+ raise EsExperiment::ConexaoError if config.connection_tries == tries
14
+
15
+ sleep config.time_between_connection_tries
16
+
17
+ tries += 1
18
+ connection(config, tries)
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EsExperiment::Config
4
+ include Singleton
5
+ attr_accessor :connection_tries,
6
+ :documents_path,
7
+ :schema_path,
8
+ :index,
9
+ :url
10
+ attr_writer :time_between_connection_tries
11
+
12
+ def time_between_connection_tries
13
+ @time_between_connection_tries || 3
14
+ end
15
+
16
+ def schema
17
+ @schema ||= Oj.load(File.read(File.join(Dir.pwd, schema_path)))
18
+ end
19
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EsExperiment::Documents
4
+ include Singleton
5
+
6
+ def get(key)
7
+ factories[key.to_sym]
8
+ end
9
+
10
+ def set(key, value)
11
+ factories[key.to_sym] = value
12
+ end
13
+
14
+ def load(config)
15
+ self.factories = {}
16
+ doc_path = config.documents_path
17
+ Dir.foreach(doc_path) do |file|
18
+ next unless valid_file?(config.schema_path, file)
19
+
20
+ load_doc(doc_path, file)
21
+ end
22
+ self
23
+ end
24
+
25
+ private
26
+
27
+ attr_accessor :factories
28
+
29
+ def valid_file?(schema_path, file)
30
+ schema = File.basename(schema_path)
31
+ schema != file && file.include?('.json')
32
+ end
33
+
34
+ def load_doc(doc_path, file)
35
+ name = File.basename(file, '.json')
36
+ data = Oj.load(File.read(File.join(Dir.pwd, doc_path, file)))
37
+ set(name, data)
38
+ end
39
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EsExperiment::ConexaoError < StandardError
4
+ def initialize(msg = 'Conexão com ES falhou')
5
+ super msg
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EsExperiment
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,182 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: es_experiment
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Caio Penhalver
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-10-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: elasticsearch
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: oj
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Library that helps create and index documents in Elasticsearch
126
+ email:
127
+ - caio.penhalver@vagas.com.br
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".travis.yml"
135
+ - CODE_OF_CONDUCT.md
136
+ - Gemfile
137
+ - Gemfile.lock
138
+ - LICENSE.txt
139
+ - README.md
140
+ - Rakefile
141
+ - bin/console
142
+ - bin/setup
143
+ - docker-compose.yml
144
+ - es_experiment.gemspec
145
+ - lib/es_experiment.rb
146
+ - lib/es_experiment/actions.rb
147
+ - lib/es_experiment/actions/create.rb
148
+ - lib/es_experiment/actions/create_index.rb
149
+ - lib/es_experiment/actions/create_list.rb
150
+ - lib/es_experiment/actions/delete_index.rb
151
+ - lib/es_experiment/client.rb
152
+ - lib/es_experiment/config.rb
153
+ - lib/es_experiment/documents.rb
154
+ - lib/es_experiment/exceptions/conexao_error.rb
155
+ - lib/es_experiment/version.rb
156
+ homepage: https://github.com/VAGAScom
157
+ licenses:
158
+ - MIT
159
+ metadata:
160
+ homepage_uri: https://github.com/VAGAScom
161
+ source_code_uri: https://github.com/VAGAScom
162
+ changelog_uri: https://github.com/VAGAScom
163
+ post_install_message:
164
+ rdoc_options: []
165
+ require_paths:
166
+ - lib
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ required_rubygems_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ requirements: []
178
+ rubygems_version: 3.0.6
179
+ signing_key:
180
+ specification_version: 4
181
+ summary: Library that helps create and index documents in Elasticsearch
182
+ test_files: []