htmlcsstoimage-api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +3 -2
- data/README.md +1 -1
- data/lib/htmlcsstoimage/version.rb +1 -1
- data/lib/htmlcsstoimage.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939005ab5dbc481066edc4aa72e5b6118dffbf38111245ac81b5a07a5c3e7b62
|
4
|
+
data.tar.gz: 90755ad2b9c749f6e95d90142ce34ed9f9e25c38da546ada1c4d9dbb50552eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89dd9fd2ae2adaec762cbb41e3453a154764eb9437c32a750d4e0d92e4d25a4dcfe4883f7807b2af23a17a2f9a6fbdc55043853673ea2e231cb78275ea002baf
|
7
|
+
data.tar.gz: 1e7c86833503da5758b89bbf5020951bad4deb031603064d27cedf6abdbe8468db078382eeea53e5994ea62529054a6affe8643160982ba85f4ae70d24658505
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
htmlcsstoimage-api (0.1.
|
4
|
+
htmlcsstoimage-api (0.1.3)
|
5
|
+
addressable (> 2.5.0)
|
5
6
|
httparty (> 0.10)
|
6
7
|
|
7
8
|
GEM
|
@@ -21,7 +22,7 @@ GEM
|
|
21
22
|
method_source (1.0.0)
|
22
23
|
mime-types (3.3.1)
|
23
24
|
mime-types-data (~> 3.2015)
|
24
|
-
mime-types-data (3.
|
25
|
+
mime-types-data (3.2021.0212)
|
25
26
|
multi_xml (0.6.0)
|
26
27
|
pry (0.13.1)
|
27
28
|
coderay (~> 1.1)
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Ruby client for the [HTML/CSS to Image API](https://htmlcsstoimage.com).
|
6
6
|
|
7
|
-
Generate
|
7
|
+
Generate png, jpg or webp images with Ruby. Renders exactly like Google Chrome.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
data/lib/htmlcsstoimage.rb
CHANGED
@@ -89,7 +89,7 @@ class HTMLCSSToImage
|
|
89
89
|
query: template_values
|
90
90
|
})
|
91
91
|
|
92
|
-
query = Addressable::URI.parse(template.
|
92
|
+
query = Addressable::URI.parse(template.expand(signed_token: nil).to_s).query
|
93
93
|
digest = OpenSSL::Digest.new('sha256')
|
94
94
|
signed_token = OpenSSL::HMAC.hexdigest(digest, @auth[:password], CGI.unescape(query))
|
95
95
|
|
@@ -105,6 +105,7 @@ class HTMLCSSToImage
|
|
105
105
|
# @see https://docs.htmlcsstoimage.com/getting-started/url-to-image/
|
106
106
|
#
|
107
107
|
# @param url [String] The fully qualified URL to a public webpage. Such as https://htmlcsstoimage.com.
|
108
|
+
# @option params [String] :css The CSS for your image. Gets injected into the webpage.
|
108
109
|
# @option params [String] :selector A CSS selector for an element on the webpage. We'll crop the image to this specific element. For example: `section#complete-toolkit.container-lg`
|
109
110
|
# @option params [Integer] :ms_delay The number of milliseconds the API should delay before generating the image. This is useful when waiting for JavaScript. We recommend starting with `500`. Large values slow down the initial render time.
|
110
111
|
# @option params [Double] :device_scale This adjusts the pixel ratio for the screenshot. Minimum: `1`, Maximum: `3`.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlcsstoimage-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Coutermarsh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.
|
207
|
+
rubygems_version: 3.3.26
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Ruby client for the HTML/CSS to Image API.
|