jirametrics 2.4pre1 → 2.4pre2
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/exporter.rb +6 -2
- data/lib/jirametrics/jira_gateway.rb +11 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd626d730d591c7cc7ec2a9245fa395bc1d8d7fc22d658b6663dce28aa40f351
|
4
|
+
data.tar.gz: b0437b25f7def75b2bd2f0fd889aead1104b65ec53e339f48b8f2e535dc84d96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8c7f1ce346a98f989641fe4cb962d4f3fd04eab690b861e296154564f2d145cfa705fbf8d590ec004a4b02f707799fb2c21eef5cddc7e4e00bcc090730bca7
|
7
|
+
data.tar.gz: 596c0b5559ae4a64d46e95f38fb13e0fdec5bc8c315195ea9a45d69abd26841d4d4aa28cee1fe46b769b596810129aaf79e9fb1052ec3827aaa89c092a5687e4
|
data/lib/jirametrics/exporter.rb
CHANGED
@@ -13,7 +13,8 @@ class Object
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class Exporter
|
16
|
-
attr_reader :project_configs
|
16
|
+
attr_reader :project_configs
|
17
|
+
attr_accessor :file_system
|
17
18
|
|
18
19
|
def self.configure &block
|
19
20
|
logfile_name = 'jirametrics.log'
|
@@ -99,7 +100,10 @@ class Exporter
|
|
99
100
|
end
|
100
101
|
|
101
102
|
def jira_config filename = nil
|
102
|
-
|
103
|
+
if filename
|
104
|
+
@jira_config = file_system.load_json(filename)
|
105
|
+
@jira_config['url'] = $1 if @jira_config['url'] =~ /^(.+)\/+$/
|
106
|
+
end
|
103
107
|
@jira_config
|
104
108
|
end
|
105
109
|
|
@@ -48,15 +48,17 @@ class JiraGateway
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def make_curl_command url:
|
51
|
-
command = '
|
52
|
-
command
|
53
|
-
command
|
54
|
-
command
|
55
|
-
command
|
56
|
-
command
|
57
|
-
command
|
58
|
-
command
|
59
|
-
command
|
51
|
+
command = +''
|
52
|
+
command << 'curl'
|
53
|
+
command << ' -L' # follow redirects
|
54
|
+
command << ' -s' # silent
|
55
|
+
command << ' -k' if @ignore_ssl_errors # insecure
|
56
|
+
command << " --cookie #{@cookies.inspect}" unless @cookies.empty?
|
57
|
+
command << " --user #{@jira_email}:#{@jira_api_token}" if @jira_api_token
|
58
|
+
command << " -H \"Authorization: Bearer #{@jira_personal_access_token}\"" if @jira_personal_access_token
|
59
|
+
command << ' --request GET'
|
60
|
+
command << ' --header "Accept: application/json"'
|
61
|
+
command << " --url \"#{url}\""
|
60
62
|
command
|
61
63
|
end
|
62
64
|
end
|
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: 2.
|
4
|
+
version: 2.4pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bowler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: random-word
|