hyperpdf 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +2 -60
  2. data/lib/hyperpdf/version.rb +1 -1
  3. metadata +2 -2
data/README.md CHANGED
@@ -2,67 +2,9 @@
2
2
 
3
3
  Ruby wrapper around the [HyperPDF](https://addons.heroku.com/hyperpdf) API
4
4
 
5
- ## Installation
5
+ ## Documentation
6
6
 
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'hyperpdf'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install hyperpdf
18
-
19
- ## Usage
20
-
21
- Initialize new HyperPDF instance
22
-
23
- pdf = HyperPDF.new('<htlm>...your html code here...</html>', user: "your_user_name", password: "your_password")
24
-
25
- Get pdf document directly
26
-
27
- # Write it to file
28
- File.open('filename.pdf', 'wb') do |f|
29
- f.write pdf.get
30
- end
31
-
32
- # Or send it to user (Rails example)
33
- send_data(pdf.get, filename: 'hyperpdf.pdf', type: 'application/pdf')
34
-
35
-
36
- Or upload it to your AWS S3 bucket
37
-
38
- pdf.upload_to_s3('YOUR_BUCKET_NAME', 'filename.pdf', true)
39
-
40
- NOTE! Before using 'upload_to_s3' method you need to give permission HyperPDF upload files to your bucket.
41
-
42
- * Log into your AWS Console
43
- * Choose S3 service
44
- * Right click on the bucket you wish to give HyperPDF permission to write to
45
- * From the context menu, click "Properties"
46
- * On properties panel select "Permissions" and click on "Add bucket policy" button
47
- * Paste the following policy into the dialog that appears (Replace YOUR_BUCKET_NAME with the name of the bucket you are adding this permission to):
48
-
49
- {
50
- "Version": "2008-10-17",
51
- "Statement": [
52
- {
53
- "Sid": "AddCannedAcl",
54
- "Effect": "Allow",
55
- "Principal": {
56
- "AWS": "arn:aws:iam::888261251835:root"
57
- },
58
- "Action": [
59
- "s3:PutObjectAcl",
60
- "s3:PutObject"
61
- ],
62
- "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
63
- }
64
- ]
65
- }
7
+ Full documentation can be found [here](https://devcenter.heroku.com/articles/hyperpdf).
66
8
 
67
9
  ## Contributing
68
10
 
@@ -1,3 +1,3 @@
1
1
  class HyperPDF
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperpdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-02-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ruby wrapper around the HyperPDF API
15
15
  email: