create_ticket 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/create_ticket/cli.rb +5 -1
- data/lib/create_ticket/version.rb +1 -1
- data/lib/create_ticket.rb +3 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82a50ea4b4c273abc499fce01d3556f87b9f1c85
|
4
|
+
data.tar.gz: 7df404627ee109b49a5a62f992a8226d70dfcbf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae40a531514e2e1f60aefe48dfd7001ab04f8b85ba69b73b80504d0f4ade0e098932ed3fb156ca823411c714817c36552e49d7da96f99817451c8f8a5dee2f3a
|
7
|
+
data.tar.gz: 7fdffd00e88eb132184ac69199fe070767f6fa9024ceb6341566689c1bd67c095e445327de87b29b0b095436a4a2502c30696fea6181954d833fad29623faa3d
|
data/lib/create_ticket/cli.rb
CHANGED
data/lib/create_ticket.rb
CHANGED
@@ -37,15 +37,9 @@ class CreateTicket
|
|
37
37
|
req.url '/rest/api/2/issue'
|
38
38
|
req.body = jira_ticket_json
|
39
39
|
end
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
rescue KeyError, JSON::ParserError
|
44
|
-
puts 'Could not create a JIRA ticket.'
|
45
|
-
puts 'Response from server:'
|
46
|
-
puts response.body
|
47
|
-
exit 1
|
48
|
-
end
|
40
|
+
|
41
|
+
key = JSON.parse(response.body).fetch('key')
|
42
|
+
"#{jira_url}/browse/#{key}"
|
49
43
|
end
|
50
44
|
|
51
45
|
def fields
|
@@ -68,10 +62,6 @@ class CreateTicket
|
|
68
62
|
|
69
63
|
def content
|
70
64
|
ERB.new(template).result(binding)
|
71
|
-
rescue KeyError => e
|
72
|
-
puts "Please set all required ENV variables for your template: #{ENV['TEMPLATE_FILENAME']}"
|
73
|
-
puts e.message
|
74
|
-
exit 1
|
75
65
|
end
|
76
66
|
|
77
67
|
def summary
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: create_ticket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Marek-Spartz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.5.1
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Create JIRA tickets
|