From cff2c5daeae5c518677eb816a7789ad2ae322a08 Mon Sep 17 00:00:00 2001
From: kakuzei <Jean-Baptiste.Jacquinot@moodys.com>
Date: Mon, 18 Oct 2021 09:51:11 +0200
Subject: [PATCH] Allow to use any version 1.x of Nokogiri for Ruby version
 later than or equal to 2.5.0

---
 Gemfile                                    | 9 +++++----
 blob/ChangeLog.md                          | 3 +++
 blob/azure-storage-blob.gemspec            | 5 +++--
 blob/lib/azure/storage/blob/version.rb     | 2 +-
 common/ChangeLog.md                        | 3 +++
 common/azure-storage-common.gemspec        | 2 +-
 common/lib/azure/storage/common/version.rb | 2 +-
 file/ChangeLog.md                          | 3 +++
 file/azure-storage-file.gemspec            | 2 +-
 file/lib/azure/storage/file/version.rb     | 2 +-
 queue/ChangeLog.md                         | 3 +++
 queue/azure-storage-queue.gemspec          | 2 +-
 queue/lib/azure/storage/queue/version.rb   | 2 +-
 table/ChangeLog.md                         | 3 +++
 table/azure-storage-table.gemspec          | 5 +++--
 table/lib/azure/storage/table/version.rb   | 2 +-
 16 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/Gemfile b/Gemfile
index 17b234dd..9a525463 100644
--- a/Gemfile
+++ b/Gemfile
@@ -27,12 +27,13 @@ source "https://rubygems.org" do
   gem "faraday",             "~> 1.0", :require => false
   gem "faraday_middleware",  "~> 1.0.0.rc1", :require => false
   gem "net-http-persistent", "~> 4.0", :require => false
-  if RUBY_VERSION.start_with?("2.3") then
-    gem "nokogiri",            "~> 1.10.4", :require => false
+  if RUBY_VERSION < "2.4.0"
+    gem "nokogiri",          "~> 1.10.4", :require => false
+  elsif RUBY_VERSION < "2.5.0"
+    gem "nokogiri",          "~> 1.11.0.rc2", :require => false
   else
-    gem "nokogiri",            "~> 1.11.0.rc2", :require => false
+    gem "nokogiri",          "~> 1", ">= 1.12.5", :require => false
   end
-
   gem "adal",                "~> 1.0", :require => false
   gem "dotenv",              "~> 2.0", :require => false
   gem "minitest",            "~> 5", :require => false
diff --git a/blob/ChangeLog.md b/blob/ChangeLog.md
index 51b7e270..aa415420 100644
--- a/blob/ChangeLog.md
+++ b/blob/ChangeLog.md
@@ -1,3 +1,6 @@
+2021.10 - version 2.0.2
+* Allow to use any version 1.x of Nokogiri for Ruby version later than or equal to 2.5.0.
+
 2020.8 - version 2.0.1
 * Bumped up Nokogiri version to 1.11.0.rc2 for Ruby version later than or equal to 2.4.0.
 
diff --git a/blob/azure-storage-blob.gemspec b/blob/azure-storage-blob.gemspec
index 24893e19..04adf40c 100644
--- a/blob/azure-storage-blob.gemspec
+++ b/blob/azure-storage-blob.gemspec
@@ -43,10 +43,11 @@ Gem::Specification.new do |s|
   s.add_runtime_dependency("azure-storage-common",    "~> 2.0")
   if RUBY_VERSION < "2.4.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.10.4")
-  else
+  elsif RUBY_VERSION < "2.5.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.11.0.rc2")
+  else
+    s.add_runtime_dependency("nokogiri",                "~> 1", ">= 1.12.5")
   end
-
   s.add_development_dependency("dotenv",              "~> 2.0")
   s.add_development_dependency("minitest",            "~> 5")
   s.add_development_dependency("minitest-reporters",  "~> 1")
diff --git a/blob/lib/azure/storage/blob/version.rb b/blob/lib/azure/storage/blob/version.rb
index ca7932c5..e0c95a63 100644
--- a/blob/lib/azure/storage/blob/version.rb
+++ b/blob/lib/azure/storage/blob/version.rb
@@ -31,7 +31,7 @@ class Version
         # Fields represent the parts defined in http://semver.org/
         MAJOR = 2 unless defined? MAJOR
         MINOR = 0 unless defined? MINOR
-        UPDATE = 1 unless defined? UPDATE
+        UPDATE = 2 unless defined? UPDATE
 
         class << self
           # @return [String]
diff --git a/common/ChangeLog.md b/common/ChangeLog.md
index 8531e7f9..4de2c428 100644
--- a/common/ChangeLog.md
+++ b/common/ChangeLog.md
@@ -1,3 +1,6 @@
+2021.10 - version 2.0.3
+* Allow to use any version 1.x of Nokogiri for Ruby version later than or equal to 2.5.0.
+
 2020.8 - version 2.0.2
 * Bumped up Nokogiri version to 1.11.0.rc2 for Ruby version later than or equal to 2.4.0.
 * Changed to use persistent HTTP client to speed up requests #168.
diff --git a/common/azure-storage-common.gemspec b/common/azure-storage-common.gemspec
index 2906823f..4320f04a 100644
--- a/common/azure-storage-common.gemspec
+++ b/common/azure-storage-common.gemspec
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
   if RUBY_VERSION < "2.4.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.10.4")
   else
-    s.add_runtime_dependency("nokogiri",                "~> 1.11.0.rc2")
+    s.add_runtime_dependency("nokogiri",                "~> 1", ">= 1.12.5")
   end
 
   s.add_development_dependency("dotenv",              "~> 2.0")
diff --git a/common/lib/azure/storage/common/version.rb b/common/lib/azure/storage/common/version.rb
index d59b4abd..ed9da12f 100644
--- a/common/lib/azure/storage/common/version.rb
+++ b/common/lib/azure/storage/common/version.rb
@@ -31,7 +31,7 @@ class Version
         # Fields represent the parts defined in http://semver.org/
         MAJOR = 2 unless defined? MAJOR
         MINOR = 0 unless defined? MINOR
-        UPDATE = 2 unless defined? UPDATE
+        UPDATE = 3 unless defined? UPDATE
 
         class << self
           # @return [String]
diff --git a/file/ChangeLog.md b/file/ChangeLog.md
index 7a86b557..fc5d41ed 100644
--- a/file/ChangeLog.md
+++ b/file/ChangeLog.md
@@ -1,3 +1,6 @@
+2021.10 - version 2.0.3
+* Allow to use any version 1.x of Nokogiri for Ruby version later than or equal to 2.5.0.
+
 2020.8 - version 2.0.2
 * Bumped up Nokogiri version to 1.11.0.rc2 for Ruby version later than or equal to 2.4.0.
 
diff --git a/file/azure-storage-file.gemspec b/file/azure-storage-file.gemspec
index 71a5a317..58068036 100644
--- a/file/azure-storage-file.gemspec
+++ b/file/azure-storage-file.gemspec
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
   if RUBY_VERSION < "2.4.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.10.4")
   else
-    s.add_runtime_dependency("nokogiri",                "~> 1.11.0.rc2")
+    s.add_runtime_dependency("nokogiri",                "~> 1", ">= 1.12.5")
   end
 
   s.add_development_dependency("dotenv",              "~> 2.0")
diff --git a/file/lib/azure/storage/file/version.rb b/file/lib/azure/storage/file/version.rb
index 3e1f811c..f2465dd8 100644
--- a/file/lib/azure/storage/file/version.rb
+++ b/file/lib/azure/storage/file/version.rb
@@ -31,7 +31,7 @@ class Version
         # Fields represent the parts defined in http://semver.org/
         MAJOR = 2 unless defined? MAJOR
         MINOR = 0 unless defined? MINOR
-        UPDATE = 2 unless defined? UPDATE
+        UPDATE = 3 unless defined? UPDATE
 
         class << self
           # @return [String]
diff --git a/queue/ChangeLog.md b/queue/ChangeLog.md
index cdce28d9..f60a89e4 100644
--- a/queue/ChangeLog.md
+++ b/queue/ChangeLog.md
@@ -1,3 +1,6 @@
+2021.10 - version 2.0.3
+* Allow to use any version 1.x of Nokogiri for Ruby version later than or equal to 2.5.0.
+
 2020.8 - version 2.0.2
 * Bumped up Nokogiri version to 1.11.0.rc2 for Ruby version later than or equal to 2.4.0.
 
diff --git a/queue/azure-storage-queue.gemspec b/queue/azure-storage-queue.gemspec
index d6d61b0a..954271e0 100644
--- a/queue/azure-storage-queue.gemspec
+++ b/queue/azure-storage-queue.gemspec
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
   if RUBY_VERSION < "2.4.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.10.4")
   else
-    s.add_runtime_dependency("nokogiri",                "~> 1.11.0.rc2")
+    s.add_runtime_dependency("nokogiri",                "~> 1", ">= 1.12.5")
   end
 
   s.add_development_dependency("dotenv",              "~> 2.0")
diff --git a/queue/lib/azure/storage/queue/version.rb b/queue/lib/azure/storage/queue/version.rb
index 16254fd3..12fc9def 100644
--- a/queue/lib/azure/storage/queue/version.rb
+++ b/queue/lib/azure/storage/queue/version.rb
@@ -31,7 +31,7 @@ class Version
         # Fields represent the parts defined in http://semver.org/
         MAJOR = 2 unless defined? MAJOR
         MINOR = 0 unless defined? MINOR
-        UPDATE = 2 unless defined? UPDATE
+        UPDATE = 3 unless defined? UPDATE
 
         class << self
           # @return [String]
diff --git a/table/ChangeLog.md b/table/ChangeLog.md
index 62eb4625..aca61b12 100644
--- a/table/ChangeLog.md
+++ b/table/ChangeLog.md
@@ -1,3 +1,6 @@
+2021.10 - version 2.0.3
+* Allow to use any version 1.x of Nokogiri for Ruby version later than or equal to 2.5.0.
+
 2020.8 - version 2.0.2
 * Bumped up Nokogiri version to 1.11.0.rc2 for Ruby version later than or equal to 2.4.0.
 
diff --git a/table/azure-storage-table.gemspec b/table/azure-storage-table.gemspec
index 21385fcd..da453696 100644
--- a/table/azure-storage-table.gemspec
+++ b/table/azure-storage-table.gemspec
@@ -43,10 +43,11 @@ Gem::Specification.new do |s|
   s.add_runtime_dependency("azure-storage-common",    "~> 2.0")
   if RUBY_VERSION < "2.4.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.10.4")
-  else
+  elsif RUBY_VERSION < "2.5.0"
     s.add_runtime_dependency("nokogiri",                "~> 1.11.0.rc2")
+  else
+    s.add_runtime_dependency("nokogiri",                "~> 1", ">= 1.12.5")
   end
-
   s.add_development_dependency("dotenv",              "~> 2.0")
   s.add_development_dependency("minitest",            "~> 5")
   s.add_development_dependency("minitest-reporters",  "~> 1")
diff --git a/table/lib/azure/storage/table/version.rb b/table/lib/azure/storage/table/version.rb
index 043675d8..3e346252 100644
--- a/table/lib/azure/storage/table/version.rb
+++ b/table/lib/azure/storage/table/version.rb
@@ -31,7 +31,7 @@ class Version
         # Fields represent the parts defined in http://semver.org/
         MAJOR = 2 unless defined? MAJOR
         MINOR = 0 unless defined? MINOR
-        UPDATE = 2 unless defined? UPDATE
+        UPDATE = 3 unless defined? UPDATE
 
         class << self
           # @return [String]
