activestorage-validator 0.1.5 → 0.2.0
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 +19 -31
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/activestorage-validator.gemspec +1 -1
- data/gemfiles/rails60.gemfile +1 -1
- data/gemfiles/{rails52.gemfile → rails61.gemfile} +1 -1
- data/lib/activestorage/validator/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581d8fd7eb76407a49d99929d0882eab59e29d193ca0200ffb871e32917fb8b6
|
4
|
+
data.tar.gz: acc60f49380c73c732e23d56aed5b2fe399fdaac7567214c43b3d1fe9bc3a774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55c2fc909292f0bbfb6f5a9a0c6a99f7a9eacddab0640bc3e49152a40b2bdfc63b501b4aa20a0f2fdd4c8b52b27041fa77ff90d21b4bc2a88284de60d142810a
|
7
|
+
data.tar.gz: 6c0efaec232cd0ecc6b175e350427d55d02af366d45c2b668ed4f488a7447f5007e19a5ac6aab65bb9442f0f911b4d08ab9bba6b5e39207ed1765d87af007abb
|
data/.github/workflows/rspec.yml
CHANGED
@@ -9,46 +9,34 @@ 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
|
-
"gemfiles/rails52.gemfile",
|
28
|
-
"gemfiles/rails60.gemfile",
|
29
|
-
]
|
25
|
+
ruby: [2.7, 3.0]
|
26
|
+
gemfile: [rails60, rails61]
|
30
27
|
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
|
28
|
+
- name: Install packages
|
29
|
+
run: |
|
30
|
+
sudo apt update -y
|
31
|
+
sudo apt install -y libsqlite3-dev
|
32
|
+
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
|
35
|
+
- name: Set up Ruby
|
36
|
+
uses: ruby/setup-ruby@v1
|
37
|
+
with:
|
38
|
+
ruby-version: ${{ matrix.ruby }}
|
39
|
+
bundler-cache: true
|
40
|
+
|
41
|
+
- name: Run rspec
|
42
|
+
run: bundle exec rspec
|
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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-11 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
|
@@ -106,8 +106,8 @@ files:
|
|
106
106
|
- config/locales/fr.yml
|
107
107
|
- config/locales/ja.yml
|
108
108
|
- config/locales/pt-br.yml
|
109
|
-
- gemfiles/rails52.gemfile
|
110
109
|
- gemfiles/rails60.gemfile
|
110
|
+
- gemfiles/rails61.gemfile
|
111
111
|
- lib/activestorage/validator.rb
|
112
112
|
- lib/activestorage/validator/blob.rb
|
113
113
|
- lib/activestorage/validator/version.rb
|