activestorage-validator 0.1.5 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +22 -31
- data/.gitignore +1 -0
- data/CHANGELOG.md +12 -0
- data/README.md +2 -2
- data/activestorage-validator.gemspec +1 -1
- data/config/locales/es.yml +7 -0
- data/config/locales/pl.yml +7 -0
- data/gemfiles/rails60.gemfile +1 -1
- data/gemfiles/{rails52.gemfile → rails61.gemfile} +1 -1
- data/gemfiles/rails70.gemfile +6 -0
- data/lib/activestorage/validator/version.rb +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7794a4dee965852bef0ebf772d56444e8fead4da8af495ebc385a22c8772a4f5
|
4
|
+
data.tar.gz: ed0e09adaea48bd600efe763be83dc8d97644a60c24d56e6dba4f2f7ccfe81fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e35d5f61512ff3cf914bd88c5420fed81b86f758b54d545761d7d76cbc57150649badc9e0a63facedfce8be2df2ca423d12b51b1ae0b5c69ed262e14fc9f6ae8
|
7
|
+
data.tar.gz: 8f32cebdb515d387a6df86f7dd51cab61acc3cf0cdf66059c23d0127ed6e933deeff010880c318243b95e186aca6ebfd57bcc25b86ef72bb4fa6255abfb48577
|
data/.github/workflows/rspec.yml
CHANGED
@@ -9,46 +9,37 @@ name: Build
|
|
9
9
|
|
10
10
|
on:
|
11
11
|
push:
|
12
|
-
branches: [
|
12
|
+
branches: [master]
|
13
13
|
pull_request:
|
14
14
|
|
15
15
|
jobs:
|
16
16
|
rspec:
|
17
|
-
|
18
17
|
runs-on: ubuntu-latest
|
19
18
|
env:
|
20
19
|
BUNDLE_JOBS: 4
|
21
20
|
BUNDLE_RETRY: 3
|
21
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
22
22
|
strategy:
|
23
23
|
fail-fast: false
|
24
24
|
matrix:
|
25
|
-
ruby: [2.
|
26
|
-
gemfile: [
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
ruby: [2.7, '3.0', 3.1]
|
26
|
+
gemfile: [rails60, rails61, rails70]
|
27
|
+
exclude:
|
28
|
+
- ruby: 3.1
|
29
|
+
gemfile: rails60
|
30
30
|
steps:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- name: Install dependencies
|
47
|
-
run: |
|
48
|
-
bundle config path /home/runner/bundle
|
49
|
-
bundle config --global gemfile ${{ matrix.gemfile }}
|
50
|
-
bundle install
|
51
|
-
bundle update
|
52
|
-
bundle clean
|
53
|
-
- name: Run rspec
|
54
|
-
run: bundle exec rspec
|
31
|
+
- name: Install packages
|
32
|
+
run: |
|
33
|
+
sudo apt update -y
|
34
|
+
sudo apt install -y libsqlite3-dev
|
35
|
+
|
36
|
+
- uses: actions/checkout@v2
|
37
|
+
|
38
|
+
- name: Set up Ruby
|
39
|
+
uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
ruby-version: ${{ matrix.ruby }}
|
42
|
+
bundler-cache: true
|
43
|
+
|
44
|
+
- name: Run rspec
|
45
|
+
run: bundle exec rspec
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -29,8 +29,8 @@ class User < ApplicationRecord
|
|
29
29
|
has_many_attached :photos
|
30
30
|
|
31
31
|
validates :avatar, presence: true, blob: { content_type: :image } # supported options: :image, :audio, :video, :text
|
32
|
-
validates :photos, presence: true, blob: { content_type: ['image/png', 'image/jpg', 'image/jpeg'], size_range: 1..5.megabytes }
|
33
|
-
# validates :photos, presence: true, blob: { content_type: %r{^image/}, size_range: 1..5.megabytes }
|
32
|
+
validates :photos, presence: true, blob: { content_type: ['image/png', 'image/jpg', 'image/jpeg'], size_range: 1..(5.megabytes) }
|
33
|
+
# validates :photos, presence: true, blob: { content_type: %r{^image/}, size_range: 1..(5.megabytes) }
|
34
34
|
end
|
35
35
|
```
|
36
36
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_dependency "rails", ">=
|
26
|
+
spec.add_dependency "rails", ">= 6.0.4.1"
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
28
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/gemfiles/rails60.gemfile
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activestorage-validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.4.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.0.4.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,11 +103,14 @@ files:
|
|
103
103
|
- config.ru
|
104
104
|
- config/locales/de.yml
|
105
105
|
- config/locales/en.yml
|
106
|
+
- config/locales/es.yml
|
106
107
|
- config/locales/fr.yml
|
107
108
|
- config/locales/ja.yml
|
109
|
+
- config/locales/pl.yml
|
108
110
|
- config/locales/pt-br.yml
|
109
|
-
- gemfiles/rails52.gemfile
|
110
111
|
- gemfiles/rails60.gemfile
|
112
|
+
- gemfiles/rails61.gemfile
|
113
|
+
- gemfiles/rails70.gemfile
|
111
114
|
- lib/activestorage/validator.rb
|
112
115
|
- lib/activestorage/validator/blob.rb
|
113
116
|
- lib/activestorage/validator/version.rb
|