sitemap_generator 6.1.0 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d08b16f794edd543800c56dd8b2827c6b4ea4fb85721b18e3b675c4a5599a9d
4
- data.tar.gz: ce55fb33969d09c5e2d9ca4b841f511b6ecb9a365a64ec20964394266bcee305
3
+ metadata.gz: 07d190381c5aae66acc3b6eaa43d61444f3280e1ff76fd0dadf49d6c730d9b7a
4
+ data.tar.gz: dc61f7ff02926247d30ead18d71b16068e14a01ed36bb0694f0615febef6000a
5
5
  SHA512:
6
- metadata.gz: 0fe5e90c200a165349a424cfbe919bb11613419acad18d068c8406c8998b22c965b80bb7a16caf20e4c59da44595abeae91f4d7555992f6f249cd4665d036cd4
7
- data.tar.gz: 7f9493d43d626dde991e35f3b552541be9154d22c5a94c55820b50f023b647207167a3dccafeff2a5402c57fa2bd0c4cd6bac2f644ecf6b823fdc1d6716b714e
6
+ metadata.gz: ee8f86311c174e2b9b01514d48325f6d824bcabfaf8e5a711ff7e83442bc9f5adf4bbbe1ddc990d292c8ffc73138e7244b840a38aaeccef6f26bb55adee8cae6
7
+ data.tar.gz: 1049e27acaa1dafee38153d4faa1b51de61e67162a792a525269090e51f85e1c5c919c9755cc301543e6cd97dd8f18f5d914685cc7e3a23c49a494d3abdb21d9
data/CHANGES.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 6.1.2
2
+
3
+ * Resolve NoMethodError using URI#open for Ruby less than 2.5.0 [#353](https://github.com/kjvarga/sitemap_generator/pull/353)
4
+
5
+ ### 6.1.1
6
+
7
+ * Resolve deprecation warning on using Kernel#open in Ruby 2.7 (use URI.open instead) [#342](https://github.com/kjvarga/sitemap_generator/pull/342)
8
+ * Support S3 Endpoints for S3 Compliant Providers like DigitalOcean Spaces [#325](https://github.com/kjvarga/sitemap_generator/pull/325)
9
+
1
10
  ### 6.1.0
2
11
 
3
12
  * Support uploading files to Google Cloud Storage [#326](https://github.com/kjvarga/sitemap_generator/pull/326) and [#340](https://github.com/kjvarga/sitemap_generator/pull/340)
data/README.md CHANGED
@@ -357,7 +357,7 @@ directory.
357
357
  Uses `Aws::S3::Resource` to upload to Amazon S3 storage. Includes automatic detection of your AWS
358
358
  credentials using `Aws::Credentials`.
359
359
 
360
- You must `require 'aws-sdk'` in your sitemap config before using this adapter,
360
+ You must `require 'aws-sdk-s3'` in your sitemap config before using this adapter,
361
361
  or `require` another library that defines `Aws::S3::Resource` and `Aws::Credentials`.
362
362
 
363
363
  An example of using this adapter in your sitemap configuration:
@@ -370,6 +370,25 @@ directory.
370
370
  )
371
371
  ```
372
372
 
373
+ ##### `SitemapGenerator::AwsSdkAdapter (DigitalOcean Spaces)`
374
+
375
+ Uses `Aws::S3::Resource` to upload to Amazon S3 storage. Includes automatic detection of your AWS
376
+ credentials using `Aws::Credentials`.
377
+
378
+ You must `require 'aws-sdk-s3'` in your sitemap config before using this adapter,
379
+ or `require` another library that defines `Aws::S3::Resource` and `Aws::Credentials`.
380
+
381
+ An example of using this adapter in your sitemap configuration:
382
+
383
+ ```ruby
384
+ SitemapGenerator::Sitemap.adapter = SitemapGenerator::AwsSdkAdapter.new('s3_bucket',
385
+ aws_access_key_id: 'AKIAI3SW5CRAZBL4WSTA',
386
+ aws_secret_access_key: 'asdfadsfdsafsadf',
387
+ aws_region: 'sfo2',
388
+ aws_endpoint: 'https://sfo2.digitaloceanspaces.com'
389
+ )
390
+ ```
391
+
373
392
  ##### `SitemapGenerator::WaveAdapter`
374
393
 
375
394
  Uses `CarrierWave::Uploader::Base` to upload to any service supported by CarrierWave, for example,
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.1.0
1
+ 6.1.2
@@ -24,6 +24,7 @@ module SitemapGenerator
24
24
  @aws_access_key_id = options[:aws_access_key_id]
25
25
  @aws_secret_access_key = options[:aws_secret_access_key]
26
26
  @aws_region = options[:aws_region]
27
+ @aws_endpoint = options[:aws_endpoint]
27
28
  end
28
29
 
29
30
  # Call with a SitemapLocation and string data
@@ -46,6 +47,7 @@ module SitemapGenerator
46
47
  def s3_resource_options
47
48
  options = {}
48
49
  options[:region] = @aws_region if !@aws_region.nil?
50
+ options[:endpoint] = @aws_endpoint if !@aws_endpoint.nil?
49
51
  if !@aws_access_key_id.nil? && !@aws_secret_access_key.nil?
50
52
  options[:credentials] = Aws::Credentials.new(
51
53
  @aws_access_key_id,
@@ -295,7 +295,11 @@ module SitemapGenerator
295
295
  name = Utilities.titleize(engine.to_s)
296
296
  begin
297
297
  Timeout::timeout(10) {
298
- open(link)
298
+ if URI.respond_to?(:open) # Available since Ruby 2.5
299
+ URI.open(link)
300
+ else
301
+ open(link) # using Kernel#open became deprecated since Ruby 2.7. See https://bugs.ruby-lang.org/issues/15893
302
+ end
299
303
  }
300
304
  output(" Successful ping of #{name}")
301
305
  rescue Timeout::Error, StandardError => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitemap_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Varga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-26 00:00:00.000000000 Z
11
+ date: 2020-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -199,8 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubyforge_project:
203
- rubygems_version: 2.7.6
202
+ rubygems_version: 3.1.2
204
203
  signing_key:
205
204
  specification_version: 4
206
205
  summary: Easily generate XML Sitemaps