lazylead 0.4.0 → 0.4.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/.docs/accuracy.md +2 -2
- data/.github/dependabot.yml +6 -0
- data/lazylead.gemspec +3 -2
- data/lib/lazylead/model.rb +2 -2
- data/lib/lazylead/opts.rb +1 -1
- data/lib/lazylead/task/touch.rb +7 -5
- data/lib/lazylead/version.rb +1 -1
- data/lib/messages/svn_touch.erb +1 -1
- data/test/lazylead/opts_test.rb +4 -0
- data/test/lazylead/task/touch_test.rb +20 -22
- data/test/test.rb +9 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd5d4e1e8d89064bfa868e1c088166d3a42b4c155fde98246979a262854d15b0
|
4
|
+
data.tar.gz: fa0d3aefc186740945b1da68318aebe1d597d7b88f70b079644058f5e201126b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b018d644048900e19d03bbf8b24847a0b617ba74721f213743687b90d1cc2078ca84f35af29c2660b73207e5fc5b86d4b9e45d3394d9c095645198400602dfe
|
7
|
+
data.tar.gz: 842cf53e33f2376891d80dcd7f7802f2a27a37bf26ea42a55c88d4b53925b6a161b3962cbc7df0467c2c1049532db8029977c78776340e938cc20f757f5d89b3
|
data/.docs/accuracy.md
CHANGED
@@ -73,7 +73,7 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
73
73
|
'{
|
74
74
|
"jql": "filter=222",
|
75
75
|
"to": "lead@fake.com",
|
76
|
-
"rules": "Lazylead::
|
76
|
+
"rules": "Lazylead::AffectedBuild",
|
77
77
|
"colors": "{ "0": "#FF4F33", "35": "#FF9F33", "57": "#19DD1E", "90": "#0FA81A" }",
|
78
78
|
"docs": "https://github.com/dgroup/lazylead/blob/master/.github/ISSUE_TEMPLATE/bug_report.md",
|
79
79
|
"max_results": "200",
|
@@ -104,4 +104,4 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
104
104
|
|
105
105
|
#### How can I add my own rules?
|
106
106
|
The custom rules should extend `Lazylead::Requirement` class and placed it to the `lib/lazylead/task/accuracy` folder.
|
107
|
-
After that, you need to mention your custom rules in `rules` option in the column `properties` from `tasks` table
|
107
|
+
After that, you need to mention your custom rules in `rules` option in the column `properties` from `tasks` table
|
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.4.
|
35
|
+
s.version = "0.4.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.4.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.4.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
|
@@ -82,6 +82,7 @@ tasks instead of solving technical problems."
|
|
82
82
|
s.add_development_dependency "minitest-fail-fast", "0.1.0"
|
83
83
|
s.add_development_dependency "minitest-hooks", "1.5.0"
|
84
84
|
s.add_development_dependency "minitest-reporters", "1.3.6"
|
85
|
+
s.add_development_dependency "net-ping", "2.0.8"
|
85
86
|
s.add_development_dependency "rake", "12.3.3"
|
86
87
|
s.add_development_dependency "random-port", "0.3.1"
|
87
88
|
s.add_development_dependency "rdoc", "6.1.1"
|
data/lib/lazylead/model.rb
CHANGED
@@ -98,7 +98,7 @@ module Lazylead
|
|
98
98
|
sys = system.connect
|
99
99
|
opts = props
|
100
100
|
opts = detect_cc(sys) if opts.key? "cc"
|
101
|
-
action.constantize.new
|
101
|
+
action.constantize.new.run(sys, postman, opts)
|
102
102
|
end
|
103
103
|
|
104
104
|
def detect_cc(sys)
|
@@ -143,7 +143,7 @@ module Lazylead
|
|
143
143
|
@log.debug "'#{name}' is started."
|
144
144
|
@log.warn "No postman, stub is used." unless props.key? "postman"
|
145
145
|
@log.warn "No team." if team.nil?
|
146
|
-
@orig.exec
|
146
|
+
@orig.exec
|
147
147
|
@log.debug "'#{name}' is completed"
|
148
148
|
rescue StandardError => e
|
149
149
|
msg = <<~MSG
|
data/lib/lazylead/opts.rb
CHANGED
@@ -33,7 +33,7 @@ module Lazylead
|
|
33
33
|
# License:: MIT
|
34
34
|
class Opts
|
35
35
|
extend Forwardable
|
36
|
-
def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :merge
|
36
|
+
def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :merge, :except
|
37
37
|
|
38
38
|
def initialize(origin = {})
|
39
39
|
@origin = origin
|
data/lib/lazylead/task/touch.rb
CHANGED
@@ -58,17 +58,19 @@ module Lazylead
|
|
58
58
|
|
59
59
|
# Return all svn commits for particular date range in repo
|
60
60
|
def svn_log(opts)
|
61
|
-
url = opts["svn_url"]
|
62
|
-
usr = decrypt(opts["svn_user"])
|
63
|
-
psw = decrypt(opts["svn_password"])
|
64
61
|
now = if opts.key? "now"
|
65
62
|
DateTime.parse(opts["now"])
|
66
63
|
else
|
67
64
|
DateTime.now
|
68
65
|
end
|
69
66
|
start = (now.to_time - opts["period"].to_i).to_datetime
|
70
|
-
|
71
|
-
|
67
|
+
cmd = [
|
68
|
+
"svn log --no-auth-cache",
|
69
|
+
"--username #{decrypt(opts['svn_user'])}",
|
70
|
+
"--password #{decrypt(opts['svn_password'])}",
|
71
|
+
"--xml -v -r {#{start}}:{#{now}} #{opts['svn_url']}"
|
72
|
+
]
|
73
|
+
raw = `#{cmd.join(" ")}`
|
72
74
|
Nokogiri.XML(raw, nil, "UTF-8")
|
73
75
|
end
|
74
76
|
|
data/lib/lazylead/version.rb
CHANGED
data/lib/messages/svn_touch.erb
CHANGED
data/test/lazylead/opts_test.rb
CHANGED
@@ -25,39 +25,37 @@
|
|
25
25
|
require "mail"
|
26
26
|
require_relative "../../test"
|
27
27
|
require_relative "../../../lib/lazylead/smtp"
|
28
|
-
|
28
|
+
require_relative "../../../lib/lazylead/opts"
|
29
29
|
require_relative "../../../lib/lazylead/postman"
|
30
30
|
require_relative "../../../lib/lazylead/task/touch"
|
31
31
|
|
32
32
|
module Lazylead
|
33
33
|
class SvnTouchTest < Lazylead::Test
|
34
|
-
# @todo #/DEV Find stable svn repo which can be used for stable test, for
|
35
|
-
# now only floating repo used for testing locally. Also, create a new
|
36
|
-
# method "ping" which can be used during tests like
|
37
|
-
# skip "No connection available to svn repo" unless ping("https://svn.com")
|
38
34
|
test "important files changed in svn repo" do
|
39
|
-
skip "No svn credentials provided" unless env? "
|
40
|
-
"
|
41
|
-
|
35
|
+
skip "No svn credentials provided" unless env? "svn_touch_user",
|
36
|
+
"svn_touch_password"
|
37
|
+
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
|
42
38
|
Lazylead::Smtp.new.enable
|
43
39
|
Task::SvnTouch.new.run(
|
44
40
|
nil,
|
45
41
|
Postman.new,
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
42
|
+
Opts.new(
|
43
|
+
"svn_url" => "https://svn.riouxsvn.com/touch4ll",
|
44
|
+
"svn_user" => ENV["svn_touch_user"],
|
45
|
+
"svn_password" => ENV["svn_touch_password"],
|
46
|
+
"commit_url" => "https://view.commit.com?rev=",
|
47
|
+
"user" => "https://user.com?id=",
|
48
|
+
"to" => "lead@fake.com",
|
49
|
+
"from" => "ll@fake.com",
|
50
|
+
"now" => "2020-08-17T00:00:00+01:00",
|
51
|
+
"period" => "864000",
|
52
|
+
"files" => "189.md,absent.txt",
|
53
|
+
"subject" => "[SVN] Important files have been changed!",
|
54
|
+
"template" => "lib/messages/svn_touch.erb"
|
55
|
+
)
|
58
56
|
)
|
59
|
-
assert_email "[SVN]
|
60
|
-
%w[
|
57
|
+
assert_email "[SVN] Important files have been changed!",
|
58
|
+
%w[3 dgroup /189.md Add\ description\ for\ 189\ issue]
|
61
59
|
end
|
62
60
|
end
|
63
61
|
end
|
data/test/test.rb
CHANGED
@@ -110,5 +110,14 @@ module Lazylead
|
|
110
110
|
.first
|
111
111
|
.body.parts.first.body.raw_source
|
112
112
|
end
|
113
|
+
|
114
|
+
# Ping remote host
|
115
|
+
# https://github.com/eitoball/net-ping
|
116
|
+
# https://stackoverflow.com/a/35508446/6916890
|
117
|
+
# https://rubygems.org/gems/net-ping/versions/2.0.8
|
118
|
+
def ping?(host)
|
119
|
+
require "net/ping"
|
120
|
+
Net::Ping::External.new(host).ping?
|
121
|
+
end
|
113
122
|
end
|
114
123
|
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.4.
|
4
|
+
version: 0.4.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: 2020-08-
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -388,6 +388,20 @@ dependencies:
|
|
388
388
|
- - '='
|
389
389
|
- !ruby/object:Gem::Version
|
390
390
|
version: 1.3.6
|
391
|
+
- !ruby/object:Gem::Dependency
|
392
|
+
name: net-ping
|
393
|
+
requirement: !ruby/object:Gem::Requirement
|
394
|
+
requirements:
|
395
|
+
- - '='
|
396
|
+
- !ruby/object:Gem::Version
|
397
|
+
version: 2.0.8
|
398
|
+
type: :development
|
399
|
+
prerelease: false
|
400
|
+
version_requirements: !ruby/object:Gem::Requirement
|
401
|
+
requirements:
|
402
|
+
- - '='
|
403
|
+
- !ruby/object:Gem::Version
|
404
|
+
version: 2.0.8
|
391
405
|
- !ruby/object:Gem::Dependency
|
392
406
|
name: rake
|
393
407
|
requirement: !ruby/object:Gem::Requirement
|
@@ -553,6 +567,7 @@ files:
|
|
553
567
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
554
568
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
555
569
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
570
|
+
- ".github/dependabot.yml"
|
556
571
|
- ".github/tasks.yml"
|
557
572
|
- ".github/trello.md"
|
558
573
|
- ".gitignore"
|
@@ -643,7 +658,7 @@ licenses:
|
|
643
658
|
- MIT
|
644
659
|
metadata: {}
|
645
660
|
post_install_message: |-
|
646
|
-
Thanks for installing Lazylead v0.4.
|
661
|
+
Thanks for installing Lazylead v0.4.3!
|
647
662
|
Read our blog posts: https://lazylead.org
|
648
663
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
649
664
|
Follow us on Twitter: https://twitter.com/lazylead
|