activestorage-validator 0.1.4 → 0.2.1

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: 354d8f902cefe6a58a25fcc97f6bcae8c878b971be3e6b9f7689e4074ba3eb7d
4
- data.tar.gz: 626b6ba362b037531daa1402387f788506ecf5cb7592cb1fd6c0e05c8a43d079
3
+ metadata.gz: 2e91fe85dc58067cd33e9e500608281525b5ca35db6a61b6045c5f546fb887f4
4
+ data.tar.gz: 2ac4c7e835d1bca3dbfab90585ae49fd9fc6188bf50de05ff342874e146bd733
5
5
  SHA512:
6
- metadata.gz: 30f39dbfc6c3a21a74590042072468bea28d910790cfbb67c5777cf403a405af5576cb5a1c4ccb775d39a0ce30c8d33d2f39c35633b0632d86f51316b0506fab
7
- data.tar.gz: 809232803f18f3fd3769591376439aa171c9aa4710ad923f1212a61fbefa0524377dc0d58077f6ff6064eb739cbf508b9922007272df3b291aad7c76214ff8aa
6
+ metadata.gz: 96e12f5dbb2b2a00a3e377fde498d56e744ebf817d6b716a57b5d858c9b5f6ff9d06d5c06c13bcb240fb2ee7d7cbdffb01efa5f9a6bacd95b6de176a13b6b83b
7
+ data.tar.gz: 5f5acbc500f4b409e422eaeaf91f70f3ca75edc40f29d93083b0ea62bfd9f038450c6a241f7eb47f8e3418bbbb2eec5c0cc9a7d239e00c47657c133f925f239f
@@ -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.1
4
+
5
+ - Add spanish locale (#28)
6
+
7
+ ## 0.2.0
8
+
9
+ - Drop support for rails 5.2
10
+
11
+ ## 0.1.5
12
+
13
+ - Add French locale (#24)
14
+
3
15
  ## 0.1.4
4
16
 
5
17
  - Updated test environment to rails 6.0.0
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
+ fr:
2
+ activerecord:
3
+ errors:
4
+ messages:
5
+ content_type: "n'est pas un format de fichier valide"
6
+ min_size_error: "La taille du fichier doit être supérieure à %{min_size}"
7
+ max_size_error: "La taille du fichier doit être inférieure à %{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.4"
3
+ VERSION = '0.2.1'
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.4
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-04 00:00:00.000000000 Z
11
+ date: 2022-07-06 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,10 +103,13 @@ files:
103
103
  - config.ru
104
104
  - config/locales/de.yml
105
105
  - config/locales/en.yml
106
+ - config/locales/es.yml
107
+ - config/locales/fr.yml
106
108
  - config/locales/ja.yml
107
109
  - config/locales/pt-br.yml
108
- - gemfiles/rails52.gemfile
109
110
  - gemfiles/rails60.gemfile
111
+ - gemfiles/rails61.gemfile
112
+ - gemfiles/rails70.gemfile
110
113
  - lib/activestorage/validator.rb
111
114
  - lib/activestorage/validator/blob.rb
112
115
  - lib/activestorage/validator/version.rb