shimmer 0.0.36 → 0.0.38

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: 2b44ee90fa35afdc7109b5b40b10a6e182618f9f16c9764ca18f24f4b4b7e166
4
- data.tar.gz: 1f0d2ac79b80f5374ce2bc18d1b61ab56b8f1c386ad6ab3240ec7795dcfb2568
3
+ metadata.gz: 902f5e484bf8f16867c9467eb8c98b81120ff6b7997b26128c73b5d46109bb8c
4
+ data.tar.gz: 3c23f32feedb88261af4fcfefa304b57dee51a0804e247b78e52ee89b7c2c25c
5
5
  SHA512:
6
- metadata.gz: 4c0f2a198e6566ff325ed5496a36620cac3fb206a8555d44e5c9b050eb60661d9f9f752cc9b0815c90ae6e7ed9088818e5c8abc744a313fd2a5a6a02490ec162
7
- data.tar.gz: e8764515081a667da62d2858ae5753440e74a955448939b5edf9f359aa950c2655d12900a05eb10a342bd52f3554723bf077aa96e6dbc4cc2674b29ddcbdf271
6
+ metadata.gz: 49348ee549734616e4ddc2a11a4cb11080adc6268c116017dfcf3536e5aaefd2db960b8eb8833127d77ea90fd5015dcc575b3f7c5ebf33784fcd2a6e58b06338
7
+ data.tar.gz: 99102aaed6f59ae09035a1ec6e564d0098816af2919382530289e99e19280195218887b60aaf3ba6cf020db370c6e018cbaa7fe591d184318d410f37275eddb0
@@ -3,8 +3,8 @@
3
3
  module Shimmer
4
4
  class SitemapsController < ActionController::Base
5
5
  def show
6
- path = "sitemaps/#{params.require(:path)}.gz"
7
- filename = "sitemap_#{params[:path]}.xml.gz"
6
+ path = request.path[1..]
7
+ filename = path.gsub("/", "-")
8
8
 
9
9
  send_data ActiveStorage::Blob.service.download(path), filename: filename, type: "application/gzip", disposition: "attachment"
10
10
  end
@@ -39,7 +39,7 @@ module Shimmer
39
39
 
40
40
  def initialize(blob_id:, width: nil, height: nil)
41
41
  @blob_id = blob_id
42
- @resize = [width, height] if width || height
42
+ @resize = [width&.to_i, height&.to_i] if width || height
43
43
  end
44
44
 
45
45
  def path
@@ -4,7 +4,7 @@ module Shimmer
4
4
  class SitemapAdapter
5
5
  def write(location, raw_data)
6
6
  SitemapGenerator::FileAdapter.new.write(location, raw_data)
7
- ActiveStorage::Blob.service.upload("sitemaps/#{location.path_in_public}", File.open(location.path))
7
+ ActiveStorage::Blob.service.upload(location.path_in_public, File.open(location.path))
8
8
  end
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shimmer
4
- VERSION = "0.0.36"
4
+ VERSION = "0.0.38"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Ravens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-09-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: