activemodel-csv_validator 0.3.0 → 0.5.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/ci.yml +22 -0
- data/CHANGELOG.md +6 -0
- data/activemodel-csv_validator.gemspec +5 -3
- data/lib/activemodel/csv_validator/version.rb +1 -1
- data/lib/activemodel/validations/csv_validator.rb +2 -1
- metadata +40 -12
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0872c58a9fa7a1287ec745c82c51f469a0b8fc86de391413e6217e28e8293196'
|
4
|
+
data.tar.gz: dafbd55f9919a1acd6dc71be4f73fcb51c2bf935663cb940683bb351a99a2ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11599c30ff00b706ab72bb05b025eece035e7e094e35e0d8c993348b58fb744ce5ab9e75f6d5f13d215b25ab53cd93dc5ae512d0fc581d73b3d28cfa1f3ddbd8
|
7
|
+
data.tar.gz: 19610b7bc46c26bc2f35942cf20982f1c9cf8a01de7db57d1b6f3f5fbaf666d257d081b5b356413666abcf452c192de8482662f993b6ffafadf4f5a57719284b
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby: ["2.7", "3.0", "3.1", ruby-head, jruby-head]
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- name: Set up Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
bundler-cache: true # 'bundle install' and cache gems
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Run tests
|
22
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -22,9 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.required_ruby_version = '>= 2.
|
26
|
-
spec.add_dependency "activemodel", ">=
|
27
|
-
spec.add_dependency "activesupport", ">=
|
25
|
+
spec.required_ruby_version = '>= 2.7.0'
|
26
|
+
spec.add_dependency "activemodel", ">= 6.1.0"
|
27
|
+
spec.add_dependency "activesupport", ">= 6.1.0"
|
28
|
+
spec.add_dependency "csv"
|
29
|
+
spec.add_dependency "nkf"
|
28
30
|
spec.add_development_dependency "bundler", "~> 2.0"
|
29
31
|
spec.add_development_dependency "rake", "~> 13.0"
|
30
32
|
spec.add_development_dependency "rspec", "~> 3.0"
|
@@ -20,7 +20,8 @@ module ActiveModel
|
|
20
20
|
end
|
21
21
|
|
22
22
|
if options[:headers].present?
|
23
|
-
|
23
|
+
headers = options[:headers].respond_to?(:call) ? options[:headers].call(record) : options[:headers]
|
24
|
+
missing_headers = headers - rows.headers
|
24
25
|
if missing_headers.present?
|
25
26
|
record.errors.add(attribute, :missing_headers, missing_headers: missing_headers.to_sentence)
|
26
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel-csv_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,28 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.1.0
|
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.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 6.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 6.1.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: csv
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nkf
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: bundler
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,9 +115,9 @@ executables: []
|
|
87
115
|
extensions: []
|
88
116
|
extra_rdoc_files: []
|
89
117
|
files:
|
118
|
+
- ".github/workflows/ci.yml"
|
90
119
|
- ".gitignore"
|
91
120
|
- ".rspec"
|
92
|
-
- ".travis.yml"
|
93
121
|
- CHANGELOG.md
|
94
122
|
- CODE_OF_CONDUCT.md
|
95
123
|
- Gemfile
|
@@ -108,7 +136,7 @@ homepage: https://github.com/aki77/activemodel-csv_validator
|
|
108
136
|
licenses:
|
109
137
|
- MIT
|
110
138
|
metadata: {}
|
111
|
-
post_install_message:
|
139
|
+
post_install_message:
|
112
140
|
rdoc_options: []
|
113
141
|
require_paths:
|
114
142
|
- lib
|
@@ -116,15 +144,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
144
|
requirements:
|
117
145
|
- - ">="
|
118
146
|
- !ruby/object:Gem::Version
|
119
|
-
version: 2.
|
147
|
+
version: 2.7.0
|
120
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
150
|
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
152
|
version: '0'
|
125
153
|
requirements: []
|
126
|
-
rubygems_version: 3.
|
127
|
-
signing_key:
|
154
|
+
rubygems_version: 3.4.10
|
155
|
+
signing_key:
|
128
156
|
specification_version: 4
|
129
157
|
summary: CSV Validator for Active Model
|
130
158
|
test_files: []
|