pdf_cover 0.2.4 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +0 -5
- data/.travis.yml +2 -2
- data/CHANGELOG.md +20 -0
- data/lib/pdf_cover.rb +5 -0
- data/lib/pdf_cover/version.rb +1 -1
- data/pdf_cover.gemspec +2 -2
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5ea1df52d94d01c0c3dcc2d6057bfb8d5946cc718dd9e805f2d3508d3ff8c6fe
|
4
|
+
data.tar.gz: 97dab0ca46c8792e725840468a0de62651d621fff83b1aa7dfbb8df61bb8e1c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce283ed6054508af7fdfae2bca9d1cf6c32135132a4d38a9a410750a68ec7ab8c179d35b83d20f25ee39f858503bbe3e7409d1758c1a513c0f1188d5ac85b30
|
7
|
+
data.tar.gz: 4c371bc621a32a293bb0b6ca9853126e2eb7b9140548bfbb7c39a6614b9f707b5275ba8a17f3fee8d2394a068f28183a8f878a4d2eb7ffff5521f26ff80a14cf
|
data/.rubocop.yml
CHANGED
@@ -16,11 +16,6 @@ AllCops:
|
|
16
16
|
- 'db/migrate/*.rb'
|
17
17
|
- 'spec/dummy/**/*'
|
18
18
|
|
19
|
-
# By default, the rails cops are not run. Override in project or home
|
20
|
-
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
21
|
-
Rails:
|
22
|
-
Enabled: true
|
23
|
-
|
24
19
|
# Indent private/protected/public as deep as method definitions
|
25
20
|
AccessModifierIndentation:
|
26
21
|
Description: Check indentation of private/protected visibility modifiers.
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [0.3.1] - 2019-11-26
|
8
|
+
### Added
|
9
|
+
- Enforce JPEG content type for carrierwave [Pull Request](https://github.com/xing/pdf_cover/pull/10)
|
10
|
+
|
11
|
+
## [0.2.4] - 2017-10-18
|
12
|
+
### Added
|
13
|
+
- Handle quotes in windows when calling GS [Pull Request](https://github.com/xing/pdf_cover/pull/9)
|
14
|
+
|
15
|
+
## [0.2.3] - 2017-08-21
|
16
|
+
### Added
|
17
|
+
- Remove `dTextAlphaBits` parameter to GS [Pull Request](https://github.com/xing/pdf_cover/pull/8)
|
18
|
+
|
19
|
+
## [0.2.3] - 2017-08-21
|
20
|
+
### Added
|
21
|
+
- Remove `dTextAlphaBits` parameter to GS [Pull Request](https://github.com/xing/pdf_cover/pull/8)
|
22
|
+
|
23
|
+
## [0.2.2] - 2017-07-05
|
24
|
+
### Added
|
25
|
+
- Add support for rails 5 [Pull Request](https://github.com/xing/pdf_cover/pull/7)
|
26
|
+
|
7
27
|
## [0.2.1] - 2016-10-24
|
8
28
|
### Added
|
9
29
|
- Add default antialias [Pull Request](https://github.com/xing/pdf_cover/pull/6)
|
data/lib/pdf_cover.rb
CHANGED
@@ -31,6 +31,7 @@ module PdfCover
|
|
31
31
|
# end
|
32
32
|
def pdf_cover_attachment(options = {})
|
33
33
|
process pdf_cover: [options[:quality], options[:resolution]]
|
34
|
+
process enforce_content_type: "image/jpeg"
|
34
35
|
|
35
36
|
define_method :full_filename do |for_file = model.logo.file|
|
36
37
|
for_file.gsub(/pdf$/i, "jpeg")
|
@@ -96,4 +97,8 @@ module PdfCover
|
|
96
97
|
converted_file = PdfCover::Converter.new(file, options).converted_file
|
97
98
|
FileUtils.cp(converted_file, current_path)
|
98
99
|
end
|
100
|
+
|
101
|
+
def enforce_content_type(content_type)
|
102
|
+
file.content_type = content_type
|
103
|
+
end
|
99
104
|
end
|
data/lib/pdf_cover/version.rb
CHANGED
data/pdf_cover.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_development_dependency "activesupport", ">= 4.2"
|
25
|
+
spec.add_development_dependency "activesupport", ">= 4.2", "< 6.0.0"
|
26
26
|
|
27
27
|
spec.add_development_dependency "appraisal"
|
28
28
|
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency "simplecov"
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
34
|
spec.add_development_dependency "rubocop", "~> 0.37.2"
|
35
|
-
spec.add_development_dependency "sqlite3"
|
35
|
+
spec.add_development_dependency "sqlite3", "~> 1.3.6"
|
36
36
|
|
37
37
|
spec.add_development_dependency "byebug"
|
38
38
|
spec.add_development_dependency "fivemat"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf_cover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan González
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 6.0.0
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 6.0.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: appraisal
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,16 +132,16 @@ dependencies:
|
|
126
132
|
name: sqlite3
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
|
-
- - "
|
135
|
+
- - "~>"
|
130
136
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
137
|
+
version: 1.3.6
|
132
138
|
type: :development
|
133
139
|
prerelease: false
|
134
140
|
version_requirements: !ruby/object:Gem::Requirement
|
135
141
|
requirements:
|
136
|
-
- - "
|
142
|
+
- - "~>"
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
144
|
+
version: 1.3.6
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
146
|
name: byebug
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,8 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
289
|
- !ruby/object:Gem::Version
|
284
290
|
version: '0'
|
285
291
|
requirements: []
|
286
|
-
|
287
|
-
rubygems_version: 2.4.5.1
|
292
|
+
rubygems_version: 3.0.3
|
288
293
|
signing_key:
|
289
294
|
specification_version: 4
|
290
295
|
summary: Convert first page of a PDF into an image format on Carrierwave and Paperclip
|