dry_struct_parser 0.1.1 → 0.1.3

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: 0d33b57fa7b8941547b8476ce6472dd247cf350c9817b35f67635790e1167655
4
- data.tar.gz: bb37c5b633714891f97dc43a8c736cfcdb9b39f293c48624b6821ad703f64327
3
+ metadata.gz: 66b2a6ba7d348f7f8fffde9cc3ea5a2209d5e80e2cbdd2f0ebedf97467b4bba8
4
+ data.tar.gz: a57578436e00e9ea9ed83b3a99684f972a752589cdf9e3d46a182e8b9cb7fdc1
5
5
  SHA512:
6
- metadata.gz: b0582b0696034ea7cfe89b6a09d53a9c8b42551077c8a8089eaacfc3de257787bc4592a7882ba8519665415c9867b43265b4f2cbfee0aea75f948634aded2680
7
- data.tar.gz: 3682e1fd2f0ca987c2381e516e28f3e009d5abb16d46d33b86157689e4748dcd1bfe4459a40c1f24e7514308974e42a213597ee855332d012c65434bc99bff85
6
+ metadata.gz: 90397b0b9d5d499bc1b7c200e5b8a5c1d424704deb0d37f7820c1394356a7eb525954de521be2a106e3d0178031d0954bd07996acae9d76d8fe2f4a38b5abab7
7
+ data.tar.gz: 3c4e25e4da74a516d66162999b8ca2b8f8dae849bd5f2200c508a6e3613694851c7f86cfa6434025f7b50c340029be05896072441736929ec9e9c138f9d1c29c
@@ -8,7 +8,7 @@ module DryStructParser
8
8
  TrueClass: "boolean",
9
9
  FalseClass: "boolean",
10
10
  Float: "float",
11
- Decimal: "decimal",
11
+ BigDecimal: "decimal",
12
12
  Date: "date",
13
13
  DateTime: "datetime",
14
14
  Time: "time"
@@ -117,6 +117,10 @@ module DryStructParser
117
117
  end
118
118
  end
119
119
 
120
+ def visit_any(_, opts)
121
+ keys[opts[:key]] = { type: :any, required: opts.fetch(:required), nullable: opts.fetch(:nullable, false) }
122
+ end
123
+
120
124
  def visit_struct(node, opts = {})
121
125
  opts[:member] = true
122
126
  visit(node[1], opts)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DryStructParser
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry_struct_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jane-Terziev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-01 00:00:00.000000000 Z
11
+ date: 2024-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.4.10
70
+ rubygems_version: 3.5.20
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Generate a readable hash from a dry-struct schema