licensee 8.7.0 → 8.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 409f633d4be23f1510209f7829bec582d72bf880
4
- data.tar.gz: 9e047e3ba7a0d209653bdb0121137c825aed9b28
3
+ metadata.gz: 71b77f0b41423b227d1aa4342cd4fc42f434b05f
4
+ data.tar.gz: b5cc75dc25a0cea4bf0e805d3c8127b2d9ad4adf
5
5
  SHA512:
6
- metadata.gz: 9bc05051d0b12c781e5d3b4df6f3ab9370117eaec627a4419ac555830c36c8b9f02a0f9c5b57dbd932b561d2d30aac20fa9fade0f4e072704cf08a0a573d6d5f
7
- data.tar.gz: a1fa2e528dde49d623c14aafa69b2ae58b44e15caba9ed98ce46115f4f8d1bdbe0ece6600fafe7cb49f413c760fed77f001c5d537e1b06824047c02fcfd1c35c
6
+ metadata.gz: d32a7edf2c19a89107ca8284797c5fcbea5bb9a6fa9780b2346e2ed91ee584023d6845c603f58ff45f09e9d189177c18838668baf33b12a9ef4472405cb1adc3
7
+ data.tar.gz: 3f89e43e6b4df0b20ba52497a33bafc2e21e27cee20309be918f654a5afcff092ec00bd97b30c124c577105be29043d357d84561c644ad0dbaf0dc6bdb197945
data/README.md CHANGED
@@ -22,7 +22,7 @@ Licensee automates the process of reading `LICENSE` files and compares their con
22
22
 
23
23
  ## Installation
24
24
 
25
- `gem install licensee` or add `gem 'licensee'` to your project's `Gemfile`.
25
+ [`gem`](https://rubygems.org/pages/download)` install licensee` or add `gem 'licensee'` to your project's `Gemfile`.
26
26
 
27
27
  ## Documentation
28
28
 
data/lib/licensee.rb CHANGED
@@ -22,6 +22,7 @@ require_relative 'licensee/matchers/package_matcher'
22
22
  require_relative 'licensee/matchers/gemspec_matcher'
23
23
  require_relative 'licensee/matchers/npm_bower_matcher'
24
24
  require_relative 'licensee/matchers/cran_matcher'
25
+ require_relative 'licensee/matchers/dist_zilla_matcher'
25
26
 
26
27
  module Licensee
27
28
  # Over which percent is a match considered a match by default
@@ -4,6 +4,7 @@ require 'digest'
4
4
  module Licensee
5
5
  module ContentHelper
6
6
  DIGEST = Digest::SHA1
7
+ END_OF_TERMS_REGEX = /^\s*end of terms and conditions\s*$/i
7
8
 
8
9
  # A set of each word in the license, without duplicates
9
10
  def wordset
@@ -46,11 +47,47 @@ module Licensee
46
47
  def content_normalized
47
48
  return unless content
48
49
  @content_normalized ||= begin
49
- content_normalized = content.downcase.strip
50
- content_normalized.gsub!(/^#{Matchers::Copyright::REGEX}$/i, '')
51
- content_normalized.gsub!(/[=-]{4,}/, '') # Strip HRs from MPL
52
- content_normalized.tr("\n", ' ').squeeze(' ').strip
50
+ string = content.downcase.strip
51
+ string = strip_title(string) while string =~ title_regex
52
+ string = strip_version(string)
53
+ string = strip_copyright(string)
54
+ string = strip_hrs(string)
55
+ string, _partition, _instructions = string.partition(END_OF_TERMS_REGEX)
56
+ strip_whitespace(string)
53
57
  end
54
58
  end
59
+
60
+ private
61
+
62
+ def license_names
63
+ @license_titles ||= License.all(hidden: true).map do |license|
64
+ license.name_without_version.downcase.sub('*', 'u')
65
+ end
66
+ end
67
+
68
+ def title_regex
69
+ /\A(the )?#{Regexp.union(license_names)}.*$/i
70
+ end
71
+
72
+ def strip_title(string)
73
+ string.sub(title_regex, '').strip
74
+ end
75
+
76
+ def strip_version(string)
77
+ string.sub(/\Aversion.*$/i, '').strip
78
+ end
79
+
80
+ def strip_copyright(string)
81
+ string.gsub(/\A#{Matchers::Copyright::REGEX}$/i, '').strip
82
+ end
83
+
84
+ # Strip HRs from MPL
85
+ def strip_hrs(string)
86
+ string.gsub(/[=-]{4,}/, '')
87
+ end
88
+
89
+ def strip_whitespace(string)
90
+ string.tr("\n", ' ').squeeze(' ').strip
91
+ end
55
92
  end
56
93
  end
@@ -80,11 +80,7 @@ module Licensee
80
80
  def meta
81
81
  @meta ||= begin
82
82
  return YAML_DEFAULTS unless parts && parts[1]
83
- meta = if YAML.respond_to? :safe_load
84
- YAML.safe_load(parts[1])
85
- else
86
- YAML.load(parts[1])
87
- end
83
+ meta = YAML.safe_load(parts[1])
88
84
  YAML_DEFAULTS.merge(meta)
89
85
  end
90
86
  end
@@ -115,6 +111,11 @@ module Licensee
115
111
  key == 'gpl-2.0' || key == 'gpl-3.0'
116
112
  end
117
113
 
114
+ # Is this license a Creative Commons license?
115
+ def creative_commons?
116
+ key.start_with?('cc-')
117
+ end
118
+
118
119
  # The license body (e.g., contents - frontmatter)
119
120
  def content
120
121
  @content ||= parts[2] if parts && parts[2]
@@ -1,11 +1,13 @@
1
- # encoding=utf-8
1
+ # encoding: UTF-8
2
2
  module Licensee
3
3
  module Matchers
4
4
  class Copyright
5
5
  attr_reader :file
6
6
 
7
7
  # rubocop:disable Metrics/LineLength
8
- REGEX = /\s*(Copyright|\(c\)) (©|\(c\)|\xC2\xA9)? ?(\d{4}|\[year\])(.*)?\s*/i
8
+ COPYRIGHT_SYMBOLS = Regexp.union([/copyright/i, /\(c\)/i, "\u00A9", "\xC2\xA9"])
9
+ REGEX = /^\s*#{COPYRIGHT_SYMBOLS}.*$/i
10
+ # rubocop:enable Metrics/LineLength
9
11
 
10
12
  def initialize(file)
11
13
  @file = file
@@ -18,19 +18,29 @@ module Licensee
18
18
  end
19
19
 
20
20
  # Licenses that may be a match for this file.
21
- # To avoid false positives, the percentage change in file length
22
- # may not exceed the inverse of the confidence threshold
21
+ # To avoid false positives:
22
+ #
23
+ # 1. Creative commons licenses cannot be matched against license files
24
+ # that begin with the title of a non-open source CC license variant
25
+ # 2. The percentage change in file length may not exceed the inverse
26
+ # of the confidence threshold
23
27
  def potential_licenses
24
28
  @potential_licenses ||= begin
25
29
  Licensee.licenses(hidden: true).select do |license|
26
- license.wordset && license.length_delta(file) <= license.max_delta
30
+ if license.creative_commons? && file.potential_false_positive?
31
+ false
32
+ else
33
+ license.wordset && license.length_delta(file) <= license.max_delta
34
+ end
27
35
  end
28
36
  end
29
37
  end
30
38
 
31
39
  def licenses_by_similiarity
32
40
  @licenses_by_similiarity ||= begin
33
- licenses = potential_licenses.map { |l| [l, l.similarity(file)] }
41
+ licenses = potential_licenses.map do |license|
42
+ [license, license.similarity(file)]
43
+ end
34
44
  licenses.sort_by { |_, similarity| similarity }.reverse
35
45
  end
36
46
  end
@@ -0,0 +1,23 @@
1
+ module Licensee
2
+ module Matchers
3
+ class DistZilla < Package
4
+ attr_reader :file
5
+
6
+ LICENSE_REGEX = /^license\s*=\s*([a-z\-0-9\._]+)/i
7
+
8
+ private
9
+
10
+ def license_property
11
+ match = file.content.match LICENSE_REGEX
12
+ spdx_name(match[1]).downcase if match && match[1]
13
+ end
14
+
15
+ def spdx_name(perl_name)
16
+ perl_name.sub('_', '-')
17
+ .sub('_', '.')
18
+ .sub('Mozilla', 'MPL')
19
+ .sub(/^GPL-(\d)$/, 'GPL-\1.0')
20
+ end
21
+ end
22
+ end
23
+ end
@@ -29,6 +29,12 @@ module Licensee
29
29
  // => 0.0 # Catch all
30
30
  }.freeze
31
31
 
32
+ # CC-NC and CC-ND are not open source licenses and should not be
33
+ # detected as CC-BY or CC-BY-SA which are 98%+ similar
34
+ CC_FALSE_POSITIVE_REGEX = /
35
+ \A(creative\ commons\ )?Attribution-(NonCommercial|NoDerivatives)
36
+ /xi
37
+
32
38
  def possible_matchers
33
39
  [Matchers::Copyright, Matchers::Exact, Matchers::Dice]
34
40
  end
@@ -38,6 +44,11 @@ module Licensee
38
44
  matches[0].strip if matches
39
45
  end
40
46
 
47
+ # Is this file likely to result in a creative commons false positive?
48
+ def potential_false_positive?
49
+ content.strip =~ CC_FALSE_POSITIVE_REGEX
50
+ end
51
+
41
52
  def self.name_score(filename)
42
53
  FILENAME_REGEXES.find { |regex, _| filename =~ regex }[1]
43
54
  end
@@ -10,6 +10,8 @@ module Licensee
10
10
  else
11
11
  if filename == 'DESCRIPTION' && content.start_with?('Package:')
12
12
  [Matchers::Cran]
13
+ elsif filename == 'dist.ini'
14
+ [Matchers::DistZilla]
13
15
  else
14
16
  []
15
17
  end
@@ -19,6 +21,7 @@ module Licensee
19
21
  def self.name_score(filename)
20
22
  return 1.0 if ::File.extname(filename) == '.gemspec'
21
23
  return 1.0 if filename == 'package.json'
24
+ return 0.8 if filename == 'dist.ini'
22
25
  return 0.9 if filename == 'DESCRIPTION'
23
26
  return 0.75 if filename == 'bower.json'
24
27
  0.0
data/lib/licensee/rule.rb CHANGED
@@ -37,7 +37,7 @@ module Licensee
37
37
  end
38
38
 
39
39
  def raw_rules
40
- YAML.load File.read(Rule.file_path)
40
+ YAML.safe_load File.read(Rule.file_path)
41
41
  end
42
42
 
43
43
  def groups
@@ -1,3 +1,3 @@
1
1
  module Licensee
2
- VERSION = '8.7.0'.freeze
2
+ VERSION = '8.8.0'.freeze
3
3
  end
data/spec/bin_spec.rb CHANGED
@@ -21,7 +21,7 @@ RSpec.describe 'command line invocation' do
21
21
  end
22
22
 
23
23
  it 'outputs the hash' do
24
- expect(stdout).to match('750260c322080bab4c19fd55eb78bc73e1ae8f11')
24
+ expect(stdout).to match('d64f3bb4282a97b37454b5bb96a8a264a3363dc3')
25
25
  end
26
26
 
27
27
  it 'outputs the attribution' do
@@ -0,0 +1,438 @@
1
+ Attribution-NonCommercial-ShareAlike 4.0 International
2
+
3
+ =======================================================================
4
+
5
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
6
+ does not provide legal services or legal advice. Distribution of
7
+ Creative Commons public licenses does not create a lawyer-client or
8
+ other relationship. Creative Commons makes its licenses and related
9
+ information available on an "as-is" basis. Creative Commons gives no
10
+ warranties regarding its licenses, any material licensed under their
11
+ terms and conditions, or any related information. Creative Commons
12
+ disclaims all liability for damages resulting from their use to the
13
+ fullest extent possible.
14
+
15
+ Using Creative Commons Public Licenses
16
+
17
+ Creative Commons public licenses provide a standard set of terms and
18
+ conditions that creators and other rights holders may use to share
19
+ original works of authorship and other material subject to copyright
20
+ and certain other rights specified in the public license below. The
21
+ following considerations are for informational purposes only, are not
22
+ exhaustive, and do not form part of our licenses.
23
+
24
+ Considerations for licensors: Our public licenses are
25
+ intended for use by those authorized to give the public
26
+ permission to use material in ways otherwise restricted by
27
+ copyright and certain other rights. Our licenses are
28
+ irrevocable. Licensors should read and understand the terms
29
+ and conditions of the license they choose before applying it.
30
+ Licensors should also secure all rights necessary before
31
+ applying our licenses so that the public can reuse the
32
+ material as expected. Licensors should clearly mark any
33
+ material not subject to the license. This includes other CC-
34
+ licensed material, or material used under an exception or
35
+ limitation to copyright. More considerations for licensors:
36
+ wiki.creativecommons.org/Considerations_for_licensors
37
+
38
+ Considerations for the public: By using one of our public
39
+ licenses, a licensor grants the public permission to use the
40
+ licensed material under specified terms and conditions. If
41
+ the licensor's permission is not necessary for any reason--for
42
+ example, because of any applicable exception or limitation to
43
+ copyright--then that use is not regulated by the license. Our
44
+ licenses grant only permissions under copyright and certain
45
+ other rights that a licensor has authority to grant. Use of
46
+ the licensed material may still be restricted for other
47
+ reasons, including because others have copyright or other
48
+ rights in the material. A licensor may make special requests,
49
+ such as asking that all changes be marked or described.
50
+ Although not required by our licenses, you are encouraged to
51
+ respect those requests where reasonable. More_considerations
52
+ for the public:
53
+ wiki.creativecommons.org/Considerations_for_licensees
54
+
55
+ =======================================================================
56
+
57
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
58
+ Public License
59
+
60
+ By exercising the Licensed Rights (defined below), You accept and agree
61
+ to be bound by the terms and conditions of this Creative Commons
62
+ Attribution-NonCommercial-ShareAlike 4.0 International Public License
63
+ ("Public License"). To the extent this Public License may be
64
+ interpreted as a contract, You are granted the Licensed Rights in
65
+ consideration of Your acceptance of these terms and conditions, and the
66
+ Licensor grants You such rights in consideration of benefits the
67
+ Licensor receives from making the Licensed Material available under
68
+ these terms and conditions.
69
+
70
+
71
+ Section 1 -- Definitions.
72
+
73
+ a. Adapted Material means material subject to Copyright and Similar
74
+ Rights that is derived from or based upon the Licensed Material
75
+ and in which the Licensed Material is translated, altered,
76
+ arranged, transformed, or otherwise modified in a manner requiring
77
+ permission under the Copyright and Similar Rights held by the
78
+ Licensor. For purposes of this Public License, where the Licensed
79
+ Material is a musical work, performance, or sound recording,
80
+ Adapted Material is always produced where the Licensed Material is
81
+ synched in timed relation with a moving image.
82
+
83
+ b. Adapter's License means the license You apply to Your Copyright
84
+ and Similar Rights in Your contributions to Adapted Material in
85
+ accordance with the terms and conditions of this Public License.
86
+
87
+ c. BY-NC-SA Compatible License means a license listed at
88
+ creativecommons.org/compatiblelicenses, approved by Creative
89
+ Commons as essentially the equivalent of this Public License.
90
+
91
+ d. Copyright and Similar Rights means copyright and/or similar rights
92
+ closely related to copyright including, without limitation,
93
+ performance, broadcast, sound recording, and Sui Generis Database
94
+ Rights, without regard to how the rights are labeled or
95
+ categorized. For purposes of this Public License, the rights
96
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
97
+ Rights.
98
+
99
+ e. Effective Technological Measures means those measures that, in the
100
+ absence of proper authority, may not be circumvented under laws
101
+ fulfilling obligations under Article 11 of the WIPO Copyright
102
+ Treaty adopted on December 20, 1996, and/or similar international
103
+ agreements.
104
+
105
+ f. Exceptions and Limitations means fair use, fair dealing, and/or
106
+ any other exception or limitation to Copyright and Similar Rights
107
+ that applies to Your use of the Licensed Material.
108
+
109
+ g. License Elements means the license attributes listed in the name
110
+ of a Creative Commons Public License. The License Elements of this
111
+ Public License are Attribution, NonCommercial, and ShareAlike.
112
+
113
+ h. Licensed Material means the artistic or literary work, database,
114
+ or other material to which the Licensor applied this Public
115
+ License.
116
+
117
+ i. Licensed Rights means the rights granted to You subject to the
118
+ terms and conditions of this Public License, which are limited to
119
+ all Copyright and Similar Rights that apply to Your use of the
120
+ Licensed Material and that the Licensor has authority to license.
121
+
122
+ j. Licensor means the individual(s) or entity(ies) granting rights
123
+ under this Public License.
124
+
125
+ k. NonCommercial means not primarily intended for or directed towards
126
+ commercial advantage or monetary compensation. For purposes of
127
+ this Public License, the exchange of the Licensed Material for
128
+ other material subject to Copyright and Similar Rights by digital
129
+ file-sharing or similar means is NonCommercial provided there is
130
+ no payment of monetary compensation in connection with the
131
+ exchange.
132
+
133
+ l. Share means to provide material to the public by any means or
134
+ process that requires permission under the Licensed Rights, such
135
+ as reproduction, public display, public performance, distribution,
136
+ dissemination, communication, or importation, and to make material
137
+ available to the public including in ways that members of the
138
+ public may access the material from a place and at a time
139
+ individually chosen by them.
140
+
141
+ m. Sui Generis Database Rights means rights other than copyright
142
+ resulting from Directive 96/9/EC of the European Parliament and of
143
+ the Council of 11 March 1996 on the legal protection of databases,
144
+ as amended and/or succeeded, as well as other essentially
145
+ equivalent rights anywhere in the world.
146
+
147
+ n. You means the individual or entity exercising the Licensed Rights
148
+ under this Public License. Your has a corresponding meaning.
149
+
150
+
151
+ Section 2 -- Scope.
152
+
153
+ a. License grant.
154
+
155
+ 1. Subject to the terms and conditions of this Public License,
156
+ the Licensor hereby grants You a worldwide, royalty-free,
157
+ non-sublicensable, non-exclusive, irrevocable license to
158
+ exercise the Licensed Rights in the Licensed Material to:
159
+
160
+ a. reproduce and Share the Licensed Material, in whole or
161
+ in part, for NonCommercial purposes only; and
162
+
163
+ b. produce, reproduce, and Share Adapted Material for
164
+ NonCommercial purposes only.
165
+
166
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
167
+ Exceptions and Limitations apply to Your use, this Public
168
+ License does not apply, and You do not need to comply with
169
+ its terms and conditions.
170
+
171
+ 3. Term. The term of this Public License is specified in Section
172
+ 6(a).
173
+
174
+ 4. Media and formats; technical modifications allowed. The
175
+ Licensor authorizes You to exercise the Licensed Rights in
176
+ all media and formats whether now known or hereafter created,
177
+ and to make technical modifications necessary to do so. The
178
+ Licensor waives and/or agrees not to assert any right or
179
+ authority to forbid You from making technical modifications
180
+ necessary to exercise the Licensed Rights, including
181
+ technical modifications necessary to circumvent Effective
182
+ Technological Measures. For purposes of this Public License,
183
+ simply making modifications authorized by this Section 2(a)
184
+ (4) never produces Adapted Material.
185
+
186
+ 5. Downstream recipients.
187
+
188
+ a. Offer from the Licensor -- Licensed Material. Every
189
+ recipient of the Licensed Material automatically
190
+ receives an offer from the Licensor to exercise the
191
+ Licensed Rights under the terms and conditions of this
192
+ Public License.
193
+
194
+ b. Additional offer from the Licensor -- Adapted Material.
195
+ Every recipient of Adapted Material from You
196
+ automatically receives an offer from the Licensor to
197
+ exercise the Licensed Rights in the Adapted Material
198
+ under the conditions of the Adapter's License You apply.
199
+
200
+ c. No downstream restrictions. You may not offer or impose
201
+ any additional or different terms or conditions on, or
202
+ apply any Effective Technological Measures to, the
203
+ Licensed Material if doing so restricts exercise of the
204
+ Licensed Rights by any recipient of the Licensed
205
+ Material.
206
+
207
+ 6. No endorsement. Nothing in this Public License constitutes or
208
+ may be construed as permission to assert or imply that You
209
+ are, or that Your use of the Licensed Material is, connected
210
+ with, or sponsored, endorsed, or granted official status by,
211
+ the Licensor or others designated to receive attribution as
212
+ provided in Section 3(a)(1)(A)(i).
213
+
214
+ b. Other rights.
215
+
216
+ 1. Moral rights, such as the right of integrity, are not
217
+ licensed under this Public License, nor are publicity,
218
+ privacy, and/or other similar personality rights; however, to
219
+ the extent possible, the Licensor waives and/or agrees not to
220
+ assert any such rights held by the Licensor to the limited
221
+ extent necessary to allow You to exercise the Licensed
222
+ Rights, but not otherwise.
223
+
224
+ 2. Patent and trademark rights are not licensed under this
225
+ Public License.
226
+
227
+ 3. To the extent possible, the Licensor waives any right to
228
+ collect royalties from You for the exercise of the Licensed
229
+ Rights, whether directly or through a collecting society
230
+ under any voluntary or waivable statutory or compulsory
231
+ licensing scheme. In all other cases the Licensor expressly
232
+ reserves any right to collect such royalties, including when
233
+ the Licensed Material is used other than for NonCommercial
234
+ purposes.
235
+
236
+
237
+ Section 3 -- License Conditions.
238
+
239
+ Your exercise of the Licensed Rights is expressly made subject to the
240
+ following conditions.
241
+
242
+ a. Attribution.
243
+
244
+ 1. If You Share the Licensed Material (including in modified
245
+ form), You must:
246
+
247
+ a. retain the following if it is supplied by the Licensor
248
+ with the Licensed Material:
249
+
250
+ i. identification of the creator(s) of the Licensed
251
+ Material and any others designated to receive
252
+ attribution, in any reasonable manner requested by
253
+ the Licensor (including by pseudonym if
254
+ designated);
255
+
256
+ ii. a copyright notice;
257
+
258
+ iii. a notice that refers to this Public License;
259
+
260
+ iv. a notice that refers to the disclaimer of
261
+ warranties;
262
+
263
+ v. a URI or hyperlink to the Licensed Material to the
264
+ extent reasonably practicable;
265
+
266
+ b. indicate if You modified the Licensed Material and
267
+ retain an indication of any previous modifications; and
268
+
269
+ c. indicate the Licensed Material is licensed under this
270
+ Public License, and include the text of, or the URI or
271
+ hyperlink to, this Public License.
272
+
273
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
274
+ reasonable manner based on the medium, means, and context in
275
+ which You Share the Licensed Material. For example, it may be
276
+ reasonable to satisfy the conditions by providing a URI or
277
+ hyperlink to a resource that includes the required
278
+ information.
279
+ 3. If requested by the Licensor, You must remove any of the
280
+ information required by Section 3(a)(1)(A) to the extent
281
+ reasonably practicable.
282
+
283
+ b. ShareAlike.
284
+
285
+ In addition to the conditions in Section 3(a), if You Share
286
+ Adapted Material You produce, the following conditions also apply.
287
+
288
+ 1. The Adapter's License You apply must be a Creative Commons
289
+ license with the same License Elements, this version or
290
+ later, or a BY-NC-SA Compatible License.
291
+
292
+ 2. You must include the text of, or the URI or hyperlink to, the
293
+ Adapter's License You apply. You may satisfy this condition
294
+ in any reasonable manner based on the medium, means, and
295
+ context in which You Share Adapted Material.
296
+
297
+ 3. You may not offer or impose any additional or different terms
298
+ or conditions on, or apply any Effective Technological
299
+ Measures to, Adapted Material that restrict exercise of the
300
+ rights granted under the Adapter's License You apply.
301
+
302
+
303
+ Section 4 -- Sui Generis Database Rights.
304
+
305
+ Where the Licensed Rights include Sui Generis Database Rights that
306
+ apply to Your use of the Licensed Material:
307
+
308
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
309
+ to extract, reuse, reproduce, and Share all or a substantial
310
+ portion of the contents of the database for NonCommercial purposes
311
+ only;
312
+
313
+ b. if You include all or a substantial portion of the database
314
+ contents in a database in which You have Sui Generis Database
315
+ Rights, then the database in which You have Sui Generis Database
316
+ Rights (but not its individual contents) is Adapted Material,
317
+ including for purposes of Section 3(b); and
318
+
319
+ c. You must comply with the conditions in Section 3(a) if You Share
320
+ all or a substantial portion of the contents of the database.
321
+
322
+ For the avoidance of doubt, this Section 4 supplements and does not
323
+ replace Your obligations under this Public License where the Licensed
324
+ Rights include other Copyright and Similar Rights.
325
+
326
+
327
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
328
+
329
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
330
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
331
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
332
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
333
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
334
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
335
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
336
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
337
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
338
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
339
+
340
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
341
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
342
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
343
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
344
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
345
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
346
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
347
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
348
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
349
+
350
+ c. The disclaimer of warranties and limitation of liability provided
351
+ above shall be interpreted in a manner that, to the extent
352
+ possible, most closely approximates an absolute disclaimer and
353
+ waiver of all liability.
354
+
355
+
356
+ Section 6 -- Term and Termination.
357
+
358
+ a. This Public License applies for the term of the Copyright and
359
+ Similar Rights licensed here. However, if You fail to comply with
360
+ this Public License, then Your rights under this Public License
361
+ terminate automatically.
362
+
363
+ b. Where Your right to use the Licensed Material has terminated under
364
+ Section 6(a), it reinstates:
365
+
366
+ 1. automatically as of the date the violation is cured, provided
367
+ it is cured within 30 days of Your discovery of the
368
+ violation; or
369
+
370
+ 2. upon express reinstatement by the Licensor.
371
+
372
+ For the avoidance of doubt, this Section 6(b) does not affect any
373
+ right the Licensor may have to seek remedies for Your violations
374
+ of this Public License.
375
+
376
+ c. For the avoidance of doubt, the Licensor may also offer the
377
+ Licensed Material under separate terms or conditions or stop
378
+ distributing the Licensed Material at any time; however, doing so
379
+ will not terminate this Public License.
380
+
381
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
382
+ License.
383
+
384
+
385
+ Section 7 -- Other Terms and Conditions.
386
+
387
+ a. The Licensor shall not be bound by any additional or different
388
+ terms or conditions communicated by You unless expressly agreed.
389
+
390
+ b. Any arrangements, understandings, or agreements regarding the
391
+ Licensed Material not stated herein are separate from and
392
+ independent of the terms and conditions of this Public License.
393
+
394
+
395
+ Section 8 -- Interpretation.
396
+
397
+ a. For the avoidance of doubt, this Public License does not, and
398
+ shall not be interpreted to, reduce, limit, restrict, or impose
399
+ conditions on any use of the Licensed Material that could lawfully
400
+ be made without permission under this Public License.
401
+
402
+ b. To the extent possible, if any provision of this Public License is
403
+ deemed unenforceable, it shall be automatically reformed to the
404
+ minimum extent necessary to make it enforceable. If the provision
405
+ cannot be reformed, it shall be severed from this Public License
406
+ without affecting the enforceability of the remaining terms and
407
+ conditions.
408
+
409
+ c. No term or condition of this Public License will be waived and no
410
+ failure to comply consented to unless expressly agreed to by the
411
+ Licensor.
412
+
413
+ d. Nothing in this Public License constitutes or may be interpreted
414
+ as a limitation upon, or waiver of, any privileges and immunities
415
+ that apply to the Licensor or You, including from the legal
416
+ processes of any jurisdiction or authority.
417
+
418
+ =======================================================================
419
+
420
+ Creative Commons is not a party to its public
421
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
422
+ its public licenses to material it publishes and in those instances
423
+ will be considered the “Licensor.” The text of the Creative Commons
424
+ public licenses is dedicated to the public domain under the CC0 Public
425
+ Domain Dedication. Except for the limited purpose of indicating that
426
+ material is shared under a Creative Commons public license or as
427
+ otherwise permitted by the Creative Commons policies published at
428
+ creativecommons.org/policies, Creative Commons does not authorize the
429
+ use of the trademark "Creative Commons" or any other trademark or logo
430
+ of Creative Commons without its prior written consent including,
431
+ without limitation, in connection with any unauthorized modifications
432
+ to any of its public licenses or any other arrangements,
433
+ understandings, or agreements concerning use of licensed material. For
434
+ the avoidance of doubt, this paragraph does not form part of the
435
+ public licenses.
436
+
437
+ Creative Commons may be contacted at creativecommons.org.
438
+