Skip to content

Commit 6b92169

Browse files
authored
Upgrade notice for V2 to V3 (#2226)
1 parent 58175d6 commit 6b92169

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased Changes
22
------------------
33

4+
* Feature - Add upgrade notice on first client initialization and gem install.
5+
46
2.11.444 (2020-02-13)
57
------------------
68

aws-sdk-core/aws-sdk-core.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
2424
spec.add_dependency('jmespath', '~> 1.0')
2525
spec.add_dependency('aws-sigv4', '~> 1.0')
2626

27+
spec.post_install_message = 'NEWER VERSION AVAILABLE: Please upgrade to AWS SDK For Ruby V3'
2728
end

aws-sdk-core/lib/aws-sdk-core/client.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,19 @@ def define(svc_name, options)
5454

5555
Api::Customizations.apply_plugins(client_class)
5656

57+
soft_deprecation
5758
client_class
5859
end
5960

61+
private
62+
63+
def soft_deprecation
64+
unless @warned
65+
@warned = true
66+
warn("NEWER VERSION AVAILABLE: Please upgrade to AWS SDK For Ruby V3")
67+
end
68+
end
69+
6070
end
6171
end
6272
end

aws-sdk-resources/aws-sdk-resources.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ Gem::Specification.new do |spec|
1717

1818
spec.add_dependency('aws-sdk-core', version)
1919

20+
spec.post_install_message = 'NEWER VERSION AVAILABLE: Please upgrade to AWS SDK For Ruby V3'
2021
end

aws-sdk/aws-sdk.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ Gem::Specification.new do |spec|
1717

1818
spec.add_dependency('aws-sdk-resources', version)
1919

20+
spec.post_install_message = 'NEWER VERSION AVAILABLE: Please upgrade to AWS SDK For Ruby V3'
2021
end

0 commit comments

Comments
 (0)