synvert-core 1.21.0 → 1.21.1

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: df27af331a60def04866041f84ae64b9fe15555996ec2289015eb2c97d965f68
4
- data.tar.gz: '092e9456741b2b43516146756ba738f6997a5252ba03dff226bde042333b4bf4'
3
+ metadata.gz: be7c1313bb5e789a3f3dd489b4e3ef579b9ddd41e4bf65a14b28b96e05b4ddb3
4
+ data.tar.gz: 32f69ddc1ac839e3e1d29addaadc2dc9b7119b0dbec3c4de4bf9ccc533dbe5cc
5
5
  SHA512:
6
- metadata.gz: 05aea1fff55d3a96596dc54de49db457ffe4fac87677bc9dada1d8af4ec6f45397b586207a0e8214fbbedbeed42f58a4fe92934a6095a610c834332632c1901a
7
- data.tar.gz: ed6ab4c13e2aa0f406de8f4eff041f4fdb39ba37430902284994eb7ed303352bb4a1b459416a73fd049196646eed95bd332721a7f9b9f6da8dcf6a119fdb25e2
6
+ metadata.gz: c0d28b3a39c908abaf543d2e9534827be828db8ab75d1e24d97e1ca9ca3d6ef3fb20dbee9e984cbaedec20b706b1732dbefdd0c45665a65a0bd822223f541dfa
7
+ data.tar.gz: db045c50ecdea16622e9cfc5b72f367336486c3e0f7ee7c8f6e727606638d363fa28bfef297fa8de61327a3d6eece65f33f4d0c0bcf671599fb1cb9b82663d30
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.21.1 (2023-02-10)
4
+
5
+ * Add `tab_size` option to `add_leading_spaces`
6
+
3
7
  ## 1.21.0 (2023-02-08)
4
8
 
5
9
  * Add `Configuration#tab_width`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert-core (1.21.0)
4
+ synvert-core (1.21.1)
5
5
  activesupport (< 7.0.0)
6
6
  erubis
7
7
  node_mutation (>= 1.9.0)
@@ -57,7 +57,7 @@ GEM
57
57
  nenv (~> 0.1)
58
58
  shellany (~> 0.0)
59
59
  parallel (1.22.1)
60
- parser (3.2.0.0)
60
+ parser (3.2.1.0)
61
61
  ast (~> 2.4.1)
62
62
  parser_node_ext (0.10.0)
63
63
  parser
@@ -425,9 +425,10 @@ module Synvert::Core
425
425
 
426
426
  # Add leading spaces before the str according to Configuration.tab_width.
427
427
  # @param str [String]
428
+ # @param tab_size [Integer] tab size
428
429
  # @return [String]
429
- def add_leading_spaces(str)
430
- " " * Configuration.tab_width + str;
430
+ def add_leading_spaces(str, tab_size: 1)
431
+ " " * Configuration.tab_width * tab_size + str;
431
432
  end
432
433
 
433
434
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '1.21.0'
5
+ VERSION = '1.21.1'
6
6
  end
7
7
  end
@@ -398,6 +398,7 @@ module Synvert::Core
398
398
  describe '#add_leading_spaces' do
399
399
  it 'adds leading spaces' do
400
400
  expect(instance.add_leading_spaces('foo')).to eq ' foo';
401
+ expect(instance.add_leading_spaces('foo', tab_size: 2)).to eq ' foo';
401
402
  end
402
403
  end
403
404
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport