grim 1.3.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/README.md +2 -0
- data/lib/grim/image_magick_processor.rb +1 -1
- data/lib/grim/pdf.rb +1 -1
- data/lib/grim/version.rb +1 -1
- data/spec/lib/grim/pdf_spec.rb +6 -0
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fffcf4ba2e8ad77918c8c916e0ee8d719b7b1b93b221ce01753d7d624338c39c
|
4
|
+
data.tar.gz: 51986ba58df2a6a18245bdc279d961e279cec5a1e323f2c621d73787412cd2eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0384bdfc68a9717feea14a3bc43ae7de62b29a2fe915bfa9ceea493698cc9046961b7e0c4a43c73aebfac26d52c38335b055361e099664cda0d0a7c2a64d0ee
|
7
|
+
data.tar.gz: 3ed4efd781c8724e1c127cd298235a79f4d1a0a35ae6f473b918f759b013da53900b68926ab9caac9ed7e9f8c18723adf238d04490d28d60162b986a6f9f0bb7
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -116,6 +116,8 @@ pdf[3].save('/path/to/image.png')
|
|
116
116
|
* [@philgooch](https://github.com/philgooch)
|
117
117
|
* [@adamcrown](https://github.com/adamcrown)
|
118
118
|
* [@fujimura](https://github.com/fujimura)
|
119
|
+
* [@JamesPaden](https://github.com/JamesPaden)
|
120
|
+
* [@fgiannattasio](https://github.com/fgiannattasio)
|
119
121
|
|
120
122
|
## License
|
121
123
|
|
@@ -15,7 +15,7 @@ module Grim
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def count(path)
|
18
|
-
command = [@ghostscript_path, "-dNODISPLAY", "-q",
|
18
|
+
command = [@ghostscript_path, "-dNODISPLAY", "-dNOSAFER", "-q",
|
19
19
|
"-sFile=#{Shellwords.shellescape(path)}",
|
20
20
|
File.expand_path('../../../lib/pdf_info.ps', __FILE__)]
|
21
21
|
result = `#{command.join(' ')}`
|
data/lib/grim/pdf.rb
CHANGED
@@ -15,7 +15,7 @@ module Grim
|
|
15
15
|
# (default: "pdftotext").
|
16
16
|
#
|
17
17
|
def initialize(path, options = {})
|
18
|
-
raise Grim::PdfNotFound unless File.
|
18
|
+
raise Grim::PdfNotFound unless File.exist?(path)
|
19
19
|
@path = path
|
20
20
|
@pdftotext_path = options[:pdftotext_path] || 'pdftotext'
|
21
21
|
end
|
data/lib/grim/version.rb
CHANGED
data/spec/lib/grim/pdf_spec.rb
CHANGED
@@ -3,6 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Grim::Pdf do
|
5
5
|
|
6
|
+
it "should not raise NoMethodErrod for File:class " do
|
7
|
+
expect{
|
8
|
+
pdf = Grim::Pdf.new(fixture_path("smoker.pdf"))
|
9
|
+
}.not_to raise_error(NoMethodError)
|
10
|
+
end
|
11
|
+
|
6
12
|
it "should have a path" do
|
7
13
|
pdf = Grim::Pdf.new(fixture_path("smoker.pdf"))
|
8
14
|
expect(pdf.path).to eq(fixture_path("smoker.pdf"))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hoyt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Grim is a simple gem for extracting a page from a pdf and converting
|
14
14
|
it to an image as well as extract the text from the page as a string. It basically
|
@@ -49,7 +49,7 @@ files:
|
|
49
49
|
homepage: http://github.com/jonmagic/grim
|
50
50
|
licenses: []
|
51
51
|
metadata: {}
|
52
|
-
post_install_message:
|
52
|
+
post_install_message:
|
53
53
|
rdoc_options: []
|
54
54
|
require_paths:
|
55
55
|
- lib
|
@@ -64,9 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
|
68
|
-
|
69
|
-
signing_key:
|
67
|
+
rubygems_version: 3.4.10
|
68
|
+
signing_key:
|
70
69
|
specification_version: 4
|
71
70
|
summary: Extract slides and text from a PDF.
|
72
71
|
test_files:
|