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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 39b255f78e1c538ab9dff505e38eb44f02f1109f
4
- data.tar.gz: dc2e06433161bd2a00b23f49e11efd1b540e4dcd
2
+ SHA256:
3
+ metadata.gz: fffcf4ba2e8ad77918c8c916e0ee8d719b7b1b93b221ce01753d7d624338c39c
4
+ data.tar.gz: 51986ba58df2a6a18245bdc279d961e279cec5a1e323f2c621d73787412cd2eb
5
5
  SHA512:
6
- metadata.gz: 293e3e0fb73403a48e0dd6b15a61c3b3b332da95b15453d11a4f4e5b33f6319049026e2c8ea60264b4b4eb7a82526fa515d88693b8711ebbd1071fc6374437e9
7
- data.tar.gz: aa12bb00ca4d407708f42e4f9607db41cc04df5af8ec6d153961c544bd3bfbb45b3bcbf08e76e0a4bfddcb8d79d9a07dfb19ca0905f8bd77dcb1e20c6bfb2cdd
6
+ metadata.gz: d0384bdfc68a9717feea14a3bc43ae7de62b29a2fe915bfa9ceea493698cc9046961b7e0c4a43c73aebfac26d52c38335b055361e099664cda0d0a7c2a64d0ee
7
+ data.tar.gz: 3ed4efd781c8724e1c127cd298235a79f4d1a0a35ae6f473b918f759b013da53900b68926ab9caac9ed7e9f8c18723adf238d04490d28d60162b986a6f9f0bb7
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
  gem "rake"
4
- gem "rspec", "~> 3.2.0"
4
+ gem "rspec", "~> 3.9.0"
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.exists?(path)
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
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Grim
3
- VERSION = "1.3.3" unless defined?(::Grim::VERSION)
3
+ VERSION = "1.3.5" unless defined?(::Grim::VERSION)
4
4
  end
@@ -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.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: 2017-09-11 00:00:00.000000000 Z
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
- rubyforge_project: grim
68
- rubygems_version: 2.4.5.1
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: