rubocop-sorbet 0.3.6 → 0.3.7

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: 7a92716b1864cc9e66f6c3dcadb78aed34de2c23d9bcaa201f5ee7cc8f9a5cbc
4
- data.tar.gz: 57ffe424d24b7ab58cea383f6f05f2f30a726e8aa6dbf0a87989bbd219276bcc
3
+ metadata.gz: 064c7d818d231c638d6b7e4a12d840506bc7dc6aa4381e95d05aea33a45979c4
4
+ data.tar.gz: ea038c407cebb75af61397ee08e9df6e51531c2697fb92845e3111219cf5b0db
5
5
  SHA512:
6
- metadata.gz: bea0851da95265e63fdfa0d33418f34ff7189fc778d3ad8aa6ef0e51f4af1b8f1aebdd514d678ad7affb71e06fe0607630b6019a43380d9c60396b092e5ad4fc
7
- data.tar.gz: c270ac5e4576d7f0d214e8d605356e93bb820dbab2f5062fc6ec7261eeb2437354c9326951704b40c2b0911dd41cf913220c5d848c21ede41976c9956772056d
6
+ metadata.gz: 3692612ec3ecf2181768c8239752907bd99b6068ff7cc3c56602d338c20f93e5e3ddb04bf33186cc4dc8fd9eb32bfe791cfeb53d40ade27880d2c8fe6a7c46f5
7
+ data.tar.gz: 41a0f6f1546653a087ac2eb1c8217e5c5fa9c8be5c3ac736ef917c671c39c7df90c85dcbe1b0b6466fd84bbcfd86ceb9783f32974dfbb80e152e98fd483b3a0b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-sorbet (0.3.6)
4
+ rubocop-sorbet (0.3.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -37,7 +37,12 @@ module RuboCop
37
37
 
38
38
  token = processed_source.tokens.first
39
39
  replace_with = suggested_strictness_level(minimum_strictness, suggested_strictness)
40
- corrector.insert_before(token.pos, "# typed: #{replace_with}\n")
40
+ sigil = "# typed: #{replace_with}"
41
+ if token.text.start_with?("#!") # shebang line
42
+ corrector.insert_after(token.pos, "\n#{sigil}")
43
+ else
44
+ corrector.insert_before(token.pos, "#{sigil}\n")
45
+ end
41
46
  end
42
47
  end
43
48
 
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'rubocop-sorbet'
8
- spec.version = '0.3.6'
8
+ spec.version = '0.3.7'
9
9
  spec.authors = ['Ufuk Kayserilioglu', 'Alan Wu', 'Alexandre Terrasa', 'Peter Zhu']
10
10
  spec.email = ['ruby@shopify.com']
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-01-24 00:00:00.000000000 Z
14
+ date: 2020-02-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec