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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b7d2b44b1c29a643b039bdb955fc41c666681c41a17ba608670ccdb9898b276
4
- data.tar.gz: 97db49aaf2c001c685eb9a16ef7257972c8df717467e8638ea57bd619b62cf5e
3
+ metadata.gz: dd626d730d591c7cc7ec2a9245fa395bc1d8d7fc22d658b6663dce28aa40f351
4
+ data.tar.gz: b0437b25f7def75b2bd2f0fd889aead1104b65ec53e339f48b8f2e535dc84d96
5
5
  SHA512:
6
- metadata.gz: 704a16388b223c738d82f9f13341f23f6b40bb659506b3b6a843e05f8da7c74e1022e7a17d8077cf123bc35a28d14b53ecc5bb7c51d8978705ebea7034b78df3
7
- data.tar.gz: 3be64f47f590cfe0011d9b9de8afc17ccf357a42a9377bec0d0729d789dcf352ffc1ed3858827268e80a85a72803a1f142702f9a73bb7dfc918941ae637a4125
6
+ metadata.gz: 3c8c7f1ce346a98f989641fe4cb962d4f3fd04eab690b861e296154564f2d145cfa705fbf8d590ec004a4b02f707799fb2c21eef5cddc7e4e00bcc090730bca7
7
+ data.tar.gz: 596c0b5559ae4a64d46e95f38fb13e0fdec5bc8c315195ea9a45d69abd26841d4d4aa28cee1fe46b769b596810129aaf79e9fb1052ec3827aaa89c092a5687e4
@@ -13,7 +13,8 @@ class Object
13
13
  end
14
14
 
15
15
  class Exporter
16
- attr_reader :project_configs, :file_system
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
- @jira_config = file_system.load_json(filename) unless filename.nil?
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 = 'curl'
52
- command += ' -s'
53
- command += ' -k' if @ignore_ssl_errors
54
- command += " --cookie #{@cookies.inspect}" unless @cookies.empty?
55
- command += " --user #{@jira_email}:#{@jira_api_token}" if @jira_api_token
56
- command += " -H \"Authorization: Bearer #{@jira_personal_access_token}\"" if @jira_personal_access_token
57
- command += ' --request GET'
58
- command += ' --header "Accept: application/json"'
59
- command += " --url \"#{url}\""
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.4pre1
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-07-13 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: random-word