lazylead 0.10.2 → 0.10.3
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/lazylead.gemspec +2 -2
- data/lib/lazylead/task/accuracy/records_link.rb +49 -0
- data/lib/lazylead/version.rb +1 -1
- data/test/lazylead/task/accuracy/records_llink_test.rb +55 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a3f17c4f0160f62b3faa0dd25179669f902d359961612701ab5b123ef2a7a2
|
4
|
+
data.tar.gz: d2a4ba8aa4d282362268a4b8911c1af9eaf425f83db9643f10dddefb8564eb53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8093e705ee5fe376e98755ec187b3e981dce7b55243c497debb1b1f5384df8c6cab62f60f01949affe0cf8218d0d1acc7a21c62cc935a538e18df80efe7b0d15
|
7
|
+
data.tar.gz: c73d5edeede58fb972d219681456832f089ed2b08b75893c657dda86ef3c4c1d9eae47fde49e8335ea0f193b94e053744da47cea44c0c804d0e4145b95abcbab
|
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.3"
|
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.3!
|
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
|
@@ -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
|
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
|
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.3
|
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-07-
|
11
|
+
date: 2021-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -697,6 +697,7 @@ 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
|
700
701
|
- lib/lazylead/task/accuracy/required.rb
|
701
702
|
- lib/lazylead/task/accuracy/requirement.rb
|
702
703
|
- lib/lazylead/task/accuracy/screenshots.rb
|
@@ -757,6 +758,7 @@ files:
|
|
757
758
|
- test/lazylead/task/accuracy/logs_link_test.rb
|
758
759
|
- test/lazylead/task/accuracy/logs_test.rb
|
759
760
|
- test/lazylead/task/accuracy/onlyll_test.rb
|
761
|
+
- test/lazylead/task/accuracy/records_llink_test.rb
|
760
762
|
- test/lazylead/task/accuracy/records_test.rb
|
761
763
|
- test/lazylead/task/accuracy/score_test.rb
|
762
764
|
- test/lazylead/task/accuracy/screenshots_test.rb
|
@@ -791,7 +793,7 @@ licenses:
|
|
791
793
|
- MIT
|
792
794
|
metadata: {}
|
793
795
|
post_install_message: |-
|
794
|
-
Thanks for installing Lazylead v0.10.
|
796
|
+
Thanks for installing Lazylead v0.10.3!
|
795
797
|
Read our blog posts: https://lazylead.org
|
796
798
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
797
799
|
Follow us on Twitter: https://twitter.com/lazylead
|
@@ -835,6 +837,7 @@ test_files:
|
|
835
837
|
- test/lazylead/task/accuracy/logs_link_test.rb
|
836
838
|
- test/lazylead/task/accuracy/logs_test.rb
|
837
839
|
- test/lazylead/task/accuracy/onlyll_test.rb
|
840
|
+
- test/lazylead/task/accuracy/records_llink_test.rb
|
838
841
|
- test/lazylead/task/accuracy/records_test.rb
|
839
842
|
- test/lazylead/task/accuracy/score_test.rb
|
840
843
|
- test/lazylead/task/accuracy/screenshots_test.rb
|