Skip to content

Commit

Permalink
Merge pull request #85 from doximity/MOFONETNAV-372
Browse files Browse the repository at this point in the history
Revert frozen string literal changes in 1.0.0
  • Loading branch information
mrsweaters committed Aug 16, 2022
2 parents 2683353 + b804ddb commit 191904b
Show file tree
Hide file tree
Showing 29 changed files with 6 additions and 56 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.0.1] - 2022-08-16
### Changed
- Revert the additional `frozen_string_literal` updates in 1.0.0 due to some issues with some classes. We'll update these in a separate release to isolate the problem.

## [1.0.0] - 2022-08-09
### Changed
- Consistently use quotations
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
es-elasticity (1.0.0)
es-elasticity (1.0.1)
activemodel (>= 5.2.0, < 7.1)
activerecord (>= 5.2.0, < 7.1)
activesupport (>= 5.2.0, < 7.1)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/base_document.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class BaseDocument
include ::ActiveModel::Model
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/bulk.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class Bulk
def initialize(client)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/config.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class Config
def client=(client)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/document.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class Document < BaseDocument
IndexMapper.set_delegates(singleton_class, :mapper)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/index_config.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class IndexConfig
class SubclassError < StandardError; end
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/index_mapper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class IndexMapper
def self.set_delegates(obj, to)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/instrumented_client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class InstrumentedClient
INDICES_METHODS = %w(exists create delete get_settings get_mapping flush refresh get_alias get_aliases put_alias delete_alias exists_alias update_aliases)
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/log_subscriber.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "active_support/subscriber"
require "active_support/log_subscriber"

Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/multi_search.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class MultiSearch
def initialize(msearch_args = {})
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/multi_search_response_parser.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class MultiSearchResponseParser
class UnknownError < StandardError; end
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/log_subscriber"

module Elasticity
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/search.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
module Search
def self.build(client, index_name, document_types, body, search_args = {})
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/segmented_document.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
class SegmentedDocument < BaseDocument
# Creates a new segment which behaves almost the same as a Document class dynamically
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/strategies.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
module Strategies
class IndexError < StandardError
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/strategies/alias_index.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
module Strategies
# This strategy keeps two aliases that might be mapped to the same index or different index, allowing
Expand Down
2 changes: 0 additions & 2 deletions lib/elasticity/strategies/single_index.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
module Strategies
class SingleIndex
Expand Down
4 changes: 1 addition & 3 deletions lib/elasticity/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

module Elasticity
VERSION = "1.0.0"
VERSION = "1.0.1"
end
2 changes: 0 additions & 2 deletions spec/functional/persistence_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

RSpec.describe "Persistence", elasticsearch: true do
def random_birthdate
Time.at(0.0 + rand * (Time.now.to_f - 0.0.to_f))
Expand Down
2 changes: 0 additions & 2 deletions spec/rspec_config.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "simplecov"
require "oj"
require "elasticity"
Expand Down
2 changes: 0 additions & 2 deletions spec/units/document_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/search"

RSpec.describe Elasticity::Document do
Expand Down
2 changes: 0 additions & 2 deletions spec/units/index_config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/index_config"

RSpec.describe Elasticity::IndexConfig do
Expand Down
2 changes: 0 additions & 2 deletions spec/units/index_mapper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/index_mapper"

RSpec.describe Elasticity::IndexMapper do
Expand Down
2 changes: 0 additions & 2 deletions spec/units/multi_search_response_parser_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/multi_search_response_parser"

RSpec.describe Elasticity::MultiSearchResponseParser do
Expand Down
2 changes: 0 additions & 2 deletions spec/units/multi_search_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/search"
require "elasticity/multi_search"

Expand Down
2 changes: 0 additions & 2 deletions spec/units/search_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require "elasticity/search"

RSpec.describe "Search" do
Expand Down
2 changes: 0 additions & 2 deletions spec/units/strategies/alias_index_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

RSpec.describe Elasticity::Strategies::AliasIndex, elasticsearch: true do
subject do
described_class.new(Elasticity.config.client, "test_index_name", "document")
Expand Down
2 changes: 0 additions & 2 deletions spec/units/strategies/single_index_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

RSpec.describe Elasticity::Strategies::SingleIndex, elasticsearch: true do
subject do
described_class.new(Elasticity.config.client, "test_index_name", "document")
Expand Down

0 comments on commit 191904b

Please sign in to comment.