lazylead 0.9.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d79bc577cc5d288972a0e76fd800bf2b34ff7ab24ae9c26440c733222fb2fd08
4
- data.tar.gz: b627e3f6e109bd0d9e33d8a3c7e388027ec299d8482cb771883f223c874ea093
3
+ metadata.gz: e2a3f17c4f0160f62b3faa0dd25179669f902d359961612701ab5b123ef2a7a2
4
+ data.tar.gz: d2a4ba8aa4d282362268a4b8911c1af9eaf425f83db9643f10dddefb8564eb53
5
5
  SHA512:
6
- metadata.gz: da3d31eb92822381047ea2cd8c3ab363765e4d7e644bfe8921644a8998eac5e4ee58f4b3000e2a46ddc0098f9c9176f563aa4c0f084f1a456fa95a905f26b3f4
7
- data.tar.gz: 206b8e56cbbb7807b4c92c291a7d2b03a8ec3bb05f7f75d60b31601ab925ec3768d0f24b84d4a124c6c0c3e99f7e39f8ea6851110144d9202237460b0d0fedfa
6
+ metadata.gz: 8093e705ee5fe376e98755ec187b3e981dce7b55243c497debb1b1f5384df8c6cab62f60f01949affe0cf8218d0d1acc7a21c62cc935a538e18df80efe7b0d15
7
+ data.tar.gz: c73d5edeede58fb972d219681456832f089ed2b08b75893c657dda86ef3c4c1d9eae47fde49e8335ea0f193b94e053744da47cea44c0c804d0e4145b95abcbab
data/.rubocop.yml CHANGED
@@ -42,7 +42,7 @@ Metrics/MethodLength:
42
42
  - "test/**/*"
43
43
 
44
44
  Metrics/ParameterLists:
45
- Max: 3
45
+ Max: 4
46
46
 
47
47
  Layout/HashAlignment:
48
48
  EnforcedColonStyle:
data/Rakefile CHANGED
@@ -114,8 +114,7 @@ task :sqlint do
114
114
  if total.positive?
115
115
  abort "#{total.colorize(:red)} SQL violations found."
116
116
  else
117
- puts "#{src.size} files inspected, #{'no offenses'.colorize(:green)} " \
118
- "detected"
117
+ puts "#{src.size} files inspected, #{'no offenses'.colorize(:green)} detected"
119
118
  end
120
119
  end
121
120
 
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.9.3"
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.9.3!
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
@@ -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.4.2"
61
+ s.add_runtime_dependency "faraday", "1.5.1"
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"
@@ -69,9 +69,9 @@ tasks instead of solving technical problems."
69
69
  s.add_runtime_dependency "openssl", "2.1.2"
70
70
  s.add_runtime_dependency "railties", "6.1.3"
71
71
  s.add_runtime_dependency "require_all", "3.0.0"
72
- s.add_runtime_dependency "rubyzip", "2.3.0"
73
- s.add_runtime_dependency "rufus-scheduler", "3.7.0"
74
- s.add_runtime_dependency "slop", "4.9.0"
72
+ s.add_runtime_dependency "rubyzip", "2.3.2"
73
+ s.add_runtime_dependency "rufus-scheduler", "3.8.0"
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"
77
77
  s.add_runtime_dependency "tilt", "2.0.10"
@@ -80,21 +80,21 @@ 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.17.0"
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.3"
90
+ s.add_development_dependency "rake", "13.0.6"
91
91
  s.add_development_dependency "random-port", "0.5.1"
92
- s.add_development_dependency "rdoc", "6.3.1"
93
- s.add_development_dependency "rubocop", "1.15.0"
94
- s.add_development_dependency "rubocop-minitest", "0.12.1"
95
- s.add_development_dependency "rubocop-performance", "1.11.3"
96
- s.add_development_dependency "rubocop-rake", "0.5.1"
97
- s.add_development_dependency "rubocop-rspec", "2.3.0"
92
+ s.add_development_dependency "rdoc", "6.3.2"
93
+ s.add_development_dependency "rubocop", "1.18.3"
94
+ s.add_development_dependency "rubocop-minitest", "0.14.0"
95
+ s.add_development_dependency "rubocop-performance", "1.11.4"
96
+ s.add_development_dependency "rubocop-rake", "0.6.0"
97
+ s.add_development_dependency "rubocop-rspec", "2.4.0"
98
98
  s.add_development_dependency "sqlint", "0.2.0"
99
99
  s.add_development_dependency "tempfile", "0.1.1"
100
100
  s.add_development_dependency "xcop", "0.6.2"
@@ -76,8 +76,7 @@ module Lazylead
76
76
  return "" if resp.blank?
77
77
  pages = JSON.parse(resp)
78
78
  return "" if pages["results"].empty?
79
- "#{@conf.url}/pages/viewpage.action?"\
80
- "pageId=#{pages['results'].first['id']}"
79
+ "#{@conf.url}/pages/viewpage.action?pageId=#{pages['results'].first['id']}"
81
80
  end
82
81
  end
83
82
 
@@ -86,7 +86,7 @@ module Lazylead
86
86
  "Hi [~#{reporter}],",
87
87
  "",
88
88
  "The triage accuracy is '{color:#{color}}#{@score}{color}'" \
89
- " (~{color:#{color}}#{@accuracy}%{color}), here are the reasons why:",
89
+ " (~{color:#{color}}#{@accuracy}%{color}), here are the reasons why:",
90
90
  "|| Ticket requirement || Status || Field ||"
91
91
  ]
92
92
  @opts[:rules].each do |r|
@@ -94,8 +94,7 @@ module Lazylead
94
94
  end
95
95
  comment << docs_link
96
96
  comment << ""
97
- comment << "Posted by [lazylead v#{Lazylead::VERSION}|" \
98
- "https://bit.ly/2NjdndS]."
97
+ comment << "Posted by [lazylead v#{Lazylead::VERSION}|https://bit.ly/2NjdndS]."
99
98
  comment.join("\r\n")
100
99
  end
101
100
 
@@ -28,6 +28,7 @@ module Lazylead
28
28
  # Check that ticket has an attachment.
29
29
  class Attachment < Lazylead::Requirement
30
30
  def passed(issue)
31
+ return false if issue.nil? || issue.attachments.nil?
31
32
  issue.attachments.any? { |a| matches?(a) }
32
33
  end
33
34
 
@@ -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 "requirement"
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 < Requirement
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
@@ -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 "logs"
26
+ require_relative "attachment"
27
+
28
+ module Lazylead
29
+ # Check that ticket has link/reference to log record(s) in another system like ELK, GrayLog, etc.
30
+ # or attachment with plain log file
31
+ class LogsLink < Lazylead::Logs
32
+ def initialize(link)
33
+ super
34
+ @link = link
35
+ end
36
+
37
+ def passed(issue)
38
+ return false if @link.nil? || (@link.is_a?(Array) && @link.empty?)
39
+ super(issue) || link?(issue)
40
+ end
41
+
42
+ # Ensure that ticket has a link to external logs system like ELK, GrayLog, etc.
43
+ def link?(issue)
44
+ return false if issue.description.nil?
45
+ issue.description
46
+ .split("\n")
47
+ .reject(&:blank?)
48
+ .flat_map(&:split)
49
+ .reject(&:blank?)
50
+ .any? do |word|
51
+ @link.is_a?(Array) ? @link.any? { |l| word.start_with? l } : word.start_with?(@link)
52
+ end
53
+ end
54
+ end
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("Recorded internal reproducing results", 5, "Attachments")
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 "Screenshots", score, "Description,Attachments"
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
- @pictures ||= issue.attachments
60
- .select { |a| @ext.include? File.extname(a.filename).downcase }
61
- .map(&:filename)
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/Environment"
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
- "#{issue['environment']}\n#{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) }
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.downcase.gsub(/(\s+|\*|\+)/, "")
42
- detect_tc line, i
43
- detect_ar line, i
44
- detect_er line, i
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
- def detect_tc(line, index)
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
- @tc = index if eql? line, %w[testcase: tc: teststeps: teststeps steps: tcsteps: tc testcases
69
- steps usecase]
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
- def detect_ar(line, index)
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
- @ar = index if starts? line, %w[ar: actualresult: ar= [ar] actualresult]
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
- def detect_er(line, index)
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
- @er = index if starts? line, %w[er: expectedresult: er= [er] expectedresult]
82
- end
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
@@ -47,7 +47,7 @@ module Lazylead
47
47
  end
48
48
 
49
49
  def time
50
- header[2]
50
+ DateTime.parse(header[2]).strftime("%d-%m-%Y %H:%M:%S")
51
51
  end
52
52
 
53
53
  def msg
@@ -23,5 +23,5 @@
23
23
  # OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
25
  module Lazylead
26
- VERSION = "0.9.3"
26
+ VERSION = "0.10.3"
27
27
  end
@@ -98,7 +98,7 @@
98
98
  <a href="<%= user %><%= commit.author %>"><%= commit.author %></a>
99
99
  </div>
100
100
  </td>
101
- <td><%= DateTime.parse(commit.time).strftime("%d-%m-%Y %H:%M:%S") %></td>
101
+ <td><%= commit.time %></td>
102
102
  <td><%= commit.lines[1] %></td>
103
103
  </tr>
104
104
  <% end %>
@@ -64,14 +64,8 @@
64
64
  padding: 36px
65
65
  }
66
66
 
67
- .commit {
68
- min-width: 100%;
69
- border-radius: 3.5px;
70
- overflow: hidden;
71
- display: inline-block;
72
- line-height: 15px;
73
- font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
74
- border: 1px solid #BCC6CC;
67
+ td {
68
+ padding: 2px;
75
69
  }
76
70
 
77
71
  .commit * {
@@ -86,29 +80,37 @@
86
80
  <p>Hi,</p>
87
81
  <p>The following file(s) contain text <code><%= text %></code> in
88
82
  <a href="<%= svn_url %>"><%= svn_url %></a>:</p>
89
- <% entries.each do |commit| %>
90
- <div class="commit">
91
- <p style="background: gainsboro;">
92
- <a href="<%= commit_url %><%= commit.rev %>"><%= commit.msg %></a>
93
- by <a href="<%= user %><%= commit.author %>"><%= commit.author %></a>
94
- at <span style="color: #275a90;"><%= commit.time %></span>
95
- </p>
96
- <% commit.diff(text.split(",")).each do |line| %>
97
- <% if line.start_with?("+++") || line.start_with?("---") %>
98
- <p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
99
- <% elsif text.split(",").any? { |t| line.include? t } %>
100
- <p style="background: #F9F103;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
101
- <% elsif line.start_with?("+") %>
102
- <p style="<%= "background: darkseagreen;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
103
- <% elsif line.start_with?("-") %>
104
- <p style="<%= "background: lightsalmon;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
105
- <% else %>
106
- <p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
107
- <% end %>
108
- <% end %>
109
- </div>
110
- <% end %>
111
- <p>Posted by<a href="https://github.com/dgroup/lazylead">lazylead
112
- v<%= version %></a>.</p>
83
+ <table summary="table with svn commits">
84
+ <tr>
85
+ <th id="rev">rev</th>
86
+ <th id="when">when</th>
87
+ <th id="author">author</th>
88
+ <th id="commit_msg" style="text-align: left">commit</th>
89
+ </tr>
90
+ <% entries.each do |commit| %>
91
+ <tr>
92
+ <td><a href="<%= commit_url %><%= commit.rev %>"><%= commit.rev %></a></td>
93
+ <td><%= commit.time %></td>
94
+ <td><a href="<%= user %><%= commit.author %>"><%= commit.author %></a></td>
95
+ <td>
96
+ <b><p><%= commit.msg %></p></b>
97
+ <% commit.diff(text.split(",")).each do |line| %>
98
+ <% if line.start_with?("+++") || line.start_with?("---") %>
99
+ <p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
100
+ <% elsif text.split(",").any? { |t| line.include? t } %>
101
+ <p style="background: #F9F103;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
102
+ <% elsif line.start_with?("+") %>
103
+ <p style="<%= "background: darkseagreen;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
104
+ <% elsif line.start_with?("-") %>
105
+ <p style="<%= "background: lightsalmon;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
106
+ <% else %>
107
+ <p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
108
+ <% end %>
109
+ <% end %>
110
+ </td>
111
+ </tr>
112
+ <% end %>
113
+ </table>
114
+ <p>Posted by<a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.</p>
113
115
  </body>
114
116
  </html>
data/readme.md CHANGED
@@ -177,7 +177,6 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
177
177
  ### How to contribute?
178
178
 
179
179
  <a href="https://www.buymeacoffee.com/lazylead" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
180
- [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YLV7Z9UUM3AJL)
181
180
 
182
181
  [Pull requests](http://www.elegantobjects.org/#principles) are welcome! Don't forget to add your name to contribution section and run this, beforehand:
183
182
  ```ruby
@@ -0,0 +1,50 @@
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/logs_link"
27
+
28
+ module Lazylead
29
+ class LogsLinkTest < Lazylead::Test
30
+ test "log file is present" do
31
+ assert LogsLink.new("https://mygraylog.com/log#5").passed(
32
+ OpenStruct.new(
33
+ attachments: [OpenStruct.new(attrs: { "size" => 10_241, "filename" => "catalina.log" })]
34
+ )
35
+ )
36
+ end
37
+
38
+ test "log file is absent but description has log reference" do
39
+ assert LogsLink.new("https://mygraylog.com").passed(
40
+ OpenStruct.new(description: "Here is the log for current ticket https://mygraylog.com/log#5")
41
+ )
42
+ end
43
+
44
+ test "log file is absent and link is absent" do
45
+ refute LogsLink.new("https://mygraylog.com").passed(
46
+ OpenStruct.new(attachments: [])
47
+ )
48
+ end
49
+ end
50
+ end
@@ -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
@@ -291,6 +291,22 @@ module Lazylead
291
291
  *{color:#DE10AA}Actual Result:{color}* = YYYY"
292
292
  end
293
293
 
294
+ test "TC with prerequisites" do
295
+ assert testcase? "{color:#0747a6}+*Pre-requisites and Steps:*+{color}
296
+ # Step 1
297
+ # Step ..
298
+ # Step N
299
+ *{color:#00673A}Expected result:{color}* = XXXX
300
+ *{color:#DE10AA}Actual Result:{color}* = YYYY"
301
+ end
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
+
294
310
  # ensure that issue description has a test case, AR and ER
295
311
  def testcase?(desc)
296
312
  Testcase.new.passed(OpenStruct.new(description: desc))
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.9.3
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-05-25 00:00:00.000000000 Z
11
+ date: 2021-07-23 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.4.2
61
+ version: 1.5.1
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.4.2
68
+ version: 1.5.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: get_process_mem
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -212,42 +212,42 @@ dependencies:
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 2.3.0
215
+ version: 2.3.2
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 2.3.0
222
+ version: 2.3.2
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: rufus-scheduler
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - '='
228
228
  - !ruby/object:Gem::Version
229
- version: 3.7.0
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.7.0
236
+ version: 3.8.0
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: slop
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - '='
242
242
  - !ruby/object:Gem::Version
243
- version: 4.9.0
243
+ version: 4.9.1
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - '='
249
249
  - !ruby/object:Gem::Version
250
- version: 4.9.0
250
+ version: 4.9.1
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: sqlite3
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -366,14 +366,14 @@ dependencies:
366
366
  requirements:
367
367
  - - '='
368
368
  - !ruby/object:Gem::Version
369
- version: 2.17.0
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.17.0
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.3
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.3
474
+ version: 13.0.6
475
475
  - !ruby/object:Gem::Dependency
476
476
  name: random-port
477
477
  requirement: !ruby/object:Gem::Requirement
@@ -492,84 +492,84 @@ dependencies:
492
492
  requirements:
493
493
  - - '='
494
494
  - !ruby/object:Gem::Version
495
- version: 6.3.1
495
+ version: 6.3.2
496
496
  type: :development
497
497
  prerelease: false
498
498
  version_requirements: !ruby/object:Gem::Requirement
499
499
  requirements:
500
500
  - - '='
501
501
  - !ruby/object:Gem::Version
502
- version: 6.3.1
502
+ version: 6.3.2
503
503
  - !ruby/object:Gem::Dependency
504
504
  name: rubocop
505
505
  requirement: !ruby/object:Gem::Requirement
506
506
  requirements:
507
507
  - - '='
508
508
  - !ruby/object:Gem::Version
509
- version: 1.15.0
509
+ version: 1.18.3
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.15.0
516
+ version: 1.18.3
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.12.1
523
+ version: 0.14.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.12.1
530
+ version: 0.14.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.3
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.3
544
+ version: 1.11.4
545
545
  - !ruby/object:Gem::Dependency
546
546
  name: rubocop-rake
547
547
  requirement: !ruby/object:Gem::Requirement
548
548
  requirements:
549
549
  - - '='
550
550
  - !ruby/object:Gem::Version
551
- version: 0.5.1
551
+ version: 0.6.0
552
552
  type: :development
553
553
  prerelease: false
554
554
  version_requirements: !ruby/object:Gem::Requirement
555
555
  requirements:
556
556
  - - '='
557
557
  - !ruby/object:Gem::Version
558
- version: 0.5.1
558
+ version: 0.6.0
559
559
  - !ruby/object:Gem::Dependency
560
560
  name: rubocop-rspec
561
561
  requirement: !ruby/object:Gem::Requirement
562
562
  requirements:
563
563
  - - '='
564
564
  - !ruby/object:Gem::Version
565
- version: 2.3.0
565
+ version: 2.4.0
566
566
  type: :development
567
567
  prerelease: false
568
568
  version_requirements: !ruby/object:Gem::Requirement
569
569
  requirements:
570
570
  - - '='
571
571
  - !ruby/object:Gem::Version
572
- version: 2.3.0
572
+ version: 2.4.0
573
573
  - !ruby/object:Gem::Dependency
574
574
  name: sqlint
575
575
  requirement: !ruby/object:Gem::Requirement
@@ -694,8 +694,11 @@ files:
694
694
  - lib/lazylead/task/accuracy/attachment.rb
695
695
  - lib/lazylead/task/accuracy/environment.rb
696
696
  - lib/lazylead/task/accuracy/logs.rb
697
+ - lib/lazylead/task/accuracy/logs_link.rb
697
698
  - lib/lazylead/task/accuracy/onlyll.rb
698
699
  - lib/lazylead/task/accuracy/records.rb
700
+ - lib/lazylead/task/accuracy/records_link.rb
701
+ - lib/lazylead/task/accuracy/required.rb
699
702
  - lib/lazylead/task/accuracy/requirement.rb
700
703
  - lib/lazylead/task/accuracy/screenshots.rb
701
704
  - lib/lazylead/task/accuracy/servers.rb
@@ -752,8 +755,10 @@ files:
752
755
  - test/lazylead/task/accuracy/affected_build_test.rb
753
756
  - test/lazylead/task/accuracy/attachment_test.rb
754
757
  - test/lazylead/task/accuracy/environment_test.rb
758
+ - test/lazylead/task/accuracy/logs_link_test.rb
755
759
  - test/lazylead/task/accuracy/logs_test.rb
756
760
  - test/lazylead/task/accuracy/onlyll_test.rb
761
+ - test/lazylead/task/accuracy/records_llink_test.rb
757
762
  - test/lazylead/task/accuracy/records_test.rb
758
763
  - test/lazylead/task/accuracy/score_test.rb
759
764
  - test/lazylead/task/accuracy/screenshots_test.rb
@@ -788,7 +793,7 @@ licenses:
788
793
  - MIT
789
794
  metadata: {}
790
795
  post_install_message: |-
791
- Thanks for installing Lazylead v0.9.3!
796
+ Thanks for installing Lazylead v0.10.3!
792
797
  Read our blog posts: https://lazylead.org
793
798
  Stay in touch with the community in Telegram: https://t.me/lazylead
794
799
  Follow us on Twitter: https://twitter.com/lazylead
@@ -829,8 +834,10 @@ test_files:
829
834
  - test/lazylead/task/accuracy/affected_build_test.rb
830
835
  - test/lazylead/task/accuracy/attachment_test.rb
831
836
  - test/lazylead/task/accuracy/environment_test.rb
837
+ - test/lazylead/task/accuracy/logs_link_test.rb
832
838
  - test/lazylead/task/accuracy/logs_test.rb
833
839
  - test/lazylead/task/accuracy/onlyll_test.rb
840
+ - test/lazylead/task/accuracy/records_llink_test.rb
834
841
  - test/lazylead/task/accuracy/records_test.rb
835
842
  - test/lazylead/task/accuracy/score_test.rb
836
843
  - test/lazylead/task/accuracy/screenshots_test.rb