stevedore 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzIwYjNlZmYxYjRhZWU0MDI3ZWIzYWI4MjY4NzFmNDJkZTM0MTg0Nw==
5
+ data.tar.gz: !binary |-
6
+ MGFlNjcyYTNkZDQ5YjQyMTg1NWEyNDJhM2E1ZDFmOTJjZjk1YjNiMg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MTFiNWMwY2RhZDA0ZjMwMzdkZTcxMDk0MjRhZTU3YTMxNTYxNWU0Yzk4YWRi
10
+ ZTQ0OTNmZWEyZTUwZGRjOGRlNjdjMjBiMjQwMzc3YmFhYTM2ZTIyNzAxZDk3
11
+ ZTVhZTdhMWIxYTVhMmM3MDVlMGY5YWRlY2Y4NjUxMDkzZWQ4M2U=
12
+ data.tar.gz: !binary |-
13
+ M2Q2MThkNzY3Y2M2YzY5NTg5ZDk4NjhmYWIzNjEzOTJjMDYyYmZjNDYzMWJl
14
+ NjQ1ZWJhZDI0MGFkZmMxMzA2Y2ZhNTI2N2U0YzJmMmNiNmQ1NzMyYmU5MzY2
15
+ YzQ3Y2UyMTYwM2UzMjFjOTU5YTA0YWE5MTM5MTgwNDE2YjljMTA=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -13,6 +13,10 @@ class Stevedore::Pdf
13
13
  metadata.num_pages
14
14
  end
15
15
 
16
+ def page_size
17
+ metadata.page_size
18
+ end
19
+
16
20
  class Metadata
17
21
  require 'yaml'
18
22
 
@@ -29,6 +33,11 @@ class Stevedore::Pdf
29
33
  def num_pages
30
34
  @raw_metadata["Pages"].to_i
31
35
  end
36
+
37
+ def page_size
38
+ size_data = @raw_metadata["Page size"].split(' ')
39
+ [size_data[0].to_i, size_data[2].to_i]
40
+ end
32
41
  end
33
42
 
34
43
  def images(base_dir = tmp_dir)
@@ -18,6 +18,12 @@ describe Stevedore::Pdf do
18
18
  end
19
19
  end
20
20
 
21
+ describe '#page_size' do
22
+ it "returns an array containing the width and height as integers" do
23
+ @pdf.page_size.should == [612,792]
24
+ end
25
+ end
26
+
21
27
  describe '#images' do
22
28
  it "should return 4 images" do
23
29
  @pdf.images.size.should == 4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "stevedore"
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Carpenter"]
@@ -43,11 +43,11 @@ Gem::Specification.new do |s|
43
43
  s.specification_version = 3
44
44
 
45
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
- s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
46
+ s.add_development_dependency(%q<rspec>, ['~> 2.8', '>= 2.8.0'])
47
47
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
48
48
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
49
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
50
- s.add_development_dependency(%q<simplecov>, [">= 0"])
49
+ s.add_development_dependency(%q<jeweler>, ['~> 1.8', '>= 1.8.4'])
50
+ s.add_development_dependency(%q<simplecov>, ["~> 0"])
51
51
  else
52
52
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
53
53
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
@@ -63,4 +63,3 @@ Gem::Specification.new do |s|
63
63
  s.add_dependency(%q<simplecov>, [">= 0"])
64
64
  end
65
65
  end
66
-
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stevedore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andrew Carpenter
@@ -13,59 +12,86 @@ date: 2015-05-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
- requirement: &70285428789320 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '2.8'
20
+ - - ! '>='
20
21
  - !ruby/object:Gem::Version
21
22
  version: 2.8.0
22
23
  type: :development
23
24
  prerelease: false
24
- version_requirements: *70285428789320
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '2.8'
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 2.8.0
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: rdoc
27
- requirement: &70285428788460 !ruby/object:Gem::Requirement
28
- none: false
35
+ requirement: !ruby/object:Gem::Requirement
29
36
  requirements:
30
37
  - - ~>
31
38
  - !ruby/object:Gem::Version
32
39
  version: '3.12'
33
40
  type: :development
34
41
  prerelease: false
35
- version_requirements: *70285428788460
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: '3.12'
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: bundler
38
- requirement: &70285428787560 !ruby/object:Gem::Requirement
39
- none: false
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
43
53
  version: '1.0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70285428787560
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: jeweler
49
- requirement: &70285428786700 !ruby/object:Gem::Requirement
50
- none: false
63
+ requirement: !ruby/object:Gem::Requirement
51
64
  requirements:
52
65
  - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: '1.8'
68
+ - - ! '>='
53
69
  - !ruby/object:Gem::Version
54
70
  version: 1.8.4
55
71
  type: :development
56
72
  prerelease: false
57
- version_requirements: *70285428786700
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '1.8'
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: 1.8.4
58
81
  - !ruby/object:Gem::Dependency
59
82
  name: simplecov
60
- requirement: &70285428785940 !ruby/object:Gem::Requirement
61
- none: false
83
+ requirement: !ruby/object:Gem::Requirement
62
84
  requirements:
63
- - - ! '>='
85
+ - - ~>
64
86
  - !ruby/object:Gem::Version
65
87
  version: '0'
66
88
  type: :development
67
89
  prerelease: false
68
- version_requirements: *70285428785940
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
69
95
  description: Get metadata about PDFs and extract full-quality images. Wrapper around
70
96
  `pdfimages` and `pdfinfo`.
71
97
  email: andrew@criticaljuncture.org
@@ -93,28 +119,24 @@ files:
93
119
  homepage: https://github.com/criticaljuncture/stevedore
94
120
  licenses:
95
121
  - MIT
122
+ metadata: {}
96
123
  post_install_message:
97
124
  rdoc_options: []
98
125
  require_paths:
99
126
  - lib
100
127
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
128
  requirements:
103
129
  - - ! '>='
104
130
  - !ruby/object:Gem::Version
105
131
  version: '0'
106
- segments:
107
- - 0
108
- hash: -3034929730470979579
109
132
  required_rubygems_version: !ruby/object:Gem::Requirement
110
- none: false
111
133
  requirements:
112
134
  - - ! '>='
113
135
  - !ruby/object:Gem::Version
114
136
  version: '0'
115
137
  requirements: []
116
138
  rubyforge_project:
117
- rubygems_version: 1.8.11
139
+ rubygems_version: 2.4.8
118
140
  signing_key:
119
141
  specification_version: 3
120
142
  summary: unload your docs