unlicense 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ca58fc6564da6726523571012aa55392630f970c45875b4952165ec1ee0e2c13
4
+ data.tar.gz: f5ebaf7734a2c883ab0f510a33d3dbc18b14ed69c86b435554889239da5bd9b4
5
+ SHA512:
6
+ metadata.gz: cc903938c8ec8da77a75965dc6059792fa5217afd4b304bccd75e03a6ccd3e4b6ae0a6e326a527733d7f31a378ec2fc092cb8c22502dfde6163906d02206e49a
7
+ data.tar.gz: 25fcaf98eb9b02e661f54485772bfdd4af8615476c69aeaa61e8530896fff7095fa87c9ced39cb1c656a897fe2723266bfaf41e5629589031e9ad1ba9450a463
data/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ * Arto Bendiken <arto@bendiken.net>
data/CHANGES.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
data/CREDITS.md ADDED
@@ -0,0 +1 @@
1
+ # Credits
data/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Unlicense Command-Line Interface (CLI)
2
+
3
+ [![Project license](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org)
4
+ [![Ruby compatibility](https://img.shields.io/badge/ruby-2.4%2B-blue)](https://rubygems.org/gems/unlicense)
5
+ [![RubyGems gem](https://img.shields.io/gem/v/unlicense.svg)](https://rubygems.org/gems/unlicense)
6
+
7
+ A simple `unlicense` script that prints out the text of the [Unlicense]
8
+ template.
9
+
10
+ ## Features
11
+
12
+ - Outputs the [Unlicense template text](https://unlicense.org/UNLICENSE)
13
+ on the standard output stream. (That's it.)
14
+
15
+ ## Prerequisites
16
+
17
+ - [Ruby] 2.4+
18
+
19
+ ## Installation
20
+
21
+ The tool can be installed quickly and easily on any computer that has [Ruby]
22
+ available:
23
+
24
+ ```bash
25
+ $ gem install unlicense
26
+ ```
27
+
28
+ After installation, test running the tool as follows:
29
+
30
+ ```bash
31
+ $ unlicense
32
+ ```
33
+
34
+ In case the command wasn't found after installation, you likely need to
35
+ configure your `PATH` environment variable to include your [RubyGems] program
36
+ path.
37
+
38
+ ## Reference (CLI)
39
+
40
+ ### Displaying the Unlicense template
41
+
42
+ ```
43
+ $ unlicense
44
+ This is free and unencumbered software released into the public domain.
45
+
46
+ Anyone is free to copy, modify, publish, use, compile, sell, or
47
+ distribute this software, either in source code form or as a compiled
48
+ binary, for any purpose, commercial or non-commercial, and by any
49
+ means.
50
+
51
+ In jurisdictions that recognize copyright laws, the author or authors
52
+ of this software dedicate any and all copyright interest in the
53
+ software to the public domain. We make this dedication for the benefit
54
+ of the public at large and to the detriment of our heirs and
55
+ successors. We intend this dedication to be an overt act of
56
+ relinquishment in perpetuity of all present and future rights to this
57
+ software under copyright law.
58
+
59
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
60
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
62
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
63
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
64
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
65
+ OTHER DEALINGS IN THE SOFTWARE.
66
+
67
+ For more information, please refer to <https://unlicense.org/>
68
+ ```
69
+
70
+ ### Writing the Unlicense template to a file
71
+
72
+ ```
73
+ $ unlicense > UNLICENSE
74
+ ```
75
+
76
+ ### Measuring the byte size of the Unlicense template
77
+
78
+ ```
79
+ $ unlicense | wc -c
80
+ 1212
81
+ ```
82
+
83
+ ### Computing the MD5 hash of the template
84
+
85
+ ```
86
+ $ unlicense | openssl dgst -md5
87
+ f4c62131f879a8445e16a7f265aea635
88
+ ```
89
+
90
+ ### Computing the SHA-1 hash of the template
91
+
92
+ ```
93
+ $ unlicense | openssl dgst -sha1
94
+ 5c88b302ec9f925c61e48a1ed9f02a9dbe0a6107
95
+ ```
96
+
97
+ ### Computing the SHA-256 hash of the template
98
+
99
+ ```
100
+ $ unlicense | openssl dgst -sha256
101
+ b5065838cbac452dfc855ba6e6e031481ad2c68406f70d21ead9321374653e6c
102
+ ```
103
+
104
+ ### Computing the SHA-512 hash of the template
105
+
106
+ ```
107
+ $ unlicense | openssl dgst -sha512
108
+ 1bb7ac541515a5950edd07c9f743e3e60ff7c6dabde874c93b452de9cf8d5e7e3a216f318553ab16a234e79d29d319d6c1da37aa63ff4f09860614ec28a1f0b8
109
+ ```
110
+
111
+ [Ruby]: https://www.ruby-lang.org/en/
112
+ [RubyGems]: https://guides.rubygems.org/faqs/
113
+ [Unlicense]: https://unlicense.org
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org/>
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bin/unlicense ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This is free and unencumbered software released into the public domain.
3
+
4
+ require_relative '../lib/unlicense'
5
+
6
+ puts Unlicense::Template.to_s
@@ -0,0 +1,35 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ require 'pathname'
4
+
5
+ ##
6
+ # The Unlicense template.
7
+ #
8
+ # @see http://unlicense.org/UNLICENSE
9
+ module Unlicense::Template
10
+ FILE = File.expand_path('../../UNLICENSE', __dir__).freeze
11
+
12
+ ##
13
+ # Returns the template path.
14
+ #
15
+ # @return [Pathname]
16
+ def self.path
17
+ Pathname(FILE)
18
+ end
19
+
20
+ ##
21
+ # Returns the template string.
22
+ #
23
+ # @return [String]
24
+ def self.to_s
25
+ self.to_str
26
+ end
27
+
28
+ ##
29
+ # Returns the template string.
30
+ #
31
+ # @return [String]
32
+ def self.to_str
33
+ File.read(FILE).freeze
34
+ end
35
+ end # Unlicense::Template
@@ -0,0 +1,21 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ module Unlicense
4
+ module VERSION
5
+ FILE = File.expand_path('../../VERSION', __dir__).freeze
6
+ STRING = File.read(FILE).chomp.freeze
7
+ MAJOR, MINOR, TINY, EXTRA = STRING.split('.').map(&:to_i).freeze
8
+
9
+ ##
10
+ # @return [String]
11
+ def self.to_s() STRING end
12
+
13
+ ##
14
+ # @return [String]
15
+ def self.to_str() STRING end
16
+
17
+ ##
18
+ # @return [Array(Integer, Integer, Integer)]
19
+ def self.to_a() [MAJOR, MINOR, TINY].freeze end
20
+ end # VERSION
21
+ end # Unlicense
data/lib/unlicense.rb ADDED
@@ -0,0 +1,8 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ ##
4
+ # Unlicense Command-Line Interface (CLI)
5
+ module Unlicense; end
6
+
7
+ require_relative 'unlicense/version'
8
+ require_relative 'unlicense/template'
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: unlicense
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Arto Bendiken
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: yard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0.9'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0.9'
55
+ description: Unlicense Command-Line Interface (CLI)
56
+ email: arto@bendiken.net
57
+ executables:
58
+ - unlicense
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - AUTHORS
63
+ - CHANGES.md
64
+ - CREDITS.md
65
+ - README.md
66
+ - UNLICENSE
67
+ - VERSION
68
+ - bin/unlicense
69
+ - lib/unlicense.rb
70
+ - lib/unlicense/template.rb
71
+ - lib/unlicense/version.rb
72
+ homepage: https://github.com/unlicense/unlicense-cli
73
+ licenses:
74
+ - Unlicense
75
+ metadata:
76
+ bug_tracker_uri: https://github.com/unlicense/unlicense-cli/issues
77
+ changelog_uri: https://github.com/unlicense/unlicense-cli/blob/master/CHANGES.md
78
+ documentation_uri: https://www.rubydoc.info/github/unlicense/unlicense-cli/master
79
+ homepage_uri: https://github.com/unlicense/unlicense-cli
80
+ source_code_uri: https://github.com/unlicense/unlicense-cli
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 2.4.0
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 2.6.8
95
+ requirements: []
96
+ rubygems_version: 3.1.2
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Unlicense Command-Line Interface (CLI)
100
+ test_files: []