overcommit 0.70.0 → 0.71.0

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: 8040d08a9f79785e2cd046c2cf17996688fc0a83c81a9a21f0527501d3160b61
4
- data.tar.gz: 7e2d8f6b3323dda0523a0f05994ad01e8321e652544ca3a71ffe746fa7e83b6d
3
+ metadata.gz: 5826d552313c4de8f5ee1f3f322e16d9193be5be215f4a1203deebd67e8b9333
4
+ data.tar.gz: 1e013ca830726957ede05edefbeef7e2133851ea039bf819bdd0a22e506b94cb
5
5
  SHA512:
6
- metadata.gz: aa10fe74466654b81aca04252f85de4f7d34964250843a4908d7e3f6328ab63ec666e1cc9cd4c3d17a0aef63c2be4966a9f1a0ef1e2b3d25fd43beb33ecaa7fb
7
- data.tar.gz: 64dbb9a221dcf7983923155f6bf461dd378b57969d0ac185856aa4fdc0908dd9c82b868f9f9db114712d5a4522ea74d9c4af5d255cd403ebdd181182ce440208
6
+ metadata.gz: 7ba0463239dcab4fc78aa972f17d374e205e261ad86bf4eebcbdf4e7bc08af0b8b3b1b601276e25d98f9b22c2cf2835e87ca007cfad50dbe54bbdf996f311a56
7
+ data.tar.gz: 3c5338c547754f27157ee427ac1c25eed520b036e91e8f901ea31919b5278a9dc99909d10268f8da54e27a1fcdb76fca8c7f1b10e419b0512a2b9eba5ea976e6
@@ -10,7 +10,7 @@ module Overcommit
10
10
  #
11
11
  # @see https://github.com/castwide/solargraph
12
12
  class Solargraph < Base
13
- MESSAGE_REGEX = /^\s*(?<file>(?:\w:)?[^:]+):(?<line>\d+) - /.freeze
13
+ MESSAGE_REGEX = /^\s*(?<file>(?:\w:)?[^:]+):(?<line>\d+)( -|:) /.freeze
14
14
 
15
15
  def run
16
16
  result = execute(command, args: applicable_files)
@@ -24,6 +24,7 @@ module Overcommit::HookContext
24
24
  @args = args
25
25
  @input = input
26
26
  @options = options
27
+ @input_mutex = Mutex.new
27
28
  end
28
29
 
29
30
  # Executes a command as if it were a regular git hook, passing all
@@ -95,7 +96,13 @@ module Overcommit::HookContext
95
96
  #
96
97
  # @return [String]
97
98
  def input_string
98
- @input_string ||= @input.read
99
+ return @input_string if defined?(@input_string)
100
+
101
+ @input_mutex.synchronize do
102
+ @input_string = @input.read unless defined?(@input_string)
103
+ end
104
+
105
+ @input_string
99
106
  end
100
107
 
101
108
  # Returns an array of lines passed to the hook via the standard input
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module Overcommit
5
- VERSION = '0.70.0'
5
+ VERSION = '0.71.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overcommit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.70.0
4
+ version: 0.71.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva