strong_csv 0.8.4 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc949ca8e807c1f7470f5823ec98c0ca264fe3116f09f55202455d2d6cf16c6c
4
- data.tar.gz: 9c7ea6d1dd16947c83ababfc361e0744ce57af2f3fb58728d394a00e7efbac27
3
+ metadata.gz: 642cc6ac08fe76d56643c190d645fc65f4c5d8a7dbe8a304ad38c265918ae40e
4
+ data.tar.gz: b83f3232be02019f69ee13774a2b0299bacb25810ed7b7b35bd5b2e68126332f
5
5
  SHA512:
6
- metadata.gz: dfb377a5b6a3de8eac040807b49c776eed4203784a16a04ae516d071553b7d4daee8e44280a5acea25b851f17062388f9ae66f6faccf4fb18c938c0c52670576
7
- data.tar.gz: 13b64716e179738e104fa65de783c42ee343d0676fb7491e13b8b5ee6a0cb3582c840162b6611af8083e09a4adde3c0197660384739eaf13fdb0a1cd24dc6878
6
+ metadata.gz: a9d429bfef2e5c40ff3c1b1e9d37f299f2f0f66607b5fc513357a1d03b8b20a16721ead6b12c1a7e8533ad8b31d8c35fea777c870a70c6ee9cfd8b5a912646dc
7
+ data.tar.gz: 4d393b455dbcd89a8a6fd051f781c6776ed5ae5c802ab582898843457748fb37d10d0cdd94c7b430a89decd9532bc9e6267a02d402433e00ea15fcdf00833612
data/README.md CHANGED
@@ -66,7 +66,7 @@ strong_csv = StrongCSV.new do
66
66
  # Literal declaration
67
67
  let :status, 0..6
68
68
  let :priority, 10, 20, 30, 40, 50
69
- let :size, "S", "M", "L" do |value|
69
+ let :size, "S", "M", "L" do |value| # The input must be one of "S", "M", or "L", and it will be casted as the returned value of the block.
70
70
  case value
71
71
  when "S"
72
72
  1
@@ -20,8 +20,8 @@ class StrongCSV
20
20
  end
21
21
 
22
22
  # @param name [String, Symbol, Integer]
23
- # @param type [StrongCSV::Type::Base]
24
- # @param types [Array<StrongCSV::Type::Base>]
23
+ # @param type [StrongCSV::Types::Base]
24
+ # @param types [Array<StrongCSV::Types::Base>]
25
25
  def let(name, type, *types, error_message: nil, &block)
26
26
  type = Types::Union.new(type, *types) unless types.empty?
27
27
  case name
@@ -9,7 +9,7 @@ class StrongCSV # rubocop:disable Style/Documentation
9
9
  # @!attribute name
10
10
  # @return [Symbol, Integer] The name for the type. This is the CSV header name. If the CSV does not have its header, Integer should be set.
11
11
  # @!attribute type
12
- # @return [StrongCSV::Type::Base]
12
+ # @return [StrongCSV::Types::Base]
13
13
  # @!attribute error_message
14
14
  # @return [String, nil] The error message returned if #cast fails. If omitted, the default error message will be used.
15
15
  # @!attribute block
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class StrongCSV
4
- VERSION = "0.8.4"
4
+ VERSION = "0.8.6"
5
5
  end
data/sig/strong_csv.rbs CHANGED
@@ -22,9 +22,9 @@ class StrongCSV
22
22
  @value: (casted)?
23
23
  @original_value: untyped
24
24
 
25
- attr_reader error_messages: [::String]?
25
+ attr_reader error_messages: Array[::String]?
26
26
 
27
- def initialize: (original_value: ::String | nil, ?value: (casted | ::Object)?, ?error_messages: [::String]?) -> void
27
+ def initialize: (original_value: ::String | nil, ?value: (casted | ::Object)?, ?error_messages: Array[::String]?) -> void
28
28
 
29
29
  def value: -> ((casted | ::Object | nil)?)
30
30
 
metadata CHANGED
@@ -1,15 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strong_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yutaka Kamei
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-04-14 00:00:00.000000000 Z
12
- dependencies: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: csv
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: forwardable
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
13
40
  description: strong_csv is a type checker for a CSV file. It lets developers declare
14
41
  types for each column to ensure all cells are satisfied with desired types.
15
42
  email:
@@ -42,7 +69,6 @@ licenses:
42
69
  metadata:
43
70
  homepage_uri: https://github.com/yykamei/strong_csv
44
71
  rubygems_mfa_required: 'true'
45
- post_install_message:
46
72
  rdoc_options: []
47
73
  require_paths:
48
74
  - lib
@@ -57,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
83
  - !ruby/object:Gem::Version
58
84
  version: '0'
59
85
  requirements: []
60
- rubygems_version: 3.5.3
61
- signing_key:
86
+ rubygems_version: 3.6.9
62
87
  specification_version: 4
63
88
  summary: Type check CSV objects
64
89
  test_files: []