summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rubygem-sitemap_generator-5.3.1-Fix-Ruby-2.0.0-compatibility.patch27
-rw-r--r--rubygem-sitemap_generator.spec31
-rw-r--r--sitemap.rb3
-rw-r--r--sources4
4 files changed, 21 insertions, 44 deletions
diff --git a/rubygem-sitemap_generator-5.3.1-Fix-Ruby-2.0.0-compatibility.patch b/rubygem-sitemap_generator-5.3.1-Fix-Ruby-2.0.0-compatibility.patch
deleted file mode 100644
index 8e9a214..0000000
--- a/rubygem-sitemap_generator-5.3.1-Fix-Ruby-2.0.0-compatibility.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 7ed62817d6e249751aedd6145aaeda1385e98b14 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
-Date: Mon, 11 Sep 2017 17:18:40 +0200
-Subject: [PATCH] Fix Ruby 2.0.0+ compatibility.
-
-YAML::ENGINE is not available since Ruby 2.0.0+, when Syck was removed
-from stdlib and replaced by Psych.
----
- lib/sitemap_generator/core_ext/big_decimal.rb | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/sitemap_generator/core_ext/big_decimal.rb b/lib/sitemap_generator/core_ext/big_decimal.rb
-index fa96550..7920edb 100644
---- a/lib/sitemap_generator/core_ext/big_decimal.rb
-+++ b/lib/sitemap_generator/core_ext/big_decimal.rb
-@@ -19,7 +19,7 @@ class SitemapGenerator::BigDecimal < BigDecimal
- #
- # Note that reconstituting YAML floats to native floats may lose precision.
- def to_yaml(opts = {})
-- return super if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
-+ return super unless defined?(YAML::ENGINE) && YAML::ENGINE.syck?
-
- YAML.quick_emit(nil, opts) do |out|
- string = to_s
---
-2.14.1
-
diff --git a/rubygem-sitemap_generator.spec b/rubygem-sitemap_generator.spec
index 5ce87f8..cb48fd7 100644
--- a/rubygem-sitemap_generator.spec
+++ b/rubygem-sitemap_generator.spec
@@ -2,29 +2,26 @@
%global gem_name sitemap_generator
Name: rubygem-%{gem_name}
-Version: 5.3.1
+Version: 6.0.0
Release: 1%{?dist}
Summary: Easily generate XML Sitemaps
License: MIT
URL: http://github.com/kjvarga/sitemap_generator
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/kjvarga/sitemap_generator.git && cd sitemap_generator
-# git checkout v5.3.1 && tar czvf sitemap_generator-5.3.1-specs.tar.gz spec/
+# git checkout v6.0.0 && tar czvf sitemap_generator-6.0.0-specs.tar.gz spec/
Source1: %{gem_name}-%{version}-specs.tar.gz
-Source2: https://raw.githubusercontent.com/kjvarga/sitemap_generator/v5.3.1/config/sitemap.rb
-# Fix compatibility with Ruby 2.0.0+.
-# https://github.com/kjvarga/sitemap_generator/pull/291
-Patch0: rubygem-sitemap_generator-5.3.1-Fix-Ruby-2.0.0-compatibility.patch
+Source2: https://raw.githubusercontent.com/kjvarga/sitemap_generator/v6.0.0/config/sitemap.rb
Requires: rubygem(bigdecimal)
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(bigdecimal)
BuildRequires: rubygem(builder)
-BuildRequires: rubygem(fog-aws) >= 1.2
-BuildRequires: rubygem(nokogiri) >= 1.6
-BuildRequires: rubygem(rspec) >= 3.5
-BuildRequires: rubygem(webmock) >= 2.3
+BuildRequires: rubygem(fog-aws)
+BuildRequires: rubygem(nokogiri)
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(webmock)
BuildArch: noarch
%description
@@ -45,8 +42,6 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
-%patch0 -p1
-
%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec
@@ -72,6 +67,15 @@ ln -s %{SOURCE2} ./config
# Get rid of Bundler.
sed -i '/[bB]undler/ s/^/#/' spec/spec_helper.rb
+# We don't need byebug to run the test suite.
+sed -i "/require 'byebug'/ s/^/#/" spec/spec_helper.rb
+
+# The 'fog-aws' is awailable in fog-aws 1.4.0+, but we have just 1.2.1 ATM :/
+sed -i "/require 'fog-aws'/ s|fog-aws|fog/aws|" spec/sitemap_generator/adapters/s3_adapter_spec.rb
+
+# We don't have aws-sdk-s3 in Fedora yet.
+mv spec/sitemap_generator/adapters/aws_sdk_adapter_spec.rb{,.disable}
+
rspec -rsitemap_generator spec
popd
@@ -91,5 +95,8 @@ popd
%doc %{gem_instdir}/README.md
%changelog
+* Tue Nov 28 2017 Vít Ondruch <vondruch@redhat.com> - 6.0.0-1
+- Update to sitemap_generator 6.0.0.
+
* Mon Sep 11 2017 Vít Ondruch <vondruch@redhat.com> - 5.3.1-1
- Initial package
diff --git a/sitemap.rb b/sitemap.rb
index f515733..5871b65 100644
--- a/sitemap.rb
+++ b/sitemap.rb
@@ -40,9 +40,6 @@ SitemapGenerator::Sitemap.create(
add '/ten'
- # This should have no effect. Already added default links.
- group(:include_root => true, :include_index => true) {}
-
# Not technically valid to have a link with a different host, but people like
# to do strange things sometimes
add '/merchant_path', :host => 'https://www.merchanthost.com'
diff --git a/sources b/sources
index 281049b..d1ff85e 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (sitemap_generator-5.3.1.gem) = 1f75c8522327a8c851e345d28ff59a199c8b3c9eb1f03658f0940d791fb5ffaa8c65971ec6fe2d4f3ea9855a39dd521cb03456a106417e7faac241d41ef0235f
-SHA512 (sitemap_generator-5.3.1-specs.tar.gz) = b57b158c396cbfaa2eda7ac34a8bb94227302217ec92f3a26005fe1e8e71b3e68bfdf934e05b9bd4789d0e7342a0e07735eb3b898bb199a88db67b41c88aa06d
+SHA512 (sitemap_generator-6.0.0.gem) = 0a05c3a3773a12da811606a0d78036ff0aee190b9f9473a4c06b78fe12c43c47ca18fc49951fbf7eec681817dd6810c57b728d53b3e498920a08b6dc49cdeea6
+SHA512 (sitemap_generator-6.0.0-specs.tar.gz) = 32965f1db26c92c3ab5a6be0f555f5534f060ef4183d450d3d832d03e8b2cd023847bbcba299f0d61621d6dbe8427d24389082f63e7bb3249e0cba01efb0e49b