• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hathitrust / otis / 18407683494

10 Oct 2025 01:16PM UTC coverage: 97.58% (+0.03%) from 97.554%
18407683494

push

github

web-flow
Merge pull request #264 from hathitrust/ETT-298-rs-usage-stats

ETT-298: Resource sharing user stats

32 of 34 new or added lines in 7 files covered. (94.12%)

1 existing line in 1 file now uncovered.

3548 of 3636 relevant lines covered (97.58%)

92.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

21.43
/lib/tasks/clear_database.rake
1
# frozen_string_literal: true
2

3
namespace :otis do
2✔
4
  desc "Clears ht_repository and ht_web tables after system tests run"
2✔
5
  # System tests are currently seeded with Fakerized data.
6
  # This messes up the regular tests which expect empty tables.
7
  # bundle exec rake db:reset should work except of course Keycard has a hissy fit when you run it.
8
  task clear_database: :environment do
2✔
9
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.ht_billing_members")
×
10
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.ht_institutions")
×
11
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.ht_users")
×
12
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.otis_contact_types")
×
13
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.otis_contacts")
×
14
    ActiveRecord::Base.connection.execute("DELETE FROM ht_web.ht_counts")
×
15
    ActiveRecord::Base.connection.execute("DELETE FROM ht_web.otis_approval_requests")
×
16
    ActiveRecord::Base.connection.execute("DELETE FROM ht_web.otis_logs")
×
17
    ActiveRecord::Base.connection.execute("DELETE FROM ht_web.otis_registrations")
×
NEW
18
    ActiveRecord::Base.connection.execute("DELETE FROM ht_repository.otis_downloads")
×
19
    ActiveRecord::Base.connection.execute("DELETE FROM hathifiles.hf")
×
20
  end
21
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc