lazylead 0.10.3 → 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/lazylead.gemspec +5 -5
- data/lib/lazylead/schedule.rb +5 -1
- data/lib/lazylead/task/accuracy/logs_link.rb +2 -2
- data/lib/lazylead/task/accuracy/wiki_url.rb +46 -0
- data/lib/lazylead/version.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_url_test.rb +54 -0
- data/test/sqlite_test.rb +1 -1
- metadata +12 -9
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/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"
|
@@ -90,8 +90,8 @@ tasks instead of solving technical problems."
|
|
90
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.
|
93
|
+
s.add_development_dependency "rubocop", "1.18.4"
|
94
|
+
s.add_development_dependency "rubocop-minitest", "0.15.0"
|
95
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"
|
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}"
|
@@ -30,7 +30,7 @@ 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
|
|
@@ -48,7 +48,7 @@ module Lazylead
|
|
48
48
|
.flat_map(&:split)
|
49
49
|
.reject(&:blank?)
|
50
50
|
.any? do |word|
|
51
|
-
@link.is_a?(Array) ? @link.any? { |l| word.
|
51
|
+
@link.is_a?(Array) ? @link.any? { |l| word.include? l } : word.include?(@link)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
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,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
|
@@ -506,28 +506,28 @@ 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
|
@@ -705,6 +705,7 @@ files:
|
|
705
705
|
- lib/lazylead/task/accuracy/stacktrace.rb
|
706
706
|
- lib/lazylead/task/accuracy/testcase.rb
|
707
707
|
- lib/lazylead/task/accuracy/wiki.rb
|
708
|
+
- lib/lazylead/task/accuracy/wiki_url.rb
|
708
709
|
- lib/lazylead/task/alert/alert.rb
|
709
710
|
- lib/lazylead/task/alert/alertif.rb
|
710
711
|
- lib/lazylead/task/alert/changed_to.rb
|
@@ -766,6 +767,7 @@ files:
|
|
766
767
|
- test/lazylead/task/accuracy/stacktrace_test.rb
|
767
768
|
- test/lazylead/task/accuracy/testcase_test.rb
|
768
769
|
- test/lazylead/task/accuracy/wiki_test.rb
|
770
|
+
- test/lazylead/task/accuracy/wiki_url_test.rb
|
769
771
|
- test/lazylead/task/alert/alertif_test.rb
|
770
772
|
- test/lazylead/task/alert/assignee_alert_test.rb
|
771
773
|
- test/lazylead/task/alert/changed_to_test.rb
|
@@ -793,7 +795,7 @@ licenses:
|
|
793
795
|
- MIT
|
794
796
|
metadata: {}
|
795
797
|
post_install_message: |-
|
796
|
-
Thanks for installing Lazylead v0.10.
|
798
|
+
Thanks for installing Lazylead v0.10.4!
|
797
799
|
Read our blog posts: https://lazylead.org
|
798
800
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
799
801
|
Follow us on Twitter: https://twitter.com/lazylead
|
@@ -845,6 +847,7 @@ test_files:
|
|
845
847
|
- test/lazylead/task/accuracy/stacktrace_test.rb
|
846
848
|
- test/lazylead/task/accuracy/testcase_test.rb
|
847
849
|
- test/lazylead/task/accuracy/wiki_test.rb
|
850
|
+
- test/lazylead/task/accuracy/wiki_url_test.rb
|
848
851
|
- test/lazylead/task/alert/alertif_test.rb
|
849
852
|
- test/lazylead/task/alert/assignee_alert_test.rb
|
850
853
|
- test/lazylead/task/alert/changed_to_test.rb
|