Skip to content

Commit

Permalink
Pull out unused ORES code
Browse files Browse the repository at this point in the history
The ORES API is down now, so these remaining tests against it were breaking the build.
  • Loading branch information
ragesoss committed Oct 9, 2023
1 parent 8d22406 commit 878ba7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 163 deletions.
75 changes: 0 additions & 75 deletions lib/ores_api.rb

This file was deleted.

10 changes: 3 additions & 7 deletions spec/lib/lift_wing_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@

require 'rails_helper'
require "#{Rails.root}/lib/lift_wing_api"
require "#{Rails.root}/lib/ores_api"

describe LiftWingApi do
let(:rev_ids) { [641962088, 675892696] }

it 'returns the basically the same data as OresApi', vcr: true do
ores_output = OresApi.new(Wiki.first).get_revision_data rev_ids
it 'returns the basically the same data as ORES used to', vcr: true do
lift_wing_output = described_class.new(Wiki.first).get_revision_data rev_ids
digger = ['enwiki', 'scores', '641962088', 'articlequality',
'features', 'feature.english.stemmed.revision.stems_length']
first_rev_ores = ores_output.dig(*digger)
first_rev_liftwing = lift_wing_output.dig(*digger)
expect(first_rev_ores).to eq(first_rev_liftwing)
expect(first_rev_liftwing).to be_positive
end

it 'handles TextDeleted revs similarly', vcr: true do
ores_output = OresApi.new(Wiki.first).get_revision_data [708326238]
lift_wing_output = described_class.new(Wiki.first).get_revision_data [708326238]
# It doesn't need to have the exact same response,
# but it does need the error type in the same place.
digger = %w[enwiki scores 708326238 articlequality error type]
expect(ores_output.dig(*digger)).to eq(lift_wing_output.dig(*digger))
expect(lift_wing_output.dig(*digger)).to include('TextDeleted')
end
end
81 changes: 0 additions & 81 deletions spec/lib/ores_api_spec.rb

This file was deleted.

0 comments on commit 878ba7a

Please sign in to comment.