lazylead 0.10.0 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/lazylead.gemspec +9 -9
- data/lib/lazylead/schedule.rb +5 -1
- data/lib/lazylead/task/accuracy/environment.rb +3 -8
- data/lib/lazylead/task/accuracy/logs_link.rb +5 -2
- data/lib/lazylead/task/accuracy/records.rb +1 -1
- data/lib/lazylead/task/accuracy/records_link.rb +49 -0
- data/lib/lazylead/task/accuracy/required.rb +42 -0
- data/lib/lazylead/task/accuracy/screenshots.rb +4 -4
- data/lib/lazylead/task/accuracy/servers.rb +7 -7
- data/lib/lazylead/task/accuracy/testcase.rb +27 -20
- data/lib/lazylead/task/accuracy/wiki_url.rb +46 -0
- data/lib/lazylead/version.rb +1 -1
- data/test/lazylead/task/accuracy/records_llink_test.rb +55 -0
- data/test/lazylead/task/accuracy/testcase_test.rb +7 -0
- data/test/lazylead/task/accuracy/wiki_url_test.rb +54 -0
- data/test/sqlite_test.rb +1 -1
- metadata +24 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59ec5b9c923e07aa0f71bf625df793b8a3451d5e6910d9a77e0785e8922cc55e
|
4
|
+
data.tar.gz: 81725aa788eb3a69cce4563cbbf9f087e7ea7fe777edc48b4d17691702765039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eed91c6f6228e9c344cca171f7838c17cd38fa4ea83965b08cac8465840430713cae5a37bfc10a49b549bb405b2cea58577b4bfecab427662a1d0be58add495d
|
7
|
+
data.tar.gz: 0a9ca2d4ea7aa062f623bb342951ae7c0a07dfba16333571d36653886a3da456d6c745aef13510bfb71787ca826c7b908625c7eea8dfaf254734adb10a3ca2fe
|
data/.rubocop.yml
CHANGED
data/lazylead.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.rubygems_version = "2.2"
|
33
33
|
s.required_ruby_version = ">=2.6.5"
|
34
34
|
s.name = "lazylead"
|
35
|
-
s.version = "0.10.
|
35
|
+
s.version = "0.10.4"
|
36
36
|
s.license = "MIT"
|
37
37
|
s.summary = "Eliminate the annoying work within bug-trackers."
|
38
38
|
s.description = "Ticketing systems (Github, Jira, etc.) are strongly
|
@@ -45,7 +45,7 @@ tasks instead of solving technical problems."
|
|
45
45
|
s.authors = ["Yurii Dubinka"]
|
46
46
|
s.email = "yurii.dubinka@gmail.com"
|
47
47
|
s.homepage = "http://github.com/dgroup/lazylead"
|
48
|
-
s.post_install_message = "Thanks for installing Lazylead v0.10.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.10.4!
|
49
49
|
Read our blog posts: https://lazylead.org
|
50
50
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
51
51
|
Follow us on Twitter: https://twitter.com/lazylead
|
@@ -58,7 +58,7 @@ tasks instead of solving technical problems."
|
|
58
58
|
s.add_runtime_dependency "activerecord", "6.1.3"
|
59
59
|
s.add_runtime_dependency "backtrace", "0.3"
|
60
60
|
s.add_runtime_dependency "colorize", "0.8.1"
|
61
|
-
s.add_runtime_dependency "faraday", "1.
|
61
|
+
s.add_runtime_dependency "faraday", "1.7.0"
|
62
62
|
s.add_runtime_dependency "get_process_mem", "0.2.7"
|
63
63
|
s.add_runtime_dependency "inifile", "3.0.0"
|
64
64
|
s.add_runtime_dependency "jira-ruby", "2.1.5"
|
@@ -70,7 +70,7 @@ tasks instead of solving technical problems."
|
|
70
70
|
s.add_runtime_dependency "railties", "6.1.3"
|
71
71
|
s.add_runtime_dependency "require_all", "3.0.0"
|
72
72
|
s.add_runtime_dependency "rubyzip", "2.3.2"
|
73
|
-
s.add_runtime_dependency "rufus-scheduler", "3.
|
73
|
+
s.add_runtime_dependency "rufus-scheduler", "3.8.0"
|
74
74
|
s.add_runtime_dependency "slop", "4.9.1"
|
75
75
|
s.add_runtime_dependency "sqlite3", "1.4.2"
|
76
76
|
s.add_runtime_dependency "tempfile", "0.1.1"
|
@@ -80,19 +80,19 @@ tasks instead of solving technical problems."
|
|
80
80
|
s.add_runtime_dependency "vcs4sql", "0.1.1"
|
81
81
|
s.add_runtime_dependency "viewpoint", "1.1.1"
|
82
82
|
s.add_development_dependency "codecov", "0.5.2"
|
83
|
-
s.add_development_dependency "guard", "2.
|
83
|
+
s.add_development_dependency "guard", "2.18.0"
|
84
84
|
s.add_development_dependency "guard-minitest", "2.4.6"
|
85
85
|
s.add_development_dependency "minitest", "5.14.4"
|
86
86
|
s.add_development_dependency "minitest-fail-fast", "0.1.0"
|
87
87
|
s.add_development_dependency "minitest-hooks", "1.5.0"
|
88
88
|
s.add_development_dependency "minitest-reporters", "1.4.3"
|
89
89
|
s.add_development_dependency "net-ping", "2.0.8"
|
90
|
-
s.add_development_dependency "rake", "13.0.
|
90
|
+
s.add_development_dependency "rake", "13.0.6"
|
91
91
|
s.add_development_dependency "random-port", "0.5.1"
|
92
92
|
s.add_development_dependency "rdoc", "6.3.2"
|
93
|
-
s.add_development_dependency "rubocop", "1.18.
|
94
|
-
s.add_development_dependency "rubocop-minitest", "0.
|
95
|
-
s.add_development_dependency "rubocop-performance", "1.11.
|
93
|
+
s.add_development_dependency "rubocop", "1.18.4"
|
94
|
+
s.add_development_dependency "rubocop-minitest", "0.15.0"
|
95
|
+
s.add_development_dependency "rubocop-performance", "1.11.4"
|
96
96
|
s.add_development_dependency "rubocop-rake", "0.6.0"
|
97
97
|
s.add_development_dependency "rubocop-rspec", "2.4.0"
|
98
98
|
s.add_development_dependency "sqlint", "0.2.0"
|
data/lib/lazylead/schedule.rb
CHANGED
@@ -47,7 +47,11 @@ module Lazylead
|
|
47
47
|
raise "ll-002: task can't be a null" if task.nil?
|
48
48
|
@trigger.method(task.type).call(task.unit) do
|
49
49
|
ActiveRecord::Base.connection_pool.with_connection do
|
50
|
-
|
50
|
+
if task.props.key? "no_logs"
|
51
|
+
task.exec
|
52
|
+
else
|
53
|
+
ORM::VerboseTask.new(task, @log).exec
|
54
|
+
end
|
51
55
|
end
|
52
56
|
end
|
53
57
|
@log.debug "Task scheduled: #{task}"
|
@@ -22,18 +22,13 @@
|
|
22
22
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
23
|
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
|
25
|
-
require_relative "
|
25
|
+
require_relative "required"
|
26
26
|
|
27
27
|
module Lazylead
|
28
28
|
# A requirement that Jira field "Environment" provided by the reporter.
|
29
|
-
class Environment <
|
29
|
+
class Environment < Lazylead::Required
|
30
30
|
def initialize(score = 0.5)
|
31
|
-
super "Environment details (URL, patches)", score, "Environment"
|
32
|
-
end
|
33
|
-
|
34
|
-
# @return true if an issue has non-empty "Environment" field
|
35
|
-
def passed(issue)
|
36
|
-
non_blank? issue, "environment"
|
31
|
+
super "Environment details (URL, patches)", score, "Environment", "environment"
|
37
32
|
end
|
38
33
|
end
|
39
34
|
end
|
@@ -30,11 +30,12 @@ module Lazylead
|
|
30
30
|
# or attachment with plain log file
|
31
31
|
class LogsLink < Lazylead::Logs
|
32
32
|
def initialize(link)
|
33
|
-
super
|
33
|
+
super()
|
34
34
|
@link = link
|
35
35
|
end
|
36
36
|
|
37
37
|
def passed(issue)
|
38
|
+
return false if @link.nil? || (@link.is_a?(Array) && @link.empty?)
|
38
39
|
super(issue) || link?(issue)
|
39
40
|
end
|
40
41
|
|
@@ -46,7 +47,9 @@ module Lazylead
|
|
46
47
|
.reject(&:blank?)
|
47
48
|
.flat_map(&:split)
|
48
49
|
.reject(&:blank?)
|
49
|
-
.any?
|
50
|
+
.any? do |word|
|
51
|
+
@link.is_a?(Array) ? @link.any? { |l| word.include? l } : word.include?(@link)
|
52
|
+
end
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
@@ -28,7 +28,7 @@ module Lazylead
|
|
28
28
|
# Check that ticket has video record(s) with reproducing results.
|
29
29
|
class Records < Lazylead::Attachment
|
30
30
|
def initialize(ext = [])
|
31
|
-
super("
|
31
|
+
super("Internal reproducing results (video)", 5, "Attachments")
|
32
32
|
@ext = ext
|
33
33
|
return unless @ext.empty?
|
34
34
|
@ext = %w[.webm .mkv .flv .flv .vob .ogv .ogg .drc .gif .gifv .mng .avi
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "records"
|
26
|
+
|
27
|
+
module Lazylead
|
28
|
+
# Check that ticket has links to video record(s) with reproducing results.
|
29
|
+
class RecordsLink < Lazylead::Records
|
30
|
+
def initialize(*urls)
|
31
|
+
super([])
|
32
|
+
@urls = urls
|
33
|
+
end
|
34
|
+
|
35
|
+
def passed(issue)
|
36
|
+
link?(issue) || super(issue)
|
37
|
+
end
|
38
|
+
|
39
|
+
def link?(issue)
|
40
|
+
return false if issue.description.nil?
|
41
|
+
issue.description
|
42
|
+
.split("\n")
|
43
|
+
.reject(&:blank?)
|
44
|
+
.flat_map(&:split)
|
45
|
+
.reject(&:blank?)
|
46
|
+
.any? { |word| @urls.any? { |u| word.start_with? u } }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "requirement"
|
26
|
+
|
27
|
+
module Lazylead
|
28
|
+
#
|
29
|
+
# Check that ticket has mandatory non-blank field(s).
|
30
|
+
#
|
31
|
+
class Required < Lazylead::Requirement
|
32
|
+
def initialize(desc, score, msg, *fields)
|
33
|
+
super desc, score, msg
|
34
|
+
@fields = fields
|
35
|
+
end
|
36
|
+
|
37
|
+
def passed(issue)
|
38
|
+
return false if @fields.nil? || @fields.empty?
|
39
|
+
@fields.all? { |f| non_blank?(issue, f) }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -35,7 +35,7 @@ module Lazylead
|
|
35
35
|
class Screenshots < Lazylead::Requirement
|
36
36
|
# @param minimum The number of expected screenshots
|
37
37
|
def initialize(minimum: 1, score: 2, ext: %w[.jpg .jpeg .exif .tiff .tff .bmp .png .svg])
|
38
|
-
super "
|
38
|
+
super "Internal reproducing results (screenshots)", score, "Description,Attachments"
|
39
39
|
@minimum = minimum
|
40
40
|
@ext = ext
|
41
41
|
end
|
@@ -56,9 +56,9 @@ module Lazylead
|
|
56
56
|
|
57
57
|
# Detect all pictures in ticket attachments and returns an array with file names.
|
58
58
|
def pictures(issue)
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
issue.attachments
|
60
|
+
.select { |a| @ext.include? File.extname(a.filename).downcase }
|
61
|
+
.map(&:filename)
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
@@ -32,18 +32,18 @@ module Lazylead
|
|
32
32
|
# @param envs regexp expressions to match servers in description.
|
33
33
|
#
|
34
34
|
def initialize(score: 2, envs: [], desc: "Internal reproducing results")
|
35
|
-
super desc, score, "Description
|
35
|
+
super desc, score, "Description"
|
36
36
|
@envs = envs
|
37
37
|
end
|
38
38
|
|
39
39
|
def passed(issue)
|
40
40
|
return true if @envs.empty?
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
issue.description.split("\n")
|
42
|
+
.reject(&:blank?)
|
43
|
+
.map(&:strip)
|
44
|
+
.flat_map { |l| l.split.map(&:strip) }
|
45
|
+
.select { |u| url?(u) }
|
46
|
+
.any? { |u| match?(u) }
|
47
47
|
end
|
48
48
|
|
49
49
|
# Ensure that particular text contains web url
|
@@ -37,11 +37,11 @@ module Lazylead
|
|
37
37
|
def passed(issue)
|
38
38
|
return false if issue.description.nil?
|
39
39
|
@tc = @ar = @er = -1
|
40
|
-
issue.description.split("\n").reject(&:blank?).each_with_index do |l, i|
|
41
|
-
line = escape l.
|
42
|
-
detect_tc
|
43
|
-
detect_ar
|
44
|
-
detect_er
|
40
|
+
issue.description.split("\n").reject(&:blank?).map(&:downcase).each_with_index do |l, i|
|
41
|
+
line = escape l.gsub(/(\s+|\*|\+)/, "")
|
42
|
+
detect_tc i, l, line
|
43
|
+
detect_ar i, l, line
|
44
|
+
detect_er i, l, line
|
45
45
|
break if with_tc_ar_er?
|
46
46
|
end
|
47
47
|
with_tc_ar_er?
|
@@ -63,30 +63,37 @@ module Lazylead
|
|
63
63
|
end
|
64
64
|
|
65
65
|
# Detect index of line with test case
|
66
|
-
|
66
|
+
# @param index The line number in description
|
67
|
+
# @param src The whole line in lower case from description
|
68
|
+
# @param strip The escaped line in lower case from description without special symbol(s)
|
69
|
+
def detect_tc(index, src, strip)
|
67
70
|
return unless @tc.negative?
|
68
|
-
|
69
|
-
|
71
|
+
keywords = %w[testcase: tc: teststeps: teststeps steps: tcsteps: tc testcases steps usecase
|
72
|
+
pre-requisitesandsteps:]
|
73
|
+
@tc = index if keywords.any? { |k| strip.eql? k }
|
74
|
+
@tc = index if keywords.any? { |k| src.include? k }
|
70
75
|
end
|
71
76
|
|
72
77
|
# Detect index of line with actual result
|
73
|
-
|
78
|
+
# @param index The line number in description
|
79
|
+
# @param src The whole line in lower case from description
|
80
|
+
# @param strip The escaped line in lower case from description without special symbol(s)
|
81
|
+
def detect_ar(index, src, strip)
|
74
82
|
return unless @ar.negative? && index > @tc
|
75
|
-
|
83
|
+
keywords = %w[ar: actualresult: ar= [ar] actualresult]
|
84
|
+
@ar = index if keywords.any? { |k| strip.start_with? k }
|
85
|
+
@ar = index if keywords.any? { |k| src.include? k }
|
76
86
|
end
|
77
87
|
|
78
88
|
# Detect index of line with expected result
|
79
|
-
|
89
|
+
# @param index The line number in description
|
90
|
+
# @param src The whole line in lower case from description
|
91
|
+
# @param strip The escaped line in lower case from description without special symbol(s)
|
92
|
+
def detect_er(index, src, strip)
|
80
93
|
return unless @er.negative? && index > @tc
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
def starts?(line, text)
|
85
|
-
text.any? { |t| line.start_with? t }
|
86
|
-
end
|
87
|
-
|
88
|
-
def eql?(line, text)
|
89
|
-
text.any? { |t| t.eql? line }
|
94
|
+
keywords = %w[er: expectedresult: er= [er] expectedresult]
|
95
|
+
@er = index if keywords.any? { |k| strip.start_with? k }
|
96
|
+
@er = index if keywords.any? { |k| src.include? k }
|
90
97
|
end
|
91
98
|
end
|
92
99
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "wiki"
|
26
|
+
|
27
|
+
module Lazylead
|
28
|
+
# Check that ticket has a web link to external system with design.
|
29
|
+
class WikiUrl < Lazylead::Wiki
|
30
|
+
def initialize(url)
|
31
|
+
super
|
32
|
+
@url = url
|
33
|
+
end
|
34
|
+
|
35
|
+
def passed(issue)
|
36
|
+
link?(issue) || super(issue)
|
37
|
+
end
|
38
|
+
|
39
|
+
def link?(issue)
|
40
|
+
issue.remote_links
|
41
|
+
.reject { |l| l.attrs.nil? || l.attrs.empty? }
|
42
|
+
.reject { |l| l.attrs["object"].nil? || l.attrs["object"]["url"].nil? }
|
43
|
+
.any? { |l| l.attrs["object"]["url"].start_with? @url }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/lazylead/version.rb
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/records_link"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class RecordsTest < Lazylead::Test
|
30
|
+
test "log file is present and link is absent" do
|
31
|
+
assert RecordsLink.new("https://youtube.com/xyz").passed(
|
32
|
+
OpenStruct.new(
|
33
|
+
attachments: [OpenStruct.new(attrs: { "size" => 10_241, "filename" => "steps.mp4" })]
|
34
|
+
)
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
test "file is absent but description has url to video" do
|
39
|
+
assert RecordsLink.new("https://youtube.com/xyz").passed(
|
40
|
+
OpenStruct.new(description: "Here is the reproducing steps: https://youtube.com/xyzzzzz")
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
test "several base urls to video" do
|
45
|
+
assert RecordsLink.new("https://site.a.com/xyz", "http://site.b.com/zyx").passed(
|
46
|
+
OpenStruct.new(description: "Here is the reproducing steps: http://site.b.com/zyx123. Wow!")
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
test "file is absent and link is absent" do
|
51
|
+
refute RecordsLink.new("https://youtube.com/xyz")
|
52
|
+
.passed(OpenStruct.new(attachments: []))
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -300,6 +300,13 @@ module Lazylead
|
|
300
300
|
*{color:#DE10AA}Actual Result:{color}* = YYYY"
|
301
301
|
end
|
302
302
|
|
303
|
+
test "TC with h3" do
|
304
|
+
assert testcase? "h3. Steps: Start updating
|
305
|
+
h3. ER: updating failed
|
306
|
+
h3. AR: updating should be passed
|
307
|
+
h3. Screenshots: !r37.png|thumbnail!"
|
308
|
+
end
|
309
|
+
|
303
310
|
# ensure that issue description has a test case, AR and ER
|
304
311
|
def testcase?(desc)
|
305
312
|
Testcase.new.passed(OpenStruct.new(description: desc))
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/wiki_url"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class WikiUrlTest < Lazylead::Test
|
30
|
+
test "wiki reference is present as url" do
|
31
|
+
assert WikiUrl.new("https://wiki.com/page=").passed(
|
32
|
+
OpenStruct.new(
|
33
|
+
remote_links: [
|
34
|
+
OpenStruct.new(
|
35
|
+
attrs: { "object" => { "url" => "https://wiki.com/page=5" } }
|
36
|
+
)
|
37
|
+
]
|
38
|
+
)
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
test "wiki reference is absent as url" do
|
43
|
+
refute WikiUrl.new("https://wiki.com/page=").passed(
|
44
|
+
OpenStruct.new(
|
45
|
+
remote_links: [
|
46
|
+
OpenStruct.new(
|
47
|
+
attrs: {}
|
48
|
+
)
|
49
|
+
]
|
50
|
+
)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/test/sqlite_test.rb
CHANGED
@@ -46,7 +46,7 @@ module Lazylead
|
|
46
46
|
tbl = t.first.to_s
|
47
47
|
cols = t.values_at(1).sort.join(",")
|
48
48
|
raise "No columns found for table #{tbl} in #{tables}" if cols.empty?
|
49
|
-
|
49
|
+
refute_nil schema[tbl], "Table '#{tbl}' not found in #{schema}"
|
50
50
|
assert_equal cols, schema[tbl], "Columns mismatch for '#{tbl}'"
|
51
51
|
end
|
52
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazylead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yurii Dubinka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.7.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.7.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: get_process_mem
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - '='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 3.
|
229
|
+
version: 3.8.0
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - '='
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: 3.
|
236
|
+
version: 3.8.0
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: slop
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -366,14 +366,14 @@ dependencies:
|
|
366
366
|
requirements:
|
367
367
|
- - '='
|
368
368
|
- !ruby/object:Gem::Version
|
369
|
-
version: 2.
|
369
|
+
version: 2.18.0
|
370
370
|
type: :development
|
371
371
|
prerelease: false
|
372
372
|
version_requirements: !ruby/object:Gem::Requirement
|
373
373
|
requirements:
|
374
374
|
- - '='
|
375
375
|
- !ruby/object:Gem::Version
|
376
|
-
version: 2.
|
376
|
+
version: 2.18.0
|
377
377
|
- !ruby/object:Gem::Dependency
|
378
378
|
name: guard-minitest
|
379
379
|
requirement: !ruby/object:Gem::Requirement
|
@@ -464,14 +464,14 @@ dependencies:
|
|
464
464
|
requirements:
|
465
465
|
- - '='
|
466
466
|
- !ruby/object:Gem::Version
|
467
|
-
version: 13.0.
|
467
|
+
version: 13.0.6
|
468
468
|
type: :development
|
469
469
|
prerelease: false
|
470
470
|
version_requirements: !ruby/object:Gem::Requirement
|
471
471
|
requirements:
|
472
472
|
- - '='
|
473
473
|
- !ruby/object:Gem::Version
|
474
|
-
version: 13.0.
|
474
|
+
version: 13.0.6
|
475
475
|
- !ruby/object:Gem::Dependency
|
476
476
|
name: random-port
|
477
477
|
requirement: !ruby/object:Gem::Requirement
|
@@ -506,42 +506,42 @@ dependencies:
|
|
506
506
|
requirements:
|
507
507
|
- - '='
|
508
508
|
- !ruby/object:Gem::Version
|
509
|
-
version: 1.18.
|
509
|
+
version: 1.18.4
|
510
510
|
type: :development
|
511
511
|
prerelease: false
|
512
512
|
version_requirements: !ruby/object:Gem::Requirement
|
513
513
|
requirements:
|
514
514
|
- - '='
|
515
515
|
- !ruby/object:Gem::Version
|
516
|
-
version: 1.18.
|
516
|
+
version: 1.18.4
|
517
517
|
- !ruby/object:Gem::Dependency
|
518
518
|
name: rubocop-minitest
|
519
519
|
requirement: !ruby/object:Gem::Requirement
|
520
520
|
requirements:
|
521
521
|
- - '='
|
522
522
|
- !ruby/object:Gem::Version
|
523
|
-
version: 0.
|
523
|
+
version: 0.15.0
|
524
524
|
type: :development
|
525
525
|
prerelease: false
|
526
526
|
version_requirements: !ruby/object:Gem::Requirement
|
527
527
|
requirements:
|
528
528
|
- - '='
|
529
529
|
- !ruby/object:Gem::Version
|
530
|
-
version: 0.
|
530
|
+
version: 0.15.0
|
531
531
|
- !ruby/object:Gem::Dependency
|
532
532
|
name: rubocop-performance
|
533
533
|
requirement: !ruby/object:Gem::Requirement
|
534
534
|
requirements:
|
535
535
|
- - '='
|
536
536
|
- !ruby/object:Gem::Version
|
537
|
-
version: 1.11.
|
537
|
+
version: 1.11.4
|
538
538
|
type: :development
|
539
539
|
prerelease: false
|
540
540
|
version_requirements: !ruby/object:Gem::Requirement
|
541
541
|
requirements:
|
542
542
|
- - '='
|
543
543
|
- !ruby/object:Gem::Version
|
544
|
-
version: 1.11.
|
544
|
+
version: 1.11.4
|
545
545
|
- !ruby/object:Gem::Dependency
|
546
546
|
name: rubocop-rake
|
547
547
|
requirement: !ruby/object:Gem::Requirement
|
@@ -697,12 +697,15 @@ files:
|
|
697
697
|
- lib/lazylead/task/accuracy/logs_link.rb
|
698
698
|
- lib/lazylead/task/accuracy/onlyll.rb
|
699
699
|
- lib/lazylead/task/accuracy/records.rb
|
700
|
+
- lib/lazylead/task/accuracy/records_link.rb
|
701
|
+
- lib/lazylead/task/accuracy/required.rb
|
700
702
|
- lib/lazylead/task/accuracy/requirement.rb
|
701
703
|
- lib/lazylead/task/accuracy/screenshots.rb
|
702
704
|
- lib/lazylead/task/accuracy/servers.rb
|
703
705
|
- lib/lazylead/task/accuracy/stacktrace.rb
|
704
706
|
- lib/lazylead/task/accuracy/testcase.rb
|
705
707
|
- lib/lazylead/task/accuracy/wiki.rb
|
708
|
+
- lib/lazylead/task/accuracy/wiki_url.rb
|
706
709
|
- lib/lazylead/task/alert/alert.rb
|
707
710
|
- lib/lazylead/task/alert/alertif.rb
|
708
711
|
- lib/lazylead/task/alert/changed_to.rb
|
@@ -756,6 +759,7 @@ files:
|
|
756
759
|
- test/lazylead/task/accuracy/logs_link_test.rb
|
757
760
|
- test/lazylead/task/accuracy/logs_test.rb
|
758
761
|
- test/lazylead/task/accuracy/onlyll_test.rb
|
762
|
+
- test/lazylead/task/accuracy/records_llink_test.rb
|
759
763
|
- test/lazylead/task/accuracy/records_test.rb
|
760
764
|
- test/lazylead/task/accuracy/score_test.rb
|
761
765
|
- test/lazylead/task/accuracy/screenshots_test.rb
|
@@ -763,6 +767,7 @@ files:
|
|
763
767
|
- test/lazylead/task/accuracy/stacktrace_test.rb
|
764
768
|
- test/lazylead/task/accuracy/testcase_test.rb
|
765
769
|
- test/lazylead/task/accuracy/wiki_test.rb
|
770
|
+
- test/lazylead/task/accuracy/wiki_url_test.rb
|
766
771
|
- test/lazylead/task/alert/alertif_test.rb
|
767
772
|
- test/lazylead/task/alert/assignee_alert_test.rb
|
768
773
|
- test/lazylead/task/alert/changed_to_test.rb
|
@@ -790,7 +795,7 @@ licenses:
|
|
790
795
|
- MIT
|
791
796
|
metadata: {}
|
792
797
|
post_install_message: |-
|
793
|
-
Thanks for installing Lazylead v0.10.
|
798
|
+
Thanks for installing Lazylead v0.10.4!
|
794
799
|
Read our blog posts: https://lazylead.org
|
795
800
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
796
801
|
Follow us on Twitter: https://twitter.com/lazylead
|
@@ -834,6 +839,7 @@ test_files:
|
|
834
839
|
- test/lazylead/task/accuracy/logs_link_test.rb
|
835
840
|
- test/lazylead/task/accuracy/logs_test.rb
|
836
841
|
- test/lazylead/task/accuracy/onlyll_test.rb
|
842
|
+
- test/lazylead/task/accuracy/records_llink_test.rb
|
837
843
|
- test/lazylead/task/accuracy/records_test.rb
|
838
844
|
- test/lazylead/task/accuracy/score_test.rb
|
839
845
|
- test/lazylead/task/accuracy/screenshots_test.rb
|
@@ -841,6 +847,7 @@ test_files:
|
|
841
847
|
- test/lazylead/task/accuracy/stacktrace_test.rb
|
842
848
|
- test/lazylead/task/accuracy/testcase_test.rb
|
843
849
|
- test/lazylead/task/accuracy/wiki_test.rb
|
850
|
+
- test/lazylead/task/accuracy/wiki_url_test.rb
|
844
851
|
- test/lazylead/task/alert/alertif_test.rb
|
845
852
|
- test/lazylead/task/alert/assignee_alert_test.rb
|
846
853
|
- test/lazylead/task/alert/changed_to_test.rb
|