html_to 0.7.0 → 0.7.1
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 +4 -4
- data/html_to.gemspec +1 -1
- data/lib/html_to/share_uploader.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6ecaa0e2c84c8fe46d7fe6aebbe6296769474158cdff0e79cf4d4dae0e6f972
|
4
|
+
data.tar.gz: 95feea233e1b7331df54c0b1c8d75c02280f74d57fdf7d09145649569e884d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f059096bd2178e8c3c187a8c486d95c83e96856ea2c858644edd6e34544685dfdea7fabe55e28ac0729606358af886cb70046ba41523ea9e36053c186547b9f4
|
7
|
+
data.tar.gz: 4dce00f4a795dc43d106b5411588f56ed6326a1eb4383cc9e3612dcd9257feeac1675c66347d88398fe0191addefea3381b1c1f8d558c1a23e2a2fa6b238132c
|
data/html_to.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'html_to'
|
5
|
-
s.version = '0.7.
|
5
|
+
s.version = '0.7.1'
|
6
6
|
s.date = '2021-04-07'
|
7
7
|
s.summary = 'Html-To transforms html to other format'
|
8
8
|
s.description = 'Simple gem for transforms html page through chromium headless.'
|
@@ -1,7 +1,14 @@
|
|
1
1
|
class HtmlTo::ShareUploader < CarrierWave::Uploader::Base
|
2
2
|
include CarrierWave::MiniMagick
|
3
|
+
|
4
|
+
raise 'Message from html_to: Rails.application.config.asset_host not present' if Rails.application.config.asset_host.nil?
|
5
|
+
|
3
6
|
def store_dir
|
4
7
|
"storage/#{model.class.base_class.name.underscore}/#{model.id}/share"
|
5
8
|
end
|
9
|
+
|
10
|
+
def url
|
11
|
+
"#{Rails.application.config.asset_host}#{super}"
|
12
|
+
end
|
6
13
|
process resize_to_limit: [1200, 630]
|
7
14
|
end
|