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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8469dce4f906ff993bc3009d906403eb41893ae8e963fc337f8d179c6b63c4d0
4
- data.tar.gz: 6c838a7a085e002e75fc0cbf226d0df63480f1454b936e2449fc2bd81020e7a7
3
+ metadata.gz: 581d8fd7eb76407a49d99929d0882eab59e29d193ca0200ffb871e32917fb8b6
4
+ data.tar.gz: acc60f49380c73c732e23d56aed5b2fe399fdaac7567214c43b3d1fe9bc3a774
5
5
  SHA512:
6
- metadata.gz: 55d5ef193669c8407a62d76f004fb15f0496fbf943f27e38c512afec3723db29c6de2d3c45add37e1a916bdc3b5ee3578e60a2ca4548a03784ee00946d484799
7
- data.tar.gz: 769002fec20150ddb445cc1a02edfb320ac7a3e30bfb806a1c55e58a3b4f445318c45e7a184b5af9454bfd7040a9cb6b0e3009f824dd02d1e1287c92b0ee095d
6
+ metadata.gz: 55c2fc909292f0bbfb6f5a9a0c6a99f7a9eacddab0640bc3e49152a40b2bdfc63b501b4aa20a0f2fdd4c8b52b27041fa77ff90d21b4bc2a88284de60d142810a
7
+ data.tar.gz: 6c0efaec232cd0ecc6b175e350427d55d02af366d45c2b668ed4f488a7447f5007e19a5ac6aab65bb9442f0f911b4d08ab9bba6b5e39207ed1765d87af007abb
@@ -9,46 +9,34 @@ name: Build
9
9
 
10
10
  on:
11
11
  push:
12
- branches: [ master ]
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.6, 2.7]
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
- - name: Install packages
32
- run: |
33
- sudo apt update -y
34
- sudo apt install -y libsqlite3-dev
35
- - uses: actions/checkout@v2
36
- - uses: actions/cache@v1
37
- with:
38
- path: /home/runner/bundle
39
- key: bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
40
- restore-keys: |
41
- bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-
42
- - name: Set up Ruby
43
- uses: ruby/setup-ruby@v1
44
- with:
45
- ruby-version: ${{ matrix.ruby }}
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
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.2.0
4
+
5
+ - Drop support for rails 5.2
6
+
3
7
  ## 0.1.5
4
8
 
5
9
  - Add French locale (#24)
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", ">= 5.2.0"
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"
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'rails', '6.0.2.2'
3
+ gem 'rails', '6.0.4.1'
4
4
  gem 'sqlite3'
5
5
 
6
6
  gemspec path: '../'
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'rails', '5.2.4.2'
3
+ gem 'rails', '6.1.4'
4
4
  gem 'sqlite3'
5
5
 
6
6
  gemspec path: '../'
@@ -1,5 +1,5 @@
1
1
  module ActiveStorage
2
2
  module Validator
3
- VERSION = '0.1.5'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
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.1.5
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-10 00:00:00.000000000 Z
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: 5.2.0
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: 5.2.0
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