node_mutation 1.3.1 → 1.3.2

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: 9fc988a54ceb1a8c68ac77bde94852da2cda3f1101b965462e246cbfac992fb5
4
- data.tar.gz: 0b22656df417e7d26390cc43f4de427dc6fb21bceedcc5904385465bb9006300
3
+ metadata.gz: d58aed2bff850b0b89d18864dcc6a3f4e85cae7f47afc619a5b45d32f48391c8
4
+ data.tar.gz: 00b768bfdf534bdcd8f6584b8dad1da5d7eaba8aa7db5e5c69938706835d7b79
5
5
  SHA512:
6
- metadata.gz: bb90cac28bce6d02bd74687e2e4003f5864b91be42d443f9de9df464f7cbdf65b4cdc758a9deeefa14a8448b0a88200501bc9e9119872380223ff9dc3b6f5b56
7
- data.tar.gz: 566fe2e70aebcbf33e37ac499ccb2a90b0614f6bf695b197096dde6a25cd0b63c3d146de25b274c922f90c8bb8fb7b5143c5fdf8836e7f53877f75f54b4f95d2
6
+ metadata.gz: eb1879571f03a10b130114d712f6508c344407edf4c89db3e09cdff16c1fe614438e4f1e54d64455fd5bb7234e160ed004e454e42e8418620e4caf844e756cc9
7
+ data.tar.gz: 36ceb04aa0ea17bdb6fe8b6402e3d5e53332c9256bdafcad926185ed8c2e001945dd5ba09bafa1ac0bbd1c428aa6d9cb7c1524298eeae8655a2478d5e952d482
data/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # NodeMutation
2
2
 
3
- ## 1.3.1 (2022-09-15)
3
+ ## 1.3.2 (2022-09-16)
4
4
 
5
+ * Add `NodeMutation::Action.to_hash`
5
6
  * Add `NodeMutation::Result.to_hash`
6
7
 
7
8
  ## 1.3.0 (2022-09-15)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.3.1)
4
+ node_mutation (1.3.2)
5
5
  activesupport (< 7.0.0)
6
6
  erubis
7
7
 
@@ -38,6 +38,10 @@ class NodeMutation::Action
38
38
  end
39
39
  end
40
40
 
41
+ def to_hash
42
+ { start: start, end: @end, new_code: new_code }
43
+ end
44
+
41
45
  protected
42
46
 
43
47
  # Calculate the begin the end positions.
@@ -23,7 +23,7 @@ class NodeMutation::Result
23
23
 
24
24
  def to_hash
25
25
  @options.each_pair.with_object({}) do |(key, value), hash|
26
- hash[key] = value.is_a?(Array) ? value.map { |action| action.to_h } : value
26
+ hash[key] = value.is_a?(Array) ? value.map { |action| action.to_hash } : value
27
27
  end
28
28
  end
29
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_mutation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang