lazylead 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.docker/docker-compose.yml +9 -10
- data/Rakefile +1 -1
- data/lazylead.gemspec +8 -7
- data/lib/lazylead/postman.rb +60 -0
- data/lib/lazylead/system/allocations.md +1 -0
- data/lib/lazylead/system/jira.rb +2 -2
- data/lib/lazylead/task/accuracy/accuracy.rb +1 -1
- data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
- data/lib/lazylead/version.rb +1 -1
- data/readme.md +29 -34
- data/test/lazylead/postman_test.rb +32 -0
- data/test/lazylead/task/accuracy/accuracy_test.rb +25 -0
- metadata +27 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc491194d58199a3949bbf63fb5dc6ea8a303dede1c5b646410fad4335e3363d
|
4
|
+
data.tar.gz: a451b8e278fa971abb3bd7453ab1d907d94a803a3fa3e42aca87dc7ab24687e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94c13ca434970b74119f1a8490110167e72cd384350f84fed34165af17062327ce0259696aa6b5f3e38a232595d169865f7f9231b995f430eaae319c0f3c15c1
|
7
|
+
data.tar.gz: bfb59ad495bf98f793400b0347951850cf556dfb055460bd6ec01e02947c6834c752343ada126f18f6c30dbe524ac51c004164082c455ad18f2add1f2e6d02ae
|
data/.docker/docker-compose.yml
CHANGED
@@ -5,19 +5,18 @@ services:
|
|
5
5
|
|
6
6
|
lazylead:
|
7
7
|
image: dgroup/lazylead:latest
|
8
|
-
container_name:
|
8
|
+
container_name: ll
|
9
9
|
mem_limit: 128m
|
10
10
|
build:
|
11
11
|
context: ../
|
12
12
|
dockerfile: .docker/Dockerfile
|
13
13
|
args:
|
14
|
-
release_tags: "latest 0.1.
|
15
|
-
version: "0.1.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- 1282:1282 # JMX connection for jvisualvm debug
|
14
|
+
release_tags: "latest 0.1.x"
|
15
|
+
version: "0.1.x"
|
16
|
+
environment:
|
17
|
+
jira_url: https://jira.spring.io
|
18
|
+
file_postman_dir: "logs"
|
20
19
|
volumes:
|
21
|
-
- .local
|
22
|
-
- .local
|
23
|
-
entrypoint: bin/lazylead --trace --verbose --log-file /lazylead/logs/ll{{.%Y-%m-%dT%H:%M:%S}}.log
|
20
|
+
- .local:/lazylead/db
|
21
|
+
- .local:/lazylead/logs
|
22
|
+
entrypoint: bin/lazylead --trace --verbose --log-file /lazylead/logs/ll{{.%Y-%m-%dT%H:%M:%S}}.log --sqlite db/ll.db
|
data/Rakefile
CHANGED
@@ -94,7 +94,7 @@ desc "Validate all XML/XSL/XSD/HTML files for formatting"
|
|
94
94
|
Xcop::RakeTask.new :xcop do |task|
|
95
95
|
task.license = "license.txt"
|
96
96
|
task.includes = %w[**/*.xml **/*.xsl **/*.xsd **/*.html]
|
97
|
-
task.excludes = %w[target/**/* coverage/**/* wp/**/*]
|
97
|
+
task.excludes = %w[target/**/* coverage/**/* wp/**/* test/resources/*]
|
98
98
|
end
|
99
99
|
|
100
100
|
# @todo #/DEV Enable rule "Checks SQL against the ANSI syntax" fully.
|
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.11.
|
35
|
+
s.version = "0.11.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.11.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.11.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.8.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"
|
@@ -77,9 +77,10 @@ tasks instead of solving technical problems."
|
|
77
77
|
s.add_runtime_dependency "tempfile", "0.1.1"
|
78
78
|
s.add_runtime_dependency "tilt", "2.0.10"
|
79
79
|
s.add_runtime_dependency "tzinfo", "2.0.4"
|
80
|
-
s.add_runtime_dependency "tzinfo-data", "1.2021.
|
80
|
+
s.add_runtime_dependency "tzinfo-data", "1.2021.2"
|
81
81
|
s.add_runtime_dependency "vcs4sql", "0.1.1"
|
82
82
|
s.add_runtime_dependency "viewpoint", "1.1.1"
|
83
|
+
s.add_runtime_dependency "zaru", "0.3.0"
|
83
84
|
s.add_development_dependency "codecov", "0.6.0"
|
84
85
|
s.add_development_dependency "guard", "2.18.0"
|
85
86
|
s.add_development_dependency "guard-minitest", "2.4.6"
|
@@ -91,11 +92,11 @@ tasks instead of solving technical problems."
|
|
91
92
|
s.add_development_dependency "rake", "13.0.6"
|
92
93
|
s.add_development_dependency "random-port", "0.5.1"
|
93
94
|
s.add_development_dependency "rdoc", "6.3.2"
|
94
|
-
s.add_development_dependency "rubocop", "1.
|
95
|
-
s.add_development_dependency "rubocop-minitest", "0.15.
|
95
|
+
s.add_development_dependency "rubocop", "1.22.0"
|
96
|
+
s.add_development_dependency "rubocop-minitest", "0.15.1"
|
96
97
|
s.add_development_dependency "rubocop-performance", "1.11.5"
|
97
98
|
s.add_development_dependency "rubocop-rake", "0.6.0"
|
98
|
-
s.add_development_dependency "rubocop-rspec", "2.
|
99
|
+
s.add_development_dependency "rubocop-rspec", "2.5.0"
|
99
100
|
s.add_development_dependency "ruby-prof", "1.4.3"
|
100
101
|
s.add_development_dependency "sqlint", "0.2.0"
|
101
102
|
s.add_development_dependency "tempfile", "0.1.1"
|
data/lib/lazylead/postman.rb
CHANGED
@@ -22,6 +22,8 @@
|
|
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 "zaru"
|
26
|
+
require "colorize"
|
25
27
|
require_relative "log"
|
26
28
|
require_relative "email"
|
27
29
|
require_relative "version"
|
@@ -76,4 +78,62 @@ module Lazylead
|
|
76
78
|
mail
|
77
79
|
end
|
78
80
|
end
|
81
|
+
|
82
|
+
#
|
83
|
+
# A postman that sends emails to the std out.
|
84
|
+
#
|
85
|
+
class StdoutPostman
|
86
|
+
def initialize(log = Log.new)
|
87
|
+
@log = log
|
88
|
+
end
|
89
|
+
|
90
|
+
# Send an email.
|
91
|
+
# :opts :: the mail configuration like to, from, cc, subject, template.
|
92
|
+
def send(opts)
|
93
|
+
if opts.msg_to.empty?
|
94
|
+
p "Email can't be sent as 'to' is empty, more: '#{opts}'"
|
95
|
+
else
|
96
|
+
p "to=#{opts.msg_to}, from=#{opts.msg_from}, cc=#{opts.msg_cc}, " \
|
97
|
+
"subject=#{opts['subject']}, attachments=#{opts.msg_attachments}, body=#{opts.msg_body}"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# A postman that sends emails to the html file.
|
104
|
+
# Use ENV['file_postman_dir'] to set a root directory.
|
105
|
+
# By default
|
106
|
+
# ENV['file_postman_dir'] = "."
|
107
|
+
#
|
108
|
+
class FilePostman
|
109
|
+
def initialize(log = Log.new, env = ENV.to_h)
|
110
|
+
@log = log
|
111
|
+
@env = env
|
112
|
+
end
|
113
|
+
|
114
|
+
# Send an email.
|
115
|
+
# :opts :: the mail configuration like to, from, cc, subject, template.
|
116
|
+
def send(opts)
|
117
|
+
if opts.msg_to.empty?
|
118
|
+
@log.warn "ll-015: Email can't be sent as 'to' is empty, more: '#{opts}'"
|
119
|
+
else
|
120
|
+
file = filename(opts)
|
121
|
+
File.open(file, "w") do |f|
|
122
|
+
f.write "<!-- to=#{opts.msg_to}, from=#{opts.msg_from}, cc=#{opts.msg_cc}, " \
|
123
|
+
"subject=#{opts['subject']}, attachments=#{opts.msg_attachments} -->"
|
124
|
+
f.write opts.msg_body
|
125
|
+
end
|
126
|
+
@log.debug "Mail '#{opts['subject']}' for #{opts.msg_to} sent to " \
|
127
|
+
"'#{file.to_s.colorize(:light_blue)}'"
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Assemble file name where email to be print
|
132
|
+
def filename(opts)
|
133
|
+
File.join(
|
134
|
+
@env.fetch("file_postman_dir", "."),
|
135
|
+
Zaru.sanitize!("#{Time.now.nsec}-#{opts['subject']}.html")
|
136
|
+
)
|
137
|
+
end
|
138
|
+
end
|
79
139
|
end
|
data/lib/lazylead/system/jira.rb
CHANGED
@@ -349,7 +349,7 @@ module Lazylead
|
|
349
349
|
extend Forwardable
|
350
350
|
def_delegators :@jira, :issues, :raw, :max_results, :limit
|
351
351
|
|
352
|
-
def initialize(url, path = "", log = Log.new)
|
352
|
+
def initialize(url, salt = NoSalt.new, path = "", log = Log.new)
|
353
353
|
@jira = Jira.new(
|
354
354
|
{
|
355
355
|
username: nil,
|
@@ -357,7 +357,7 @@ module Lazylead
|
|
357
357
|
site: url,
|
358
358
|
context_path: path
|
359
359
|
},
|
360
|
-
|
360
|
+
salt,
|
361
361
|
log
|
362
362
|
)
|
363
363
|
end
|
@@ -82,7 +82,7 @@ module Lazylead
|
|
82
82
|
# Accuracy is a percentage between current score and maximum possible value.
|
83
83
|
def evaluate(digits = 2)
|
84
84
|
@score = @opts[:rules].select { |r| r.passed(@issue) }.sum(&:score)
|
85
|
-
@accuracy = (score / @opts[:total] * 100).round(digits)
|
85
|
+
@accuracy = (@score.to_f / @opts[:total] * 100).round(digits)
|
86
86
|
self
|
87
87
|
end
|
88
88
|
|
@@ -51,7 +51,7 @@ module Lazylead
|
|
51
51
|
.to_enum(:scan, /!.+!/)
|
52
52
|
.map { Regexp.last_match }
|
53
53
|
.map(&:to_s)
|
54
|
-
.
|
54
|
+
.grep_v(%r{(http|https)://.*/images/icons/link_attachment.*.gif})
|
55
55
|
end
|
56
56
|
|
57
57
|
# Detect all pictures in ticket attachments and returns an array with file names.
|
data/lib/lazylead/version.rb
CHANGED
data/readme.md
CHANGED
@@ -19,8 +19,6 @@
|
|
19
19
|
[![DevOps By Rultor.com](http://www.rultor.com/b/dgroup/lazylead)](http://www.rultor.com/p/dgroup/lazylead)
|
20
20
|
[![EO badge](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org/#principles)
|
21
21
|
|
22
|
-
⚠️ We're still in a very early alpha version, the API may change frequently until we release version `1.0`.
|
23
|
-
|
24
22
|
### Overview
|
25
23
|
Ticketing systems (Github, Jira, etc.) are strongly integrated into our processes and everyone understands their necessity. As soon as a developer becomes a lead/technical manager, he or she faces a set of routine tasks that are related to ticketing work. On large projects this becomes a problem, more and more you spend time running around on dashboards and tickets, looking for incorrect deviations in tickets and performing routine tasks instead of solving technical problems.
|
26
24
|
|
@@ -28,35 +26,35 @@ The idea of automatic management is not new, for example [Zerocracy](https://www
|
|
28
26
|
I like this idea, but large companies/projects are not ready yet for such a decisive breakthrough and need step-by-step solutions such as [lazylead](https://github.com/dgroup/lazylead).
|
29
27
|
I think you remember how [static code analysis](https://en.wikipedia.org/wiki/Static_program_analysis) treated at in the past; today we have a huge toolkit (pmd, checkstyle, qulice, rubocop, peon, etc) for each language that allows you to avoid routine issues and remove from the code reviewer the unnecessary load.
|
30
28
|
|
31
|
-
Join our telegram
|
32
|
-
|
33
|
-
| Daily annoying task | Jira | Github | Trello | SVN |
|
34
|
-
| :---------------------------------------------------------------------------------- | :---: | :----: | :----: | :----: |
|
35
|
-
| [Notify ticket's assignee](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
36
|
-
| [Notify ticket's reporter](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
37
|
-
| [Notify ticket's manager](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
38
|
-
| [Notify about illegal "Fix Version" modification](lib/lazylead/task/fix_version.rb) | ✅ | ❌ | ❌ | ❌ |
|
39
|
-
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
40
|
-
| [Propagate some fields from parent ticket into sub-tasks](.docs/propagate_down.md) | ✅ | ❌ | ❌ | ❌ |
|
41
|
-
| [Evaluate the ticket formatting accuracy](.docs/accuracy.md) | ✅ | ⌛ | ⌛ | ❌ |
|
42
|
-
| Print the current capacity of team into newly created tasks | ⌛ | ⌛ | ⌛ | ❌ |
|
43
|
-
| Create/retrofit the defect automatically into latest release | ⌛ | ⌛ | ❌ | ❌ |
|
44
|
-
| [Notify about expired(ing) due dates](.docs/duedate_expired.md) | ✅ | ❌ | ⌛ | ❌ |
|
45
|
-
| Notify about absent original estimations | ⌛ | ⌛ | ⌛ | ❌ |
|
46
|
-
| Notify about 'Hot potato' tickets | ⌛ | ⌛ | ⌛ | ❌ |
|
47
|
-
| Notify about long live tickets (aging) | ⌛ | ⌛ | ⌛ | ❌ |
|
48
|
-
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ | ❌ |
|
49
|
-
| Propogate fields from parent tickets to sub-tasks | ✅ | ⌛ | ⌛ | ❌ |
|
50
|
-
| Notify about tickets without comments with expected text | ✅ | ⌛ | ⌛ | ❌ |
|
51
|
-
| [Notify about team loading (no tasks on teammates)](lib/lazylead/task/loading.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
52
|
-
| Notify about tickets matches predefined multiple conditions | ✅ | ⌛ | ⌛ | ❌ |
|
53
|
-
| Link automatically the ticket and Confluence page if link found in ticket's comments/description | ✅ | ⌛ | ⌛ | ❌ |
|
54
|
-
| Notify about tickets assigned to your team members not by effective managers| ✅ | ⌛ | ⌛ | ❌ |
|
55
|
-
| Notify about modifications of important files in VCS | ❌ | ⌛ | ❌ | ✅ |
|
56
|
-
| Notify about diff changes for past X period in VCS | ❌ | ⌛ | ❌ | ✅ |
|
57
|
-
| Notify about changes with some text for past X period in VCS | ❌ | ⌛ | ❌ | ✅ |
|
58
|
-
| [Notify when someone outside of your team changed the due date on tickets for your team](lib/lazylead/task/micromanager.rb)| ✅ | ⌛ | ❌ | ❌ |
|
59
|
-
| [Notify when someone outside of your team assigned a ticket directly to the developer](lib/lazylead/task/assignment.rb)| ✅ | ⌛ | ❌ | ❌ |
|
29
|
+
Join our telegram chat [lazylead](https://t.me/lazyleads) for discussions.
|
30
|
+
|
31
|
+
| Daily annoying task | Jira | Github | Trello | SVN | Git |
|
32
|
+
| :---------------------------------------------------------------------------------- | :---: | :----: | :----: | :----: | :----: |
|
33
|
+
| [Notify ticket's assignee](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
34
|
+
| [Notify ticket's reporter](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
35
|
+
| [Notify ticket's manager](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
36
|
+
| [Notify about illegal "Fix Version" modification](lib/lazylead/task/fix_version.rb) | ✅ | ❌ | ❌ | ❌ | ❌ |
|
37
|
+
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
38
|
+
| [Propagate some fields from parent ticket into sub-tasks](.docs/propagate_down.md) | ✅ | ❌ | ❌ | ❌ | ❌ |
|
39
|
+
| [Evaluate the ticket formatting accuracy](.docs/accuracy.md) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
40
|
+
| Print the current capacity of team into newly created tasks | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
41
|
+
| Create/retrofit the defect automatically into latest release | ⌛ | ⌛ | ❌ | ❌ | ❌ |
|
42
|
+
| [Notify about expired(ing) due dates](.docs/duedate_expired.md) | ✅ | ❌ | ⌛ | ❌ | ❌ |
|
43
|
+
| Notify about absent original estimations | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
44
|
+
| Notify about 'Hot potato' tickets | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
45
|
+
| Notify about long live tickets (aging) | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
46
|
+
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
47
|
+
| Propogate fields from parent tickets to sub-tasks | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
48
|
+
| Notify about tickets without comments with expected text | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
49
|
+
| [Notify about team loading (no tasks on teammates)](lib/lazylead/task/loading.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
50
|
+
| Notify about tickets matches predefined multiple conditions | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
51
|
+
| Link automatically the ticket and Confluence page if link found in ticket's comments/description | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
52
|
+
| Notify about tickets assigned to your team members not by effective managers| ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
53
|
+
| Notify about modifications of important files in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
54
|
+
| Notify about diff changes for past X period in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
55
|
+
| Notify about changes with some text for past X period in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
56
|
+
| [Notify when someone outside of your team changed the due date on tickets for your team](lib/lazylead/task/micromanager.rb)| ✅ | ⌛ | ❌ | ❌ | ❌ |
|
57
|
+
| [Notify when someone outside of your team assigned a ticket directly to the developer](lib/lazylead/task/assignment.rb)| ✅ | ⌛ | ❌ | ❌ | ❌ |
|
60
58
|
|
61
59
|
| Integration | Type | Status |
|
62
60
|
| :---------------------------------------------------- | :-----------: | :----: |
|
@@ -183,6 +181,3 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
183
181
|
rake -A
|
184
182
|
```
|
185
183
|
Everyone interacting in this project’s codebases, issue trackers, chat rooms is expected to follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
|
186
|
-
|
187
|
-
Contributors:
|
188
|
-
* [dgroup](https://github.com/dgroup) as Yurii Dubinka ([yurii.dubinka@gmail.com](mailto:yurii.dubinka@gmail.com))
|
@@ -57,4 +57,36 @@ module Lazylead
|
|
57
57
|
)
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
class StdoutPostmanTest < Lazylead::Test
|
62
|
+
# @todo #495/DEV Find way to capture the STDOUT in order to test the email sending.
|
63
|
+
# Right now its just visual verification.
|
64
|
+
test "send email to stdout" do
|
65
|
+
StdoutPostman.new.send(
|
66
|
+
Opts.new(
|
67
|
+
"to" => "to@email.com",
|
68
|
+
"from" => "from@email.com",
|
69
|
+
"attachments" => ["readme.md"],
|
70
|
+
"subject" => "[LL] Attachments",
|
71
|
+
"template" => "lib/messages/savepoint.erb"
|
72
|
+
)
|
73
|
+
)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
class FilePostmanTest < Lazylead::Test
|
78
|
+
# @todo #/DEV add new assert method which consume the file name and check existence on the disk
|
79
|
+
test "send email to html file" do
|
80
|
+
FilePostman.new(Log.new, "file_postman_dir" => "test/resources")
|
81
|
+
.send(
|
82
|
+
Opts.new(
|
83
|
+
"to" => "to@email.com",
|
84
|
+
"from" => "from@email.com",
|
85
|
+
"attachments" => ["readme.md"],
|
86
|
+
"subject" => "[LL] Attachments",
|
87
|
+
"template" => "lib/messages/savepoint.erb"
|
88
|
+
)
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
60
92
|
end
|
@@ -97,5 +97,30 @@ module Lazylead
|
|
97
97
|
)
|
98
98
|
)[:tickets].size
|
99
99
|
end
|
100
|
+
|
101
|
+
test "score is correct" do
|
102
|
+
Lazylead::Smtp.new.enable
|
103
|
+
Task::Accuracy.new.run(
|
104
|
+
NoAuthJira.new("https://jira.spring.io"),
|
105
|
+
Postman.new,
|
106
|
+
Opts.new(
|
107
|
+
"from" => "ll@fake.com",
|
108
|
+
"to" => "lead@fake.com",
|
109
|
+
"rules" => "Lazylead::Stacktrace,Lazylead::Testcase",
|
110
|
+
"fields" => "attachment,description,reporter,priority,duedate,summary",
|
111
|
+
"colors" => {
|
112
|
+
"0" => "#FF4F33",
|
113
|
+
"30" => "#FEC15E",
|
114
|
+
"50" => "#19DD1E"
|
115
|
+
}.to_json.to_s,
|
116
|
+
"jql" => "key=DATAMONGO-1532",
|
117
|
+
"silent" => "true",
|
118
|
+
"subject" => "[LL] Check DATAMONGO-1532",
|
119
|
+
"template" => "lib/messages/accuracy.erb"
|
120
|
+
)
|
121
|
+
)
|
122
|
+
assert_email "[LL] Check DATAMONGO-1532",
|
123
|
+
"DATAMONGO-1532", "3", "42.86%"
|
124
|
+
end
|
100
125
|
end
|
101
126
|
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.11.
|
4
|
+
version: 0.11.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-10-03 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.8.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.8.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: get_process_mem
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,14 +324,14 @@ dependencies:
|
|
324
324
|
requirements:
|
325
325
|
- - '='
|
326
326
|
- !ruby/object:Gem::Version
|
327
|
-
version: 1.2021.
|
327
|
+
version: 1.2021.2
|
328
328
|
type: :runtime
|
329
329
|
prerelease: false
|
330
330
|
version_requirements: !ruby/object:Gem::Requirement
|
331
331
|
requirements:
|
332
332
|
- - '='
|
333
333
|
- !ruby/object:Gem::Version
|
334
|
-
version: 1.2021.
|
334
|
+
version: 1.2021.2
|
335
335
|
- !ruby/object:Gem::Dependency
|
336
336
|
name: vcs4sql
|
337
337
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +360,20 @@ dependencies:
|
|
360
360
|
- - '='
|
361
361
|
- !ruby/object:Gem::Version
|
362
362
|
version: 1.1.1
|
363
|
+
- !ruby/object:Gem::Dependency
|
364
|
+
name: zaru
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
366
|
+
requirements:
|
367
|
+
- - '='
|
368
|
+
- !ruby/object:Gem::Version
|
369
|
+
version: 0.3.0
|
370
|
+
type: :runtime
|
371
|
+
prerelease: false
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - '='
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: 0.3.0
|
363
377
|
- !ruby/object:Gem::Dependency
|
364
378
|
name: codecov
|
365
379
|
requirement: !ruby/object:Gem::Requirement
|
@@ -520,28 +534,28 @@ dependencies:
|
|
520
534
|
requirements:
|
521
535
|
- - '='
|
522
536
|
- !ruby/object:Gem::Version
|
523
|
-
version: 1.
|
537
|
+
version: 1.22.0
|
524
538
|
type: :development
|
525
539
|
prerelease: false
|
526
540
|
version_requirements: !ruby/object:Gem::Requirement
|
527
541
|
requirements:
|
528
542
|
- - '='
|
529
543
|
- !ruby/object:Gem::Version
|
530
|
-
version: 1.
|
544
|
+
version: 1.22.0
|
531
545
|
- !ruby/object:Gem::Dependency
|
532
546
|
name: rubocop-minitest
|
533
547
|
requirement: !ruby/object:Gem::Requirement
|
534
548
|
requirements:
|
535
549
|
- - '='
|
536
550
|
- !ruby/object:Gem::Version
|
537
|
-
version: 0.15.
|
551
|
+
version: 0.15.1
|
538
552
|
type: :development
|
539
553
|
prerelease: false
|
540
554
|
version_requirements: !ruby/object:Gem::Requirement
|
541
555
|
requirements:
|
542
556
|
- - '='
|
543
557
|
- !ruby/object:Gem::Version
|
544
|
-
version: 0.15.
|
558
|
+
version: 0.15.1
|
545
559
|
- !ruby/object:Gem::Dependency
|
546
560
|
name: rubocop-performance
|
547
561
|
requirement: !ruby/object:Gem::Requirement
|
@@ -576,14 +590,14 @@ dependencies:
|
|
576
590
|
requirements:
|
577
591
|
- - '='
|
578
592
|
- !ruby/object:Gem::Version
|
579
|
-
version: 2.
|
593
|
+
version: 2.5.0
|
580
594
|
type: :development
|
581
595
|
prerelease: false
|
582
596
|
version_requirements: !ruby/object:Gem::Requirement
|
583
597
|
requirements:
|
584
598
|
- - '='
|
585
599
|
- !ruby/object:Gem::Version
|
586
|
-
version: 2.
|
600
|
+
version: 2.5.0
|
587
601
|
- !ruby/object:Gem::Dependency
|
588
602
|
name: ruby-prof
|
589
603
|
requirement: !ruby/object:Gem::Requirement
|
@@ -830,7 +844,7 @@ licenses:
|
|
830
844
|
- MIT
|
831
845
|
metadata: {}
|
832
846
|
post_install_message: |-
|
833
|
-
Thanks for installing Lazylead v0.11.
|
847
|
+
Thanks for installing Lazylead v0.11.4!
|
834
848
|
Read our blog posts: https://lazylead.org
|
835
849
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
836
850
|
Follow us on Twitter: https://twitter.com/lazylead
|