Skip to content

Commit cad6357

Browse files
authored
Merge pull request #7261 from rubygems/add-missing-resolv-and-timeout-licenses
Add missing resolv and timeout licenses
2 parents 03222d9 + 0069465 commit cad6357

File tree

6 files changed

+83
-7
lines changed

6 files changed

+83
-7
lines changed

Manifest.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ lib/rubygems/net-http/lib/net/http/response.rb
438438
lib/rubygems/net-http/lib/net/http/responses.rb
439439
lib/rubygems/net-http/lib/net/http/status.rb
440440
lib/rubygems/net-http/lib/net/https.rb
441+
lib/rubygems/net-protocol/LICENSE.txt
441442
lib/rubygems/net-protocol/lib/net/protocol.rb
442443
lib/rubygems/net/http.rb
443444
lib/rubygems/openssl.rb
@@ -480,6 +481,7 @@ lib/rubygems/request_set/lockfile.rb
480481
lib/rubygems/request_set/lockfile/parser.rb
481482
lib/rubygems/request_set/lockfile/tokenizer.rb
482483
lib/rubygems/requirement.rb
484+
lib/rubygems/resolv/LICENSE.txt
483485
lib/rubygems/resolv/lib/resolv.rb
484486
lib/rubygems/resolver.rb
485487
lib/rubygems/resolver/activation_request.rb
@@ -562,6 +564,7 @@ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
562564
lib/rubygems/stub_specification.rb
563565
lib/rubygems/text.rb
564566
lib/rubygems/timeout.rb
567+
lib/rubygems/timeout/LICENSE.txt
565568
lib/rubygems/timeout/lib/timeout.rb
566569
lib/rubygems/tsort.rb
567570
lib/rubygems/tsort/.document

Rakefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ if File.exist?("tool/automatiek.rake")
213213
subsublib.namespace = "Timeout"
214214
subsublib.prefix = "Gem"
215215
subsublib.vendor_lib = "lib/rubygems/timeout"
216-
subsublib.license_path = "License.txt"
216+
subsublib.license_path = "LICENSE.txt"
217217
end
218218
end
219219

@@ -240,15 +240,15 @@ if File.exist?("tool/automatiek.rake")
240240
subsublib.namespace = "Net"
241241
subsublib.prefix = "Gem"
242242
subsublib.vendor_lib = "lib/rubygems/net-protocol"
243-
subsublib.license_path = "License.txt"
243+
subsublib.license_path = "LICENSE.txt"
244244

245245
subsublib.dependency("timeout") do |ssslib|
246246
ssslib.version = "v0.4.1"
247247
ssslib.download = { github: "https://github.com/ruby/timeout" }
248248
ssslib.namespace = "Timeout"
249249
ssslib.prefix = "Gem"
250250
ssslib.vendor_lib = "lib/rubygems/timeout"
251-
ssslib.license_path = "License.txt"
251+
ssslib.license_path = "LICENSE.txt"
252252
end
253253
end
254254

@@ -258,7 +258,7 @@ if File.exist?("tool/automatiek.rake")
258258
subsublib.namespace = "Timeout"
259259
subsublib.prefix = "Gem"
260260
subsublib.vendor_lib = "lib/rubygems/timeout"
261-
subsublib.license_path = "License.txt"
261+
subsublib.license_path = "LICENSE.txt"
262262
end
263263

264264
sublib.dependency("resolv") do |subsublib|
@@ -267,15 +267,15 @@ if File.exist?("tool/automatiek.rake")
267267
subsublib.namespace = "Resolv"
268268
subsublib.prefix = "Gem"
269269
subsublib.vendor_lib = "lib/rubygems/resolv"
270-
subsublib.license_path = "License.txt"
270+
subsublib.license_path = "LICENSE.txt"
271271

272272
subsublib.dependency("timeout") do |ssslib|
273273
ssslib.version = "v0.4.1"
274274
ssslib.download = { github: "https://github.com/ruby/timeout" }
275275
ssslib.namespace = "Timeout"
276276
ssslib.prefix = "Gem"
277277
ssslib.vendor_lib = "lib/rubygems/timeout"
278-
ssslib.license_path = "License.txt"
278+
ssslib.license_path = "LICENSE.txt"
279279
end
280280
end
281281
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions
5+
are met:
6+
1. Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22+
SUCH DAMAGE.

lib/rubygems/resolv/LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions
5+
are met:
6+
1. Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22+
SUCH DAMAGE.

lib/rubygems/timeout/LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions
5+
are met:
6+
1. Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22+
SUCH DAMAGE.

tool/automatiek/gem.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,17 @@ def namespace_files(folder)
115115
end
116116

117117
def clean
118-
files = Dir.glob("#{vendor_lib}/*", File::FNM_DOTMATCH).reject do |f|
118+
all_files = Dir.glob("#{vendor_lib}/*", File::FNM_DOTMATCH)
119+
120+
unless all_files.include?("#{vendor_lib}/#{license_path}")
121+
raise "#{license_path} was not found in gem #{gem_name}. The gem includes the following files:\n * #{all_files.join("\n * ")}"
122+
end
123+
124+
files = all_files.reject do |f|
119125
basename = f.split("/").last
120126
allowlist.include? basename
121127
end
128+
122129
FileUtils.rm_r files
123130
end
124131

0 commit comments

Comments
 (0)