8000 Move to using a post install message for 3.0 warning. · rubyzip/rubyzip@2f1c1ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f1c1ea

Browse files
committed
Move to using a post install message for 3.0 warning.
1 parent 16de339 commit 2f1c1ea

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# X.X.X (Next)
22

3+
# 2.3.2 (2021-07-05)
4+
5+
- This is a dummy release to warn about breaking changes coming in version 3.0. This updated version uses the Gem `post_install_message` instead of printing to `STDERR`.
6+
37
# 2.3.1 (2021-07-03)
48

59
- This is a dummy release to warn about breaking changes coming in version 3.0.

lib/zip.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,6 @@
3434
require 'zip/errors'
3535

3636
module Zip
37-
BANNER = [
38-
'RubyZip 3.0 is coming!',
39-
'**********************',
40-
'',
41-
'The public API of some Rubyzip classes has been modernized to use named',
42-
'parameters for optional arguments. Please check your usage of the',
43-
'following classes:',
44-
' * `Zip::File`',
45-
' * `Zip::Entry`',
46-
' * `Zip::InputStream`',
47-
' * `Zip::OutputStream`',
48-
'',
49-
'Please ensure that your Gemfiles and .gemspecs are suitably restrictive',
50-
'to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).',
51-
'See https://github.com/rubyzip/rubyzip for details. The Changelog also',
52-
'lists other enhancements and bugfixes that have been implemented since',
53-
'version 2.3.0.'
54-
].freeze
55-
5637
extend self
5738
attr_accessor :unicode_names,
5839
:on_exists_proc,
@@ -66,8 +47,6 @@ module Zip
6647
:validate_entry_sizes
6748

6849
def reset!
69-
warn BANNER.join("\n") unless BANNER.empty?
70-
7150
@_ran_once = false
7251
@unicode_names = false
7352
@on_exists_proc = false

lib/zip/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Zip
2-
VERSION = '2.3.1'
2+
VERSION = '2.3.2'
33
end

rubyzip.gemspec

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,22 @@ Gem::Specification.new do |s|
2626
s.add_development_dependency 'pry', '~> 0.10'
2727
s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
2828
s.add_development_dependency 'rubocop', '~> 0.79'
29+
s.post_install_message = <<~ENDBANNER
30+
RubyZip 3.0 is coming!
31+
**********************
32+
33+
The public API of some Rubyzip classes has been modernized to use named
34+
parameters for optional arguments. Please check your usage of the
35+
following classes:
36+
* `Zip::File`
37+
* `Zip::Entry`
38+
* `Zip::InputStream`
39+
* `Zip::OutputStream`
40+
41+
Please ensure that your Gemfiles and .gemspecs are suitably restrictive
42+
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
43+
See https://github.com/rubyzip/rubyzip for details. The Changelog also
44+
lists other enhancements and bugfixes that have been implemented since
45+
version 2.3.0.
46+
ENDBANNER
2947
end

0 commit comments

Comments
 (0)
0