remap 2.2.43 → 2.2.44

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: 88fc0978315944ad791a089536840916db814b0fc7dad18cda8c19d1c9901d9c
4
- data.tar.gz: 2b59e22a02ac486b04758c772082731b2e91cb0ba698e40e3502794236515ff5
3
+ metadata.gz: f9c58b85124adc855131d9efee5ce1ff8653cf4828882a5ad1b60ebb0d1ea99b
4
+ data.tar.gz: ace57dfce51c7b820d2db5c2f742e5e44828bc998cc719a817bb040e4d08f139
5
5
  SHA512:
6
- metadata.gz: 41a5d60aa1fa66fb254162d1313611e441e239de54e59c4d7ebaa8a5334a6930317cb32703bd837e85212826b23286afa57e9d8662d8e9c78ab4fc3d569bcddd
7
- data.tar.gz: 3c8b89c3a3cb5a4fae156a0757b2130afc95ced6911b2707e239e7a3dd791ed5036b46711fb4262b94006b027bc0e98f0882e5a2e4131a12c7730542699e7068
6
+ metadata.gz: d868e87397958d9c68f2048a7888e306c3764dbac799ff5c34c2d8d00e08463fe5abacc708dcc232605c33f319b1cca0b34252108cfb8f4ca1f7831718956d9e
7
+ data.tar.gz: 3880cde868fbfa68702db58d6db914825f34614b140c3284c264f6b4303338dfda22f1a0f151419d610225c4cd029a776c149b4901607915988acf3c6598386a
@@ -4,6 +4,8 @@ module Remap
4
4
  module Extensions
5
5
  module Array
6
6
  refine ::Array do
7
+ using Object
8
+
7
9
  # @return [Array<Hash>]
8
10
  def to_hash
9
11
  map(&:to_hash)
@@ -5,7 +5,7 @@ module Remap
5
5
  module Hash
6
6
  refine ::Hash do
7
7
  def formatted
8
- JSON.neat_generate(self, sort: true, wrap: 40, aligned: true, around_colon: 1)
8
+ JSON.neat_generate(compact_blank, sort: true, wrap: 40, aligned: true, around_colon: 1)
9
9
  end
10
10
  end
11
11
  end
@@ -11,27 +11,6 @@ module Remap
11
11
  delegate_missing_to :notice
12
12
  delegate :inspect, :to_s, to: :notice
13
13
  option :notice, type: Types.Instance(Notice)
14
-
15
- def inspect
16
- "#<%s %s>" % [self.class, to_hash.formatted]
17
- end
18
-
19
- def undefined(state)
20
- state.set(notice: notice).except(:value)
21
- end
22
-
23
- def failure(state)
24
- Failure.new(failures: [notice], notices: state.fetch(:notices))
25
- end
26
-
27
- def traced(backtrace)
28
- e = Traced.new(notice: notice)
29
- e.set_backtrace(backtrace)
30
- e
31
- end
32
- end
33
-
34
- class Traced < Error
35
14
  end
36
15
  end
37
16
  end
data/lib/remap/notice.rb CHANGED
@@ -20,19 +20,5 @@ module Remap
20
20
  def to_hash
21
21
  super.except(:backtrace).compact_blank
22
22
  end
23
-
24
- # Used by State to skip mapping rules
25
- #
26
- # @raise [Notice::Ignore]
27
- def ignore!
28
- raise Ignore.new(notice: self)
29
- end
30
-
31
- # Used by the state to halt mappers
32
- #
33
- # @raise [Notice::Fatal]
34
- def fatal!
35
- raise Fatal.new(notice: self)
36
- end
37
23
  end
38
24
  end
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.43
4
+ version: 2.2.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander