jirametrics 2.29 → 2.29.1
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 +4 -4
- data/lib/jirametrics/aging_work_bar_chart.rb +6 -4
- data/lib/jirametrics/html_report_config.rb +9 -7
- data/lib/jirametrics/issue.rb +2 -2
- data/lib/jirametrics.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f676247bd97cf564aee1cdb04ea94f0e1868248224f50147e52b32ba49d761f3
|
|
4
|
+
data.tar.gz: 6d88a6ace656442225a1ee54b75fd62047c48e1a54ec0afceeebfe07992dad84
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98e4c85669bb5c913b225583e7ebb6c23fa3dacd2125e0d4ef26464dca49d4e9639ff3d7adaa9e9d3b6e2b5afd0a801e4616daa14eea2c05e8c611b2594b21b8
|
|
7
|
+
data.tar.gz: b96a04a26a666ec218ad7d13235609d0638fdf2de116bfdfa18893e0f5b9af17f7d98f5ee37424bc4e8bb8478ca6f3764fe447a529a01c4602449c30168d6087
|
|
@@ -235,10 +235,12 @@ class AgingWorkBarChart < ChartBase
|
|
|
235
235
|
previous_change = change
|
|
236
236
|
end
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
if previous_change
|
|
239
|
+
results << create_range_for_priority(
|
|
240
|
+
previous_change: previous_change, stop_time: time_range.end,
|
|
241
|
+
expedited_priority_names: expedited_priority_names
|
|
242
|
+
)
|
|
243
|
+
end
|
|
242
244
|
results
|
|
243
245
|
end
|
|
244
246
|
|
|
@@ -35,8 +35,8 @@ class HtmlReportConfig < HtmlGenerator
|
|
|
35
35
|
|
|
36
36
|
def method_missing name, *_args, board_id: nil, **_kwargs, &block
|
|
37
37
|
class_name = name.to_s.split('_').map(&:capitalize).join
|
|
38
|
-
klass =
|
|
39
|
-
|
|
38
|
+
klass = resolve_chart_class(class_name)
|
|
39
|
+
return super if klass.nil?
|
|
40
40
|
|
|
41
41
|
block ||= ->(_) {}
|
|
42
42
|
|
|
@@ -45,8 +45,13 @@ class HtmlReportConfig < HtmlGenerator
|
|
|
45
45
|
else
|
|
46
46
|
execute_chart klass.new(block)
|
|
47
47
|
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def resolve_chart_class class_name
|
|
51
|
+
klass = Object.const_get(class_name)
|
|
52
|
+
klass < ChartBase ? klass : nil
|
|
48
53
|
rescue NameError
|
|
49
|
-
|
|
54
|
+
nil
|
|
50
55
|
end
|
|
51
56
|
|
|
52
57
|
def execute_chart_per_board klass:, block:, board_id:
|
|
@@ -64,10 +69,7 @@ class HtmlReportConfig < HtmlGenerator
|
|
|
64
69
|
|
|
65
70
|
def respond_to_missing? name, include_private = false
|
|
66
71
|
class_name = name.to_s.split('_').map(&:capitalize).join
|
|
67
|
-
|
|
68
|
-
klass < ChartBase
|
|
69
|
-
rescue NameError
|
|
70
|
-
super
|
|
72
|
+
!resolve_chart_class(class_name).nil? || super
|
|
71
73
|
end
|
|
72
74
|
|
|
73
75
|
def cycletime label = nil, &block
|
data/lib/jirametrics/issue.rb
CHANGED
|
@@ -48,8 +48,8 @@ class Issue
|
|
|
48
48
|
def type = @raw['fields']['issuetype']['name']
|
|
49
49
|
def type_icon_url = @raw['fields']['issuetype']['iconUrl']
|
|
50
50
|
|
|
51
|
-
def priority_name = @raw
|
|
52
|
-
def priority_url = @raw
|
|
51
|
+
def priority_name = @raw.dig('fields', 'priority', 'name')
|
|
52
|
+
def priority_url = @raw.dig('fields', 'priority', 'iconUrl')
|
|
53
53
|
|
|
54
54
|
def summary = @raw['fields']['summary']
|
|
55
55
|
|
data/lib/jirametrics.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'English'
|
|
3
4
|
require 'thor'
|
|
4
5
|
require 'require_all'
|
|
5
6
|
|
|
@@ -100,6 +101,22 @@ class JiraMetrics < Thor
|
|
|
100
101
|
Exporter.instance.stitch stitch_file
|
|
101
102
|
end
|
|
102
103
|
|
|
104
|
+
def self.log_uncaught_exception exception, file_system: nil
|
|
105
|
+
return unless exception && !exception.is_a?(SystemExit)
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
file_system ||= Exporter.instance.file_system
|
|
109
|
+
return if file_system.logfile == $stdout
|
|
110
|
+
|
|
111
|
+
file_system.logfile.puts "#{exception.class}: #{exception.message}"
|
|
112
|
+
exception.backtrace&.each { |line| file_system.logfile.puts "\t#{line}" }
|
|
113
|
+
rescue StandardError
|
|
114
|
+
# Exporter may not be initialized, or the logfile may already be closed
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
at_exit { JiraMetrics.log_uncaught_exception $ERROR_INFO }
|
|
119
|
+
|
|
103
120
|
no_commands do
|
|
104
121
|
def load_config config_file, file_system: FileSystem.new
|
|
105
122
|
config_file = './config.rb' if config_file.nil?
|