firespring_dev_commands 2.1.13 → 2.1.14.pre.alpha.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/firespring_dev_commands/jira.rb +21 -3
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05de3b2e1af3b056c9f173a6ec470f802712ed2b7227c2472f32b6dcc14b4326
|
4
|
+
data.tar.gz: 6272959b3d7e75a3b7b66923df1ccb25579b65ae7cb9919897964117fdc63dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2331931b5b49de1a0a78cc8ad1fb7cf6a9f21ca31a36c2362dedd00b27018de9200e328a9a979fa34cd3229d22d982b7dcd0e8b76b601d55e5dca41b78290f3
|
7
|
+
data.tar.gz: f8cf6ea20a574a8e08f6fd2fa3279b3ba9e84523361905d8fa49400b7b73db54c5d21ed017b29f41482f6e5449234eb11ae3b6185e43dccd43f1cff8eca84cb5
|
@@ -4,6 +4,18 @@ require 'base64'
|
|
4
4
|
module Dev
|
5
5
|
# Class which contains methods to conenct to jira and query issues
|
6
6
|
class Jira
|
7
|
+
# The config file to try to load credentials from
|
8
|
+
CONFIG_FILE = "#{Dir.home}/.env.jira".freeze
|
9
|
+
|
10
|
+
# The text of the username variable key
|
11
|
+
JIRA_USERNAME = 'JIRA_USERNAME'.freeze
|
12
|
+
|
13
|
+
# The text of the token variable key
|
14
|
+
JIRA_TOKEN = 'JIRA_TOKEN'.freeze
|
15
|
+
|
16
|
+
# The text of the url variable key
|
17
|
+
JIRA_URL = 'JIRA_URL'.freeze
|
18
|
+
|
7
19
|
# Config object for setting top level jira config options
|
8
20
|
# "points_field_name" is the field holding the value for points on a story. If this is not present, all points will default to 0
|
9
21
|
# "user_lookup_list" should be an array of Jira::User objects representing the usernames, ids, etc for all jira users
|
@@ -11,9 +23,11 @@ module Dev
|
|
11
23
|
# and there is no way to query this information from Jira directly.
|
12
24
|
Config = Struct.new(:username, :token, :url, :points_field_name, :expand, :user_lookup_list, :read_timeout, :http_debug) do
|
13
25
|
def initialize
|
14
|
-
|
15
|
-
|
16
|
-
self.
|
26
|
+
Dotenv.load(CONFIG_FILE) if File.exist?(CONFIG_FILE)
|
27
|
+
|
28
|
+
self.username = ENV.fetch(JIRA_USERNAME, nil)
|
29
|
+
self.token = ENV.fetch(JIRA_TOKEN, nil)
|
30
|
+
self.url = ENV.fetch(JIRA_URL, nil)
|
17
31
|
self.points_field_name = nil
|
18
32
|
self.expand = []
|
19
33
|
self.user_lookup_list = []
|
@@ -40,6 +54,10 @@ module Dev
|
|
40
54
|
|
41
55
|
# Initialize a new jira client using the given inputs
|
42
56
|
def initialize(username: self.class.config.username, token: self.class.config.token, url: self.class.config.url)
|
57
|
+
raise 'username is required' if username.to_s.strip.empty?
|
58
|
+
raise 'token is required' if token.to_s.strip.empty?
|
59
|
+
raise 'url is required' if url.to_s.strip.empty?
|
60
|
+
|
43
61
|
@username = username
|
44
62
|
@token = token
|
45
63
|
@url = url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.14.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -399,9 +399,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
399
399
|
version: '3.1'
|
400
400
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
401
401
|
requirements:
|
402
|
-
- - "
|
402
|
+
- - ">"
|
403
403
|
- !ruby/object:Gem::Version
|
404
|
-
version:
|
404
|
+
version: 1.3.1
|
405
405
|
requirements: []
|
406
406
|
rubygems_version: 3.4.10
|
407
407
|
signing_key:
|