shiftzilla 0.2.31 → 0.2.32
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/shiftzilla/source.rb +24 -4
- data/lib/shiftzilla/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 357448b678ecf7a3ed4cc51f16b3b7d3b56a74000a02fdb8852197b736a884ed
|
|
4
|
+
data.tar.gz: 3e710abb67f1954f46876923377cf4a98a87c7c16378f34d743938fabfe5c722
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5807bea1a9c395df1eb9de16a89ef9234dc09c6aa497d9bd8f91471c6928a3472d51420532ea755c3fbe2e4b2c83343723ac3edbec7e6c785db52045bc4359a3
|
|
7
|
+
data.tar.gz: 555ede112e9652153dff9354cbbc8839c2e0f6f29350a6b04ccb32747783caeaa649cf3ccb7d5d6eb7169ca408f34e02a3c3b4b712d84f890d72ded076eb8f09
|
data/lib/shiftzilla/source.rb
CHANGED
|
@@ -25,11 +25,31 @@ module Shiftzilla
|
|
|
25
25
|
output_format = @fields.map{ |fld| "%{#{fld.to_s}}" }.join("\x1F")
|
|
26
26
|
table_fields = @fields.map{ |fld| "\"#{field_map[fld]}\"" }.join(',')
|
|
27
27
|
insert_frame = @fields.map{ |fld| '?' }.join(', ')
|
|
28
|
-
#
|
|
29
|
-
bz_command = "bugzilla query --savedsearch #{@search} --savedsearch-sharer-id=#{@sharer} --outputformat='#{output_format}\x1F%{flags}flags||EOR'"
|
|
30
|
-
|
|
31
|
-
bz_csv = `#{bz_command}`
|
|
28
|
+
# Previous bz_command that used the savedsearch provided by the config
|
|
29
|
+
#bz_command = "bugzilla query --savedsearch #{@search} --savedsearch-sharer-id=#{@sharer} --outputformat='#{output_format}\x1F%{flags}flags||EOR'"
|
|
32
30
|
retrieved = []
|
|
31
|
+
bz_page_size = 1000
|
|
32
|
+
offset = 0
|
|
33
|
+
# Results from the query, to be split by "||EOR\n"
|
|
34
|
+
bz_csv = ""
|
|
35
|
+
|
|
36
|
+
# Execute the bugzilla query with pagination
|
|
37
|
+
begin
|
|
38
|
+
# Generate the query via string interpolation and execute
|
|
39
|
+
# Query needs to be hard-coded here for string interpolation
|
|
40
|
+
bz_command = "bugzilla query --from-url 'https://bugzilla.redhat.com/buglist.cgi?bug_severity=unspecified&bug_severity=urgent&bug_severity=high&bug_severity=medium&bug_status=NEW&bug_status=ASSIGNED&bug_status=POST&bug_status=ON_DEV&classification=Red%20Hat&columnlist=short_desc%2Cversion%2Cbug_severity%2Cpriority%2Ccomponent%2Creporter%2Cassigned_to%2Cqa_contact%2Cbug_status%2Cproduct%2Cchangeddate%2Ctarget_release%2Ckeywords%2Cflagtypes.name%2Cbug_file_loc%2Cext_bz_list&f1=component&f10=target_release&f11=target_release&f2=component&f3=version&f4=target_release&f5=target_release&f6=target_release&f7=short_desc&f8=target_release&f9=short_desc&limit=#{bz_page_size}&list_id=12103836&o1=notequals&o10=notsubstring&o11=notsubstring&o2=notequals&o3=notregexp&o4=notsubstring&o5=notsubstring&o6=notsubstring&o7=notsubstring&o8=notsubstring&o9=notsubstring&offset=#{offset}&order=bug_status%2Cpriority%2Cassigned_to%2Cbug_id&product=OKD&product=OpenShift%20Container%20Platform&query_format=advanced&v1=Documentation&v2=RFE&v3=%5E2%5C.' --outputformat='#{output_format}\x1F%{flags}flags||EOR'"
|
|
41
|
+
bz_csv_inner = `#{bz_command}`
|
|
42
|
+
|
|
43
|
+
# Shovel results into bz_csv to parse later
|
|
44
|
+
bz_csv << bz_csv_inner
|
|
45
|
+
|
|
46
|
+
# Increase the offset by the page limit
|
|
47
|
+
offset += bz_page_size
|
|
48
|
+
|
|
49
|
+
# Repeat if we got the same number of results as the limit
|
|
50
|
+
end while bz_csv_inner.split("||EOR\n").length == bz_page_size
|
|
51
|
+
|
|
52
|
+
# Parse the results
|
|
33
53
|
bz_csv.split("||EOR\n").each do |row|
|
|
34
54
|
values = row.split("\x1F").map{ |v| v.strip }
|
|
35
55
|
|
data/lib/shiftzilla/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shiftzilla
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.32
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- N. Harrison Ripps
|
|
8
8
|
- Rory Thrasher
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -191,7 +191,7 @@ homepage: http://github.com/nhr/shiftzilla
|
|
|
191
191
|
licenses:
|
|
192
192
|
- MIT
|
|
193
193
|
metadata: {}
|
|
194
|
-
post_install_message:
|
|
194
|
+
post_install_message:
|
|
195
195
|
rdoc_options: []
|
|
196
196
|
require_paths:
|
|
197
197
|
- lib
|
|
@@ -206,9 +206,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
206
206
|
- !ruby/object:Gem::Version
|
|
207
207
|
version: '0'
|
|
208
208
|
requirements: []
|
|
209
|
-
rubyforge_project:
|
|
209
|
+
rubyforge_project:
|
|
210
210
|
rubygems_version: 2.7.7
|
|
211
|
-
signing_key:
|
|
211
|
+
signing_key:
|
|
212
212
|
specification_version: 4
|
|
213
213
|
summary: Shiftzilla is a tool for providing historical reports based on Bugzilla data
|
|
214
214
|
test_files: []
|