rujira 0.1.6 → 0.1.8

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: da8eaee19c39b45a5223e13a7e2d9cfa81ff5b18063429be52473a05a7c30b4f
4
+ data.tar.gz: ce13ac7aeeabbc471071cb9c9feb36917c8062e52c598f27ab452d34c4a0db59
5
5
  SHA512:
6
- metadata.gz: ae579ef0d21f37fb22002669d668ddf6f876a1940da8fd0e5cd6022f8458407913ea3ba398af98590daf75b8dcd4b4b783c0764c05081aef60e24a4db789450d
7
- data.tar.gz: 19062bf410f45b08e1a1554743a7f179acb314d3e95a8a92c5d914b1147b64458797ea849da34c19e3867e6c726add88f23c810f186df2cd6f81c76794a1bb39
6
+ metadata.gz: 430557532512d326578de11200a13d25d4ac466278765216781ec247e47d6782084c2e92c740f4ce509c18beab1fbc7ab2b8abe2573cb90c0a8c116c10944af5
7
+ data.tar.gz: d2c000d5675f2acba7bd4a7dc58daa16e39d7e1a069ac7da068525322b30aa14e3ae47eaf94fda8f4c300c070bb621533a9e737835a5fbe26a74571afce3fd3e
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.8"
5
5
  end
metadata CHANGED
@@ -1,15 +1,43 @@
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.8
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
12
- dependencies: []
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday-multipart
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
13
41
  description: The library is developed for the purposes of the organization, new features
14
42
  can be added as MR. Welcome!
15
43
  email:
@@ -59,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
87
  - !ruby/object:Gem::Version
60
88
  version: '0'
61
89
  requirements: []
62
- rubygems_version: 3.4.7
90
+ rubygems_version: 3.5.10
63
91
  signing_key:
64
92
  specification_version: 4
65
93
  summary: API for Atlassian jira in ruby