urlbox 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -5
  3. metadata +31 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ef43ac5284c0b908c6af96dd073d0cc1247ec1a8843587d943afdf5ba19496c
4
- data.tar.gz: e1455e47e15e5d50792d2ac069c2a303fc2d8806bffbf14f06231aa5d26e8127
3
+ metadata.gz: 4b14abd901e6ebaaab4e9b3fc6c67a5d2b1e5abff718add4fc0fbc3c39a60c41
4
+ data.tar.gz: a6c10edccc3836bed18e60971ada7531990584d2b6a3f11a2d98fbcca92ebc0f
5
5
  SHA512:
6
- metadata.gz: f80703ad795b28f7e7415a0eb9f5de2b4df3d2a4403a09686fa69ed43d596cb7cb792e3feac84ede4aeb63c3294577987e0e768f8adb901ef83d1b23e4e7f46d
7
- data.tar.gz: 4d3cd6197c64c2140066bed5c23743b8a2afd9672c97ed8f8d83d20edfbd209ddabb6a961eac807fc84b57d22395ca6bbd4fd716b24275be23481cd294c9b20e
6
+ metadata.gz: bc5002ddeacb27e2dcb6613998e88209ea36972253093f4e8dca72fd99877f41c0163c30d81b7741cb278f1242012f1aadc5c60999f649075bd5d95c8aa1b5b1
7
+ data.tar.gz: f4b0ddd9da81a2cb6cbf50d3400dbc3d9bd31ece7f6a7b520432222670c4a4a1e197570c652e8f07c18750dd262eb72f00e65a6706823a56e714fb50b2b93f10
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ![image](https://user-images.githubusercontent.com/1453680/143582241-f44bd8c6-c242-48f4-8f9a-ed5507948588.png)
2
2
  # Urlbox Ruby Library
3
+ ![Tests](https://github.com/urlbox/urlbox-python/actions/workflows/tests.yml/badge.svg)
4
+ ![Linter](https://github.com/urlbox/urlbox-python/actions/workflows/linters.yml/badge.svg)
5
+
3
6
  The Urlbox Ruby gem provides easy access to the <a href="https://urlbox.io/" target="_blank">Urlbox website screenshot API</a> from your Ruby/Rails application.
4
7
 
5
8
  Now there's no need to muck around with http clients, etc...
@@ -61,13 +64,13 @@ In your erb/html template, use the screenshot_url generated above:
61
64
  ```ruby
62
65
  require 'urlbox/client'
63
66
 
64
- urlbox_client = Urlbox::Client.newpay(api_key: 'YOUR_API_KEY', api_secret: 'YOUR_API_SECRET')
67
+ urlbox_client = Urlbox::Client.new(api_key: 'YOUR_API_KEY', api_secret: 'YOUR_API_SECRET')
65
68
 
66
69
  # Make a request to the UrlBox API
67
70
  response = Urlbox::Client.get({url: 'http://example.com/'})
68
71
 
69
72
  # Save your screenshot image to screenshot.png:
70
- File.write('screenshot.png', response.content)
73
+ File.write('screenshot.png', response.to_s)
71
74
  ```
72
75
 
73
76
  All UrlboxClient methods require at least one argument: a hash that *must include either a "url", or "html" entry*, which the Urlbox API will render as a screenshot.
@@ -102,7 +105,7 @@ response = urlbox_client.get(options)
102
105
  # For example, if you requested jpg format, the Content-Type will be image/jpeg
103
106
  # and response body will be the actual jpg binary data.
104
107
 
105
- response.content # Your screenshot as binary image data which looks like 👇
108
+ response.to_s # Your screenshot as binary image data which looks like 👇
106
109
  ```
107
110
  ![image](https://user-images.githubusercontent.com/1453680/143479491-78d8edbc-dfdc-48e3-9ae0-3b59bcf98e2c.png)
108
111
 
@@ -117,7 +120,7 @@ Makes a GET request to the Urlbox API to create a screenshot for the url or html
117
120
  Example request:
118
121
  ```ruby
119
122
  response = urlbox_client.get({url: 'http://example.com/'})
120
- response.content # Your screenshot 🎉
123
+ response.to_s # Your screenshot 🎉
121
124
  ```
122
125
 
123
126
  ### delete(options)
@@ -134,7 +137,7 @@ Example request:
134
137
  ```ruby
135
138
  response = urlbox_client.head({url: 'http://example.com/'})
136
139
 
137
- puts(response.headers.to_s)
140
+ puts(response.headers)
138
141
 
139
142
  ```
140
143
 
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urlbox
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
  - Urlbox
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-06 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-02-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: http
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: openssl
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.2'
13
41
  description: Urlbox is the easiest, quickest, screenshot API. See https://www.urlbox.io
14
42
  for details.
15
43
  email: