h2p 0.1 → 0.2

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: 3fce445c7c68092538348c0768d2041ad737ae6568f52dd2da5a5d7dea796d18
4
- data.tar.gz: 605ff64067fddde56ab499946b1bc7ab26e9ab3ba19d671d80a70df4f7cff285
3
+ metadata.gz: 80a70f92f3f85ab558982ec080940d6538a85dba746d88e252cf4b92dc9a497f
4
+ data.tar.gz: b071393d6bfd888da5dbc77a63e1837c794dc7aada9cd5570e7c8cb517274cd7
5
5
  SHA512:
6
- metadata.gz: df1190a85dce0f00952693cb22edcb4354fdefb3b60e491a6c1280b5413aee149ead5de26ecc19e08033ce4f2233ee7fe6a53ded4b4cd4bcc4a4702055940685
7
- data.tar.gz: 6a5569cb95e91657b38b73ab144318eb9d362d82b0ade2b97c39b0547a4dc072fd6eba99201db240478d66c80fa9b3055c34ded06572a125eedb68ce0ec2c8a0
6
+ metadata.gz: 69c6845b83a6520933c8c94ce43a724fe9c88d92b2b687f5084f3205e85f5453b4441381546e49fb35b8f258dfa3d6f6a3cf0ac3116c25fd2f11f85eea776430
7
+ data.tar.gz: 8665abf299ac2f275662fe688ca698e5e500745af33eeaa0d98d5b6053a1a5d95cb88b56eb3fe3d222dc16942af4d82e7772a69331fa189f5b7a8e1c3e844db2
@@ -0,0 +1,4 @@
1
+ Version 0.2
2
+ -----------
3
+
4
+ - Switch to unlicense
data/LICENSE CHANGED
@@ -1,21 +1,24 @@
1
- MIT License
1
+ This is free and unencumbered software released into the public domain.
2
2
 
3
- Copyright (c) 2019 digital-fabric
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
4
7
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
11
15
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
14
23
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
24
+ For more information, please refer to <http://unlicense.org/>
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem install 'h2p'
12
12
  gem install 'wkhtmltopdf-binary'
13
13
  ```
14
14
 
15
- Or just [use the source(TM)](#use-the-source).
15
+ Or just [use the source™️](#use-the-source).
16
16
 
17
17
  ## Usage
18
18
 
@@ -25,11 +25,14 @@ my_pdf = H2P.convert(my_html)
25
25
 
26
26
  ## Use the source
27
27
 
28
- Adding a dependency to your `Gemfile` is just another thing to keep track off,
29
- on top of everything else. Luckily, H2P is so small you can just copy the
30
- source into your project:
28
+ If you don't want to add another dependency to your project, here's the source
29
+ of the present gem (with the [modulation](https://github.com/digital-fabric/modulation)
30
+ dependency removed.) Feel free to use and manipulate however you please:
31
31
 
32
32
  ```ruby
33
+ # This is free and unencumbered software released into the public domain
34
+ # Full license here: https://unlicense.org/
35
+
33
36
  require 'tmpdir'
34
37
  require 'fileutils'
35
38
 
@@ -43,7 +46,6 @@ module H2P
43
46
  def self.convert(html)
44
47
  html_path = tmp_path(:html)
45
48
  pdf_path = tmp_path(:pdf)
46
- p [html_path, pdf_path]
47
49
  File.open(html_path, 'w+') { |f| f << html }
48
50
  system('wkhtmltopdf', '-q', html_path, pdf_path)
49
51
  IO.read(pdf_path)
data/lib/h2p.rb CHANGED
@@ -16,7 +16,6 @@ module H2P
16
16
  def self.convert(html)
17
17
  html_path = tmp_path(:html)
18
18
  pdf_path = tmp_path(:pdf)
19
- p [html_path, pdf_path]
20
19
  File.open(html_path, 'w+') { |f| f << html }
21
20
  system('wkhtmltopdf', '-q', html_path, pdf_path)
22
21
  IO.read(pdf_path)
@@ -1,3 +1,3 @@
1
1
  module H2P
2
- VERSION = '0.1'
2
+ VERSION = '0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2p
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-05 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: modulation