jirametrics 1.0.3pre1 → 1.2

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: e077ebc2c47b51a275a148820ceb7a60bfd7bcc247887464cadcb7f2d082dd37
4
- data.tar.gz: aad87d7168eb7e984628e4f7c533bf5fafab3ff404402515ea2c8678b7424d41
3
+ metadata.gz: 764cb202d312568aa9677798e2ced203b1c8a27578c5dead600cda5401970693
4
+ data.tar.gz: 159da0c95a7377ba3fd0320efa89f685792e8b4da2e06396fe48737f9dc5ec6c
5
5
  SHA512:
6
- metadata.gz: 3d00b015d68c6a3b59f7d75960ac334e0ac0add0d12189467153ea496059e8cf5c3264c0fe402be5d8b9ecec3b6f8b4886a4c424550a6bc5ffc6cefe3585ad5d
7
- data.tar.gz: a91f5f9cf366956d6a76de31576bbac3acb313f38391fa0ef5bcdc573b0ee46ec4031794491ac8b3733a2b307dbd3e5bb81c24266b919405a72d146a7d3f44d1
6
+ metadata.gz: 6b315ccf74df5fc323fe82e09f581d055145540af51236cd22ca49bf8e77e3ec7394a0effe67f9a8ec83ed5ca87b2ad580234559f4fbfc18e23b5822af323d83
7
+ data.tar.gz: 4eedc85ec84f589f1a485d8e67f954c69d5c43b0e9bf457bf969107eff4a0a68466a30cad26bf7836bb5d2377503e3eb76fa9562a5466f3e923487c85173f389
@@ -39,11 +39,15 @@ class Board
39
39
  end.compact
40
40
  end
41
41
 
42
+ def server_url_prefix
43
+ raise "Cannot parse self: #{@raw['self'].inspect}" unless @raw['self'] =~ /^(https?:\/\/.+)\/rest\//
44
+
45
+ $1
46
+ end
47
+
42
48
  def url
43
49
  # Strangely, the URL isn't anywhere in the returned data so we have to fabricate it.
44
- raise "Cannot parse self: #{@raw['self']}" unless @raw['self'] =~ /^(https?:\/\/[^\/]+)\//
45
-
46
- "#{$1}/secure/RapidBoard.jspa?rapidView=#{id}"
50
+ "#{server_url_prefix}/secure/RapidBoard.jspa?rapidView=#{id}"
47
51
  end
48
52
 
49
53
  def status_ids_from_column column
@@ -75,7 +75,7 @@ class Issue
75
75
 
76
76
  def url
77
77
  # Strangely, the URL isn't anywhere in the returned data so we have to fabricate it.
78
- "#{$1}/browse/#{key}" if @raw['self'] =~ /^(https?:\/\/[^\/]+)\//
78
+ "#{@board.server_url_prefix}/browse/#{key}"
79
79
  end
80
80
 
81
81
  def key_as_i
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.3pre1
4
+ version: '1.2'
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-07 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: random-word
@@ -159,9 +159,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  version: 3.0.0
160
160
  required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - ">"
162
+ - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: 1.3.1
164
+ version: '0'
165
165
  requirements: []
166
166
  rubygems_version: 3.2.15
167
167
  signing_key: