hpa-ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/hpa.gemspec +4 -3
- data/lib/hpa.rb +1 -1
- data/lib/hpa/version.rb +1 -1
- data/test/hpa_test.rb +2 -2
- data/test/test_helper.rb +2 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bfed6a00926044ec4bb1f65165547cceb84eba9
|
4
|
+
data.tar.gz: 8723bda2dfad584a1b482433447add6ccb10f769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a87b086a5b79baf9649f3e0e54e03ae2aeec5433214fca0cc3cc83d94136273f315c0a001d2874c1cb3b3f6397b6cd4a4dda190341f7d9f03cce42e7bf52acc
|
7
|
+
data.tar.gz: 5c35540d06ece43904a40abb4453f316cf4424a5864602a60a582978072ecaad1df2b9143b84acb0f8df35d082dc107bdef7fcb7a6aa7dfdf13ead4dd0c4e141
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
hpa-ruby
|
2
2
|
=====
|
3
3
|
|
4
|
-
This is a Ruby wrapper for [HTML PDF API](
|
4
|
+
This is a Ruby wrapper for [HTML PDF API](https://htmlpdfapi.com) - [Documentation](https://htmlpdfapi.com/documentation)
|
5
5
|
|
6
6
|
HTML PDF API is a service that allows you to convert HTML to PDF using standard technologies (HTML, CSS and JavaScript).
|
7
7
|
|
@@ -40,7 +40,7 @@ Then you have to set your API token:
|
|
40
40
|
|
41
41
|
Set API base (endpoint and version)
|
42
42
|
|
43
|
-
Hpa.api_base = "htmlpdfapi.com/api/v1" # default
|
43
|
+
Hpa.api_base = "https://htmlpdfapi.com/api/v1" # default
|
44
44
|
|
45
45
|
|
46
46
|
Assets
|
@@ -109,7 +109,7 @@ PDFs
|
|
109
109
|
|
110
110
|
From url:
|
111
111
|
|
112
|
-
response = Hpa::Pdf.create(:url => "
|
112
|
+
response = Hpa::Pdf.create(:url => "https://htmlpdfapi.com/examples/example.html")
|
113
113
|
|
114
114
|
From HTML string:
|
115
115
|
|
data/hpa.gemspec
CHANGED
@@ -18,9 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "rest-client"
|
21
|
+
spec.add_dependency "rest-client", '~> 1.7'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
24
|
-
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "minitest"
|
24
|
+
spec.add_development_dependency "rake", '~> 10.3'
|
25
|
+
spec.add_development_dependency "minitest", '~> 5.4'
|
26
26
|
end
|
27
|
+
|
data/lib/hpa.rb
CHANGED
data/lib/hpa/version.rb
CHANGED
data/test/hpa_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class HpaTest <
|
3
|
+
class HpaTest < Minitest::Test
|
4
4
|
|
5
5
|
|
6
6
|
def setup
|
@@ -60,7 +60,7 @@ class HpaTest < MiniTest::Unit::TestCase
|
|
60
60
|
|
61
61
|
|
62
62
|
def test_create_pdf_from_url
|
63
|
-
response = Hpa::Pdf.create(:url => "
|
63
|
+
response = Hpa::Pdf.create(:url => "https://htmlpdfapi.com/examples/example.html")
|
64
64
|
|
65
65
|
assert_equal 200, response.code
|
66
66
|
assert_equal "%PDF", response.body[0, 4]
|
data/test/test_helper.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'hpa'
|
2
|
+
require 'minitest'
|
2
3
|
require 'minitest/unit'
|
3
4
|
require 'minitest/autorun'
|
4
5
|
require 'minitest/pride'
|
5
6
|
|
6
7
|
|
7
|
-
class
|
8
|
+
class Minitest::Test
|
8
9
|
|
9
10
|
Hpa.api_token = ENV['api_token']
|
10
11
|
Hpa.api_base = ENV['api_base'] if ENV['api_base']
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hpa-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zoran Žabčić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,30 +42,30 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '5.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '5.4'
|
69
69
|
description: HTML PDF API is a service that allows you to convert HTML to PDF using
|
70
70
|
standard technologies (HTML, CSS and JavaScript).
|
71
71
|
email:
|