skooma 0.2.0 → 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: 784c4f022f60aced719808f543bcdc9a153df4a58dd44179888f73f9c7c8fa3f
4
- data.tar.gz: c60b8a11cd1ccbefcc83207a0ad2734281d8e194b58fd2637dd25bd48e7577a3
3
+ metadata.gz: eef2c83a80d1526de1a465acbb29b70fc053b6b5e54ed1e6b6ed131f56a8fe0a
4
+ data.tar.gz: 0c4cdec06703bdeb6fd3cf6922401552afaa13aa20b9189e472e703288ba60aa
5
5
  SHA512:
6
- metadata.gz: c17febaba56cd351329f42acd06a74fdbd02782ccaef3d855098cc41159ee31ef8862cba849a4591f15a6580ffe69705fc783a5ab026f52fa5eefbf55963cd8f
7
- data.tar.gz: 35f93cdc5ace695d8e3bf7f315a573e9498e1799fb4bbd9f012d097b7b04ea0a3626b57239e67fbf49a5193d07947aa7c671543630353b10401a16bc66fb0625
6
+ metadata.gz: b5089b0a710836b072b723014cfaaf88b4504853f09a42ddf6a6f9e36ed50271b082dfcc184e047f2bf4481e6a343b4bebbd3bced7dfcec2c5a4f85697fbf113
7
+ data.tar.gz: aacb7329ef950a1fc9ff87513a85803e5530cacaec97f0dad1330bf20fb45e9bc339fe9004af11e1b90cfa6cbb725a2cd339a69c6a23721b667e8d10959b37fb
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning].
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2023-10-23
11
+
12
+ ### Fixed
13
+
14
+ - Raise error when parameter attributes misses required keys. ([@skryukov])
15
+ - Fix output format. ([@skryukov])
16
+
10
17
  ## [0.2.0] - 2023-10-23
11
18
 
12
19
  ### Added
@@ -26,7 +33,8 @@ and this project adheres to [Semantic Versioning].
26
33
 
27
34
  [@skryukov]: https://github.com/skryukov
28
35
 
29
- [Unreleased]: https://github.com/skryukov/skooma/compare/v0.2.0...HEAD
36
+ [Unreleased]: https://github.com/skryukov/skooma/compare/v0.2.1...HEAD
37
+ [0.2.1]: https://github.com/skryukov/skooma/compare/v0.2.0...v0.2.1
30
38
  [0.2.0]: https://github.com/skryukov/skooma/compare/v0.1.0...v0.2.0
31
39
  [0.1.0]: https://github.com/skryukov/skooma/commits/v0.1.0
32
40
 
@@ -9,9 +9,11 @@ module Skooma
9
9
  module ValueParser
10
10
  class << self
11
11
  def call(instance, result)
12
- type = result.sibling(instance, "in").annotation
13
- key = result.sibling(instance, "name").annotation
14
- raise Error, "Missing key: #{key}" unless key
12
+ type = result.sibling(instance, "in")&.annotation
13
+ raise Error, "Missing `in` key #{result.path}" unless type
14
+
15
+ key = result.sibling(instance, "name")&.annotation
16
+ raise Error, "Missing `name` key #{instance.path}: #{key}" unless key
15
17
 
16
18
  case type
17
19
  when "query"
@@ -30,7 +32,7 @@ module Skooma
30
32
  when "cookie"
31
33
  # instance["headers"]["Cookie"]
32
34
  else
33
- raise Error, "Unknown location: #{result.sibling(instance, "in").annotation}"
35
+ raise Error, "Unknown location: #{type}"
34
36
  end
35
37
  end
36
38
 
@@ -18,8 +18,9 @@ module Skooma
18
18
  "keywordLocation" => node.path.to_s
19
19
  }
20
20
 
21
- child_data = node.children.filter_map do |_, child|
22
- node_data(child) unless child.valid?
21
+ child_data = []
22
+ node.each_children do |child|
23
+ child_data << node_data(child) unless child.valid?
23
24
  end
24
25
 
25
26
  if first || child_data.length > 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skooma
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skooma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svyatoslav Kryukov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-22 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk