sitemap_generator 6.2.0 → 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4649b091445a578b7e482dc4b73d76a78afdf97ad5af8694a8fb49972c157d7c
4
- data.tar.gz: 9aab8c0be6dbb77dcfa9323a06b5621f0206bd75051edbb80de3cdfba9e7183c
3
+ metadata.gz: 6619733ac6e91a00c5a7b194f82f76b68de2c0521dda3c554d28c8315c0e7c29
4
+ data.tar.gz: 0d73d0acac5b95961d5799a766a5c6af6fac85173420807db5cbc9a630f1841d
5
5
  SHA512:
6
- metadata.gz: 70f24b02d6d9a2e99a7eab5aa280040b69279254824f45b1375cdfc724a672818e6b65a5fa7fe49098f400752f3a64fd5e0ad527b4212d53651383d896c4c128
7
- data.tar.gz: 9a45c8ab51121aa67dd2a8f5b9a72ec7610965e54d0f3c7dc173b7edef92bf6913c2247de2712adfb546babb679761cbf982809916beeeb4a1a3b0dd872bafa6
6
+ metadata.gz: 637cc70ee0036b4e9d228abe34abe4b220db7a6647c3e26b1b98e5df20e59d0e9c24f5f8596ef941afb5ea252081ce048cc74e95b7b52a69fc4c5e48774e3c22
7
+ data.tar.gz: 784183a6a1a1735078734f68aab8e62702b62e474c7602c9360bf2021aeff6492c03405b14a4800d42490bd0b2319c00814541252a3a8f6d4e70becfd87ee6d0
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 6.2.1
2
+
3
+ * Bugfix: Improve handling of deprecated options in `AwsSdkAdapter`. Fixes bug where `:region` was being set to `nil`. [#390](https://github.com/kjvarga/sitemap_generator/pull/390).
4
+
1
5
  ### 6.2.0
2
6
 
3
7
  * Raise `LoadError` when an adapter's dependency is missing to better support Sorbet [#387](https://github.com/kjvarga/sitemap_generator/pull/387).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.2.0
1
+ 6.2.1
@@ -28,12 +28,13 @@ module SitemapGenerator
28
28
  def initialize(bucket, aws_access_key_id: nil, aws_secret_access_key: nil, aws_region: nil, aws_endpoint: nil, **options)
29
29
  @bucket = bucket
30
30
  @options = options
31
- @options[:access_key_id] ||= aws_access_key_id
32
- @options[:secret_access_key] ||= aws_secret_access_key
33
- @options[:region] ||= aws_region
34
- @options[:endpoint] ||= aws_endpoint
31
+ set_option_unless_set(:access_key_id, aws_access_key_id)
32
+ set_option_unless_set(:secret_access_key, aws_secret_access_key)
33
+ set_option_unless_set(:region, aws_region)
34
+ set_option_unless_set(:endpoint, aws_endpoint)
35
35
  end
36
36
 
37
+
37
38
  # Call with a SitemapLocation and string data
38
39
  def write(location, raw_data)
39
40
  SitemapGenerator::FileAdapter.new.write(location, raw_data)
@@ -47,6 +48,10 @@ module SitemapGenerator
47
48
 
48
49
  private
49
50
 
51
+ def set_option_unless_set(key, value)
52
+ @options[key] = value if @options[key].nil? && !value.nil?
53
+ end
54
+
50
55
  def s3_resource
51
56
  @s3_resource ||= Aws::S3::Resource.new(@options)
52
57
  end
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.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Varga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder