Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ gem "ruby-magic", "~> 0.6"
gem "shoryuken", "~> 7.0", require: false
gem "statsd-instrument", "~> 3.11"
gem "validates_formatting_of", "~> 0.9"
gem "opensearch-ruby", "~> 3.4"
gem "opensearch-ruby", "4.0.0.pre.beta.5"
gem "searchkick", "~> 6.1"
gem "faraday_middleware-aws-sigv4", "~> 1.0"
gem "xml-simple", "~> 1.1"
Expand Down
12 changes: 5 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ GEM
mocha (3.1.0)
ruby2_keywords (>= 0.0.5)
msgpack (1.8.1)
multi_json (1.21.1)
multi_xml (0.9.1)
bigdecimal (>= 3.1, < 5)
multipart-post (2.4.1)
Expand Down Expand Up @@ -570,9 +569,9 @@ GEM
tzinfo
validate_url
webfinger (~> 2.0)
opensearch-ruby (3.4.0)
faraday (>= 1.0, < 3)
multi_json (>= 1.0)
opensearch-ruby (4.0.0.pre.beta.5)
faraday (~> 2.0)
logger
openssl (3.3.3)
openssl-signature_algorithm (1.3.0)
openssl (> 2.0)
Expand Down Expand Up @@ -978,7 +977,7 @@ DEPENDENCIES
omniauth-github (~> 2.0)
omniauth-rails_csrf_protection (~> 2.0)
openid_connect (~> 2.5)
opensearch-ruby (~> 3.4)
opensearch-ruby (= 4.0.0.pre.beta.5)
pagy (~> 8.4)
pg (~> 1.6)
pg_query (~> 6.2)
Expand Down Expand Up @@ -1217,7 +1216,6 @@ CHECKSUMS
minitest-retry (0.3.1) sha256=9b8282c5c1684a04b330526b90f39e42b7cec1b91abf70af6526e64131df186f
mocha (3.1.0) sha256=75f42d69ebfb1f10b32489dff8f8431d37a418120ecdfc07afe3bc183d4e1d56
msgpack (1.8.1) sha256=3fef787cd3965fd119c08a22724a56a93ca25008c3421fc15039f603a8b7c86c
multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
multi_xml (0.9.1) sha256=7ce766b59c17241ed62976caeae1fae9b2431b263398c35396239a68c4a64e57
multipart-post (2.4.1) sha256=9872d03a8e552020ca096adadbf5e3cb1cd1cdd6acd3c161136b8a5737cdb4a8
mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751
Expand All @@ -1243,7 +1241,7 @@ CHECKSUMS
omniauth-oauth2 (1.9.0) sha256=ed15f6d9d20991807ce114cc5b9c1453bce3645b64e51c68c90cff5ff153fee8
omniauth-rails_csrf_protection (2.0.1) sha256=c6e3204d7e3925bb537cb52d50fdfc9f05293f1a9d87c5d4ab4ca3a39ba8c32d
openid_connect (2.5.0) sha256=659aff8edce0907798e3f6837e5f27ae2937ae8735216f3e900ab8daa29e39c4
opensearch-ruby (3.4.0) sha256=0a8621686bed3c59b4c23e08cbaef873685a3fe4568e9d2703155ca92b8ca05d
opensearch-ruby (4.0.0.pre.beta.5) sha256=9f81be4a03456d615616ef9c3f453ba6a9cacb15f318f7008aa40597434e4aa0
openssl (3.3.3) sha256=d46902138f2987c13122fab826030a11c2bb9b8a16394215cbfc5062c5e2d335
openssl-signature_algorithm (1.3.0) sha256=a3b40b5e8276162d4a6e50c7c97cdaf1446f9b2c3946a6fa2c14628e0c957e80
optimist (3.2.1) sha256=8cf8a0fd69f3aa24ab48885d3a666717c27bc3d9edd6e976e18b9d771e72e34e
Expand Down
4 changes: 2 additions & 2 deletions app/models/concerns/rubygem_searchable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module RubygemSearchable
}
scope :search_import, -> { includes(:linkset, :gem_download, :most_recent_version, :versions, :latest_version) }

def search_data # rubocop:disable Metrics/MethodLength
def search_data # rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity
if (latest_version = most_recent_version)
deps = latest_version.dependencies.to_a
versioned_links = links(latest_version)
Expand Down Expand Up @@ -61,7 +61,7 @@ def search_data # rubocop:disable Metrics/MethodLength
yanked: versions.none?(&:indexed?),
summary: latest_version&.summary,
description: latest_version&.description,
updated: updated_at,
updated: updated_at&.utc&.iso8601,
dependencies: {
development: deps&.select { |r| r.rubygem && r.scope == "development" },
runtime: deps&.select { |r| r.rubygem && r.scope == "runtime" }
Expand Down
18 changes: 0 additions & 18 deletions config/initializers/opensearch_multi_json_serializer_patch.rb

This file was deleted.

15 changes: 0 additions & 15 deletions config/initializers/sawyer_multi_json_serializer_patch.rb

This file was deleted.

2 changes: 1 addition & 1 deletion test/integration/pusher_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def two_cert_chain(signing_key:, root_not_before: Time.current, cert_not_before:
"yanked" => false,
"summary" => "old summary",
"description" => "Some awesome gem",
"updated" => "2016-07-04T00:00:00.000Z",
"updated" => "2016-07-04T00:00:00Z",
"dependencies" => { "development" => [], "runtime" => [] },
"suggest" => { "input" => "gemsgemsgems", "weight" => 0, "contexts" => { "yanked" => false } }
}
Expand Down
2 changes: 1 addition & 1 deletion test/models/concerns/rubygem_searchable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RubygemSearchableTest < ActiveSupport::TestCase
yanked: false,
summary: "some summary",
description: "some description",
updated: @rubygem.updated_at,
updated: @rubygem.updated_at.utc.iso8601,
dependencies: { development: [@dev_dep], runtime: [@run_dep] }
}

Expand Down
2 changes: 1 addition & 1 deletion test/models/rubygem_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ class RubygemTest < ActiveSupport::TestCase
}
)

hash = MultiJSON.parse(@rubygem.to_json)
hash = JSON.parse(@rubygem.to_json)

assert_equal "http://example.com/home", hash["homepage_uri"]
assert_equal "http://example.com/wiki", hash["wiki_uri"]
Expand Down
Loading