jirametrics 1.0.2 → 1.1

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: 393873fc1b78ea5456593282aab074b81e0b0f8a20451c40723de472da572223
4
- data.tar.gz: 4bf51e683292de85dbf4ccc171817586f136a15f301814de38f6c4a9d1521f5c
3
+ metadata.gz: b364ac3658693ddcb9687bf2bb9efb47bdff52759de9138a06042637696eea82
4
+ data.tar.gz: 73d53b6f4bbe31bc8ad16df13a2216e665ed8739c91ddbf0e637566da96068b9
5
5
  SHA512:
6
- metadata.gz: 030ff4ea4a037b825eee453a8df5be4c5b10e6395e2c75788bc81bcdc08618e3f663b1befa25631761c9a5c62aed97527bdc0896139496237d2f96719b35cfdb
7
- data.tar.gz: 6475e126ad0f632af902e480725c4cfac8aec0a6f756e202241c806939e60b879cca209bd1b29fe2b73af53fee3935210135aecd4a744ef58cb0e5d91ef330b4
6
+ metadata.gz: 2440c600218f8444c2441c48e6e31a2fa85be04a874050506e835b7d57ed2c778cdfc407055201b5b9bc0273e41815e409a8e169c6a18e0900a025c1ea54f41a
7
+ data.tar.gz: 1374993eb3adf9d993bd25f0e8265d234680fe9daf69d14c8f55ad17d0e2b62d29884306c535c9cb98d5558a6cf2c9c6c234d825397d5d019dc8ad2c7718b9d3
@@ -69,7 +69,7 @@ class Issue
69
69
 
70
70
  def labels = @raw['fields']['labels'] || []
71
71
 
72
- def author = @raw['fields']['creator']['displayName']
72
+ def author = @raw['fields']['creator']&.[]('displayName') || ''
73
73
 
74
74
  def resolution = @raw['fields']['resolution']&.[]('name')
75
75
 
data/lib/jirametrics.rb CHANGED
@@ -5,7 +5,7 @@ require 'thor'
5
5
  class JiraMetrics < Thor
6
6
  option :config
7
7
  option :name
8
- desc 'export', "Export data into either reports or CSV's as per the configuration"
8
+ desc 'export only', "Export data into either reports or CSV's as per the configuration"
9
9
  def export
10
10
  load_config options[:config]
11
11
  Exporter.instance.export(name_filter: options[:name] || '*')
@@ -13,12 +13,23 @@ class JiraMetrics < Thor
13
13
 
14
14
  option :config
15
15
  option :name
16
- desc 'download', 'Download data from Jira'
16
+ desc 'download only', 'Download data from Jira'
17
17
  def download
18
18
  load_config options[:config]
19
19
  Exporter.instance.download(name_filter: options[:name] || '*')
20
20
  end
21
21
 
22
+ option :config
23
+ option :name
24
+ desc 'download and export', 'Same as running download, followed by export'
25
+ def go
26
+ load_config options[:config]
27
+ Exporter.instance.download(name_filter: options[:name] || '*')
28
+
29
+ load_config options[:config]
30
+ Exporter.instance.export(name_filter: options[:name] || '*')
31
+ end
32
+
22
33
  private
23
34
 
24
35
  def load_config config_file
@@ -80,7 +91,7 @@ class JiraMetrics < Thor
80
91
  require 'jirametrics/columns_config'
81
92
  require 'jirametrics/hierarchy_table'
82
93
  require 'jirametrics/board'
83
- require config_file
94
+ load config_file
84
95
  end
85
96
 
86
97
  # Dir.foreach('lib/jirametrics') {|file| puts "require 'jirametrics/#{$1}'" if file =~ /^(.+)\.rb$/}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirametrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bowler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-03 00:00:00.000000000 Z
11
+ date: 2023-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: random-word