licensee 9.12.0 → 9.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +1 -1
  3. data/bin/licensee +4 -4
  4. data/lib/licensee.rb +3 -3
  5. data/lib/licensee/commands/detect.rb +6 -6
  6. data/lib/licensee/commands/diff.rb +2 -2
  7. data/lib/licensee/content_helper.rb +72 -26
  8. data/lib/licensee/hash_helper.rb +5 -5
  9. data/lib/licensee/license.rb +17 -21
  10. data/lib/licensee/matchers.rb +1 -0
  11. data/lib/licensee/matchers/cabal.rb +1 -1
  12. data/lib/licensee/matchers/cargo.rb +1 -1
  13. data/lib/licensee/matchers/copyright.rb +3 -3
  14. data/lib/licensee/matchers/dice.rb +4 -4
  15. data/lib/licensee/matchers/dist_zilla.rb +1 -1
  16. data/lib/licensee/matchers/gemspec.rb +4 -4
  17. data/lib/licensee/matchers/npm_bower.rb +5 -2
  18. data/lib/licensee/matchers/nuget.rb +43 -0
  19. data/lib/licensee/matchers/spdx.rb +1 -1
  20. data/lib/licensee/project_files/license_file.rb +3 -3
  21. data/lib/licensee/project_files/package_manager_file.rb +3 -2
  22. data/lib/licensee/project_files/project_file.rb +2 -1
  23. data/lib/licensee/projects/fs_project.rb +7 -2
  24. data/lib/licensee/projects/git_project.rb +3 -3
  25. data/lib/licensee/projects/github_project.rb +1 -1
  26. data/lib/licensee/projects/project.rb +3 -3
  27. data/lib/licensee/version.rb +1 -1
  28. data/licensee.gemspec +45 -0
  29. data/spec/bin_spec.rb +1 -1
  30. data/spec/fixture_spec.rb +5 -5
  31. data/spec/fixtures/bom/LICENSE.txt +21 -0
  32. data/spec/fixtures/bsd-3-noendorseslash/LICENSE +30 -0
  33. data/spec/fixtures/cc0-cal2013/LICENSE +116 -0
  34. data/spec/fixtures/cc0-cc/LICENSE +121 -0
  35. data/spec/fixtures/crlf-bsd/LICENSE.md +27 -0
  36. data/spec/fixtures/detect.json +14 -20
  37. data/spec/fixtures/fixtures.yml +43 -3
  38. data/spec/fixtures/license-hashes.json +10 -8
  39. data/spec/fixtures/markdown-artistic/LICENSE.md +192 -0
  40. data/spec/fixtures/multiple-arrs/LICENSE +30 -0
  41. data/spec/fixtures/readme-invalid-encoding/README.md +24 -0
  42. data/spec/fixtures/unlicense-noinfo/LICENSE +22 -0
  43. data/spec/fixtures/vim/LICENSE +78 -0
  44. data/spec/integration_spec.rb +87 -4
  45. data/spec/licensee/commands/detect_spec.rb +5 -5
  46. data/spec/licensee/commands/license_path_spec.rb +1 -1
  47. data/spec/licensee/commands/version_spec.rb +1 -1
  48. data/spec/licensee/content_helper_spec.rb +46 -50
  49. data/spec/licensee/hash_helper_spec.rb +23 -23
  50. data/spec/licensee/license_field_spec.rb +3 -3
  51. data/spec/licensee/license_meta_spec.rb +18 -22
  52. data/spec/licensee/license_rules_spec.rb +4 -2
  53. data/spec/licensee/license_spec.rb +43 -39
  54. data/spec/licensee/matchers/cabal_matcher_spec.rb +4 -2
  55. data/spec/licensee/matchers/cargo_matcher_spec.rb +3 -2
  56. data/spec/licensee/matchers/copyright_matcher_spec.rb +3 -3
  57. data/spec/licensee/matchers/cran_matcher_spec.rb +3 -2
  58. data/spec/licensee/matchers/dice_matcher_spec.rb +15 -21
  59. data/spec/licensee/matchers/dist_zilla_matcher_spec.rb +3 -2
  60. data/spec/licensee/matchers/exact_matcher_spec.rb +3 -2
  61. data/spec/licensee/matchers/gemspec_matcher_spec.rb +3 -2
  62. data/spec/licensee/matchers/matcher_spec.rb +10 -8
  63. data/spec/licensee/matchers/npm_bower_matcher_spec.rb +12 -3
  64. data/spec/licensee/matchers/nu_get_matcher_spec.rb +91 -0
  65. data/spec/licensee/matchers/package_matcher_spec.rb +4 -2
  66. data/spec/licensee/matchers/reference_matcher_spec.rb +2 -2
  67. data/spec/licensee/matchers/spdx_matcher_spec.rb +3 -2
  68. data/spec/licensee/project_files/license_file_spec.rb +43 -42
  69. data/spec/licensee/project_files/package_info_spec.rb +11 -1
  70. data/spec/licensee/project_files/project_file_spec.rb +5 -2
  71. data/spec/licensee/project_files/readme_file_spec.rb +2 -1
  72. data/spec/licensee/project_spec.rb +22 -17
  73. data/spec/licensee/projects/github_project_spec.rb +6 -5
  74. data/spec/licensee/rule_spec.rb +5 -4
  75. data/spec/licensee_spec.rb +10 -9
  76. data/spec/spec_helper.rb +2 -2
  77. data/spec/vendored_license_spec.rb +5 -5
  78. data/vendor/choosealicense.com/_data/meta.yml +1 -1
  79. data/vendor/choosealicense.com/_data/rules.yml +15 -12
  80. data/vendor/choosealicense.com/_licenses/0bsd.txt +3 -3
  81. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +4 -4
  82. data/vendor/choosealicense.com/_licenses/artistic-2.0.txt +1 -1
  83. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +3 -3
  84. data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +1 -0
  85. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +3 -3
  86. data/vendor/choosealicense.com/_licenses/bsd-4-clause.txt +61 -0
  87. data/vendor/choosealicense.com/_licenses/bsl-1.0.txt +5 -1
  88. data/vendor/choosealicense.com/_licenses/cc-by-4.0.txt +16 -13
  89. data/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +16 -13
  90. data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +113 -104
  91. data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +6 -6
  92. data/vendor/choosealicense.com/_licenses/ecl-2.0.txt +4 -4
  93. data/vendor/choosealicense.com/_licenses/epl-1.0.txt +3 -3
  94. data/vendor/choosealicense.com/_licenses/epl-2.0.txt +5 -5
  95. data/vendor/choosealicense.com/_licenses/eupl-1.2.txt +3 -3
  96. data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +3 -3
  97. data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +4 -4
  98. data/vendor/choosealicense.com/_licenses/isc.txt +3 -3
  99. data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +0 -1
  100. data/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +1 -1
  101. data/vendor/choosealicense.com/_licenses/mit.txt +3 -3
  102. data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +3 -3
  103. data/vendor/choosealicense.com/_licenses/ncsa.txt +24 -24
  104. data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +3 -3
  105. data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +4 -1
  106. data/vendor/choosealicense.com/_licenses/osl-3.0.txt +3 -3
  107. data/vendor/choosealicense.com/_licenses/postgresql.txt +5 -5
  108. data/vendor/choosealicense.com/_licenses/unlicense.txt +3 -3
  109. data/vendor/choosealicense.com/_licenses/upl-1.0.txt +4 -4
  110. data/vendor/choosealicense.com/_licenses/vim.txt +111 -0
  111. data/vendor/choosealicense.com/_licenses/zlib.txt +4 -1
  112. metadata +62 -21
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Licensee
4
+ module Matchers
5
+ class NuGet < Licensee::Matchers::Package
6
+ # While we could parse the nuspec file, prefer a lenient regex for speed and security.
7
+ # Moar parsing moar problems.
8
+ LICENSE_REGEX = %r{
9
+ <license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9. +()]+)</license\s*>
10
+ }ix.freeze
11
+
12
+ LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i.freeze
13
+
14
+ NUGET_REGEX = %r{https?://licenses.nuget.org/(.*)}i.freeze
15
+ OPENSOURCE_REGEX = %r{https?://(?:www\.)?opensource.org/licenses/(.*)}i.freeze
16
+ SPDX_REGEX = %r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
17
+ APACHE_REGEX = %r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
18
+
19
+ private
20
+
21
+ def license_from_first_capture(url, pattern)
22
+ match = url.match(pattern)
23
+ match[1].downcase if match && match[1]
24
+ end
25
+
26
+ def license_from_url(url)
27
+ license_from_first_capture(url, NUGET_REGEX) ||
28
+ license_from_first_capture(url, OPENSOURCE_REGEX) ||
29
+ license_from_first_capture(url, SPDX_REGEX) ||
30
+ license_from_first_capture(url, APACHE_REGEX)&.gsub('license', 'apache')
31
+ end
32
+
33
+ def license_property
34
+ # Prefer the explicit <license type="expression"> element
35
+ match = @file.content.match LICENSE_REGEX
36
+ return match[1].downcase if match && match[1]
37
+
38
+ url_match = @file.content.match LICENSE_URL_REGEX
39
+ license_from_url(url_match[1]) if url_match && url_match[1]
40
+ end
41
+ end
42
+ end
43
+ end
@@ -5,7 +5,7 @@ module Licensee
5
5
  class Spdx < Licensee::Matchers::Package
6
6
  # While we could parse the LICENSE.spdx file, prefer
7
7
  # a lenient regex for speed and security. Moar parsing moar problems.
8
- LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9\. +()]+)\s*/i.freeze
8
+ LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9. +()]+)\s*/i.freeze
9
9
 
10
10
  private
11
11
 
@@ -34,8 +34,8 @@ module Licensee
34
34
  /\A#{COPYING_REGEX}#{OTHER_EXT_REGEX}\z/ => 0.75, # COPYING.textile
35
35
  /\A#{LICENSE_REGEX}[-_]/ => 0.70, # LICENSE-MIT
36
36
  /\A#{COPYING_REGEX}[-_]/ => 0.65, # COPYING-MIT
37
- /[-_]#{LICENSE_REGEX}/ => 0.60, # MIT-LICENSE-MIT
38
- /[-_]#{COPYING_REGEX}/ => 0.55, # MIT-COPYING
37
+ /\A\w+[-_]#{LICENSE_REGEX}/ => 0.60, # MIT-LICENSE-MIT
38
+ /\A\w+[-_]#{COPYING_REGEX}/ => 0.55, # MIT-COPYING
39
39
  /\A#{OFL_REGEX}#{PREFERRED_EXT_REGEX}/ => 0.50, # OFL.md
40
40
  /\A#{OFL_REGEX}#{OTHER_EXT_REGEX}/ => 0.45, # OFL.textile
41
41
  /\A#{OFL_REGEX}\z/ => 0.40, # OFL
@@ -56,7 +56,7 @@ module Licensee
56
56
 
57
57
  def attribution
58
58
  @attribution ||= begin
59
- return unless copyright? || license.content =~ /\[fullname\]/
59
+ return unless copyright? || license.content&.include?('[fullname]')
60
60
 
61
61
  matches = Matchers::Copyright::REGEX
62
62
  .match(content_without_title_and_version)
@@ -7,7 +7,8 @@ module Licensee
7
7
  MATCHERS_EXTENSIONS = {
8
8
  '.gemspec' => [Matchers::Gemspec],
9
9
  '.json' => [Matchers::NpmBower],
10
- '.cabal' => [Matchers::Cabal]
10
+ '.cabal' => [Matchers::Cabal],
11
+ '.nuspec' => [Matchers::NuGet]
11
12
  }.freeze
12
13
 
13
14
  # Hash of Filename => [possible matchers]
@@ -33,7 +34,7 @@ module Licensee
33
34
  end
34
35
 
35
36
  def self.name_score(filename)
36
- return 1.0 if ['.gemspec', '.cabal'].include?(File.extname(filename))
37
+ return 1.0 if ['.gemspec', '.cabal', '.nuspec'].include?(File.extname(filename))
37
38
 
38
39
  FILENAMES_SCORES[filename] || 0.0
39
40
  end
@@ -38,8 +38,9 @@ module Licensee
38
38
  @content = content.dup
39
39
  @content.force_encoding(ENCODING)
40
40
  unless @content.valid_encoding?
41
- @content.encode!(ENCODING, ENCODING_OPTIONS)
41
+ @content.encode!(ENCODING, **ENCODING_OPTIONS)
42
42
  end
43
+ @content.encode!(ENCODING, universal_newline: true)
43
44
 
44
45
  metadata = { name: metadata } if metadata.is_a? String
45
46
  @data = metadata || {}
@@ -44,13 +44,18 @@ module Licensee
44
44
  end
45
45
  end
46
46
 
47
- # Retrieve a file's content from disk
47
+ # Retrieve a file's content from disk, enforcing encoding
48
48
  #
49
49
  # file - the file hash, with the :name key as the file's relative path
50
50
  #
51
51
  # Returns the file contents as a string
52
52
  def load_file(file)
53
- File.read dir_path.join(file[:dir], file[:name])
53
+ content = File.read dir_path.join(file[:dir], file[:name])
54
+ content.force_encoding(ProjectFiles::ProjectFile::ENCODING)
55
+
56
+ return content if content.valid_encoding?
57
+
58
+ content.encode(ProjectFiles::ProjectFile::ENCODING, **ProjectFiles::ProjectFile::ENCODING_OPTIONS)
54
59
  end
55
60
 
56
61
  # Returns true if @dir is @root or it's descendant
@@ -44,9 +44,9 @@ module Licensee
44
44
 
45
45
  def commit
46
46
  @commit ||= if revision
47
- repository.lookup(revision)
48
- else
49
- repository.last_commit
47
+ repository.lookup(revision)
48
+ else
49
+ repository.last_commit
50
50
  end
51
51
  end
52
52
 
@@ -15,7 +15,7 @@ module Licensee
15
15
  # If there's any trailing data (e.g. `.git`) this pattern will ignore it:
16
16
  # we're going to use the API rather than clone the repo.
17
17
  GITHUB_REPO_PATTERN =
18
- %r{https://github.com/([^\/]+\/([^\/]+(?=\.git)|[^\/]+)).*}.freeze
18
+ %r{https://github.com/([^/]+/([^/]+(?=\.git)|[^/]+)).*}.freeze
19
19
 
20
20
  class RepoNotFound < StandardError; end
21
21
 
@@ -25,9 +25,9 @@ module Licensee
25
25
  return @license if defined? @license
26
26
 
27
27
  @license = if licenses_without_copyright.count == 1 || lgpl?
28
- licenses_without_copyright.first
29
- elsif licenses_without_copyright.count > 1
30
- Licensee::License.find('other')
28
+ licenses_without_copyright.first
29
+ elsif licenses_without_copyright.count > 1
30
+ Licensee::License.find('other')
31
31
  end
32
32
  end
33
33
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Licensee
4
- VERSION = '9.12.0'
4
+ VERSION = '9.14.1'
5
5
  end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path('lib/licensee/version', __dir__)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'licensee'
7
+ gem.version = Licensee::VERSION
8
+
9
+ gem.summary = 'A Ruby Gem to detect open source project licenses'
10
+ gem.description = <<-DESC
11
+ Licensee automates the process of reading LICENSE files and
12
+ compares their contents to known licenses using a fancy maths.
13
+ DESC
14
+
15
+ gem.authors = ['Ben Balter']
16
+ gem.email = 'ben.balter@github.com'
17
+ gem.homepage = 'https://github.com/benbalter/licensee'
18
+ gem.license = 'MIT'
19
+
20
+ gem.bindir = 'bin'
21
+ gem.executables << 'licensee'
22
+
23
+ gem.add_dependency('dotenv', '~> 2.0')
24
+ gem.add_dependency('octokit', '~> 4.17')
25
+ gem.add_dependency('reverse_markdown', '~> 1.0')
26
+ gem.add_dependency('rugged', '>= 0.24', '<2.0')
27
+ gem.add_dependency('thor', '>= 0.19', '< 2.0')
28
+
29
+ gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')
30
+ gem.add_development_dependency('pry', '~> 0.9')
31
+ gem.add_development_dependency('rspec', '~> 3.5')
32
+ gem.add_development_dependency('rubocop', '~> 0.80')
33
+ gem.add_development_dependency('rubocop-performance', '~> 1.5')
34
+ gem.add_development_dependency('rubocop-rspec', '~> 1.36')
35
+ gem.add_development_dependency('simplecov', '~> 0.16')
36
+ gem.add_development_dependency('webmock', '~> 3.1')
37
+
38
+ gem.required_ruby_version = '> 2.3'
39
+
40
+ # ensure the gem is built out of versioned files
41
+ gem.files = Dir[
42
+ '{bin,lib,man,test,vendor,spec}/**/*',
43
+ 'README*', 'LICENSE*'
44
+ ] & `git ls-files -z`.split("\0")
45
+ end
@@ -14,7 +14,7 @@ RSpec.describe 'command line invocation' do
14
14
  let(:status) { output[2] }
15
15
 
16
16
  it 'Returns a zero exit code' do
17
- expect(status.exitstatus).to eql(0)
17
+ expect(status.exitstatus).to be(0)
18
18
  end
19
19
 
20
20
  it 'returns the help text' do
@@ -5,6 +5,8 @@ RSpec.describe 'fixture test' do
5
5
  let(:options) { { detect_packages: true, detect_readme: true } }
6
6
 
7
7
  context "the #{fixture} fixture" do
8
+ subject { Licensee.project(path, **options) }
9
+
8
10
  let(:path) { fixture_path(fixture) }
9
11
  let(:other) { Licensee::License.find('other') }
10
12
  let(:none) { Licensee::License.find('none') }
@@ -12,8 +14,6 @@ RSpec.describe 'fixture test' do
12
14
  let(:license_file) { subject.license_file }
13
15
  let(:matcher) { license_file&.matcher }
14
16
 
15
- subject { Licensee.project(path, options) }
16
-
17
17
  it 'has an expected license in fixtures-licenses.yml' do
18
18
  msg = 'Expected an entry in `'.dup
19
19
  msg << fixture_path('fixtures-licenses.yml')
@@ -24,9 +24,9 @@ RSpec.describe 'fixture test' do
24
24
 
25
25
  it 'detects the license' do
26
26
  expected = if expectations['key']
27
- Licensee::License.find(expectations['key'])
28
- else
29
- none
27
+ Licensee::License.find(expectations['key'])
28
+ else
29
+ none
30
30
  end
31
31
 
32
32
  expect(subject.license).to eql(expected)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Artúr Barnabás Kovács
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ Copyright © 2019, Person Person and contributors
2
+
3
+ All rights reserved.
4
+
5
+ * * *
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of someorg/foo-bar-baz-quux nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,116 @@
1
+ CC0 1.0 Universal
2
+
3
+ Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer
6
+ exclusive Copyright and Related Rights (defined below) upon the creator and
7
+ subsequent owner(s) (each and all, an "owner") of an original work of
8
+ authorship and/or a database (each, a "Work").
9
+
10
+ Certain owners wish to permanently relinquish those rights to a Work for the
11
+ purpose of contributing to a commons of creative, cultural and scientific
12
+ works ("Commons") that the public can reliably and without fear of later
13
+ claims of infringement build upon, modify, incorporate in other works, reuse
14
+ and redistribute as freely as possible in any form whatsoever and for any
15
+ purposes, including without limitation commercial purposes. These owners may
16
+ contribute to the Commons to promote the ideal of a free culture and the
17
+ further production of creative, cultural and scientific works, or to gain
18
+ reputation or greater distribution for their Work in part through the use and
19
+ efforts of others.
20
+
21
+ For these and/or other purposes and motivations, and without any expectation
22
+ of additional consideration or compensation, the person associating CC0 with a
23
+ Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25
+ and publicly distribute the Work under its terms, with knowledge of his or her
26
+ Copyright and Related Rights in the Work and the meaning and intended legal
27
+ effect of CC0 on those rights.
28
+
29
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
30
+ protected by copyright and related or neighboring rights ("Copyright and
31
+ Related Rights"). Copyright and Related Rights include, but are not limited
32
+ to, the following:
33
+
34
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
35
+ and translate a Work;
36
+
37
+ ii. moral rights retained by the original author(s) and/or performer(s);
38
+
39
+ iii. publicity and privacy rights pertaining to a person's image or likeness
40
+ depicted in a Work;
41
+
42
+ iv. rights protecting against unfair competition in regards to a Work,
43
+ subject to the limitations in paragraph 4(a), below;
44
+
45
+ v. rights protecting the extraction, dissemination, use and reuse of data in
46
+ a Work;
47
+
48
+ vi. database rights (such as those arising under Directive 96/9/EC of the
49
+ European Parliament and of the Council of 11 March 1996 on the legal
50
+ protection of databases, and under any national implementation thereof,
51
+ including any amended or successor version of such directive); and
52
+
53
+ vii. other similar, equivalent or corresponding rights throughout the world
54
+ based on applicable law or treaty, and any national implementations thereof.
55
+
56
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58
+ unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59
+ and Related Rights and associated claims and causes of action, whether now
60
+ known or unknown (including existing as well as future claims and causes of
61
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
62
+ duration provided by applicable law or treaty (including future time
63
+ extensions), (iii) in any current or future medium and for any number of
64
+ copies, and (iv) for any purpose whatsoever, including without limitation
65
+ commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66
+ the Waiver for the benefit of each member of the public at large and to the
67
+ detriment of Affirmer's heirs and successors, fully intending that such Waiver
68
+ shall not be subject to revocation, rescission, cancellation, termination, or
69
+ any other legal or equitable action to disrupt the quiet enjoyment of the Work
70
+ by the public as contemplated by Affirmer's express Statement of Purpose.
71
+
72
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
73
+ judged legally invalid or ineffective under applicable law, then the Waiver
74
+ shall be preserved to the maximum extent permitted taking into account
75
+ Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76
+ is so judged Affirmer hereby grants to each affected person a royalty-free,
77
+ non transferable, non sublicensable, non exclusive, irrevocable and
78
+ unconditional license to exercise Affirmer's Copyright and Related Rights in
79
+ the Work (i) in all territories worldwide, (ii) for the maximum duration
80
+ provided by applicable law or treaty (including future time extensions), (iii)
81
+ in any current or future medium and for any number of copies, and (iv) for any
82
+ purpose whatsoever, including without limitation commercial, advertising or
83
+ promotional purposes (the "License"). The License shall be deemed effective as
84
+ of the date CC0 was applied by Affirmer to the Work. Should any part of the
85
+ License for any reason be judged legally invalid or ineffective under
86
+ applicable law, such partial invalidity or ineffectiveness shall not
87
+ invalidate the remainder of the License, and in such case Affirmer hereby
88
+ affirms that he or she will not (i) exercise any of his or her remaining
89
+ Copyright and Related Rights in the Work or (ii) assert any associated claims
90
+ and causes of action with respect to the Work, in either case contrary to
91
+ Affirmer's express Statement of Purpose.
92
+
93
+ 4. Limitations and Disclaimers.
94
+
95
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
96
+ surrendered, licensed or otherwise affected by this document.
97
+
98
+ b. Affirmer offers the Work as-is and makes no representations or warranties
99
+ of any kind concerning the Work, express, implied, statutory or otherwise,
100
+ including without limitation warranties of title, merchantability, fitness
101
+ for a particular purpose, non infringement, or the absence of latent or
102
+ other defects, accuracy, or the present or absence of errors, whether or not
103
+ discoverable, all to the greatest extent permissible under applicable law.
104
+
105
+ c. Affirmer disclaims responsibility for clearing rights of other persons
106
+ that may apply to the Work or any use thereof, including without limitation
107
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
108
+ disclaims responsibility for obtaining any necessary consents, permissions
109
+ or other rights required for any use of the Work.
110
+
111
+ d. Affirmer understands and acknowledges that Creative Commons is not a
112
+ party to this document and has no duty or obligation with respect to this
113
+ CC0 or use of the Work.
114
+
115
+ For more information, please see
116
+ <http://creativecommons.org/publicdomain/zero/1.0/>
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.