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

pulibrary / pdc_describe / 9091a1ae-29be-458c-984a-339d213919c4

12 Dec 2024 07:41PM UTC coverage: 26.434% (-69.7%) from 96.113%
9091a1ae-29be-458c-984a-339d213919c4

Pull #2000

circleci

jrgriffiniii
Removing integration with ActiveStorage
Pull Request #2000: Bump actionpack from 7.2.1.1 to 7.2.2.1

945 of 3575 relevant lines covered (26.43%)

0.35 hits per line

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

92.31
/app/models/pdc_metadata/rights.rb
1
# frozen_string_literal: true
2
# Class for representing a Rights statement
3
module PDCMetadata
1✔
4
  class Rights
1✔
5
    attr_accessor :identifier, :uri, :name
1✔
6
    def initialize(identifier:, uri:, name:)
1✔
7
      @identifier = identifier
9✔
8
      @uri = uri
9✔
9
      @name = name
9✔
10
    end
11

12
    def compare_value
1✔
13
      @name
×
14
    end
15

16
    def self.all
1✔
17
      @all ||= [
2✔
18
        Rights.new(identifier: "MIT", uri: "https://mit-license.org/", name: "MIT License"),
19
        Rights.new(identifier: "GPLv3", uri: "https://www.gnu.org/licenses/gpl-3.0.en.html", name: "GNU General Public License"),
20
        Rights.new(identifier: "CC BY", uri: "https://creativecommons.org/licenses/by/4.0/", name: "Creative Commons Attribution 4.0 International"),
21
        Rights.new(identifier: "CC BY-SA", uri: "https://creativecommons.org/licenses/by-sa/4.0/", name: "Creative Commons Attribution-ShareAlike 4.0 International"),
22
        Rights.new(identifier: "CC BY-NC", uri: "https://creativecommons.org/licenses/by-nc/4.0/", name: "Creative Commons Attribution-NonCommercial 4.0 International"),
23
        Rights.new(identifier: "CC BY-NC-SA", uri: "https://creativecommons.org/licenses/by-nc-sa/4.0/", name: "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"),
24
        Rights.new(identifier: "CC BY-ND", uri: "https://creativecommons.org/licenses/by-nd/4.0/", name: "Creative Commons Attribution-NoDerivatives 4.0 International"),
25
        Rights.new(identifier: "CC BY-NC-ND", uri: "https://creativecommons.org/licenses/by-nc-nd/4.0/", name: "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International"),
26
        Rights.new(identifier: "CC0", uri: "https://creativecommons.org/publicdomain/zero/1.0/", name: "Creative Commons 1.0 Universal - Public Domain Dedication")
27
      ]
28
    end
29

30
    def self.find(identifier)
1✔
31
      all.find { |rights| rights.identifier == identifier }
8✔
32
    end
33
  end
34
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