rujira 0.1.6 → 0.1.7

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: b6c5b714472d56b23db8bfe6a5a96e60c3dfd6af7cb8176fbef27d839bc2ace3
4
- data.tar.gz: 106ca92334c64b3129f4e66d8aaa570eaa4d09adcba9ac7dad1d4136d6c251a8
3
+ metadata.gz: be517969de7ad5a326182e68a46edd4b20d5b5a18ce91a0ca04df2c358a827ed
4
+ data.tar.gz: '09c6ae394603fe54be3be5d7119ff054556f68991ab3fb80cbf4dbb373b98dea'
5
5
  SHA512:
6
- metadata.gz: ae579ef0d21f37fb22002669d668ddf6f876a1940da8fd0e5cd6022f8458407913ea3ba398af98590daf75b8dcd4b4b783c0764c05081aef60e24a4db789450d
7
- data.tar.gz: 19062bf410f45b08e1a1554743a7f179acb314d3e95a8a92c5d914b1147b64458797ea849da34c19e3867e6c726add88f23c810f186df2cd6f81c76794a1bb39
6
+ metadata.gz: 56a6b962413d44807786d0399a3c1c5f96c947eb13f893093e86418e87394a3b8bb598e9c10e042c6b48585dca8d5850257c4cf547c78f1fdaa0cf0698ceac4e
7
+ data.tar.gz: b92fe934ebb3c07213f5432744e06fdfbab201ce06f21733758c7f95e285469cff7951fdfab07bf8fa5c521c3c3b57c6e5b335db7b0f51ada2da0d3f6a9e98a8
data/README.md CHANGED
@@ -50,6 +50,7 @@
50
50
  '--description=The base description of task' \
51
51
  '--issuetype=Task'
52
52
  rake jira:search -- '-q project = ITMG'
53
+ rake jira:attach -- '--file=upload.png' '--issue=ITMG-1'
53
54
 
54
55
  ## Testing
55
56
 
@@ -51,12 +51,15 @@ module Rujira
51
51
  @parser.on('-i ISSUETYPE', '--issuetype=ISSUETYPE') { |issuetype| @options[:issuetype] = issuetype.strip }
52
52
  end
53
53
 
54
- result = Rujira::Api::Issue.create fields: {
55
- project: { key: @options[:project] },
56
- summary: @options[:summary],
57
- issuetype: { name: @options[:issuetype] },
58
- description: @options[:description]
59
- }
54
+ options = @options
55
+ result = Rujira::Api::Issue.create do
56
+ data fields: {
57
+ project: { key: options[:project] },
58
+ summary: options[:summary],
59
+ issuetype: { name: options[:issuetype] },
60
+ description: options[:description]
61
+ }
62
+ end
60
63
  url = Rujira::Configuration.url
61
64
  puts "// A new task been posted, check it out at #{url}/browse/#{result.data['key']}"
62
65
  end
@@ -66,18 +69,29 @@ module Rujira
66
69
  @parser.on('-q JQL', '--jql=JQL') { |jql| @options[:jql] = jql }
67
70
  end
68
71
 
69
- result = Rujira::Api::Search.get jql: @options[:jql]
72
+ options = @options
73
+ result = Rujira::Api::Search.get do
74
+ data jql: options[:jql]
75
+ end
70
76
  result.iter.each { |i| puts JSON.pretty_generate(i.data) }
71
77
  end
78
+ generate 'delete' do
79
+ parser do
80
+ @parser.banner = "Usage: rake jira:task:delete -- '[options]'"
81
+ @parser.on('-i ID', '--issue=ID') { |id| @options[:id] = id }
82
+ end
83
+
84
+ Rujira::Api::Issue.del @options[:id]
85
+ end
72
86
  generate 'attach' do
73
87
  parser do
74
88
  @parser.banner = "Usage: rake jira:task:attach -- '[options]'"
75
- @parser.on('-f FILE', '--file=FILE') { |jql| @options[:file] = jql }
76
- @parser.on('-i ID', '--issue=ID') { |jql| @options[:id] = jql }
89
+ @parser.on('-f FILE', '--file=FILE') { |file| @options[:file] = file }
90
+ @parser.on('-i ID', '--issue=ID') { |id| @options[:id] = id }
77
91
  end
78
92
 
79
93
  result = Rujira::Api::Issue.attachments @options[:id], @options[:file]
80
- JSON.pretty_generate(result)
94
+ puts JSON.pretty_generate(result.data)
81
95
  end
82
96
  end
83
97
  # rubocop:enable Metrics/AbcSize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rujira
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rujira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Semenov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-03 00:00:00.000000000 Z
11
+ date: 2024-05-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The library is developed for the purposes of the organization, new features
14
14
  can be added as MR. Welcome!