bicho 0.0.12 → 0.0.13
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/bicho/bug.rb +7 -2
- data/lib/bicho/client.rb +1 -1
- data/lib/bicho/query.rb +9 -2
- data/lib/bicho/version.rb +1 -1
- data/test/test_novell_plugin.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2760edd7531e71e8047f5043ca304271d784185e
|
4
|
+
data.tar.gz: c99dbcd06578f5dbde10fd773cb32652a113877d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 962b69c57522a18ab23ab6245f100f9d3f66ab227c5537232ef5ee1d0b861ee959bd05528ffdb6604075c0057f3dd074a56fe7ef6d9b04dba24d87b7b3a11377
|
7
|
+
data.tar.gz: 5b5b087d28f2fd5a467d4bac125ed41d192f2c0fc40cae050d6f583baa8a2426494117da9a4b9463b9ad7dc11bd5ef959b20dbae253694f6b9ef942fb189a4c3
|
data/lib/bicho/bug.rb
CHANGED
@@ -56,8 +56,13 @@ module Bicho
|
|
56
56
|
@data = data
|
57
57
|
end
|
58
58
|
|
59
|
-
def method_missing(
|
60
|
-
@data
|
59
|
+
def method_missing(method_name, *_args)
|
60
|
+
return super unless @data.key?(method_name.to_s)
|
61
|
+
@data[method_name.to_s]
|
62
|
+
end
|
63
|
+
|
64
|
+
def respond_to_missing?(method_name, _include_private = false)
|
65
|
+
@data.key?(method_name.to_s) || super
|
61
66
|
end
|
62
67
|
|
63
68
|
def id
|
data/lib/bicho/client.rb
CHANGED
@@ -238,7 +238,7 @@ module Bicho
|
|
238
238
|
end
|
239
239
|
when Net::HTTPRedirection
|
240
240
|
location = response['location']
|
241
|
-
if redirects_left
|
241
|
+
if redirects_left.zero?
|
242
242
|
raise "Maximum redirects exceeded (redirected to #{location})"
|
243
243
|
end
|
244
244
|
new_location_uri = URI.parse(location)
|
data/lib/bicho/query.rb
CHANGED
@@ -62,13 +62,20 @@ module Bicho
|
|
62
62
|
# Query responds to all the bug search attributes.
|
63
63
|
#
|
64
64
|
# @see {Bug.where Allowed attributes}
|
65
|
-
def method_missing(
|
65
|
+
def method_missing(method_name, *args)
|
66
|
+
return super unless Bicho::SEARCH_FIELDS
|
67
|
+
.map(&:first)
|
68
|
+
.include?(method_name)
|
66
69
|
args.each do |arg|
|
67
|
-
append_query(
|
70
|
+
append_query(method_name.to_s, arg)
|
68
71
|
end
|
69
72
|
self
|
70
73
|
end
|
71
74
|
|
75
|
+
def respond_to_missing?(method_name, _include_private = false)
|
76
|
+
Bicho::SEARCH_FIELDS.map(&:first).include?(method_name) || super
|
77
|
+
end
|
78
|
+
|
72
79
|
# Shortcut equivalent to status new, assigned, needinfo and reopened
|
73
80
|
def open
|
74
81
|
status(:new).status(:assigned).status(:needinfo).status(:reopened)
|
data/lib/bicho/version.rb
CHANGED
data/test/test_novell_plugin.rb
CHANGED
@@ -15,7 +15,7 @@ class NovellPluginTest < Minitest::Test
|
|
15
15
|
site_url = plugin.transform_site_url_hook(url, log)
|
16
16
|
api_url = plugin.transform_api_url_hook(url, log)
|
17
17
|
assert_equal(site_url.to_s, "http://bugzilla.#{domain}.com")
|
18
|
-
assert_equal(api_url.to_s,
|
18
|
+
assert_equal(api_url.to_s, "https://test:test@apibugzilla.#{domain}.com")
|
19
19
|
assert_match(/Rewrote url/, r.gets)
|
20
20
|
end
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bicho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Mac-Vicar P.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|