remap 2.2.44 → 2.2.45

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: f9c58b85124adc855131d9efee5ce1ff8653cf4828882a5ad1b60ebb0d1ea99b
4
- data.tar.gz: ace57dfce51c7b820d2db5c2f742e5e44828bc998cc719a817bb040e4d08f139
3
+ metadata.gz: dd36dff737c5c3965b1a7bc5dd643bc83098a908c7dac7426a13e6c40a76af95
4
+ data.tar.gz: 958e0d19bc7d57a72697af4c1dea86f47810f87025a99ab1e13824f82822ce53
5
5
  SHA512:
6
- metadata.gz: d868e87397958d9c68f2048a7888e306c3764dbac799ff5c34c2d8d00e08463fe5abacc708dcc232605c33f319b1cca0b34252108cfb8f4ca1f7831718956d9e
7
- data.tar.gz: 3880cde868fbfa68702db58d6db914825f34614b140c3284c264f6b4303338dfda22f1a0f151419d610225c4cd029a776c149b4901607915988acf3c6598386a
6
+ metadata.gz: 62e4ad82b773e57a113f190ab5cb3d238e9e0059aa4f692475c8372c91ed25dc9c564782a0522cb1902c2d5f408f0109136487ceb6176bfd5e0e4dd3b92cba23
7
+ data.tar.gz: 647d4ee1c543073752b92d4e04a7deadde0dd4522ae793cf475544f58a88986d9077bf44fcb2b3cf0acf2b9ee7d5400ff4c95d246f05b78f9e9ce62c800e0c2f
@@ -31,7 +31,7 @@ module Remap
31
31
  #
32
32
  # @return [State]
33
33
  def call(state)
34
- catch { super(state.set(id: _1)).except(:id) }
34
+ catch_ignored { super(state.set(id: _1)).remove_id }
35
35
  end
36
36
  end
37
37
  end
@@ -9,8 +9,12 @@ module Remap
9
9
  required(:notices).array(Types.Instance(Notice))
10
10
  required(:options).value(:hash)
11
11
  required(:path).array(Types::Key)
12
- required(:ids).value(:array)
13
- required(:fatal_ids).value(:array)
12
+
13
+ required(:ids).array(Types::ID)
14
+ optional(:id).filled(Types::ID)
15
+
16
+ required(:fatal_ids).array(Types::ID)
17
+ optional(:fatal_id).filled(Types::ID)
14
18
 
15
19
  optional(:index).filled(:integer)
16
20
  optional(:element).filled
data/lib/remap/types.rb CHANGED
@@ -18,6 +18,7 @@ module Remap
18
18
  Rule = Interface(:call) | Instance(Proc)
19
19
  Key = Interface(:hash)
20
20
  Notice = Instance(Remap::Notice)
21
+ ID = String | Symbol
21
22
 
22
23
  # Validates a state according to State::Schema
23
24
  State = Hash.constructor do |input, type, &error|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.44
4
+ version: 2.2.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander