Skip to content

Commit 06f4a85

Browse files
Merge pull request #6 from lagardere-sports/fix/openstruct-loading-error
fix: OpenStruct causes NameError in Rake13.2.0
2 parents eee3803 + 17c9094 commit 06f4a85

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Generate png, jpg or webp images with Ruby. Renders exactly like Google Chrome.
1111
Add this line to your application's Gemfile:
1212

1313
```ruby
14-
gem 'htmlcsstoimage-api'
14+
gem 'htmlcsstoimage-api', require: 'htmlcsstoimage'
1515
```
1616

1717
And then execute:
@@ -27,6 +27,7 @@ Or install it yourself as:
2727
Create a new instance of the API client.
2828

2929
```ruby
30+
require "htmlcsstoimage"
3031
# Retrieve your user id and api key from https://htmlcsstoimage.com/dashboard
3132
client = HTMLCSSToImage.new(user_id: "user-id", api_key: "api-key")
3233
```
@@ -36,6 +37,7 @@ client = HTMLCSSToImage.new(user_id: "user-id", api_key: "api-key")
3637
Alternatively, you can set `ENV["HCTI_USER_ID"]` and `ENV["HCTI_API_KEY"]`. These will be loaded automatically.
3738

3839
```ruby
40+
require "htmlcsstoimage"
3941
client = HTMLCSSToImage.new
4042
```
4143

lib/htmlcsstoimage.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "htmlcsstoimage/version"
22
require "httparty"
33
require "addressable"
4+
require "ostruct"
45

56
class HTMLCSSToImage
67
include HTTParty

0 commit comments

Comments
 (0)