mini_paperclip 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +23 -11
- data/Rakefile +1 -1
- data/gemfiles/development.gemfile +2 -4
- data/gemfiles/minimum.gemfile +8 -0
- data/gemfiles/{rails_52.gemfile → rails_72.gemfile} +1 -1
- data/gemfiles/{rails_60.gemfile → rails_80.gemfile} +1 -1
- data/gemfiles/rails_81.gemfile +5 -0
- data/lib/mini_paperclip/attachment.rb +13 -8
- data/lib/mini_paperclip/class_methods.rb +1 -1
- data/lib/mini_paperclip/config.rb +2 -2
- data/lib/mini_paperclip/interpolator.rb +1 -1
- data/lib/mini_paperclip/shoulda/matchers/have_attached_file_matcher.rb +4 -4
- data/lib/mini_paperclip/shoulda/matchers/validate_attachment_content_type_matcher.rb +1 -1
- data/lib/mini_paperclip/shoulda/matchers/validate_attachment_geometry_matcher.rb +4 -4
- data/lib/mini_paperclip/shoulda/matchers/validate_attachment_presence_matcher.rb +1 -1
- data/lib/mini_paperclip/shoulda/matchers/validate_attachment_size_matcher.rb +1 -1
- data/lib/mini_paperclip/storage/filesystem.rb +2 -1
- data/lib/mini_paperclip/storage/s3.rb +1 -0
- data/lib/mini_paperclip/version.rb +1 -1
- data/lib/mini_paperclip.rb +10 -2
- data/mini_paperclip.gemspec +13 -14
- metadata +170 -141
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 850d839537b2fe1437c8ac554c25d3f30a510aca55d9b4b1499c793140ba359e
|
|
4
|
+
data.tar.gz: 3cd21db1f81a1d104149b07da78742383cadcc9c5a61e202ae412187b64434e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 172cec449a9333d874da8a65d44d7cae8615c37e20d443ddc133df3f23141992de56dfafd5cca35736edd907978c5882c1b079a171712766eeebb4462884142a
|
|
7
|
+
data.tar.gz: 35836fe46ceefcd5005babb272703991eb5d77d37309b3eaac54eee6de9b9bad38d167bc2c1135d3553d0267d79d0756f722511be311fac256caf7415bf6b1e0
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -15,29 +15,41 @@ on:
|
|
|
15
15
|
branches:
|
|
16
16
|
- main
|
|
17
17
|
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
18
21
|
jobs:
|
|
19
22
|
test:
|
|
20
23
|
strategy:
|
|
21
24
|
fail-fast: false
|
|
22
25
|
matrix:
|
|
23
26
|
ruby:
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
+
- "3.3"
|
|
28
|
+
- "3.4"
|
|
29
|
+
- "4.0"
|
|
27
30
|
gemfile:
|
|
28
|
-
- gemfiles/
|
|
29
|
-
- gemfiles/
|
|
30
|
-
|
|
31
|
+
- gemfiles/rails_72.gemfile
|
|
32
|
+
- gemfiles/rails_80.gemfile
|
|
33
|
+
- gemfiles/rails_81.gemfile
|
|
34
|
+
include:
|
|
35
|
+
- ruby: "3.3"
|
|
36
|
+
gemfile: gemfiles/minimum.gemfile
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
env:
|
|
39
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
31
40
|
steps:
|
|
32
|
-
- uses: actions/checkout@
|
|
41
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
42
|
+
with:
|
|
43
|
+
persist-credentials: false
|
|
44
|
+
- name: Install ImageMagick
|
|
45
|
+
run: sudo apt-get update && sudo apt-get install -y imagemagick
|
|
33
46
|
- name: Set up Ruby
|
|
34
|
-
uses: ruby/setup-ruby@v1
|
|
47
|
+
uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1.345.0
|
|
35
48
|
with:
|
|
36
49
|
ruby-version: ${{ matrix.ruby }}
|
|
37
|
-
|
|
38
|
-
run: bundle install --gemfile=${{ matrix.gemfile }}
|
|
50
|
+
bundler-cache: true
|
|
39
51
|
- name: Run tests and Print coverage
|
|
40
52
|
env:
|
|
41
53
|
COVERAGE: 1
|
|
42
54
|
LOGLEVEL: info
|
|
43
|
-
run: bundle exec
|
|
55
|
+
run: bundle exec rake
|
data/Rakefile
CHANGED
|
@@ -46,6 +46,7 @@ module MiniPaperclip
|
|
|
46
46
|
def exists?(style = :original)
|
|
47
47
|
file? && @storage.exists?(style)
|
|
48
48
|
end
|
|
49
|
+
alias_method :exist?, :exists?
|
|
49
50
|
|
|
50
51
|
def url(style = :original)
|
|
51
52
|
@storage.url_for_read(style)
|
|
@@ -102,15 +103,16 @@ module MiniPaperclip
|
|
|
102
103
|
@config.styles&.each do |style, size_arg|
|
|
103
104
|
Tempfile.create([style.to_s, File.extname(@waiting_write_file.path)]) do |temp|
|
|
104
105
|
temp.binmode
|
|
105
|
-
MiniMagick
|
|
106
|
+
MiniMagick.convert do |convert|
|
|
106
107
|
convert << @waiting_write_file.path
|
|
107
108
|
convert.coalesce if animated?
|
|
108
109
|
convert.auto_orient
|
|
109
110
|
if size_arg.end_with?('#')
|
|
110
111
|
# crop option
|
|
111
|
-
|
|
112
|
+
crop_size = size_arg.delete_suffix('#')
|
|
113
|
+
convert.resize("#{crop_size}^")
|
|
112
114
|
convert.gravity("center")
|
|
113
|
-
convert.extent(
|
|
115
|
+
convert.extent(crop_size)
|
|
114
116
|
else
|
|
115
117
|
convert.resize(size_arg)
|
|
116
118
|
end
|
|
@@ -125,7 +127,7 @@ module MiniPaperclip
|
|
|
125
127
|
if !@config.keep_old_files
|
|
126
128
|
do_delete_files
|
|
127
129
|
end
|
|
128
|
-
|
|
130
|
+
|
|
129
131
|
ensure
|
|
130
132
|
if @waiting_write_file.respond_to?(:close!)
|
|
131
133
|
@waiting_write_file.close!
|
|
@@ -191,10 +193,13 @@ module MiniPaperclip
|
|
|
191
193
|
|
|
192
194
|
def assign_http(url)
|
|
193
195
|
# download from url
|
|
196
|
+
uri = URI.parse(url)
|
|
197
|
+
unless uri.is_a?(URI::HTTP)
|
|
198
|
+
raise UnsupportedError, "attachment for \"#{url[0..100]}\" is not supported"
|
|
199
|
+
end
|
|
194
200
|
open_uri_option = {
|
|
195
|
-
read_timeout:
|
|
201
|
+
read_timeout: @config.read_timeout || 60
|
|
196
202
|
}
|
|
197
|
-
uri = URI.parse(url)
|
|
198
203
|
uri.open(open_uri_option) do |io|
|
|
199
204
|
@record.write_attribute("#{@attachment_name}_file_name", File.basename(uri.path))
|
|
200
205
|
@record.write_attribute("#{@attachment_name}_content_type", strict_content_type(io))
|
|
@@ -211,7 +216,7 @@ module MiniPaperclip
|
|
|
211
216
|
if match_data.nil?
|
|
212
217
|
raise UnsupportedError, "attachment for \"#{data_uri[0..100]}\" is not supported"
|
|
213
218
|
end
|
|
214
|
-
raw =
|
|
219
|
+
raw = match_data[2].unpack1("m")
|
|
215
220
|
@record.write_attribute("#{@attachment_name}_file_name", nil)
|
|
216
221
|
@record.write_attribute("#{@attachment_name}_content_type", strict_content_type(StringIO.new(raw)))
|
|
217
222
|
@record.write_attribute("#{@attachment_name}_file_size", raw.bytesize)
|
|
@@ -222,7 +227,7 @@ module MiniPaperclip
|
|
|
222
227
|
|
|
223
228
|
def strict_content_type(io)
|
|
224
229
|
io.rewind
|
|
225
|
-
|
|
230
|
+
Marcel::Magic.by_magic(io)&.type
|
|
226
231
|
end
|
|
227
232
|
|
|
228
233
|
def build_tempfile(io)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module MiniPaperclip
|
|
4
|
-
|
|
4
|
+
Config = Struct.new(
|
|
5
5
|
:storage,
|
|
6
6
|
:filesystem_path,
|
|
7
7
|
:hash_secret,
|
|
@@ -20,7 +20,7 @@ module MiniPaperclip
|
|
|
20
20
|
:read_timeout,
|
|
21
21
|
:logger,
|
|
22
22
|
keyword_init: true,
|
|
23
|
-
)
|
|
23
|
+
) do
|
|
24
24
|
def merge(hash)
|
|
25
25
|
dup.merge!(hash)
|
|
26
26
|
end
|
|
@@ -10,17 +10,17 @@ module MiniPaperclip
|
|
|
10
10
|
# describe User do
|
|
11
11
|
# it { should have_attached_file(:avatar) }
|
|
12
12
|
# end
|
|
13
|
-
def have_attached_file
|
|
13
|
+
def have_attached_file(name)
|
|
14
14
|
HaveAttachedFileMatcher.new(name)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
class HaveAttachedFileMatcher
|
|
18
|
-
def initialize
|
|
18
|
+
def initialize(attachment_name)
|
|
19
19
|
@attachment_name = attachment_name
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def matches?
|
|
23
|
-
@subject = subject.
|
|
22
|
+
def matches?(subject)
|
|
23
|
+
@subject = subject.is_a?(Class) ? subject.new : subject
|
|
24
24
|
|
|
25
25
|
@subject.respond_to?(@attachment_name) &&
|
|
26
26
|
@subject.respond_to?("#{@attachment_name}=") &&
|
|
@@ -43,7 +43,7 @@ module MiniPaperclip
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def matches?(subject)
|
|
46
|
-
@subject = subject.
|
|
46
|
+
@subject = subject.is_a?(Class) ? subject.new : subject
|
|
47
47
|
|
|
48
48
|
unless @format && !@width.empty? && !@height.empty?
|
|
49
49
|
raise CallError, [
|
|
@@ -79,7 +79,7 @@ module MiniPaperclip
|
|
|
79
79
|
@subject.public_send("#{@attachment_name}=", f)
|
|
80
80
|
end
|
|
81
81
|
@subject.valid?
|
|
82
|
-
@subject.errors.details[
|
|
82
|
+
@subject.errors.details[@attachment_name]&.find { |d| d[:error] == :geometry }.nil?
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def when_invalid
|
|
@@ -87,7 +87,7 @@ module MiniPaperclip
|
|
|
87
87
|
@subject.public_send("#{@attachment_name}=", f)
|
|
88
88
|
end
|
|
89
89
|
@subject.valid?
|
|
90
|
-
detail = @subject.errors.details[
|
|
90
|
+
detail = @subject.errors.details[@attachment_name]&.find { |d| d[:error] == :geometry }
|
|
91
91
|
return false unless detail
|
|
92
92
|
return false unless detail[:expected_width_less_than_or_equal_to] == @width[:less_than_or_equal_to]
|
|
93
93
|
return false unless detail[:expected_height_less_than_or_equal_to] == @height[:less_than_or_equal_to]
|
|
@@ -97,7 +97,7 @@ module MiniPaperclip
|
|
|
97
97
|
def create_dummy_image(width:, height:)
|
|
98
98
|
Tempfile.create(['MiniPaperclip::Shoulda::Matchers::ValidateAttachmentGeometryMatcher', ".#{@format}"]) do |f|
|
|
99
99
|
f.binmode
|
|
100
|
-
MiniMagick
|
|
100
|
+
MiniMagick.convert do |convert|
|
|
101
101
|
convert.size("#{width}x#{height}")
|
|
102
102
|
convert.xc("none")
|
|
103
103
|
convert.strip
|
|
@@ -19,7 +19,7 @@ module MiniPaperclip
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def matches?(subject)
|
|
22
|
-
@subject = subject.
|
|
22
|
+
@subject = subject.is_a?(Class) ? subject.new : subject
|
|
23
23
|
|
|
24
24
|
begin
|
|
25
25
|
@subject.write_attribute("#{@attachment_name}_file_name", 'hello.png')
|
|
@@ -25,7 +25,7 @@ module MiniPaperclip
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def matches?(subject)
|
|
28
|
-
@subject = subject.
|
|
28
|
+
@subject = subject.is_a?(Class) ? subject.new : subject
|
|
29
29
|
|
|
30
30
|
begin
|
|
31
31
|
@subject.write_attribute("#{@attachment_name}_file_size", @less_than_size - 1)
|
data/lib/mini_paperclip.rb
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "fileutils"
|
|
4
|
+
require "logger"
|
|
5
|
+
require "open-uri"
|
|
3
6
|
require "openssl"
|
|
4
|
-
require "
|
|
7
|
+
require "stringio"
|
|
8
|
+
require "tempfile"
|
|
5
9
|
require "active_model/validator"
|
|
6
10
|
require "active_support"
|
|
11
|
+
require "active_support/core_ext/hash/deep_merge"
|
|
12
|
+
require "active_support/core_ext/object/blank"
|
|
13
|
+
require "active_support/core_ext/string/inflections"
|
|
14
|
+
require "active_support/core_ext/time/calculations"
|
|
7
15
|
require "active_support/number_helper"
|
|
8
16
|
require "mini_magick"
|
|
9
|
-
require "
|
|
17
|
+
require "marcel"
|
|
10
18
|
require "aws-sdk-s3"
|
|
11
19
|
require "image_size"
|
|
12
20
|
|
data/mini_paperclip.gemspec
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require_relative
|
|
1
|
+
require_relative "lib/mini_paperclip/version"
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "mini_paperclip"
|
|
@@ -6,28 +6,27 @@ Gem::Specification.new do |spec|
|
|
|
6
6
|
spec.authors = ["ksss"]
|
|
7
7
|
spec.email = ["co000ri@gmail.com"]
|
|
8
8
|
|
|
9
|
-
spec.summary =
|
|
10
|
-
spec.description =
|
|
9
|
+
spec.summary = "MiniPaperclip is a mini paperclip"
|
|
10
|
+
spec.description = "Subset from paperclip because paperclip has deprecated"
|
|
11
11
|
spec.homepage = "https://github.com/reproio/mini_paperclip"
|
|
12
12
|
spec.license = "MIT"
|
|
13
|
-
spec.required_ruby_version =
|
|
13
|
+
spec.required_ruby_version = ">= 3.3.0"
|
|
14
14
|
|
|
15
|
-
spec.
|
|
16
|
-
spec.
|
|
17
|
-
spec.
|
|
18
|
-
spec.
|
|
19
|
-
spec.
|
|
20
|
-
spec.
|
|
15
|
+
spec.add_dependency "activemodel", ">= 7.2"
|
|
16
|
+
spec.add_dependency "activesupport", ">= 7.2"
|
|
17
|
+
spec.add_dependency "aws-sdk-s3"
|
|
18
|
+
spec.add_dependency "image_size"
|
|
19
|
+
spec.add_dependency "logger"
|
|
20
|
+
spec.add_dependency "marcel", ">= 1.0"
|
|
21
|
+
spec.add_dependency "mini_magick", ">= 5.0"
|
|
21
22
|
|
|
22
23
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
23
24
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
24
25
|
|
|
25
26
|
# Specify which files should be added to the gem when it is released.
|
|
26
27
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
27
|
-
spec.files = Dir.chdir(
|
|
28
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{
|
|
28
|
+
spec.files = Dir.chdir(__dir__) do
|
|
29
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match?(%r{\A(?:test|spec|features)/}) }
|
|
29
30
|
end
|
|
30
|
-
spec.bindir = "exe"
|
|
31
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
32
31
|
spec.require_paths = ["lib"]
|
|
33
32
|
end
|
metadata
CHANGED
|
@@ -1,166 +1,195 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mini_paperclip
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- ksss
|
|
8
|
-
|
|
9
|
-
bindir: exe
|
|
7
|
+
- ksss
|
|
8
|
+
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- !ruby/object:Gem::
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- !ruby/object:Gem::
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: activemodel
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: "7.2"
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
-
|
|
25
|
+
- ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: "7.2"
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: activesupport
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
-
|
|
33
|
+
- ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: "7.2"
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
-
|
|
41
|
+
- ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: "7.2"
|
|
44
|
+
- !ruby/object:Gem::Dependency
|
|
45
|
+
name: aws-sdk-s3
|
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
-
|
|
49
|
+
- ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: "0"
|
|
52
|
+
type: :runtime
|
|
53
|
+
prerelease: false
|
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
-
|
|
57
|
+
- ">="
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: "0"
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: image_size
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
-
|
|
65
|
+
- ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: "0"
|
|
68
|
+
type: :runtime
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
-
|
|
73
|
+
- ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: "0"
|
|
76
|
+
- !ruby/object:Gem::Dependency
|
|
77
|
+
name: logger
|
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
-
|
|
81
|
+
- ">="
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: "0"
|
|
84
|
+
type: :runtime
|
|
85
|
+
prerelease: false
|
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
-
|
|
89
|
+
- ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: "0"
|
|
92
|
+
- !ruby/object:Gem::Dependency
|
|
93
|
+
name: marcel
|
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
|
95
|
+
requirements:
|
|
96
|
+
-
|
|
97
|
+
- ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: "1.0"
|
|
100
|
+
type: :runtime
|
|
101
|
+
prerelease: false
|
|
102
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
103
|
+
requirements:
|
|
104
|
+
-
|
|
105
|
+
- ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: "1.0"
|
|
108
|
+
- !ruby/object:Gem::Dependency
|
|
109
|
+
name: mini_magick
|
|
110
|
+
requirement: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
-
|
|
113
|
+
- ">="
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: "5.0"
|
|
116
|
+
type: :runtime
|
|
117
|
+
prerelease: false
|
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
-
|
|
121
|
+
- ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: "5.0"
|
|
97
124
|
description: Subset from paperclip because paperclip has deprecated
|
|
98
125
|
email:
|
|
99
|
-
- co000ri@gmail.com
|
|
126
|
+
- co000ri@gmail.com
|
|
100
127
|
executables: []
|
|
101
128
|
extensions: []
|
|
102
129
|
extra_rdoc_files: []
|
|
103
130
|
files:
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
- CODE_OF_CONDUCT.md
|
|
108
|
-
- Gemfile
|
|
109
|
-
- LICENSE.txt
|
|
110
|
-
- README.md
|
|
111
|
-
- Rakefile
|
|
112
|
-
- bin/console
|
|
113
|
-
- bin/setup
|
|
114
|
-
- gemfiles/development.gemfile
|
|
115
|
-
- gemfiles/
|
|
116
|
-
- gemfiles/
|
|
117
|
-
- gemfiles/
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- lib/mini_paperclip
|
|
121
|
-
- lib/mini_paperclip/
|
|
122
|
-
- lib/mini_paperclip/
|
|
123
|
-
- lib/mini_paperclip/
|
|
124
|
-
- lib/mini_paperclip/
|
|
125
|
-
- lib/mini_paperclip/shoulda/matchers
|
|
126
|
-
- lib/mini_paperclip/shoulda/matchers/
|
|
127
|
-
- lib/mini_paperclip/shoulda/matchers/
|
|
128
|
-
- lib/mini_paperclip/shoulda/matchers/
|
|
129
|
-
- lib/mini_paperclip/
|
|
130
|
-
- lib/mini_paperclip/
|
|
131
|
-
- lib/mini_paperclip/storage
|
|
132
|
-
- lib/mini_paperclip/storage/
|
|
133
|
-
- lib/mini_paperclip/
|
|
134
|
-
- lib/mini_paperclip/
|
|
135
|
-
- lib/mini_paperclip/validators
|
|
136
|
-
- lib/mini_paperclip/validators/
|
|
137
|
-
- lib/mini_paperclip/validators/
|
|
138
|
-
- lib/mini_paperclip/validators/
|
|
139
|
-
- lib/mini_paperclip/
|
|
140
|
-
- mini_paperclip.
|
|
141
|
-
|
|
131
|
+
- .github/workflows/ci.yml
|
|
132
|
+
- .gitignore
|
|
133
|
+
- .rspec
|
|
134
|
+
- CODE_OF_CONDUCT.md
|
|
135
|
+
- Gemfile
|
|
136
|
+
- LICENSE.txt
|
|
137
|
+
- README.md
|
|
138
|
+
- Rakefile
|
|
139
|
+
- bin/console
|
|
140
|
+
- bin/setup
|
|
141
|
+
- gemfiles/development.gemfile
|
|
142
|
+
- gemfiles/minimum.gemfile
|
|
143
|
+
- gemfiles/rails_72.gemfile
|
|
144
|
+
- gemfiles/rails_80.gemfile
|
|
145
|
+
- gemfiles/rails_81.gemfile
|
|
146
|
+
- gemfiles/rails_head.gemfile
|
|
147
|
+
- lib/mini_paperclip.rb
|
|
148
|
+
- lib/mini_paperclip/attachment.rb
|
|
149
|
+
- lib/mini_paperclip/class_methods.rb
|
|
150
|
+
- lib/mini_paperclip/config.rb
|
|
151
|
+
- lib/mini_paperclip/interpolator.rb
|
|
152
|
+
- lib/mini_paperclip/shoulda/matchers.rb
|
|
153
|
+
- lib/mini_paperclip/shoulda/matchers/have_attached_file_matcher.rb
|
|
154
|
+
- lib/mini_paperclip/shoulda/matchers/validate_attachment_content_type_matcher.rb
|
|
155
|
+
- lib/mini_paperclip/shoulda/matchers/validate_attachment_geometry_matcher.rb
|
|
156
|
+
- lib/mini_paperclip/shoulda/matchers/validate_attachment_presence_matcher.rb
|
|
157
|
+
- lib/mini_paperclip/shoulda/matchers/validate_attachment_size_matcher.rb
|
|
158
|
+
- lib/mini_paperclip/storage.rb
|
|
159
|
+
- lib/mini_paperclip/storage/base.rb
|
|
160
|
+
- lib/mini_paperclip/storage/filesystem.rb
|
|
161
|
+
- lib/mini_paperclip/storage/s3.rb
|
|
162
|
+
- lib/mini_paperclip/validators.rb
|
|
163
|
+
- lib/mini_paperclip/validators/content_type_validator.rb
|
|
164
|
+
- lib/mini_paperclip/validators/file_size_validator.rb
|
|
165
|
+
- lib/mini_paperclip/validators/geometry_validator.rb
|
|
166
|
+
- lib/mini_paperclip/validators/media_type_spoof_validator.rb
|
|
167
|
+
- lib/mini_paperclip/validators/presence_validator.rb
|
|
168
|
+
- lib/mini_paperclip/version.rb
|
|
169
|
+
- mini_paperclip.gemspec
|
|
170
|
+
homepage: "https://github.com/reproio/mini_paperclip"
|
|
142
171
|
licenses:
|
|
143
|
-
- MIT
|
|
172
|
+
- MIT
|
|
144
173
|
metadata:
|
|
145
|
-
homepage_uri: https://github.com/reproio/mini_paperclip
|
|
146
|
-
source_code_uri: https://github.com/reproio/mini_paperclip
|
|
147
|
-
post_install_message:
|
|
174
|
+
homepage_uri: "https://github.com/reproio/mini_paperclip"
|
|
175
|
+
source_code_uri: "https://github.com/reproio/mini_paperclip"
|
|
148
176
|
rdoc_options: []
|
|
149
177
|
require_paths:
|
|
150
|
-
- lib
|
|
178
|
+
- lib
|
|
151
179
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
180
|
requirements:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
181
|
+
-
|
|
182
|
+
- ">="
|
|
183
|
+
- !ruby/object:Gem::Version
|
|
184
|
+
version: 3.3.0
|
|
156
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
186
|
requirements:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
187
|
+
-
|
|
188
|
+
- ">="
|
|
189
|
+
- !ruby/object:Gem::Version
|
|
190
|
+
version: "0"
|
|
161
191
|
requirements: []
|
|
162
|
-
rubygems_version:
|
|
163
|
-
signing_key:
|
|
192
|
+
rubygems_version: 4.1.0
|
|
164
193
|
specification_version: 4
|
|
165
194
|
summary: MiniPaperclip is a mini paperclip
|
|
166
195
|
test_files: []
|