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

pulibrary / pdc_describe / cace366a-ffad-45f1-9b60-678e607fa527

14 May 2024 02:21PM UTC coverage: 60.862% (-35.0%) from 95.908%
cace366a-ffad-45f1-9b60-678e607fa527

push

circleci

jrgriffiniii
wip

1 of 3 new or added lines in 2 files covered. (33.33%)

1194 existing lines in 57 files now uncovered.

2076 of 3411 relevant lines covered (60.86%)

22.71 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✔
UNCOV
13
      @name
×
14
    end
15

16
    def self.all
1✔
17
      @all ||= [
197✔
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 }
708✔
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