inch 0.5.8 → 0.5.9

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: cd1b6ae7ca5ae4764816a45ac8aada91b776c622
4
- data.tar.gz: b2f8b8c690f3ea84826bbfd45215542087ca545a
3
+ metadata.gz: 02e3f6cdb3de9a2b6952487a90108cb60ac2b1e3
4
+ data.tar.gz: 70040714c0aa9af08b2b61e3e7eb52a58d915959
5
5
  SHA512:
6
- metadata.gz: 511398f40a05ecf0f0ba776f81be7196ee28ada965b9a797f4c21c3a3a97cb16ba801de89c0de324d4f11974aadbd72897757c7c800e182ca5c87f470c8ed18a
7
- data.tar.gz: 6e7273b119fe56d0e883cb11edf25a023677e95f6f73489c76341bea1d1bb1aa9f222374adb4fa14dfe6607b5c9ff13fb041884110fc73eac60dc7dca140c010
6
+ metadata.gz: 4cecb783fe62af643de866676580afb2fdf5e9b2932f69964434e546c8858d9b20d32076e897b42a7c4724d4346f1cb2bfcfabb23e642b76d14be3098dbbb34a
7
+ data.tar.gz: 09fc41f600d83bfaf291999783f06e2171feea6cd8d8dacb614e98f69c8dec848f97953d6878dc9081a10226a732e5dba12e1c15f40263da1f476fa8183cf608
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.9
4
+
5
+ - NodeJS: Improve output of code object names and locations
6
+
3
7
  ## 0.5.8
4
8
 
5
9
  - Elixir: Recognize location (filename/line no.) of code objects
@@ -18,6 +18,14 @@ module Inch
18
18
  class Base
19
19
  include TraceHelper
20
20
 
21
+ def display_name(object)
22
+ if object.language == :nodejs
23
+ object.fullname+" in #{object.filename.relative_path}".color(:dark)
24
+ else
25
+ object.fullname
26
+ end
27
+ end
28
+
21
29
  def priority_arrow(priority, color = :white)
22
30
  Evaluation::PriorityRange.all.each do |range|
23
31
  return range.arrow.color(color).dark if range.include?(priority)
@@ -69,15 +69,15 @@ module Inch
69
69
  def result_grades(object, color)
70
70
  grade = object.grade.to_s
71
71
  grade = grade.ljust(2).color(color)
72
- priority = object.priority
73
- " #{grade} #{priority_arrow(priority, color)} #{object.fullname}"
72
+ priority_arr = priority_arrow(object.priority, color)
73
+ " #{grade} #{priority_arr} #{display_name(object)}"
74
74
  end
75
75
 
76
76
  def result_numbers(object, color)
77
77
  score = object.score.to_s
78
78
  score = score.rjust(3).color(color)
79
79
  priority = object.priority
80
- "#{score} #{priority} #{object.fullname}"
80
+ "#{score} #{priority} #{display_name(object)}"
81
81
  end
82
82
  end
83
83
  end
@@ -86,7 +86,7 @@ module Inch
86
86
  grade = o.grade.to_s.ljust(2).color(r.color)
87
87
  priority = o.priority
88
88
  ui.sub(" #{grade} #{priority_arrow(priority, r.color)} " \
89
- "#{o.fullname}")
89
+ "#{display_name(o)}")
90
90
  end
91
91
  end
92
92
  end
@@ -22,14 +22,7 @@ module Inch
22
22
  end
23
23
 
24
24
  def fullname
25
- #fail NotImplementedError
26
- base = "#{@hash['longname']}"
27
- if meta?
28
- base << " @ #{meta['path']}/" \
29
- "#{meta['filename']}:" \
30
- "#{meta['lineno']}"
31
- end
32
- base
25
+ "#{@hash['longname']}"
33
26
  end
34
27
 
35
28
  # Returns all files declaring the object in the form of an Array
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = '0.5.8'
2
+ VERSION = '0.5.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2015-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
399
399
  version: '0'
400
400
  requirements: []
401
401
  rubyforge_project:
402
- rubygems_version: 2.4.2
402
+ rubygems_version: 2.2.2
403
403
  signing_key:
404
404
  specification_version: 4
405
405
  summary: Documentation measurement tool for Ruby