codeclimate 0.9.2 → 0.9.3

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
  SHA1:
3
- metadata.gz: dacbb140292d61911f693eddf47566cca79a8971
4
- data.tar.gz: e3a2d03b2f9114d6e68a199461492ed5e1bcf380
3
+ metadata.gz: d4a00a5adf7f1cc2a98901ee4a953bbd233322a9
4
+ data.tar.gz: e3bf21594ba21e22cff4853599af010034f814c5
5
5
  SHA512:
6
- metadata.gz: 22f87e0b1980085a4b5a7db3471aa73bad2b7db36f88216ea33f79e15eeb32d33db8a743ed916213cf68bcd235955806a0be34a197033a5d8de7ee580ed91474
7
- data.tar.gz: b1605896bb70d332f30da3c503ec0d57977ce7dd0d5565133368dc3596067c92833288a75f24c142957476c049550244170a50f0206484aa75f00b8b7e369012
6
+ metadata.gz: 3d3baaf44cc288437df80e49cf0772271754a9e0aea94998273039ac97ff63ab2910cfbff653bf64e29cc0af2fb2e2654acccc3f8a46ce22439235787158dcc5
7
+ data.tar.gz: 873bf1aadaf48ab5f104bff2b8bcccbc5e44fd74505dfef9f236909e7a7b7c8418fc924aae61032ed60b1a3399f50c533b18cc314bfea402d73a0f0d65f05431
data/config/engines.yml CHANGED
@@ -19,6 +19,12 @@ rubocop:
19
19
  - \.rb$
20
20
  default_ratings_paths:
21
21
  - "**.rb"
22
+ duplication:
23
+ image: codeclimate/codeclimate-duplication
24
+ description: Structural duplication detection for Ruby, Python, JavaScript, and PHP
25
+ community: false
26
+ enable_regexps:
27
+ default_ratings_paths:
22
28
  gofmt:
23
29
  image: codeclimate/codeclimate-gofmt
24
30
  description: gofmt
@@ -92,7 +98,7 @@ bundler-audit:
92
98
  upgrade_languages:
93
99
  - Ruby
94
100
  enable_regexps:
95
- - Gemfile\.lock
101
+ - ^Gemfile\.lock$
96
102
  default_ratings_paths:
97
103
  - Gemfile.lock
98
104
  phpcodesniffer:
@@ -27,10 +27,8 @@ module CC
27
27
  @command = command
28
28
  @listener = listener
29
29
  @timeout = timeout
30
-
31
30
  @output_delimeter = "\n"
32
31
  @on_output = ->(*) { }
33
-
34
32
  @timed_out = false
35
33
  @stderr_io = StringIO.new
36
34
  end
@@ -51,16 +49,15 @@ module CC
51
49
  t_timeout = timeout_thread(@pid)
52
50
 
53
51
  _, status = Process.waitpid2(@pid)
54
-
55
- duration = ((Time.now - started) * 1000).round
56
- @listener.finished(container_data(duration: duration, status: status))
57
-
58
- t_timeout.kill
52
+ if @timed_out
53
+ @listener.timed_out(container_data(duration: @timeout))
54
+ else
55
+ duration = ((Time.now - started) * 1000).round
56
+ @listener.finished(container_data(duration: duration, status: status))
57
+ end
59
58
  ensure
60
59
  t_timeout.kill if t_timeout
61
-
62
60
  if @timed_out
63
- @listener.timed_out(container_data(duration: @timeout))
64
61
  t_out.kill if t_out
65
62
  t_err.kill if t_err
66
63
  else
@@ -116,13 +113,7 @@ module CC
116
113
  end
117
114
 
118
115
  def container_data(duration: nil, status: nil)
119
- ContainerData.new(
120
- @image,
121
- @name,
122
- duration,
123
- status,
124
- @stderr_io.string
125
- )
116
+ ContainerData.new(@image, @name, duration, status, @stderr_io.string)
126
117
  end
127
118
  end
128
119
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport