grim 1.3.2 → 1.3.3

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: 03ab2fa755b3007eeb540551be56697a60545d6f
4
- data.tar.gz: ef026ecc3608773e405d3fbf628e0773e4362041
3
+ metadata.gz: 39b255f78e1c538ab9dff505e38eb44f02f1109f
4
+ data.tar.gz: dc2e06433161bd2a00b23f49e11efd1b540e4dcd
5
5
  SHA512:
6
- metadata.gz: a1f1b4fc008c7f0a0ac5e376ce53e4bf897236b2eb4f4607b03fb1a3a379cca559456dbafbaadfa48f04540e43b82a8b6c37cd0c8a985bcd813577d9da272596
7
- data.tar.gz: d6cd65a0a403f8dad817eb92f54c3d518202767c5e1bf34b386e4e97b834382fd3dd11cc643f0ffe1e89d13d7c7b78afbc3478bfa922a259526d474534e0d876
6
+ metadata.gz: 293e3e0fb73403a48e0dd6b15a61c3b3b332da95b15453d11a4f4e5b33f6319049026e2c8ea60264b4b4eb7a82526fa515d88693b8711ebbd1071fc6374437e9
7
+ data.tar.gz: aa12bb00ca4d407708f42e4f9607db41cc04df5af8ec6d153961c544bd3bfbb45b3bcbf08e76e0a4bfddcb8d79d9a07dfb19ca0905f8bd77dcb1e20c6bfb2cdd
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jonmagic@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/README.md CHANGED
@@ -101,8 +101,8 @@ pdf[3].save('/path/to/image.png')
101
101
 
102
102
  ## Reference
103
103
 
104
- * [jonmagic.com: Grim](http://jonmagic.com/blog/archives/2011/09/06/grim/)
105
- * [jonmagic.com: Grim MultiProcessor](http://jonmagic.com/blog/archives/2011/10/06/grim-multiprocessor-to-the-rescue/)
104
+ * [jonmagic.com: Grim](http://theprogrammingbutler.com/blog/archives/2011/09/06/grim/)
105
+ * [jonmagic.com: Grim MultiProcessor](http://theprogrammingbutler.com/blog/archives/2011/10/06/grim-multiprocessor-to-the-rescue/)
106
106
 
107
107
  ## Contributors
108
108
 
@@ -115,6 +115,7 @@ pdf[3].save('/path/to/image.png')
115
115
  * [@victormier](https://github.com/victormier)
116
116
  * [@philgooch](https://github.com/philgooch)
117
117
  * [@adamcrown](https://github.com/adamcrown)
118
+ * [@fujimura](https://github.com/fujimura)
118
119
 
119
120
  ## License
120
121
 
@@ -59,7 +59,7 @@ module Grim
59
59
  command << "-interlace none"
60
60
  command << "-density #{density}"
61
61
  command << "#{Shellwords.shellescape(pdf.path)}[#{index}]"
62
- command << path
62
+ command << Shellwords.shellescape(path)
63
63
 
64
64
  command
65
65
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Grim
3
- VERSION = "1.3.2" unless defined?(::Grim::VERSION)
3
+ VERSION = "1.3.3" unless defined?(::Grim::VERSION)
4
4
  end
@@ -50,6 +50,20 @@ describe Grim::ImageMagickProcessor do
50
50
  end
51
51
  end
52
52
 
53
+ describe "#save to path includes shell meta character" do
54
+ before(:all) do
55
+ @path = tmp_path("to_png_spec(1).png")
56
+ @pdf = Grim::Pdf.new(fixture_path("smoker.pdf"))
57
+
58
+ @processor = Grim::ImageMagickProcessor.new
59
+ end
60
+
61
+ it "should success" do
62
+ @processor.save(@pdf, 0, @path, {})
63
+ expect(File.exist?(@path)).to be(true)
64
+ end
65
+ end
66
+
53
67
  describe "#save with width option" do
54
68
  before(:each) do
55
69
  @path = tmp_path("to_png_spec.png")
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.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Hoyt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-24 00:00:00.000000000 Z
11
+ date: 2017-09-11 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
@@ -21,6 +21,7 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - ".gitignore"
24
+ - CODE_OF_CONDUCT.md
24
25
  - Gemfile
25
26
  - LICENSE
26
27
  - README.md
@@ -64,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  version: '0'
65
66
  requirements: []
66
67
  rubyforge_project: grim
67
- rubygems_version: 2.6.11
68
+ rubygems_version: 2.4.5.1
68
69
  signing_key:
69
70
  specification_version: 4
70
71
  summary: Extract slides and text from a PDF.