node_mutation 1.9.0 → 1.9.2

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: 36b238099da8793f4d2e9df6c5e679ba4d4f7da2254c020606d73dfd93f3baf8
4
- data.tar.gz: b44fbf6192513de334c03580a04b8fe30602697a2d8f7fc39a96f5776c046739
3
+ metadata.gz: ccf182b956fa95424444237b856f0eaf8a184079ad3c0a4288d73dfe826ba288
4
+ data.tar.gz: 6bfb14607647b18b00dfaf9dd64f238aef07aa3f12df72706ffea054ec1b09d6
5
5
  SHA512:
6
- metadata.gz: cbfb8d677df7896754afddf23e3fa880f6d6f16d646c9a93881b4e216c1a2adf83c4ba45a96dd4827aeb9800ea375ba5dd992a815bf2794e1b5d11206b956415
7
- data.tar.gz: 3a0c2217d7b51a90bd2818a036e07b76f2e2df82295f5bed462e075198855325285513e344d97cc70ac0179b1fa6a77ca13f25558f12f0db982903cc52a65318
6
+ metadata.gz: dd147fa9473293c29053b372d21de52fd197a936d3b1c615bf461702630612386851b592c28f6e06ff70831799ca28c493e63044c3cbbc2bb5f631dbe369790d
7
+ data.tar.gz: aa523832bc7421c0f2a4090d2e685ddb09ee3f818c4df39499ed796a84ec2a54f28b7b29f7fff0749e387597f6ea4cfe2f9fb06fc3caba49a20be503207e2370
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.9.2 (2023-02-11)
4
+
5
+ * Squeeze space if end with space, newline or semicolon
6
+
7
+ ## 1.9.1 (2023-02-10)
8
+
9
+ * Make sure `tab_width` is an Integer
10
+
3
11
  ## 1.9.0 (2023-02-08)
4
12
 
5
13
  * Configure `tab_width`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.9.0)
4
+ node_mutation (1.9.2)
5
5
  erubis
6
6
 
7
7
  GEM
@@ -54,7 +54,7 @@ class NodeMutation::Action
54
54
 
55
55
  # Squeeze spaces from source code.
56
56
  def squeeze_spaces
57
- if file_source[@start - 1] == ' ' && file_source[@end] == ' '
57
+ if file_source[@start - 1] == ' ' && [' ', "\n", ';'].include?(file_source[@end])
58
58
  @start -= 1
59
59
  end
60
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.9.0"
4
+ VERSION = "1.9.2"
5
5
  end
data/lib/node_mutation.rb CHANGED
@@ -39,7 +39,7 @@ class NodeMutation
39
39
  @strategy = options[:strategy]
40
40
  end
41
41
  if options[:tab_width]
42
- @tab_width = options[:tab_width]
42
+ @tab_width = options[:tab_width].to_i
43
43
  end
44
44
  end
45
45
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_mutation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2023-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis