lazylead 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.docs/duedate_expired.md +1 -1
- data/.rubocop.yml +18 -3
- data/Gemfile +1 -1
- data/Guardfile +1 -1
- data/Rakefile +1 -1
- data/bin/lazylead +1 -1
- data/lazylead.gemspec +11 -11
- data/lib/lazylead.rb +2 -2
- data/lib/lazylead/allocated.rb +1 -1
- data/lib/lazylead/cc.rb +1 -1
- data/lib/lazylead/cli/app.rb +1 -1
- data/lib/lazylead/confluence.rb +1 -1
- data/lib/lazylead/email.rb +1 -1
- data/lib/lazylead/exchange.rb +1 -1
- data/lib/lazylead/home.rb +1 -1
- data/lib/lazylead/log.rb +1 -1
- data/lib/lazylead/model.rb +1 -1
- data/lib/lazylead/opts.rb +6 -3
- data/lib/lazylead/postman.rb +1 -1
- data/lib/lazylead/requires.rb +38 -0
- data/lib/lazylead/salt.rb +1 -1
- data/lib/lazylead/schedule.rb +1 -1
- data/lib/lazylead/smtp.rb +1 -1
- data/lib/lazylead/system/empty.rb +1 -1
- data/lib/lazylead/system/fake.rb +1 -1
- data/lib/lazylead/system/jira.rb +19 -18
- data/lib/lazylead/system/synced.rb +1 -1
- data/lib/lazylead/task/accuracy/accuracy.rb +15 -18
- data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
- data/lib/lazylead/task/accuracy/attachment.rb +1 -1
- data/lib/lazylead/task/accuracy/environment.rb +1 -1
- data/lib/lazylead/task/accuracy/logs.rb +1 -1
- data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
- data/lib/lazylead/task/accuracy/records.rb +1 -1
- data/lib/lazylead/task/accuracy/requirement.rb +1 -1
- data/lib/lazylead/task/accuracy/servers.rb +1 -1
- data/lib/lazylead/task/accuracy/stacktrace.rb +1 -1
- data/lib/lazylead/task/accuracy/testcase.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki.rb +1 -1
- data/lib/lazylead/task/{alert.rb → alert/alert.rb} +6 -6
- data/lib/lazylead/task/alert/alertif.rb +75 -0
- data/lib/lazylead/task/alert/changed_to.rb +58 -0
- data/lib/lazylead/task/assignment.rb +1 -1
- data/lib/lazylead/task/confluence_ref.rb +1 -1
- data/lib/lazylead/task/echo.rb +1 -1
- data/lib/lazylead/task/fix_version.rb +1 -1
- data/lib/lazylead/task/loading.rb +94 -0
- data/lib/lazylead/task/missing_comment.rb +1 -1
- data/lib/lazylead/task/propagate_down.rb +3 -3
- data/lib/lazylead/task/savepoint.rb +1 -1
- data/lib/lazylead/task/svn/diff.rb +1 -1
- data/lib/lazylead/task/svn/grep.rb +1 -1
- data/lib/lazylead/task/svn/touch.rb +1 -1
- data/lib/lazylead/version.rb +2 -2
- data/lib/messages/accuracy.erb +1 -1
- data/lib/messages/alertif.erb +134 -0
- data/lib/messages/created_recently.erb +110 -0
- data/lib/messages/loading.erb +117 -0
- data/readme.md +3 -3
- data/test/lazylead/allocated_test.rb +1 -1
- data/test/lazylead/cc_test.rb +1 -1
- data/test/lazylead/cli/app_test.rb +2 -2
- data/test/lazylead/confluence_test.rb +1 -1
- data/test/lazylead/exchange_test.rb +1 -1
- data/test/lazylead/model_test.rb +1 -1
- data/test/lazylead/opts_test.rb +1 -1
- data/test/lazylead/postman_test.rb +1 -1
- data/test/lazylead/salt_test.rb +1 -1
- data/test/lazylead/smoke_test.rb +1 -1
- data/test/lazylead/smtp_test.rb +1 -1
- data/test/lazylead/system/jira_test.rb +10 -1
- data/test/lazylead/task/accuracy/accuracy_test.rb +1 -1
- data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
- data/test/lazylead/task/accuracy/attachment_test.rb +1 -1
- data/test/lazylead/task/accuracy/environment_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_test.rb +1 -1
- data/test/lazylead/task/accuracy/onlyll_test.rb +1 -1
- data/test/lazylead/task/accuracy/records_test.rb +1 -1
- data/test/lazylead/task/accuracy/score_test.rb +2 -2
- data/test/lazylead/task/accuracy/servers_test.rb +1 -1
- data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
- data/test/lazylead/task/accuracy/testcase_test.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
- data/test/lazylead/task/alert/alertif_test.rb +54 -0
- data/test/lazylead/task/{assignee_alert_test.rb → alert/assignee_alert_test.rb} +10 -10
- data/test/lazylead/task/alert/changed_to_test.rb +42 -0
- data/test/lazylead/task/assignment_test.rb +1 -1
- data/test/lazylead/task/confluence_ref_test.rb +1 -1
- data/test/lazylead/task/created_recently_test.rb +53 -0
- data/test/lazylead/task/duedate_test.rb +2 -2
- data/test/lazylead/task/echo_test.rb +1 -1
- data/test/lazylead/task/fix_version_test.rb +1 -1
- data/test/lazylead/task/loading_test.rb +54 -0
- data/test/lazylead/task/missing_comment_test.rb +1 -1
- data/test/lazylead/task/propagate_down_test.rb +1 -1
- data/test/lazylead/task/savepoint_test.rb +1 -1
- data/test/lazylead/task/svn/diff_test.rb +1 -1
- data/test/lazylead/task/svn/grep_test.rb +1 -1
- data/test/lazylead/task/svn/touch_test.rb +1 -1
- data/test/lazylead/version_test.rb +1 -1
- data/test/sqlite_test.rb +1 -1
- data/test/test.rb +1 -1
- data/upgrades/sqlite/001-install-main-lazylead-tables.sql +1 -1
- data/upgrades/sqlite/999.testdata.sql +1 -1
- metadata +37 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 422600b27880dd0aa96889f7fb8e2f55dc371ac8638dc7065d5e57bc8556aece
|
4
|
+
data.tar.gz: 4c8fd293522b890072ef45af8fbefe5cce59594023a38e12ef275e5ef3453d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59932534b571e92e9c8877d365292de759081444ac629c7d59d9b09897519ca19043d6886afc45291df327af3e4eec2524e0019e159ad0564e270eeceb0cad8f
|
7
|
+
data.tar.gz: cd6cdbe78ca38b738005fc91184e7fe4390276fcde446da0180f009d406d081cceb5e617ab62a76d9417559b071972d603a1b4adfbe4a70fba98b482d8f84ebf
|
data/.docs/duedate_expired.md
CHANGED
@@ -89,4 +89,4 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
89
89
|
#### Where is the code?
|
90
90
|
| Logic | Tests | Email Template |
|
91
91
|
| :-----: | :------: | :-----: |
|
92
|
-
| AssigneeAlert in [alert.rb](../lib/lazylead/task/alert.rb)| [duedate_test.rb](../test/lazylead/task/duedate_test.rb) | [due_date_expired.erb](../lib/messages/due_date_expired.erb) |
|
92
|
+
| AssigneeAlert in [alert.rb](../lib/lazylead/task/alert/alert.rb)| [duedate_test.rb](../test/lazylead/task/duedate_test.rb) | [due_date_expired.erb](../lib/messages/due_date_expired.erb) |
|
data/.rubocop.yml
CHANGED
@@ -85,12 +85,20 @@ Style/HashTransformValues:
|
|
85
85
|
Style/FormatStringToken:
|
86
86
|
Exclude:
|
87
87
|
- "lib/lazylead/task/accuracy/accuracy.rb"
|
88
|
-
|
88
|
+
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
|
89
|
+
Enabled: true
|
89
90
|
Lint/RaiseException:
|
90
91
|
Enabled: true
|
91
|
-
|
92
92
|
Lint/StructNewOverride:
|
93
93
|
Enabled: true
|
94
|
+
Lint/NumberedParameterAssignment: # (new in 1.9)
|
95
|
+
Enabled: true
|
96
|
+
Lint/OrAssignmentToConstant: # (new in 1.9)
|
97
|
+
Enabled: true
|
98
|
+
Lint/SymbolConversion: # (new in 1.9)
|
99
|
+
Enabled: true
|
100
|
+
Lint/TripleQuotes: # (new in 1.9)
|
101
|
+
Enabled: true
|
94
102
|
|
95
103
|
# @todo #/DEV Add violation regarding methods without documentation using RDoc
|
96
104
|
# https://stackoverflow.com/questions/1681467/how-to-document-ruby-code
|
@@ -139,7 +147,8 @@ Style/RedundantArgument: # (new in 1.4)
|
|
139
147
|
Enabled: true
|
140
148
|
Style/SwapValues: # (new in 1.1)
|
141
149
|
Enabled: true
|
142
|
-
|
150
|
+
Style/HashConversion: # (new in 1.10)
|
151
|
+
Enabled: true
|
143
152
|
Minitest/AssertInDelta: # (new in 0.10)
|
144
153
|
Enabled: true
|
145
154
|
Minitest/AssertionInLifecycleHook: # (new in 0.10)
|
@@ -191,4 +200,10 @@ Performance/Squeeze: # (new in 1.7)
|
|
191
200
|
Performance/StringInclude: # (new in 1.7)
|
192
201
|
Enabled: true
|
193
202
|
Performance/Sum: # (new in 1.8)
|
203
|
+
Enabled: true
|
204
|
+
Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
|
205
|
+
Enabled: true
|
206
|
+
Performance/RedundantSplitRegexpArgument: # (new in 1.10)
|
207
|
+
Enabled: true
|
208
|
+
Gemspec/DateAssignment: # (new in 1.10)
|
194
209
|
Enabled: true
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/Guardfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/bin/lazylead
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# The MIT License
|
5
5
|
#
|
6
|
-
# Copyright (c) 2019-
|
6
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
7
7
|
#
|
8
8
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
# of this software and associated documentation files (the "Software"),
|
data/lazylead.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -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.
|
35
|
+
s.version = "0.8.0"
|
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.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.8.0!
|
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
|
@@ -55,7 +55,7 @@ tasks instead of solving technical problems."
|
|
55
55
|
s.test_files = s.files.grep(%r{^(test|features)/})
|
56
56
|
s.rdoc_options = ["--charset=UTF-8"]
|
57
57
|
s.extra_rdoc_files = %w[readme.md license.txt]
|
58
|
-
s.add_runtime_dependency "activerecord", "6.1.
|
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
61
|
s.add_runtime_dependency "faraday", "1.3.0"
|
@@ -67,7 +67,7 @@ tasks instead of solving technical problems."
|
|
67
67
|
s.add_runtime_dependency "mail", "2.7.1"
|
68
68
|
s.add_runtime_dependency "memory_profiler", "1.0.0"
|
69
69
|
s.add_runtime_dependency "openssl", "2.1.2"
|
70
|
-
s.add_runtime_dependency "railties", "6.1.
|
70
|
+
s.add_runtime_dependency "railties", "6.1.3"
|
71
71
|
s.add_runtime_dependency "require_all", "3.0.0"
|
72
72
|
s.add_runtime_dependency "rufus-scheduler", "3.7.0"
|
73
73
|
s.add_runtime_dependency "slop", "4.8.2"
|
@@ -77,11 +77,11 @@ tasks instead of solving technical problems."
|
|
77
77
|
s.add_runtime_dependency "tzinfo", "2.0.4"
|
78
78
|
s.add_runtime_dependency "tzinfo-data", "1.2021.1"
|
79
79
|
s.add_runtime_dependency "vcs4sql", "0.1.1"
|
80
|
-
s.add_runtime_dependency "viewpoint", "1.1.
|
81
|
-
s.add_development_dependency "codecov", "0.
|
80
|
+
s.add_runtime_dependency "viewpoint", "1.1.1"
|
81
|
+
s.add_development_dependency "codecov", "0.5.1"
|
82
82
|
s.add_development_dependency "guard", "2.16.2"
|
83
83
|
s.add_development_dependency "guard-minitest", "2.4.6"
|
84
|
-
s.add_development_dependency "minitest", "5.14.
|
84
|
+
s.add_development_dependency "minitest", "5.14.4"
|
85
85
|
s.add_development_dependency "minitest-fail-fast", "0.1.0"
|
86
86
|
s.add_development_dependency "minitest-hooks", "1.5.0"
|
87
87
|
s.add_development_dependency "minitest-reporters", "1.4.3"
|
@@ -89,11 +89,11 @@ tasks instead of solving technical problems."
|
|
89
89
|
s.add_development_dependency "rake", "13.0.3"
|
90
90
|
s.add_development_dependency "random-port", "0.5.1"
|
91
91
|
s.add_development_dependency "rdoc", "6.3.0"
|
92
|
-
s.add_development_dependency "rubocop", "1.
|
92
|
+
s.add_development_dependency "rubocop", "1.11.0"
|
93
93
|
s.add_development_dependency "rubocop-minitest", "0.10.3"
|
94
|
-
s.add_development_dependency "rubocop-performance", "1.
|
94
|
+
s.add_development_dependency "rubocop-performance", "1.10.1"
|
95
95
|
s.add_development_dependency "rubocop-rake", "0.5.1"
|
96
|
-
s.add_development_dependency "rubocop-rspec", "2.
|
96
|
+
s.add_development_dependency "rubocop-rspec", "2.2.0"
|
97
97
|
s.add_development_dependency "sqlint", "0.1.10"
|
98
98
|
s.add_development_dependency "tempfile", "0.1.1"
|
99
99
|
s.add_development_dependency "xcop", "0.6.2"
|
data/lib/lazylead.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -37,7 +37,7 @@ require_relative "lazylead/system/jira"
|
|
37
37
|
require_relative "lazylead/system/empty"
|
38
38
|
require_relative "lazylead/system/fake"
|
39
39
|
require_relative "lazylead/system/synced"
|
40
|
-
require_relative "lazylead/task/alert"
|
40
|
+
require_relative "lazylead/task/alert/alert"
|
41
41
|
require_relative "lazylead/task/confluence_ref"
|
42
42
|
require_relative "lazylead/task/echo"
|
43
43
|
require_relative "lazylead/task/fix_version"
|
data/lib/lazylead/allocated.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/cc.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/cli/app.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/confluence.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/email.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/exchange.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/home.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/log.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/model.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/opts.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -34,8 +34,7 @@ module Lazylead
|
|
34
34
|
# License:: MIT
|
35
35
|
class Opts
|
36
36
|
extend Forwardable
|
37
|
-
def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :except, :each,
|
38
|
-
:each_pair, :sort_by
|
37
|
+
def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :except, :each, :each_pair, :sort_by
|
39
38
|
|
40
39
|
def initialize(origin = {})
|
41
40
|
@origin = origin
|
@@ -139,5 +138,9 @@ module Lazylead
|
|
139
138
|
def numeric?(key)
|
140
139
|
to_h[key].to_i.positive?
|
141
140
|
end
|
141
|
+
|
142
|
+
def construct(field, delim: ",")
|
143
|
+
slice(field, delim).map(&:constantize).map(&:new)
|
144
|
+
end
|
142
145
|
end
|
143
146
|
end
|
data/lib/lazylead/postman.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -0,0 +1,38 @@
|
|
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
|
+
module Lazylead
|
26
|
+
#
|
27
|
+
# Allows to load all ruby files within particular dir.
|
28
|
+
#
|
29
|
+
class Requires
|
30
|
+
def initialize(dir)
|
31
|
+
@dir = dir
|
32
|
+
end
|
33
|
+
|
34
|
+
def load
|
35
|
+
Dir[File.join(@dir, "*.rb")].sort.each { |f| require f }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/lazylead/salt.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/schedule.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/smtp.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/system/fake.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
data/lib/lazylead/system/jira.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2021 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -30,6 +30,10 @@ require_relative "../opts"
|
|
30
30
|
module Lazylead
|
31
31
|
# Jira system for manipulation with issues.
|
32
32
|
#
|
33
|
+
# Jira official documentation:
|
34
|
+
# - https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/issue-getIssue
|
35
|
+
# - https://developer.atlassian.com/server/jira/platform/rest-apis/
|
36
|
+
#
|
33
37
|
# Author:: Yurii Dubinka (yurii.dubinka@gmail.com)
|
34
38
|
# Copyright:: Copyright (c) 2019-2020 Yurii Dubinka
|
35
39
|
# License:: MIT
|
@@ -82,22 +86,7 @@ module Lazylead
|
|
82
86
|
@opts[:auth_type] = :basic if @opts[:auth_type].nil?
|
83
87
|
@opts["username"] = @salt.decrypt(@opts["username"]) if @salt.specified?
|
84
88
|
@opts["password"] = @salt.decrypt(@opts["password"]) if @salt.specified?
|
85
|
-
|
86
|
-
cp("username", :username)
|
87
|
-
cp("password", :password)
|
88
|
-
cp("context_path", :context_path)
|
89
|
-
@client = JIRA::Client.new(@opts)
|
90
|
-
end
|
91
|
-
|
92
|
-
# Copy the required/mandatory parameter(s) for Jira client which can't
|
93
|
-
# be specified/defined at database level.
|
94
|
-
#
|
95
|
-
# @todo #/DEV Jira.cp - find a way how to avoid this method.
|
96
|
-
# Potentially, hash with indifferent access might be used.
|
97
|
-
# http://jocellyn.cz/2014/05/03/hash-with-indifferent-access.html
|
98
|
-
# key.kind_of?(Symbol) ? key.to_s : key
|
99
|
-
def cp(act, exp)
|
100
|
-
@opts[exp] = @opts[act] if @opts.key? act
|
89
|
+
@client = JIRA::Client.new(@opts.symbolize_keys)
|
101
90
|
end
|
102
91
|
end
|
103
92
|
|
@@ -313,7 +302,19 @@ module Lazylead
|
|
313
302
|
|
314
303
|
# Check that comment has expected text
|
315
304
|
def include?(text)
|
316
|
-
|
305
|
+
to_s.include? text
|
306
|
+
end
|
307
|
+
|
308
|
+
def to_s
|
309
|
+
@comment.attrs["body"]
|
310
|
+
end
|
311
|
+
|
312
|
+
def lines
|
313
|
+
to_s.split("\n").reject(&:blank?)
|
314
|
+
end
|
315
|
+
|
316
|
+
def author
|
317
|
+
@comment.attrs["author"]["displayName"]
|
317
318
|
end
|
318
319
|
end
|
319
320
|
|