-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #16, CVE-2016-10173 Also makes the move from minitar.gemspec to archive-tar-minitar.gemspec.
- Loading branch information
1 parent
27569df
commit 407a4ad
Showing
9 changed files
with
185 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
# -*- encoding: utf-8 -*- | ||
# stub: archive-tar-minitar 0.6 ruby lib | ||
|
||
minitar = Gem::Specification.load('minitar.gemspec') | ||
minitar.name = 'archive-tar-minitar' | ||
minitar.description = | ||
minitar.summary = %q(This gem is deprecated. Just install 'minitar'.) | ||
minitar.files.delete_if { |f| f !~ %r{lib/archive-tar-minitar\.rb} } | ||
minitar.extra_rdoc_files.clear | ||
minitar.rdoc_options.clear | ||
minitar.dependencies.clear | ||
minitar.add_dependency(%q<minitar>, "~> #{minitar.version}") | ||
minitar.add_dependency(%q<minitar-cli>, "<= 1.0") | ||
|
||
minitar | ||
Gem::Specification.new do |s| | ||
s.name = "archive-tar-minitar" | ||
s.version = "0.6" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.require_paths = ["lib"] | ||
s.authors = ["Austin Ziegler"] | ||
s.date = "2017-02-06" | ||
s.description = "'archive-tar-minitar' has been deprecated; just install 'minitar'. The minitar library is a pure-Ruby library that provides the ability to deal\nwith POSIX tar(1) archive files.\n\nThis is release 0.6, \u{2026}\n\nminitar (previously called Archive::Tar::Minitar) is based heavily on code\noriginally written by Mauricio Julio Fern\u{e1}ndez Pradier for the rpa-base\nproject." | ||
s.email = ["halostatue@gmail.com"] | ||
s.files = ["lib/archive-tar-minitar.rb"] | ||
s.homepage = "https://github.com/halostatue/minitar/" | ||
s.licenses = ["Ruby", "BSD-2-Clause"] | ||
s.post_install_message = "'archive-tar-minitar' has been deprecated; just install 'minitar'." | ||
s.required_ruby_version = Gem::Requirement.new(">= 1.8") | ||
s.rubygems_version = "2.5.1" | ||
s.summary = "'archive-tar-minitar' has been deprecated; just install 'minitar'." | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 4 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<minitar>, ["~> 0.6"]) | ||
s.add_runtime_dependency(%q<minitar-cli>, ["<= 1.0"]) | ||
else | ||
s.add_dependency(%q<minitar>, ["~> 0.6"]) | ||
s.add_dependency(%q<minitar-cli>, ["<= 1.0"]) | ||
end | ||
else | ||
s.add_dependency(%q<minitar>, ["~> 0.6"]) | ||
s.add_dependency(%q<minitar-cli>, ["<= 1.0"]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module Hoe::Deprecated_Gem | ||
def linked_spec(spec) | ||
atm = YAML.load(YAML.dump(spec)) | ||
atm.name = 'archive-tar-minitar' | ||
d = %Q('#{atm.name}' has been deprecated; just install '#{spec.name}'.) | ||
atm.description = "#{d} #{spec.description}" | ||
atm.summary = atm.post_install_message = d | ||
atm.files.delete_if { |f| f !~ %r{lib/archive-tar-minitar\.rb} } | ||
atm.extra_rdoc_files.clear | ||
atm.rdoc_options.clear | ||
atm.dependencies.clear | ||
atm.add_dependency(%Q(#{spec.name}), "~> #{spec.version}") | ||
atm.add_dependency(%Q(#{spec.name}-cli), "<= 1.0") | ||
|
||
unless @include_all | ||
[ :signing_key, :cert_chain ].each { |name| | ||
atm.send("#{name}=".to_sym, atm.default_value(name)) | ||
} | ||
end | ||
|
||
atm | ||
end | ||
|
||
def define_deprecated_gem_tasks | ||
gemspec = spec.name + '.gemspec' | ||
atmspec = 'archive-tar-minitar.gemspec' | ||
|
||
file atmspec => gemspec do | ||
open(atmspec, 'w') { |f| f.write(linked_spec(spec).to_ruby) } | ||
end | ||
|
||
task :gemspec => atmspec | ||
|
||
Gem::PackageTask.new linked_spec(spec) do |pkg| | ||
pkg.need_tar = @need_tar | ||
pkg.need_zip = @need_zip | ||
end | ||
end | ||
end |
Oops, something went wrong.