node_mutation 1.4.2 → 1.4.3

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: 976a6458a2d0fec8c240abf9c2be1d19aa7e95fe696df882df88136b71d5508c
4
- data.tar.gz: 508d7c2b4cf4e64b4cf5d258af62037b33222af4e25faf1f5fae8fb18e35d6cc
3
+ metadata.gz: 739b5f521fb0df8ea2e4b47f11851574e4e771528923fa89e0d7c5a2ed8a0b7b
4
+ data.tar.gz: fe8c44a82ef5a21df6390936f7b5b91700c8a7f965e34ada1229ef2443b013c6
5
5
  SHA512:
6
- metadata.gz: a00c2bad64ac0f931423bb4ee0ea5dcb0893d6dec2784902b2cee30a2a6723a5cace395133056b3703c213f2283eb4dec0946b2cafea9e5372e3bf8cad077aa3
7
- data.tar.gz: 3a3b59553a9261f211b5ab9b9378efbc47dca750e26d9d75914b3951a4a24634ac9ac8ac325589fe6a4d3bc56e8f3932d4ec3cdb95caa2cc28605d2c10e8ceec
6
+ metadata.gz: b2dd045bc579535b9ba6c6ece53c8f19ae840385682ca0f3759713b5ee36abca574cbf4a80c065b024ecbf40d23a39c423b6e7ecd3a82d4417f7b65583b78885
7
+ data.tar.gz: 298af0ed4518668a784df4e5c3fec4a3904fa63fc325ace94d90ec869cd111efe5e20829b6f0f8902264f38fe87ea2359c65db1ada2170813b4ce62886fdbaef
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.4.3 (2022-09-24)
4
+
5
+ * Update source only if `new_code` is not `nil`
6
+
3
7
  ## 1.4.2 (2022-09-23)
4
8
 
5
9
  * Add `NodeMutation#to_json`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.4.2)
4
+ node_mutation (1.4.3)
5
5
  activesupport (< 7.0.0)
6
6
  erubis
7
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.4.2"
4
+ VERSION = "1.4.3"
5
5
  end
data/lib/node_mutation.rb CHANGED
@@ -234,7 +234,7 @@ class NodeMutation
234
234
  raise ConflictActionError, "mutation actions are conflicted"
235
235
  end
236
236
  @actions.reverse_each do |action|
237
- source[action.start...action.end] = action.new_code
237
+ source[action.start...action.end] = action.new_code if action.new_code
238
238
  end
239
239
  NodeMutation::Result.new(
240
240
  affected: true,
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.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang