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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d239b9b34098dda7392ae191f5aca7733600f7e97a06c72008951852c00e20fe
4
- data.tar.gz: 446cbd2635aa331d8dac616f73d97d1ea285709e4bdbd7462dcec29f428d44e7
3
+ metadata.gz: 939005ab5dbc481066edc4aa72e5b6118dffbf38111245ac81b5a07a5c3e7b62
4
+ data.tar.gz: 90755ad2b9c749f6e95d90142ce34ed9f9e25c38da546ada1c4d9dbb50552eec
5
5
  SHA512:
6
- metadata.gz: fed426a2bd8e9252f9c221906d4f5b508462bf7799ac85812d4b56dd4e18a2e0970b41923e2c02c1f71b1533a35b97c9c2ed07066083a6d973c3e66ee28b31eb
7
- data.tar.gz: 4e1fa8c2c13eb5d032bd3258b6dd1bff97739938414aaa315be211460632dddaec71f411323ac5f03c8a19ab6121eb1f5c8a6dcd6460083ed35a954f8a842b02
6
+ metadata.gz: 89dd9fd2ae2adaec762cbb41e3453a154764eb9437c32a750d4e0d92e4d25a4dcfe4883f7807b2af23a17a2f9a6fbdc55043853673ea2e231cb78275ea002baf
7
+ data.tar.gz: 1e7c86833503da5758b89bbf5020951bad4deb031603064d27cedf6abdbe8468db078382eeea53e5994ea62529054a6affe8643160982ba85f4ae70d24658505
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
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.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.2020.0512)
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 a png, jpg or webp images with Ruby. Renders exactly like Google Chrome.
7
+ Generate png, jpg or webp images with Ruby. Renders exactly like Google Chrome.
8
8
 
9
9
  ## Installation
10
10
 
@@ -1,3 +1,3 @@
1
1
  class HTMLCSSToImage
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -89,7 +89,7 @@ class HTMLCSSToImage
89
89
  query: template_values
90
90
  })
91
91
 
92
- query = Addressable::URI.parse(template.generate).query
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.2
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: 2020-10-02 00:00:00.000000000 Z
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.0.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.