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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4bbc67bf18e48b39b2881572d38e440eecd7eecd
4
- data.tar.gz: a7aa0115471179d767f2de55dbb28cb637330f82
2
+ SHA256:
3
+ metadata.gz: 5ea1df52d94d01c0c3dcc2d6057bfb8d5946cc718dd9e805f2d3508d3ff8c6fe
4
+ data.tar.gz: 97dab0ca46c8792e725840468a0de62651d621fff83b1aa7dfbb8df61bb8e1c9
5
5
  SHA512:
6
- metadata.gz: c346dd71ca2a355a7164581c26865d55d083db3b944ddaa35c4c5930f7a70b4e2a304f01930839f44b88a83d79912a45d27c2ed84b8d074e3918336823af24fb
7
- data.tar.gz: 239f8f8fa97cd0b9e7442072039c489f1cd3cc45ad8520bbc1db94fe618e520d59fb320bb975702aca8de134f4784ebb5eb1a013c6339de99278c527c73e91ec
6
+ metadata.gz: 6ce283ed6054508af7fdfae2bca9d1cf6c32135132a4d38a9a410750a68ec7ab8c179d35b83d20f25ee39f858503bbe3e7409d1758c1a513c0f1188d5ac85b30
7
+ data.tar.gz: 4c371bc621a32a293bb0b6ca9853126e2eb7b9140548bfbb7c39a6614b9f707b5275ba8a17f3fee8d2394a068f28183a8f878a4d2eb7ffff5521f26ff80a14cf
@@ -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.
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.6
4
- - 2.3.4
3
+ - 2.5.7
4
+ - 2.6.5
5
5
  gemfile:
6
6
  - gemfiles/4.2.gemfile
7
7
  - gemfiles/5.0.gemfile
@@ -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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PdfCover
2
- VERSION = "0.2.4".freeze
2
+ VERSION = "0.3.1".freeze
3
3
  end
@@ -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.2.4
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: 2017-10-18 00:00:00.000000000 Z
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: '0'
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: '0'
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
- rubyforge_project:
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