pdf_meta 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 9e9f12db955d00234ed51e48f58b1800e13ca3f2
4
- data.tar.gz: 0f243667baf7db768ab67a67abab28802ffe66b7
3
+ metadata.gz: c3cbf21ab026b7c9a45ed4112ae80b2e402c67b6
4
+ data.tar.gz: e194b8b6fa94f42f96c75e78eeb07f933ec20f43
5
5
  SHA512:
6
- metadata.gz: b42fd05c5a5d38c6be7374e204b32df299a884522335de7d9836cc49659ec46a8367bdcab208e05bcffeabcdecf48a1fb107ea1a42c6b021600c447a6d9d08e7
7
- data.tar.gz: c35a3ce898f7b30c066812f0aca5523c1ee5931be6a2dd1772c7a0d2f51ce46f85a94ec60397de249d338f4d282bfe110c3f3b5d6dcbcb8403dc5b68cb788176
6
+ metadata.gz: 2610988d5759b91f55fcee037b21369d5ed553d88bc1cca7fa6438c7c89a2e0e9c42c5cc53f6ed3d11e7b636137ebbf160de5c48bf35481e95fcca41087ae68c
7
+ data.tar.gz: 67221bee8827e3d136ff5d2415898c1a8d6484c83bc0ecef2b5ae371dfacd8327206cddc30598cd5147d8c48e87b17b07e4c36dafbec0411e123b9842d01b1b5
data/README.md CHANGED
@@ -1,11 +1,19 @@
1
- # PdfMeta
1
+ # PDFMeta
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pdf_meta`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ PDFMeta is a gem designed to resiliantly return metadata from a PDF, using poppler/xpdf command line tools
6
4
 
7
5
  ## Installation
8
6
 
7
+ Install the poppler command line tools:
8
+
9
+ ###OSX
10
+
11
+ `brew install poppler`
12
+
13
+ ###Debian Based
14
+
15
+ `apt-get install poppler-utils`
16
+
9
17
  Add this line to your application's Gemfile:
10
18
 
11
19
  ```ruby
@@ -20,9 +28,34 @@ Or install it yourself as:
20
28
 
21
29
  $ gem install pdf_meta
22
30
 
31
+ ## Configuration
32
+
33
+ You shouldn't need to configure the gem, however if you've installed pdfinfo in a custom location then pass it here
34
+
35
+ ```ruby
36
+ PDFMeta.configure do |config|
37
+ config[:command_path] = '/path/to/pdfinfo' #=> Default is just 'pdfinfo' in path
38
+ end
39
+ ```
40
+
23
41
  ## Usage
24
42
 
25
- TODO: Write usage instructions here
43
+ There's only one call to the API, it takes either a string path to a file, or an open file handle
44
+
45
+ ```ruby
46
+ PDFMeta.read('path/to/file')
47
+
48
+ PDFMeta.read(File.open('path/to/file'))
49
+ ```
50
+
51
+ It will return either a `PDFMeta::Results` or raise one of the following errors:
52
+ - `PopplerMissingError`
53
+ - `UnknownError`
54
+ - `UnableToReadFileError`
55
+ - `UnableOpenOutputFileError`
56
+ - `PDFPermissionError`
57
+ - `UnknownPopplerError`
58
+
26
59
 
27
60
  ## Development
28
61
 
@@ -32,7 +65,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
65
 
33
66
  ## Contributing
34
67
 
35
- 1. Fork it ( https://github.com/[my-github-username]/pdf_meta/fork )
68
+ 1. Fork it ( https://github.com/boardiq/pdf_meta/fork )
36
69
  2. Create your feature branch (`git checkout -b my-new-feature`)
37
70
  3. Commit your changes (`git commit -am 'Add some feature'`)
38
71
  4. Push to the branch (`git push origin my-new-feature`)
data/lib/pdf_meta.rb CHANGED
@@ -2,7 +2,6 @@ require "active_support"
2
2
  require "active_support/core_ext"
3
3
  require "virtus"
4
4
  require "open3"
5
- require "pry"
6
5
 
7
6
  require "pdf_meta/version"
8
7
 
@@ -1,3 +1,3 @@
1
1
  module PDFMeta
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf_meta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Carlile
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport