zelastic 0.5.1 → 0.7.0

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
- SHA1:
3
- metadata.gz: 7688ccc666c5845c29e20e163691a19f35ee368d
4
- data.tar.gz: 6de7dbb95705106006706f62d03425345d7509c1
2
+ SHA256:
3
+ metadata.gz: 82591810835538bb7b3ede975d3731fc2b3300dfa9934f72f81ed323458c8145
4
+ data.tar.gz: c7631b4cb764dbfffdf4efd35296b9b9c5d5ce790c03464c7ba584ad060cae47
5
5
  SHA512:
6
- metadata.gz: 113fedb974cb28813e3b8084dbec4dd154b2821afcd0127cbef7b6874b0438b5986fa336bdcc2159502f0869d9f2455ce836907821026393e0814a6e36350456
7
- data.tar.gz: 8af284f5e38267416325426ea8a72ad62a485698ee51e2e66790bac8590e9e3e6a61c1b85671e31bf0ec35c3d63a9dbbc8c3017abb28ef6d655021b666140975
6
+ metadata.gz: 43647ec72340be7b8a4121eb7190d74844ad3284f38457dbe6948ddd81d4ed46fe9c2c7b9b8ae057db07b506efb5c2e7393f5eba43e209ecbf49dd58ec22b70c
7
+ data.tar.gz: 1b834cba1e6bffd46e108528b3d0eac68ca3766b86c5a28741db3c838b71d9c509cd1e42ac6dd82ff5f9ed7fc99a7cf1534507fc48b3fd1b388980ebbf0b33cd
data/.circleci/config.yml CHANGED
@@ -1,65 +1,47 @@
1
- references:
2
- ruby: &ruby
3
- image: carwow/ruby-ci:2.4.4
4
- environment:
5
- ELASTICSEARCH_URL: http://localhost:9200
6
-
7
- elasticsearch_container: &elasticsearch_container
8
- image: carwow/elasticsearch-ci:5.5.1
1
+ version: 2.1
9
2
 
10
- version: 2
11
3
  jobs:
12
- bundle:
13
- working_directory: ~/zelastic
14
- docker:
15
- - *ruby
16
- steps:
17
- - checkout
18
- - restore_cache:
19
- keys:
20
- - bundle-{{ checksum "Gemfile.lock" }}
21
- - bundle-
22
- - run: |
23
- bundle config --local path vendor/bundle &&
24
- bundle check || bundle install --jobs=4 --retry=3
25
- bundle clean --force
26
- - save_cache:
27
- key: bundle-{{ checksum "Gemfile.lock" }}
28
- paths: [vendor/bundle]
29
-
30
- rubocop:
31
- working_directory: ~/zelastic
4
+ test:
5
+ parameters:
6
+ ruby_version:
7
+ type: string
8
+ elasticsearch_version:
9
+ type: string
10
+ elasticsearch_gem_version:
11
+ type: string
32
12
  docker:
33
- - *ruby
34
- steps:
35
- - checkout
36
- - restore_cache: { keys: ['bundle-{{ checksum "Gemfile.lock" }}'] }
37
- - run: bundle exec rubocop
38
-
39
- tests:
40
- working_directory: ~/zelastic
41
- docker:
42
- - *ruby
43
- - *elasticsearch_container
13
+ - image: "cimg/ruby:<< parameters.ruby_version >>"
14
+ - image: "elasticsearch:<< parameters.elasticsearch_version >>"
15
+ environment:
16
+ "discovery.type": single-node
17
+ environment:
18
+ ELASTICSEARCH_GEM_VERSION: "<< parameters.elasticsearch_gem_version >>"
44
19
  steps:
45
20
  - checkout
46
- - restore_cache: { keys: ['bundle-{{ checksum "Gemfile.lock" }}'] }
47
- - run:
48
- name: Wait for ES to be ready
49
- command: |
50
- until curl $ELASTICSEARCH_URL/_cat/health | egrep '(green|yellow)' 2>&1 > /dev/null; do
51
- echo -n .
52
- sleep 1
53
- done
54
- - run: |
55
- bundle exec rspec --pattern "**/*_spec.rb" --format "progress"
21
+ - run: bin/setup
22
+ - run: bin/rubocop
23
+ - run: dockerize -wait http://localhost:9200 -timeout 1m
24
+ - run: bin/rspec
56
25
 
57
26
  workflows:
58
27
  version: 2
59
- build:
28
+ test:
60
29
  jobs:
61
- - bundle
62
- - rubocop:
63
- requires: [bundle]
64
- - tests:
65
- requires: [bundle]
30
+ - test:
31
+ name: "test with elasticsearch v7
32
+ and gem << matrix.elasticsearch_gem_version >>
33
+ and ruby v<< matrix.ruby_version >>"
34
+ elasticsearch_version: "7.17.5"
35
+ matrix:
36
+ parameters:
37
+ ruby_version: ["3.1", "2.7"]
38
+ elasticsearch_gem_version: ["~> 7", "~> 5"]
39
+ - test:
40
+ name: "test with elasticsearch v5
41
+ and gem ~> 5
42
+ and ruby v<< matrix.ruby_version >>"
43
+ elasticsearch_version: "5.6-alpine"
44
+ elasticsearch_gem_version: "~> 5"
45
+ matrix:
46
+ parameters:
47
+ ruby_version: ["3.1", "2.7"]
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: '09:00'
8
+ timezone: 'Europe/London'
9
+ open-pull-requests-limit: 10
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /Gemfile.lock
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
data/.rubocop.yml CHANGED
@@ -1,24 +1,10 @@
1
- inherit_from: .rubocop_todo.yml
1
+ inherit_gem:
2
+ carwow_rubocop:
3
+ - config/default.yml
2
4
 
3
- AllCops:
4
- TargetRubyVersion: 2.4
5
+ inherit_mode:
6
+ merge:
7
+ - Exclude
5
8
 
6
- # Configuration parameters: CountComments, ExcludedMethods.
7
- Metrics/BlockLength:
8
- Exclude:
9
- - '*.gemspec'
10
- - 'spec/**/*'
11
-
12
- # Configuration parameters: CountComments.
13
- Metrics/MethodLength:
14
- Max: 18
15
-
16
- # Offense count: 2
17
- Style/Documentation:
18
- Exclude:
19
- - '**/*'
20
-
21
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
22
- # URISchemes: http, https
23
- Metrics/LineLength:
24
- Max: 100
9
+ Metrics:
10
+ Enabled: false
data/Gemfile CHANGED
@@ -3,3 +3,5 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ gem 'elasticsearch', ENV['ELASTICSEARCH_GEM_VERSION'] if ENV['ELASTICSEARCH_GEM_VERSION']
data/bin/rspec ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
12
+
13
+ bundle_binstub = File.expand_path('bundle', __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require 'rubygems'
25
+ require 'bundler/setup'
26
+
27
+ load Gem.bin_path('rspec-core', 'rspec')
data/bin/rubocop ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
12
+
13
+ bundle_binstub = File.expand_path('bundle', __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require 'rubygems'
25
+ require 'bundler/setup'
26
+
27
+ load Gem.bin_path('rubocop', 'rubocop')
@@ -15,9 +15,14 @@ module Zelastic
15
15
  @data_source = data_source
16
16
  @mapping = mapping
17
17
  @index_data = index_data
18
+ @_type = overrides.fetch(:type, true)
18
19
  @overrides = overrides
19
20
  end
20
21
 
22
+ def type?
23
+ @_type
24
+ end
25
+
21
26
  def index_data(model)
22
27
  @index_data.call(model)
23
28
  end
@@ -36,13 +41,14 @@ module Zelastic
36
41
 
37
42
  def logger
38
43
  return Rails.logger if defined?(Rails)
39
- @logger ||= Logger.new(STDOUT)
44
+
45
+ @logger ||= Logger.new($stdout)
40
46
  end
41
47
 
42
48
  def index_definition
43
49
  {
44
50
  settings: overrides.fetch(:index_settings, {}),
45
- mappings: { type => mapping }
51
+ mappings: type ? { type => mapping } : mapping
46
52
  }
47
53
  end
48
54
 
@@ -25,7 +25,6 @@ module Zelastic
25
25
  end
26
26
  end
27
27
 
28
- # rubocop:disable Metrics/AbcSize
29
28
  def switch_read_index(new_name)
30
29
  new_index = [config.read_alias, new_name].join('_')
31
30
 
@@ -37,12 +36,14 @@ module Zelastic
37
36
  remove_action =
38
37
  ({ remove: { index: old_index, alias: config.read_alias } } if old_index)
39
38
 
40
- client.indices.update_aliases(body: {
41
- actions: [
42
- remove_action,
43
- { add: { index: new_index, alias: config.read_alias } }
44
- ].compact
45
- })
39
+ client.indices.update_aliases(
40
+ body: {
41
+ actions: [
42
+ remove_action,
43
+ { add: { index: new_index, alias: config.read_alias } }
44
+ ].compact
45
+ }
46
+ )
46
47
  end
47
48
 
48
49
  def stop_dual_writes
@@ -52,14 +53,15 @@ module Zelastic
52
53
  logger.info("Currently used index is #{current_index}")
53
54
 
54
55
  other_write_indices = client.indices.get_alias(name: config.write_alias).keys
55
- .reject { |name| name == current_index }
56
+ .reject { |name| name == current_index }
56
57
 
57
58
  if other_write_indices.none?
58
59
  logger.info("No write indexes that aren't the read index. Nothing to do!")
59
60
  return
60
61
  end
61
62
  logger.info("Stopping writes to #{other_write_indices.count} old ES indices: " \
62
- "#{other_write_indices.join(', ')}")
63
+ "#{other_write_indices.join(', ')}"
64
+ )
63
65
 
64
66
  actions = other_write_indices.map do |index|
65
67
  { remove: { index: index, alias: config.write_alias } }
@@ -74,11 +76,11 @@ module Zelastic
74
76
  logger.info("Currently used index is #{current_index}")
75
77
 
76
78
  indices_to_delete = client
77
- .cat
78
- .indices(format: :json)
79
- .map { |index| index['index'] }
80
- .select { |name| name.start_with?(config.read_alias) }
81
- .reject { |name| name == current_index }
79
+ .cat
80
+ .indices(format: :json)
81
+ .map { |index| index['index'] }
82
+ .select { |name| name.start_with?(config.read_alias) }
83
+ .reject { |name| name == current_index }
82
84
 
83
85
  if indices_to_delete.none?
84
86
  logger.info('Nothing to do: no old indices')
@@ -89,11 +91,11 @@ module Zelastic
89
91
  )
90
92
  client.indices.delete(index: indices_to_delete)
91
93
  end
92
- # rubocop:enable Metrics/AbcSize
93
94
 
94
95
  private
95
96
 
96
97
  attr_reader :config, :client
98
+
97
99
  def_delegators :config, :logger
98
100
 
99
101
  def indexer
@@ -118,7 +120,14 @@ module Zelastic
118
120
  end
119
121
 
120
122
  def current_index_size
121
- @current_index_size ||= client.count(index: config.read_alias, type: config.type)['count']
123
+ @current_index_size ||= client.count(**count_params)['count']
124
+ end
125
+
126
+ def count_params
127
+ {
128
+ index: config.read_alias,
129
+ type: config.type? ? config.type : nil
130
+ }.compact
122
131
  end
123
132
 
124
133
  def indexed_percent(batch_size, batch_number)
@@ -17,19 +17,19 @@ module Zelastic
17
17
  @config = config
18
18
  end
19
19
 
20
- def index_batch(batch, client: nil, index_name: nil)
20
+ def index_batch(batch, client: nil, index_name: nil, refresh: false)
21
21
  version = current_version
22
- execute_bulk(client: client, index_name: index_name) do |index|
22
+ execute_bulk(client: client, index_name: index_name, refresh: refresh) do |index|
23
23
  batch.map do |record|
24
24
  index_command(index: index, version: version, record: record)
25
25
  end
26
26
  end
27
27
  end
28
28
 
29
- def index_record(record)
29
+ def index_record(record, refresh: false)
30
30
  version = current_version
31
31
 
32
- execute_bulk do |index_name|
32
+ execute_bulk(refresh: refresh) do |index_name|
33
33
  [index_command(index: index_name, version: version, record: record)]
34
34
  end
35
35
  end
@@ -43,13 +43,10 @@ module Zelastic
43
43
 
44
44
  execute_bulk do |index_name|
45
45
  ids.map do |id|
46
- {
47
- delete: {
48
- _index: index_name,
49
- _type: config.type,
50
- _id: id
51
- }
52
- }
46
+ delete_params = { _index: index_name, _id: id }
47
+ delete_params[:_type] = config.type if config.type?
48
+
49
+ { delete: delete_params }
53
50
  end
54
51
  end
55
52
  end
@@ -65,12 +62,13 @@ module Zelastic
65
62
  private
66
63
 
67
64
  attr_reader :config
65
+
68
66
  def_delegators :config, :logger
69
67
 
70
68
  def current_version
71
69
  config.data_source.connection
72
- .select_one('SELECT txid_snapshot_xmax(txid_current_snapshot()) as xmax')
73
- .fetch('xmax')
70
+ .select_one('SELECT txid_snapshot_xmax(txid_current_snapshot()) as xmax')
71
+ .fetch('xmax')
74
72
  end
75
73
 
76
74
  def write_indices(client)
@@ -78,27 +76,31 @@ module Zelastic
78
76
  end
79
77
 
80
78
  def index_command(index:, version:, record:)
79
+ version_params =
80
+ if config.type?
81
+ { _version: version, _version_type: :external, _type: config.type }
82
+ else
83
+ { version: version, version_type: :external }
84
+ end
85
+
81
86
  {
82
87
  index: {
83
88
  _index: index,
84
- _type: config.type,
85
89
  _id: record.id,
86
- _version: version,
87
- _version_type: :external,
88
90
  data: config.index_data(record)
89
- }
91
+ }.merge(version_params)
90
92
  }
91
93
  end
92
94
 
93
- def execute_bulk(client: nil, index_name: nil)
95
+ def execute_bulk(client: nil, index_name: nil, refresh: false, &block)
94
96
  clients = Array(client || config.clients)
95
97
 
96
98
  clients.map do |current_client|
97
99
  indices = Array(index_name || write_indices(current_client))
98
100
 
99
- commands = indices.flat_map { |index| yield(index) }
101
+ commands = indices.flat_map(&block)
100
102
 
101
- current_client.bulk(body: commands).tap do |result|
103
+ current_client.bulk(body: commands, refresh: refresh).tap do |result|
102
104
  check_errors!(result)
103
105
  end
104
106
  end
@@ -108,22 +110,27 @@ module Zelastic
108
110
  return false unless result['errors']
109
111
 
110
112
  errors = result['items']
111
- .map { |item| item['error'] || item.fetch('index', {})['error'] }
112
- .compact
113
+ .filter_map { |item| item['error'] || item.fetch('index', {})['error'] }
113
114
 
114
115
  ignorable_errors, important_errors = errors
115
- .partition { |error| ignorable_error?(error) }
116
+ .partition { |error| ignorable_error?(error) }
116
117
 
117
118
  logger.warn("Ignoring #{ignorable_errors.count} version conflicts") if ignorable_errors.any?
118
119
 
119
120
  return unless important_errors.any?
121
+
120
122
  raise IndexingError, important_errors
121
123
  end
122
124
 
123
125
  def ignorable_error?(error)
124
- # rubocop:disable Metrics/LineLength
125
- regexp = /^\[#{config.type}\]\[\d+\]: version conflict, current version \[\d+\] is higher or equal to the one provided \[\d+\]$/
126
- # rubocop:enable Metrics/LineLength
126
+ # rubocop:disable Layout/LineLength
127
+ regexp =
128
+ if config.type?
129
+ /^\[#{config.type}\]\[\d+\]: version conflict, current version \[\d+\] is higher or equal to the one provided \[\d+\]$/
130
+ else
131
+ /^\[\d+\]: version conflict, current version \[\d+\] is higher or equal to the one provided \[\d+\]$/
132
+ end
133
+ # rubocop:enable Layout/LineLength
127
134
  error['type'] == 'version_conflict_engine_exception' &&
128
135
  error['reason'] =~ regexp
129
136
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zelastic
4
- VERSION = '0.5.1'
4
+ VERSION = '0.7.0'
5
5
  end
data/zelastic.gemspec CHANGED
@@ -1,7 +1,6 @@
1
-
2
1
  # frozen_string_literal: true
3
2
 
4
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
5
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
5
  require 'zelastic/version'
7
6
 
@@ -26,10 +25,10 @@ Gem::Specification.new do |spec|
26
25
  spec.add_dependency 'activesupport'
27
26
 
28
27
  spec.add_development_dependency 'activerecord'
29
- spec.add_development_dependency 'bundler'
30
- spec.add_development_dependency 'elasticsearch'
31
- spec.add_development_dependency 'pry'
32
- spec.add_development_dependency 'rake'
33
- spec.add_development_dependency 'rspec'
34
- spec.add_development_dependency 'rubocop'
28
+ spec.add_development_dependency 'bundler', '~> 2'
29
+ spec.add_development_dependency 'carwow_rubocop', '~> 4'
30
+ spec.add_development_dependency 'elasticsearch', '>= 5', '< 8'
31
+ spec.add_development_dependency 'pry', '~> 0.14'
32
+ spec.add_development_dependency 'rake', '~> 13'
33
+ spec.add_development_dependency 'rspec', '~> 3'
35
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zelastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - carwow Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -42,86 +42,92 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2'
55
55
  - !ruby/object:Gem::Dependency
56
- name: elasticsearch
56
+ name: carwow_rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '4'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '4'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
70
+ name: elasticsearch
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '5'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '8'
76
79
  type: :development
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
83
  - - ">="
81
84
  - !ruby/object:Gem::Version
82
- version: '0'
85
+ version: '5'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '8'
83
89
  - !ruby/object:Gem::Dependency
84
- name: rake
90
+ name: pry
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ">="
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '0'
95
+ version: '0.14'
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ">="
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '0'
102
+ version: '0.14'
97
103
  - !ruby/object:Gem::Dependency
98
- name: rspec
104
+ name: rake
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - ">="
107
+ - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '0'
109
+ version: '13'
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - ">="
114
+ - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: '0'
116
+ version: '13'
111
117
  - !ruby/object:Gem::Dependency
112
- name: rubocop
118
+ name: rspec
113
119
  requirement: !ruby/object:Gem::Requirement
114
120
  requirements:
115
- - - ">="
121
+ - - "~>"
116
122
  - !ruby/object:Gem::Version
117
- version: '0'
123
+ version: '3'
118
124
  type: :development
119
125
  prerelease: false
120
126
  version_requirements: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - ">="
128
+ - - "~>"
123
129
  - !ruby/object:Gem::Version
124
- version: '0'
130
+ version: '3'
125
131
  description: An index manager for Elasticsearch and ActiveRecord
126
132
  email:
127
133
  - developers@carwow.co.uk
@@ -130,17 +136,18 @@ extensions: []
130
136
  extra_rdoc_files: []
131
137
  files:
132
138
  - ".circleci/config.yml"
139
+ - ".github/dependabot.yml"
133
140
  - ".gitignore"
134
141
  - ".rspec"
135
142
  - ".rubocop.yml"
136
- - ".rubocop_todo.yml"
137
143
  - CHANGELOG.md
138
144
  - Gemfile
139
- - Gemfile.lock
140
145
  - LICENSE.txt
141
146
  - README.md
142
147
  - Rakefile
143
148
  - bin/console
149
+ - bin/rspec
150
+ - bin/rubocop
144
151
  - bin/setup
145
152
  - lib/zelastic.rb
146
153
  - lib/zelastic/config.rb
@@ -152,7 +159,7 @@ homepage: https://github.com/carwow/zelastic
152
159
  licenses:
153
160
  - MIT
154
161
  metadata: {}
155
- post_install_message:
162
+ post_install_message:
156
163
  rdoc_options: []
157
164
  require_paths:
158
165
  - lib
@@ -167,9 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
174
  - !ruby/object:Gem::Version
168
175
  version: '0'
169
176
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.6.14.1
172
- signing_key:
177
+ rubygems_version: 3.3.11
178
+ signing_key:
173
179
  specification_version: 4
174
180
  summary: Zero-downtime (re-)indexing of ActiveRecord models into Elasticsearch.
175
181
  test_files: []
data/.rubocop_todo.yml DELETED
@@ -1,32 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-05-27 17:11:31 +0100 using RuboCop version 0.52.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- Lint/ShadowingOuterLocalVariable:
11
- Exclude:
12
- - 'lib/zelastic/indexer.rb'
13
-
14
- # Offense count: 1
15
- Metrics/AbcSize:
16
- Max: 17
17
-
18
- # Offense count: 1
19
- # Configuration parameters: CountComments, ExcludedMethods.
20
- Metrics/BlockLength:
21
- Max: 83
22
-
23
- # Offense count: 4
24
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
25
- # URISchemes: http, https
26
- Metrics/LineLength:
27
- Max: 146
28
-
29
- # Offense count: 1
30
- Naming/AccessorMethodName:
31
- Exclude:
32
- - 'spec/zelastic/indexer_spec.rb'
data/Gemfile.lock DELETED
@@ -1,91 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- zelastic (0.5.1)
5
- activesupport
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (5.1.4)
11
- activesupport (= 5.1.4)
12
- activerecord (5.1.4)
13
- activemodel (= 5.1.4)
14
- activesupport (= 5.1.4)
15
- arel (~> 8.0)
16
- activesupport (5.1.4)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- arel (8.0.0)
22
- ast (2.3.0)
23
- coderay (1.1.2)
24
- concurrent-ruby (1.0.5)
25
- diff-lcs (1.3)
26
- elasticsearch (6.0.2)
27
- elasticsearch-api (= 6.0.2)
28
- elasticsearch-transport (= 6.0.2)
29
- elasticsearch-api (6.0.2)
30
- multi_json
31
- elasticsearch-transport (6.0.2)
32
- faraday
33
- multi_json
34
- faraday (0.15.2)
35
- multipart-post (>= 1.2, < 3)
36
- i18n (0.9.1)
37
- concurrent-ruby (~> 1.0)
38
- method_source (0.9.0)
39
- minitest (5.11.1)
40
- multi_json (1.13.1)
41
- multipart-post (2.0.0)
42
- parallel (1.12.1)
43
- parser (2.4.0.2)
44
- ast (~> 2.3)
45
- powerpack (0.1.1)
46
- pry (0.11.3)
47
- coderay (~> 1.1.0)
48
- method_source (~> 0.9.0)
49
- rainbow (3.0.0)
50
- rake (12.3.0)
51
- rspec (3.7.0)
52
- rspec-core (~> 3.7.0)
53
- rspec-expectations (~> 3.7.0)
54
- rspec-mocks (~> 3.7.0)
55
- rspec-core (3.7.1)
56
- rspec-support (~> 3.7.0)
57
- rspec-expectations (3.7.0)
58
- diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.7.0)
60
- rspec-mocks (3.7.0)
61
- diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.7.0)
63
- rspec-support (3.7.0)
64
- rubocop (0.52.1)
65
- parallel (~> 1.10)
66
- parser (>= 2.4.0.2, < 3.0)
67
- powerpack (~> 0.1)
68
- rainbow (>= 2.2.2, < 4.0)
69
- ruby-progressbar (~> 1.7)
70
- unicode-display_width (~> 1.0, >= 1.0.1)
71
- ruby-progressbar (1.9.0)
72
- thread_safe (0.3.6)
73
- tzinfo (1.2.4)
74
- thread_safe (~> 0.1)
75
- unicode-display_width (1.3.0)
76
-
77
- PLATFORMS
78
- ruby
79
-
80
- DEPENDENCIES
81
- activerecord
82
- bundler
83
- elasticsearch
84
- pry
85
- rake
86
- rspec
87
- rubocop
88
- zelastic!
89
-
90
- BUNDLED WITH
91
- 1.16.2