licensee 9.10.1 → 9.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/bin/licensee +5 -4
- data/lib/licensee.rb +7 -5
- data/lib/licensee/commands/detect.rb +7 -5
- data/lib/licensee/commands/diff.rb +7 -8
- data/lib/licensee/commands/license_path.rb +2 -0
- data/lib/licensee/commands/version.rb +2 -0
- data/lib/licensee/content_helper.rb +230 -85
- data/lib/licensee/hash_helper.rb +7 -5
- data/lib/licensee/license.rb +21 -22
- data/lib/licensee/license_field.rb +3 -1
- data/lib/licensee/license_meta.rb +2 -0
- data/lib/licensee/license_rules.rb +2 -0
- data/lib/licensee/matchers.rb +2 -0
- data/lib/licensee/matchers/cabal.rb +16 -2
- data/lib/licensee/matchers/cargo.rb +3 -1
- data/lib/licensee/matchers/copyright.rb +6 -4
- data/lib/licensee/matchers/cran.rb +5 -3
- data/lib/licensee/matchers/dice.rb +6 -4
- data/lib/licensee/matchers/dist_zilla.rb +3 -1
- data/lib/licensee/matchers/exact.rb +2 -0
- data/lib/licensee/matchers/gemspec.rb +7 -5
- data/lib/licensee/matchers/matcher.rb +3 -1
- data/lib/licensee/matchers/npm_bower.rb +3 -1
- data/lib/licensee/matchers/package.rb +2 -0
- data/lib/licensee/matchers/reference.rb +3 -1
- data/lib/licensee/matchers/spdx.rb +3 -1
- data/lib/licensee/project_files.rb +2 -0
- data/lib/licensee/project_files/license_file.rb +12 -10
- data/lib/licensee/project_files/package_manager_file.rb +2 -0
- data/lib/licensee/project_files/project_file.rb +12 -5
- data/lib/licensee/project_files/readme_file.rb +5 -3
- data/lib/licensee/projects.rb +2 -0
- data/lib/licensee/projects/fs_project.rb +9 -2
- data/lib/licensee/projects/git_project.rb +19 -11
- data/lib/licensee/projects/github_project.rb +3 -1
- data/lib/licensee/projects/project.rb +7 -5
- data/lib/licensee/rule.rb +2 -0
- data/lib/licensee/version.rb +3 -1
- data/licensee.gemspec +45 -0
- data/spec/bin_spec.rb +3 -1
- data/spec/fixture_spec.rb +46 -0
- data/spec/fixtures/bsd-3-noendorseslash/LICENSE +30 -0
- data/spec/fixtures/cc0-cal2013/LICENSE +116 -0
- data/spec/fixtures/cc0-cc/LICENSE +121 -0
- data/spec/fixtures/detect.json +10 -8
- data/spec/fixtures/fixtures.yml +134 -0
- data/spec/fixtures/html/license.html +262 -0
- data/spec/fixtures/license-hashes.json +41 -0
- data/spec/fixtures/mit-optional/LICENSE.txt +21 -0
- data/spec/fixtures/multiple-arrs/LICENSE +30 -0
- data/spec/fixtures/readme-invalid-encoding/README.md +24 -0
- data/spec/fixtures/unlicense-noinfo/LICENSE +22 -0
- data/spec/integration_spec.rb +68 -2
- data/spec/licensee/commands/detect_spec.rb +11 -7
- data/spec/licensee/commands/license_path_spec.rb +3 -1
- data/spec/licensee/commands/version_spec.rb +3 -1
- data/spec/licensee/content_helper_spec.rb +185 -67
- data/spec/licensee/hash_helper_spec.rb +3 -1
- data/spec/licensee/license_field_spec.rb +5 -3
- data/spec/licensee/license_meta_spec.rb +16 -12
- data/spec/licensee/license_rules_spec.rb +6 -2
- data/spec/licensee/license_spec.rb +37 -35
- data/spec/licensee/matchers/cabal_matcher_spec.rb +97 -2
- data/spec/licensee/matchers/cargo_matcher_spec.rb +5 -2
- data/spec/licensee/matchers/copyright_matcher_spec.rb +7 -5
- data/spec/licensee/matchers/cran_matcher_spec.rb +5 -2
- data/spec/licensee/matchers/dice_matcher_spec.rb +15 -12
- data/spec/licensee/matchers/dist_zilla_matcher_spec.rb +5 -2
- data/spec/licensee/matchers/exact_matcher_spec.rb +5 -2
- data/spec/licensee/matchers/gemspec_matcher_spec.rb +5 -2
- data/spec/licensee/matchers/matcher_spec.rb +6 -2
- data/spec/licensee/matchers/npm_bower_matcher_spec.rb +5 -3
- data/spec/licensee/matchers/package_matcher_spec.rb +6 -2
- data/spec/licensee/matchers/reference_matcher_spec.rb +4 -2
- data/spec/licensee/matchers/spdx_matcher_spec.rb +5 -2
- data/spec/licensee/project_files/license_file_spec.rb +20 -18
- data/spec/licensee/project_files/package_info_spec.rb +5 -1
- data/spec/licensee/project_files/project_file_spec.rb +8 -2
- data/spec/licensee/project_files/readme_file_spec.rb +4 -1
- data/spec/licensee/project_spec.rb +24 -17
- data/spec/licensee/projects/git_project_spec.rb +23 -0
- data/spec/licensee/projects/github_project_spec.rb +8 -5
- data/spec/licensee/rule_spec.rb +6 -3
- data/spec/licensee_spec.rb +12 -9
- data/spec/spec_helper.rb +27 -9
- data/spec/vendored_license_spec.rb +29 -10
- data/vendor/choosealicense.com/_data/meta.yml +0 -4
- data/vendor/choosealicense.com/_data/rules.yml +3 -0
- data/vendor/choosealicense.com/_licenses/0bsd.txt +39 -0
- data/vendor/choosealicense.com/_licenses/afl-3.0.txt +7 -6
- data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +0 -1
- data/vendor/choosealicense.com/_licenses/apache-2.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/artistic-2.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +8 -6
- data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +2 -2
- data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +12 -10
- data/vendor/choosealicense.com/_licenses/bsd-4-clause.txt +61 -0
- data/vendor/choosealicense.com/_licenses/bsl-1.0.txt +5 -2
- data/vendor/choosealicense.com/_licenses/cc-by-4.0.txt +16 -14
- data/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +16 -14
- data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +113 -105
- data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +579 -0
- data/vendor/choosealicense.com/_licenses/ecl-2.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/epl-1.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/epl-2.0.txt +3 -4
- data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +0 -1
- data/vendor/choosealicense.com/_licenses/eupl-1.2.txt +0 -1
- data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +0 -1
- data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/isc.txt +2 -3
- data/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +0 -1
- data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +1 -3
- data/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +1 -2
- data/vendor/choosealicense.com/_licenses/mit.txt +1 -2
- data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +0 -1
- data/vendor/choosealicense.com/_licenses/ms-pl.txt +0 -1
- data/vendor/choosealicense.com/_licenses/ms-rl.txt +0 -1
- data/vendor/choosealicense.com/_licenses/ncsa.txt +21 -22
- data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +573 -0
- data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +4 -2
- data/vendor/choosealicense.com/_licenses/osl-3.0.txt +1 -2
- data/vendor/choosealicense.com/_licenses/postgresql.txt +4 -5
- data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -2
- data/vendor/choosealicense.com/_licenses/upl-1.0.txt +4 -5
- data/vendor/choosealicense.com/_licenses/vim.txt +111 -0
- data/vendor/choosealicense.com/_licenses/wtfpl.txt +0 -1
- data/vendor/choosealicense.com/_licenses/zlib.txt +4 -2
- metadata +79 -28
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Licensee
|
2
4
|
module ProjectFiles
|
3
5
|
class ReadmeFile < Licensee::ProjectFiles::LicenseFile
|
@@ -7,8 +9,8 @@ module Licensee
|
|
7
9
|
/\AREADME\.(#{Regexp.union(EXTENSIONS).source})\z/i => 0.9
|
8
10
|
}.freeze
|
9
11
|
|
10
|
-
TITLE_REGEX = /licen[sc]e:?/i
|
11
|
-
UNDERLINE_REGEX = /\n[-=]+/m
|
12
|
+
TITLE_REGEX = /licen[sc]e:?/i.freeze
|
13
|
+
UNDERLINE_REGEX = /\n[-=]+/m.freeze
|
12
14
|
CONTENT_REGEX = /^
|
13
15
|
(?: # Header lookbehind
|
14
16
|
[\#=]+\s#{TITLE_REGEX}\s*[\#=]* # Start of hashes or rdoc header
|
@@ -25,7 +27,7 @@ module Licensee
|
|
25
27
|
|
|
26
28
|
\z # End of file
|
27
29
|
)
|
28
|
-
/mix
|
30
|
+
/mix.freeze
|
29
31
|
|
30
32
|
def possible_matchers
|
31
33
|
super.push(Matchers::Reference)
|
data/lib/licensee/projects.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Filesystem-based project
|
2
4
|
#
|
3
5
|
# Analyze a folder on the filesystem for license information
|
@@ -42,13 +44,18 @@ module Licensee
|
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
45
|
-
# Retrieve a file's content from disk
|
47
|
+
# Retrieve a file's content from disk, enforcing encoding
|
46
48
|
#
|
47
49
|
# file - the file hash, with the :name key as the file's relative path
|
48
50
|
#
|
49
51
|
# Returns the file contents as a string
|
50
52
|
def load_file(file)
|
51
|
-
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)
|
52
59
|
end
|
53
60
|
|
54
61
|
# Returns true if @dir is @root or it's descendant
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Git-based project
|
2
4
|
#
|
3
5
|
# Analyze a given (bare) Git repository for license information
|
@@ -11,34 +13,40 @@ autoload :Rugged, 'rugged'
|
|
11
13
|
module Licensee
|
12
14
|
module Projects
|
13
15
|
class GitProject < Licensee::Projects::Project
|
14
|
-
attr_reader :
|
16
|
+
attr_reader :revision
|
15
17
|
|
16
18
|
class InvalidRepository < ArgumentError; end
|
17
19
|
|
18
20
|
def initialize(repo, revision: nil, **args)
|
19
|
-
@
|
20
|
-
repo
|
21
|
-
else
|
22
|
-
Rugged::Repository.new(repo)
|
23
|
-
end
|
24
|
-
|
21
|
+
@raw_repo = repo
|
25
22
|
@revision = revision
|
23
|
+
|
24
|
+
raise InvalidRepository if repository.head_unborn?
|
25
|
+
|
26
26
|
super(**args)
|
27
|
+
end
|
28
|
+
|
29
|
+
def repository
|
30
|
+
@repository ||= begin
|
31
|
+
return @raw_repo if @raw_repo.is_a? Rugged::Repository
|
32
|
+
|
33
|
+
Rugged::Repository.new(@raw_repo)
|
34
|
+
end
|
27
35
|
rescue Rugged::OSError, Rugged::RepositoryError
|
28
36
|
raise InvalidRepository
|
29
37
|
end
|
30
38
|
|
31
39
|
def close
|
32
|
-
|
40
|
+
repository.close
|
33
41
|
end
|
34
42
|
|
35
43
|
private
|
36
44
|
|
37
45
|
def commit
|
38
46
|
@commit ||= if revision
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
repository.lookup(revision)
|
48
|
+
else
|
49
|
+
repository.last_commit
|
42
50
|
end
|
43
51
|
end
|
44
52
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# GitHub project
|
2
4
|
#
|
3
5
|
# Analyses a remote GitHub repository for license information
|
@@ -13,7 +15,7 @@ module Licensee
|
|
13
15
|
# If there's any trailing data (e.g. `.git`) this pattern will ignore it:
|
14
16
|
# we're going to use the API rather than clone the repo.
|
15
17
|
GITHUB_REPO_PATTERN =
|
16
|
-
%r{https://github.com/([^\/]+\/([^\/]+(?=\.git)|[^\/]+)).*}
|
18
|
+
%r{https://github.com/([^\/]+\/([^\/]+(?=\.git)|[^\/]+)).*}.freeze
|
17
19
|
|
18
20
|
class RepoNotFound < StandardError; end
|
19
21
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Licensee::Project represents an open source project on disk
|
2
4
|
# It is not used directly, but rather is extended by FSProject and GitProject
|
3
5
|
# depending on the type of file system access available
|
@@ -23,9 +25,9 @@ module Licensee
|
|
23
25
|
return @license if defined? @license
|
24
26
|
|
25
27
|
@license = if licenses_without_copyright.count == 1 || lgpl?
|
26
|
-
|
27
|
-
|
28
|
-
|
28
|
+
licenses_without_copyright.first
|
29
|
+
elsif licenses_without_copyright.count > 1
|
30
|
+
Licensee::License.find('other')
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
@@ -113,7 +115,7 @@ module Licensee
|
|
113
115
|
return [] if files.empty? || files.nil?
|
114
116
|
|
115
117
|
found = files.map { |file| file.merge(score: yield(file[:name])) }
|
116
|
-
found.select! { |file| file[:score]
|
118
|
+
found.select! { |file| file[:score].positive? }
|
117
119
|
found.sort { |a, b| b[:score] <=> a[:score] }
|
118
120
|
end
|
119
121
|
|
@@ -137,7 +139,7 @@ module Licensee
|
|
137
139
|
# Returns an array of LicenseFiles with LPGL first
|
138
140
|
def prioritize_lgpl(files)
|
139
141
|
return files if files.empty?
|
140
|
-
return files unless files.first.license
|
142
|
+
return files unless files.first.license&.gpl?
|
141
143
|
|
142
144
|
lesser = files.find_index(&:lgpl?)
|
143
145
|
files.unshift(files.delete_at(lesser)) if lesser
|
data/lib/licensee/rule.rb
CHANGED
data/lib/licensee/version.rb
CHANGED
data/licensee.gemspec
ADDED
@@ -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')
|
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
|
data/spec/bin_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe 'command line invocation' do
|
2
4
|
let(:command) { ['bundle', 'exec', 'bin/licensee', 'help'] }
|
3
5
|
let(:arguments) { [] }
|
@@ -12,7 +14,7 @@ RSpec.describe 'command line invocation' do
|
|
12
14
|
let(:status) { output[2] }
|
13
15
|
|
14
16
|
it 'Returns a zero exit code' do
|
15
|
-
expect(status.exitstatus).to
|
17
|
+
expect(status.exitstatus).to be(0)
|
16
18
|
end
|
17
19
|
|
18
20
|
it 'returns the help text' do
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe 'fixture test' do
|
4
|
+
fixtures.each do |fixture|
|
5
|
+
let(:options) { { detect_packages: true, detect_readme: true } }
|
6
|
+
|
7
|
+
context "the #{fixture} fixture" do
|
8
|
+
subject { Licensee.project(path, **options) }
|
9
|
+
|
10
|
+
let(:path) { fixture_path(fixture) }
|
11
|
+
let(:other) { Licensee::License.find('other') }
|
12
|
+
let(:none) { Licensee::License.find('none') }
|
13
|
+
let(:expectations) { fixture_licenses[fixture] || {} }
|
14
|
+
let(:license_file) { subject.license_file }
|
15
|
+
let(:matcher) { license_file&.matcher }
|
16
|
+
|
17
|
+
it 'has an expected license in fixtures-licenses.yml' do
|
18
|
+
msg = 'Expected an entry in `'.dup
|
19
|
+
msg << fixture_path('fixtures-licenses.yml')
|
20
|
+
msg << "` for the `#{fixture}` fixture. Please run "
|
21
|
+
msg << 'script/dump-fixture-licenses and confirm the output.'
|
22
|
+
expect(fixture_licenses).to have_key(fixture), msg
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'detects the license' do
|
26
|
+
expected = if expectations['key']
|
27
|
+
Licensee::License.find(expectations['key'])
|
28
|
+
else
|
29
|
+
none
|
30
|
+
end
|
31
|
+
|
32
|
+
expect(subject.license).to eql(expected)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns the expected hash' do
|
36
|
+
hash = license_file ? license_file.content_hash : nil
|
37
|
+
expect(hash).to eql(expectations['hash'])
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'uses the expected matcher' do
|
41
|
+
expected = matcher ? matcher.name.to_s : nil
|
42
|
+
expect(expected).to eql(expectations['matcher'])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -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.
|