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

pulibrary / bibdata / b3c4a532-5da0-46f8-9c20-20018605a028

21 Mar 2025 08:11PM UTC coverage: 42.257% (-49.9%) from 92.185%
b3c4a532-5da0-46f8-9c20-20018605a028

push

circleci

sandbergja
Move various gems from the default Gemfile group to a more appropriate group

1599 of 3784 relevant lines covered (42.26%)

2.56 hits per line

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

33.33
/app/models/user.rb
1
class User < ActiveRecord::Base
1✔
2
  devise :database_authenticatable,
1✔
3
         :rememberable, :trackable, :validatable,
4
         :omniauthable
5

6
  def self.from_cas(access_token)
1✔
7
    User.where(provider: access_token.provider, uid: access_token.uid).first_or_create do |user|
×
8
      user.uid = access_token.uid
×
9
      user.username = access_token.uid
×
10
      user.email = "#{access_token.uid}@princeton.edu"
×
11
      user.password = SecureRandom.urlsafe_base64
×
12
      user.provider = access_token.provider
×
13
    end
14
  end
15

16
  # Determines whether or not a given user is a catalog administrator
17
  # @return [TrueClass, FalseClass]
18
  def catalog_admin?
1✔
19
    netids = Rails.application.config.authz
×
20
    netids.include? uid
×
21
  end
22
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

© 2025 Coveralls, Inc