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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8469dce4f906ff993bc3009d906403eb41893ae8e963fc337f8d179c6b63c4d0
4
- data.tar.gz: 6c838a7a085e002e75fc0cbf226d0df63480f1454b936e2449fc2bd81020e7a7
3
+ metadata.gz: 7794a4dee965852bef0ebf772d56444e8fead4da8af495ebc385a22c8772a4f5
4
+ data.tar.gz: ed0e09adaea48bd600efe763be83dc8d97644a60c24d56e6dba4f2f7ccfe81fe
5
5
  SHA512:
6
- metadata.gz: 55d5ef193669c8407a62d76f004fb15f0496fbf943f27e38c512afec3723db29c6de2d3c45add37e1a916bdc3b5ee3578e60a2ca4548a03784ee00946d484799
7
- data.tar.gz: 769002fec20150ddb445cc1a02edfb320ac7a3e30bfb806a1c55e58a3b4f445318c45e7a184b5af9454bfd7040a9cb6b0e3009f824dd02d1e1287c92b0ee095d
6
+ metadata.gz: e35d5f61512ff3cf914bd88c5420fed81b86f758b54d545761d7d76cbc57150649badc9e0a63facedfce8be2df2ca423d12b51b1ae0b5c69ed262e14fc9f6ae8
7
+ data.tar.gz: 8f32cebdb515d387a6df86f7dd51cab61acc3cf0cdf66059c23d0127ed6e933deeff010880c318243b95e186aca6ebfd57bcc25b86ef72bb4fa6255abfb48577
@@ -9,46 +9,37 @@ 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', 3.1]
26
+ gemfile: [rails60, rails61, rails70]
27
+ exclude:
28
+ - ruby: 3.1
29
+ gemfile: rails60
30
30
  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
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
@@ -10,5 +10,6 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  /Gemfile.lock
13
+ gemfiles/*.lock
13
14
  *.sqlite
14
15
  Gemfile.local
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.2.2
4
+
5
+ - Add polish locale (#29)
6
+
7
+ ## 0.2.1
8
+
9
+ - Add spanish locale (#28)
10
+
11
+ ## 0.2.0
12
+
13
+ - Drop support for rails 5.2
14
+
3
15
  ## 0.1.5
4
16
 
5
17
  - 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"
@@ -0,0 +1,7 @@
1
+ es:
2
+ activerecord:
3
+ errors:
4
+ messages:
5
+ content_type: "no es un formato válido"
6
+ min_size_error: "tamaño de archivo debe ser mayor a %{min_size}"
7
+ max_size_error: "tamaño de archivo debe ser menor a %{max_size}"
@@ -0,0 +1,7 @@
1
+ pl:
2
+ activerecord:
3
+ errors:
4
+ messages:
5
+ content_type: "ma nieprawidłowy format"
6
+ min_size_error: "Rozmiar pliku nie może być większy niż %{min_size}"
7
+ max_size_error: "Rozmiar pliku nie może być mniejszy niż %{max_size}"
@@ -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: '../'
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rails', '~> 7.0.0'
4
+ gem 'sqlite3'
5
+
6
+ gemspec path: '../'
@@ -1,5 +1,5 @@
1
1
  module ActiveStorage
2
2
  module Validator
3
- VERSION = '0.1.5'
3
+ VERSION = '0.2.2'
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.2
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: 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: 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
@@ -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