lazylead 0.11.4 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +3 -0
- data/.circleci/config.yml +0 -12
- data/.docs/accuracy.sql +35 -0
- data/.github/workflows/build.yml +39 -0
- data/.github/workflows/release.yml +15 -0
- data/.rubocop.yml +11 -2
- data/.rultor.yml +2 -2
- data/Gemfile +1 -1
- data/Rakefile +17 -9
- data/bin/lazylead +5 -5
- data/lazylead.gemspec +22 -25
- data/lib/lazylead/allocated.rb +1 -1
- data/lib/lazylead/cc.rb +1 -1
- data/lib/lazylead/cli/app.rb +3 -3
- data/lib/lazylead/confluence.rb +4 -3
- data/lib/lazylead/email.rb +1 -1
- data/lib/lazylead/exchange.rb +3 -3
- data/lib/lazylead/home.rb +2 -2
- data/lib/lazylead/log.rb +1 -1
- data/lib/lazylead/model.rb +4 -3
- data/lib/lazylead/opts.rb +1 -1
- data/lib/lazylead/os.rb +2 -1
- data/lib/lazylead/postman.rb +8 -7
- data/lib/lazylead/requires.rb +1 -1
- data/lib/lazylead/salt.rb +1 -1
- data/lib/lazylead/schedule.rb +5 -9
- 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 +5 -3
- data/lib/lazylead/system/synced.rb +1 -1
- data/lib/lazylead/task/accuracy/accuracy.rb +3 -3
- 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/has_label.rb +1 -1
- data/lib/lazylead/task/accuracy/logs.rb +1 -1
- data/lib/lazylead/task/accuracy/logs_link.rb +1 -1
- data/lib/lazylead/task/accuracy/memes.rb +1 -1
- data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
- data/lib/lazylead/task/accuracy/records.rb +9 -2
- data/lib/lazylead/task/accuracy/records_link.rb +1 -1
- data/lib/lazylead/task/accuracy/required.rb +1 -1
- data/lib/lazylead/task/accuracy/requirement.rb +1 -1
- data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
- data/lib/lazylead/task/accuracy/servers.rb +1 -1
- data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
- data/lib/lazylead/task/accuracy/testcase.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki_url.rb +1 -1
- data/lib/lazylead/task/alert/alert.rb +1 -1
- data/lib/lazylead/task/alert/alertif.rb +1 -1
- data/lib/lazylead/task/alert/changed_to.rb +1 -1
- data/lib/lazylead/task/assignment.rb +1 -1
- data/lib/lazylead/task/confluence_ref.rb +1 -1
- data/lib/lazylead/task/echo.rb +2 -2
- data/lib/lazylead/task/fix_version.rb +1 -1
- data/lib/lazylead/task/git/git.rb +82 -0
- data/lib/lazylead/task/loading.rb +2 -3
- data/lib/lazylead/task/micromanager.rb +1 -1
- 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/svn.rb +1 -1
- data/lib/lazylead/task/svn/touch.rb +42 -14
- data/lib/lazylead/version.rb +2 -2
- data/lib/lazylead.rb +1 -1
- data/license.txt +1 -1
- data/readme.md +20 -15
- data/test/lazylead/allocated_test.rb +1 -1
- data/test/lazylead/cc_test.rb +7 -7
- data/test/lazylead/cli/app_test.rb +1 -1
- data/test/lazylead/confluence_test.rb +1 -1
- data/test/lazylead/exchange_test.rb +10 -10
- data/test/lazylead/file_postman_test.rb +47 -0
- data/test/lazylead/model_test.rb +2 -2
- data/test/lazylead/opts_test.rb +1 -1
- data/test/lazylead/postman_test.rb +7 -39
- data/test/lazylead/retry_test.rb +12 -1
- data/test/lazylead/salt_test.rb +1 -1
- data/test/lazylead/smoke_test.rb +2 -2
- data/test/lazylead/smtp_test.rb +7 -7
- data/test/lazylead/stdout_postman_test.rb +48 -0
- data/test/lazylead/system/jira_test.rb +53 -54
- data/test/lazylead/task/accuracy/accuracy_test.rb +11 -11
- data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
- data/test/lazylead/task/accuracy/attachment_test.rb +4 -4
- data/test/lazylead/task/accuracy/environment_test.rb +1 -1
- data/test/lazylead/task/accuracy/has_label_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_link_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_test.rb +1 -1
- data/test/lazylead/task/accuracy/memes_test.rb +1 -1
- data/test/lazylead/task/accuracy/onlyll_test.rb +21 -21
- data/test/lazylead/task/accuracy/records_llink_test.rb +1 -1
- data/test/lazylead/task/accuracy/records_test.rb +35 -12
- data/test/lazylead/task/accuracy/score_test.rb +4 -4
- data/test/lazylead/task/accuracy/screenshots_test.rb +3 -3
- 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/accuracy/wiki_url_test.rb +1 -1
- data/test/lazylead/task/alert/alertif_test.rb +5 -5
- data/test/lazylead/task/alert/assignee_alert_test.rb +1 -1
- data/test/lazylead/task/alert/changed_to_test.rb +5 -5
- data/test/lazylead/task/assignment_test.rb +5 -5
- data/test/lazylead/task/confluence_ref_test.rb +8 -8
- data/test/lazylead/task/created_recently_test.rb +4 -4
- data/test/lazylead/task/duedate_test.rb +14 -14
- data/test/lazylead/task/echo_test.rb +1 -1
- data/test/lazylead/task/fix_version_test.rb +6 -5
- data/test/lazylead/task/loading_test.rb +7 -7
- data/test/lazylead/task/micromanager_test.rb +5 -5
- data/test/lazylead/task/missing_comment_test.rb +4 -4
- 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 +14 -15
- data/test/lazylead/task/svn/grep_test.rb +4 -3
- data/test/lazylead/task/svn/touch_test.rb +74 -6
- data/test/lazylead/version_test.rb +1 -1
- data/test/sqlite_test.rb +1 -1
- data/test/test.rb +10 -3
- metadata +49 -107
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 359acf575a8e7cc8b4e4896446c74390715249ae8f1ed547af526d3300e5b520
|
4
|
+
data.tar.gz: 0c324152b043999546f503aa55f66147e2749106d68ffe61325e6dbabf0256bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18373c1b59c44cc8cd4cfde55fb6ec573851b1f51d78c7e6a5a7d5b6ddd2b3428c86430b3c913923624fa9ba31aff9274c5b4b1c46399ae942e0e1bc61335d59
|
7
|
+
data.tar.gz: 9978b72b3c076526cfc1023b39bfe48476a93cb8d19a3d56077d9c7b9962e54e52de1a873b8df29365764fae02ab391540ffb86c7fd8f59a35e444e3fd82ff1c
|
data/.0pdd.yml
CHANGED
data/.circleci/config.yml
CHANGED
@@ -3,15 +3,6 @@
|
|
3
3
|
# Without this integration the release history won't be clear.
|
4
4
|
version: 2
|
5
5
|
jobs:
|
6
|
-
test:
|
7
|
-
docker:
|
8
|
-
- image: ruby:2.6.5-alpine
|
9
|
-
steps:
|
10
|
-
- checkout
|
11
|
-
- run: |
|
12
|
-
apk add libc-dev gcc make git sqlite sqlite-dev sqlite-libs
|
13
|
-
bundler install
|
14
|
-
- run: bundle exec rake test rubocop sqlint xcop
|
15
6
|
deploy:
|
16
7
|
machine: true
|
17
8
|
steps:
|
@@ -57,11 +48,8 @@ workflows:
|
|
57
48
|
version: 2
|
58
49
|
build_and_test:
|
59
50
|
jobs:
|
60
|
-
- test
|
61
51
|
- deploy:
|
62
52
|
filters:
|
63
53
|
branches:
|
64
54
|
only:
|
65
55
|
- master
|
66
|
-
requires:
|
67
|
-
- test
|
data/.docs/accuracy.sql
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
insert into teams (id, name, properties)
|
2
|
+
values (1, 'Dream team with lazylead', '{}');
|
3
|
+
insert into systems(id, properties)
|
4
|
+
values (1, '{"type":"Lazylead::Jira", "site":"${jira_url}", "context_path":""}');
|
5
|
+
insert into tasks (name, schedule, enabled, id, system, team_id, action, properties)
|
6
|
+
values ('Expired due dates',
|
7
|
+
'cron:* * * * *',
|
8
|
+
'true',
|
9
|
+
1, 1, 1,
|
10
|
+
'Lazylead::Task::AssigneeAlert',
|
11
|
+
'{
|
12
|
+
"sql": "resolution = unresolved and due < startOfDay()",
|
13
|
+
"cc": "their@lead.com",
|
14
|
+
"subject": "[LL] Expired due dates",
|
15
|
+
"template": "lib/messages/due_date_expired.erb",
|
16
|
+
"postman": "Lazylead::FilePostman"
|
17
|
+
}');
|
18
|
+
insert into tasks (name, schedule, enabled, id, system, team_id, action, properties)
|
19
|
+
values ('Reporter''s ticket score in Spring Data MongoDB',
|
20
|
+
'cron:* * * * *',
|
21
|
+
'true',
|
22
|
+
2, 1, 1,
|
23
|
+
'Lazylead::Task::Accuracy',
|
24
|
+
'{
|
25
|
+
"from": "ll@fake.com",
|
26
|
+
"to": "lead@fake.com",
|
27
|
+
"rules": "Lazylead::Stacktrace,Lazylead::Testcase",
|
28
|
+
"fields": "attachment,description,environment,components,versions,reporter,labels,priority,duedate,summary",
|
29
|
+
"colors": "{\"0\":\"#FF4F33\",\"30\":\"#FEC15E\",\"50\":\"#19DD1E\"}",
|
30
|
+
"jql": "type=Bug and project =''Spring Data MongoDB'' and key >= DATAMONGO-1530 and key <= DATAMONGO-1600",
|
31
|
+
"silent": "true",
|
32
|
+
"subject": "[LL] Reporter''s ticket score in Spring Data MongoDB",
|
33
|
+
"template": "lib/messages/accuracy.erb",
|
34
|
+
"postman":"Lazylead::FilePostman"
|
35
|
+
}');
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
|
6
|
+
# @todo #572/DEV Assemble docker image in GitHub actions in order to replace Circle CI
|
7
|
+
|
8
|
+
# @todo #572/DEV Test docker image in GitHub actions in order to replace Circle CI
|
9
|
+
|
10
|
+
# @todo #572/DEV Publish docker image in GitHub actions in order to replace Circle CI
|
11
|
+
|
12
|
+
# @todo #572/DEV Integrate rultor with GitHub action and push docker image with particular tag
|
13
|
+
name: CI
|
14
|
+
on: push
|
15
|
+
jobs:
|
16
|
+
build:
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
22
|
+
with:
|
23
|
+
ruby-version: '2.6.5'
|
24
|
+
- uses: actions/cache@v2
|
25
|
+
with:
|
26
|
+
path: vendor/bundle
|
27
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
28
|
+
restore-keys: |
|
29
|
+
${{ runner.os }}-gems-
|
30
|
+
- name: Bundle install
|
31
|
+
run: |
|
32
|
+
bundle config path vendor/bundle
|
33
|
+
bundle install --jobs 4 --retry 3
|
34
|
+
- name: Install dependencies
|
35
|
+
run: bundle install
|
36
|
+
- name: Run tests
|
37
|
+
env:
|
38
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
39
|
+
run: bundle exec rake -A
|
@@ -0,0 +1,15 @@
|
|
1
|
+
on:
|
2
|
+
release:
|
3
|
+
types: [published, created, prereleased]
|
4
|
+
jobs:
|
5
|
+
build:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- uses: actions/checkout@v2
|
9
|
+
- name: Notify Telegram group
|
10
|
+
uses: yanzay/notify-telegram@v0.1.0
|
11
|
+
if: always()
|
12
|
+
with:
|
13
|
+
chat: ${{ secrets.TELEGRAM_CHAT }} # user id or channel name secret
|
14
|
+
token: ${{ secrets.TELEGRAM_TOKEN }} # token secret
|
15
|
+
status: ${{ job.status }} # do not modify this line
|
data/.rubocop.yml
CHANGED
@@ -89,6 +89,9 @@ Style/FormatStringToken:
|
|
89
89
|
- "lib/lazylead/task/accuracy/accuracy.rb"
|
90
90
|
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
|
91
91
|
Enabled: true
|
92
|
+
# @todo #/DEV Enable Style/OpenStructUse rule, for now its disabled due to rubocop upgrade
|
93
|
+
Style/OpenStructUse:
|
94
|
+
Enabled: false
|
92
95
|
Lint/RaiseException:
|
93
96
|
Enabled: true
|
94
97
|
Lint/StructNewOverride:
|
@@ -151,6 +154,10 @@ Style/SwapValues: # (new in 1.1)
|
|
151
154
|
Enabled: true
|
152
155
|
Style/HashConversion: # (new in 1.10)
|
153
156
|
Enabled: true
|
157
|
+
Style/RedundantStringEscape: # (new in 1.7)
|
158
|
+
Enabled: true
|
159
|
+
Exclude:
|
160
|
+
- "test/lazylead/task/svn/grep_test.rb"
|
154
161
|
Minitest/AssertInDelta: # (new in 0.10)
|
155
162
|
Enabled: true
|
156
163
|
Minitest/AssertionInLifecycleHook: # (new in 0.10)
|
@@ -207,5 +214,7 @@ Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
|
|
207
214
|
Enabled: true
|
208
215
|
Performance/RedundantSplitRegexpArgument: # (new in 1.10)
|
209
216
|
Enabled: true
|
210
|
-
Gemspec/
|
211
|
-
Enabled: true
|
217
|
+
Gemspec/DeprecatedAttributeAssignment: # (new in 1.10)
|
218
|
+
Enabled: true
|
219
|
+
Gemspec/RequireMFA:
|
220
|
+
Enabled: false
|
data/.rultor.yml
CHANGED
@@ -16,7 +16,7 @@ release:
|
|
16
16
|
sed -i "s/0\.0\.0/${tag}/g" lib/lazylead/version.rb
|
17
17
|
sed -i "s/0\.0\.0/${tag}/g" lazylead.gemspec
|
18
18
|
bundle install --no-color
|
19
|
-
bundle exec rake --trace test rubocop sqlint
|
19
|
+
bundle exec rake --trace test rubocop sqlint
|
20
20
|
git add lib/lazylead/version.rb lazylead.gemspec
|
21
21
|
git commit -m "version set to ${tag}"
|
22
22
|
gem build lazylead.gemspec
|
@@ -28,4 +28,4 @@ merge:
|
|
28
28
|
squash: true
|
29
29
|
script: |-
|
30
30
|
bundle install
|
31
|
-
bundle exec rake test rubocop sqlint
|
31
|
+
bundle exec rake test rubocop sqlint
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 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-2022 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"),
|
@@ -46,7 +46,10 @@ def version
|
|
46
46
|
Gem::Specification.load(Dir["*.gemspec"].first).version
|
47
47
|
end
|
48
48
|
|
49
|
-
task default: %i[init_hooks clean rubocop test sqlint
|
49
|
+
task default: %i[init_hooks clean rubocop test sqlint docker]
|
50
|
+
# @todo #/DEV Update copyright to 2023, so far lets disable this task for separate PR
|
51
|
+
|
52
|
+
# task default: %i[init_hooks clean rubocop test sqlint copyright docker]
|
50
53
|
|
51
54
|
task :init_hooks do
|
52
55
|
next if File.file?(".git/hooks/commit-msg")
|
@@ -82,6 +85,8 @@ RuboCop::RakeTask.new(:rubocop) do |task|
|
|
82
85
|
end
|
83
86
|
|
84
87
|
task :copyright do
|
88
|
+
# @todo #/DEV Update copyright to 2022 for sql files as current changes of structure may lead
|
89
|
+
# to manual actions during installation.
|
85
90
|
sh "grep -q -r \"2019-#{Date.today.strftime('%Y')}\" \
|
86
91
|
--include \"*.rb\" \
|
87
92
|
--include \"*.txt\" \
|
@@ -89,13 +94,16 @@ task :copyright do
|
|
89
94
|
."
|
90
95
|
end
|
91
96
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
97
|
+
# @todo #/DEV Enable xcop when xml/html files will be added to the project. So far there is no
|
98
|
+
# profit.
|
99
|
+
#
|
100
|
+
# require "xcop/rake_task"
|
101
|
+
# desc "Validate all XML/XSL/XSD/HTML files for formatting"
|
102
|
+
# Xcop::RakeTask.new :xcop do |task|
|
103
|
+
# task.license = "license.txt"
|
104
|
+
# task.includes = %w[**/*.xml **/*.xsl **/*.xsd **/*.html]
|
105
|
+
# task.excludes = %w[target/**/* coverage/**/* wp/**/* test/resources/*]
|
106
|
+
# end
|
99
107
|
|
100
108
|
# @todo #/DEV Enable rule "Checks SQL against the ANSI syntax" fully.
|
101
109
|
# Right now all violations related to PRAGMA https://www.sqlite.org/pragma.html
|
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-2022 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"),
|
@@ -91,10 +91,10 @@ cmd = lambda do
|
|
91
91
|
Lazylead::Schedule.new(log: log),
|
92
92
|
Lazylead::Smtp.new(
|
93
93
|
log, Lazylead::Salt.new("smtp_salt"),
|
94
|
-
smtp_host: ENV
|
95
|
-
smtp_port: ENV
|
96
|
-
smtp_user: ENV
|
97
|
-
smtp_pass: ENV
|
94
|
+
smtp_host: ENV.fetch("smtp_host", nil),
|
95
|
+
smtp_port: ENV.fetch("smtp_port", nil),
|
96
|
+
smtp_user: ENV.fetch("smtp_user", nil),
|
97
|
+
smtp_pass: ENV.fetch("smtp_pass", nil)
|
98
98
|
)
|
99
99
|
).run(opts.to_h)
|
100
100
|
return 0
|
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-2022 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"),
|
@@ -28,11 +28,9 @@ lib = File.expand_path("lib", __dir__)
|
|
28
28
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
29
29
|
|
30
30
|
Gem::Specification.new do |s|
|
31
|
-
s.specification_version = 2 if s.respond_to? :specification_version=
|
32
|
-
s.rubygems_version = "2.2"
|
33
31
|
s.required_ruby_version = ">=2.6.5"
|
34
32
|
s.name = "lazylead"
|
35
|
-
s.version = "0.
|
33
|
+
s.version = "0.13.0"
|
36
34
|
s.license = "MIT"
|
37
35
|
s.summary = "Eliminate the annoying work within bug-trackers."
|
38
36
|
s.description = "Ticketing systems (Github, Jira, etc.) are strongly
|
@@ -45,25 +43,24 @@ tasks instead of solving technical problems."
|
|
45
43
|
s.authors = ["Yurii Dubinka"]
|
46
44
|
s.email = "yurii.dubinka@gmail.com"
|
47
45
|
s.homepage = "http://github.com/dgroup/lazylead"
|
48
|
-
s.post_install_message = "Thanks for installing Lazylead v0.
|
46
|
+
s.post_install_message = "Thanks for installing Lazylead v0.13.0!
|
49
47
|
Read our blog posts: https://lazylead.org
|
50
48
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
51
49
|
Follow us on Twitter: https://twitter.com/lazylead
|
52
50
|
If you have any issues, report to our GitHub repo: https://github.com/dgroup/lazylead"
|
53
51
|
s.files = `git ls-files`.split($RS)
|
54
52
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
55
|
-
s.test_files = s.files.grep(%r{^(test|features)/})
|
56
53
|
s.rdoc_options = ["--charset=UTF-8"]
|
57
54
|
s.extra_rdoc_files = %w[readme.md license.txt]
|
58
55
|
s.add_runtime_dependency "activerecord", "6.1.3"
|
59
56
|
s.add_runtime_dependency "backtrace", "0.3"
|
60
57
|
s.add_runtime_dependency "colorize", "0.8.1"
|
61
|
-
s.add_runtime_dependency "faraday", "
|
58
|
+
s.add_runtime_dependency "faraday", "2.3.0"
|
62
59
|
s.add_runtime_dependency "get_process_mem", "0.2.7"
|
63
60
|
s.add_runtime_dependency "inifile", "3.0.0"
|
64
|
-
s.add_runtime_dependency "jira-ruby", "2.
|
65
|
-
s.add_runtime_dependency "json", "2.
|
66
|
-
s.add_runtime_dependency "logging", "2.3.
|
61
|
+
s.add_runtime_dependency "jira-ruby", "2.2.0"
|
62
|
+
s.add_runtime_dependency "json", "2.6.2"
|
63
|
+
s.add_runtime_dependency "logging", "2.3.1"
|
67
64
|
s.add_runtime_dependency "mail", "2.7.1"
|
68
65
|
s.add_runtime_dependency "memory_profiler", "1.0.0"
|
69
66
|
s.add_runtime_dependency "nokogiri", "1.11.3"
|
@@ -71,34 +68,34 @@ tasks instead of solving technical problems."
|
|
71
68
|
s.add_runtime_dependency "railties", "6.1.3"
|
72
69
|
s.add_runtime_dependency "require_all", "3.0.0"
|
73
70
|
s.add_runtime_dependency "rubyzip", "2.3.2"
|
74
|
-
s.add_runtime_dependency "rufus-scheduler", "3.
|
75
|
-
s.add_runtime_dependency "slop", "4.9.
|
76
|
-
s.add_runtime_dependency "sqlite3", "1.4.
|
77
|
-
s.add_runtime_dependency "tempfile", "0.1.
|
71
|
+
s.add_runtime_dependency "rufus-scheduler", "3.9.1"
|
72
|
+
s.add_runtime_dependency "slop", "4.9.2"
|
73
|
+
s.add_runtime_dependency "sqlite3", "1.4.4"
|
74
|
+
s.add_runtime_dependency "tempfile", "0.1.2"
|
78
75
|
s.add_runtime_dependency "tilt", "2.0.10"
|
79
76
|
s.add_runtime_dependency "tzinfo", "2.0.4"
|
80
|
-
s.add_runtime_dependency "tzinfo-data", "1.
|
77
|
+
s.add_runtime_dependency "tzinfo-data", "1.2022.1"
|
81
78
|
s.add_runtime_dependency "vcs4sql", "0.1.1"
|
82
79
|
s.add_runtime_dependency "viewpoint", "1.1.1"
|
83
80
|
s.add_runtime_dependency "zaru", "0.3.0"
|
84
81
|
s.add_development_dependency "codecov", "0.6.0"
|
85
82
|
s.add_development_dependency "guard", "2.18.0"
|
86
83
|
s.add_development_dependency "guard-minitest", "2.4.6"
|
87
|
-
s.add_development_dependency "minitest", "5.
|
84
|
+
s.add_development_dependency "minitest", "5.19.0"
|
88
85
|
s.add_development_dependency "minitest-fail-fast", "0.1.0"
|
89
86
|
s.add_development_dependency "minitest-hooks", "1.5.0"
|
90
|
-
s.add_development_dependency "minitest-reporters", "1.
|
87
|
+
s.add_development_dependency "minitest-reporters", "1.5.0"
|
91
88
|
s.add_development_dependency "net-ping", "2.0.8"
|
92
89
|
s.add_development_dependency "rake", "13.0.6"
|
93
90
|
s.add_development_dependency "random-port", "0.5.1"
|
94
|
-
s.add_development_dependency "rdoc", "6.
|
95
|
-
s.add_development_dependency "rubocop", "1.
|
96
|
-
s.add_development_dependency "rubocop-minitest", "0.
|
97
|
-
s.add_development_dependency "rubocop-performance", "1.
|
91
|
+
s.add_development_dependency "rdoc", "6.4.0"
|
92
|
+
s.add_development_dependency "rubocop", "1.50.2"
|
93
|
+
s.add_development_dependency "rubocop-minitest", "0.20.1"
|
94
|
+
s.add_development_dependency "rubocop-performance", "1.16.0"
|
98
95
|
s.add_development_dependency "rubocop-rake", "0.6.0"
|
99
|
-
s.add_development_dependency "rubocop-rspec", "2.
|
96
|
+
s.add_development_dependency "rubocop-rspec", "2.11.1"
|
100
97
|
s.add_development_dependency "ruby-prof", "1.4.3"
|
101
|
-
s.add_development_dependency "sqlint", "0.2.
|
102
|
-
s.add_development_dependency "tempfile", "0.1.
|
103
|
-
s.
|
98
|
+
s.add_development_dependency "sqlint", "0.2.1"
|
99
|
+
s.add_development_dependency "tempfile", "0.1.2"
|
100
|
+
s.metadata = { "rubygems_mfa_required" => "false" }
|
104
101
|
end
|
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-2022 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-2022 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-2022 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"),
|
@@ -59,7 +59,7 @@ module Lazylead
|
|
59
59
|
def apply_vcs_migration(opts)
|
60
60
|
@db = "#{File.expand_path(opts[:home])}/#{opts[:sqlite]}"
|
61
61
|
vcs = "#{File.expand_path(opts[:home])}/#{opts[:vcs4sql]}"
|
62
|
-
@log.debug "Database: '#{@db.colorize(:light_blue)}', "\
|
62
|
+
@log.debug "Database: '#{@db.colorize(:light_blue)}', " \
|
63
63
|
"sql migration dir: '#{vcs.colorize(:light_blue)}'"
|
64
64
|
Vcs4sql::Sqlite::Migration.new(@db).upgrade vcs, opts[:testdata]
|
65
65
|
@log.debug "Migration applied to '#{@db.colorize(:light_blue)}' from " \
|
@@ -70,7 +70,7 @@ module Lazylead
|
|
70
70
|
ActiveRecord::Base.establish_connection(
|
71
71
|
adapter: "sqlite3",
|
72
72
|
database: @db,
|
73
|
-
pool: opts[:max_connections] || ENV
|
73
|
+
pool: opts[:max_connections] || ENV.fetch("MT_CPU", nil)
|
74
74
|
)
|
75
75
|
@log.debug "Database connection established"
|
76
76
|
end
|
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-2022 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,9 @@ module Lazylead
|
|
34
34
|
class Confluence
|
35
35
|
def initialize(conf)
|
36
36
|
@conf = conf
|
37
|
-
@http = Faraday.new(url: @conf.url)
|
38
|
-
|
37
|
+
@http = Faraday.new(url: @conf.url) do |conn|
|
38
|
+
conn.request :authorization, :basic, @conf.user, @conf.pass
|
39
|
+
end
|
39
40
|
end
|
40
41
|
|
41
42
|
# Confluence instance url like
|
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-2022 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-2022 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"),
|
@@ -51,8 +51,8 @@ module Lazylead
|
|
51
51
|
# :opts :: the mail configuration like from, cc, subject, template.
|
52
52
|
def send(opts)
|
53
53
|
if opts.msg_to.empty?
|
54
|
-
@log.warn "ll-012: Email can't be sent to '#{opts.msg_to}," \
|
55
|
-
"
|
54
|
+
@log.warn "ll-012: Email can't be sent to '#{opts.msg_to}, " \
|
55
|
+
"more: '#{opts}'"
|
56
56
|
else
|
57
57
|
msg = make_msg opts
|
58
58
|
cli.send_message msg
|
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-2022 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 @@ module Lazylead
|
|
32
32
|
# License:: MIT
|
33
33
|
class Home
|
34
34
|
def dir
|
35
|
-
ENV["LL_HOME"].nil? ? Dir.pwd : ENV
|
35
|
+
ENV["LL_HOME"].nil? ? Dir.pwd : ENV.fetch("LL_HOME", nil)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
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-2022 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-2022 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"),
|
@@ -68,7 +68,7 @@ module Lazylead
|
|
68
68
|
opts.each_with_object({}) do |e, o|
|
69
69
|
k = e[0]
|
70
70
|
v = e[1]
|
71
|
-
v = ENV
|
71
|
+
v = ENV.fetch(v.slice(2, v.length - 3), nil) if v.respond_to?(:start_with?) && v.start_with?("${")
|
72
72
|
o[k] = v
|
73
73
|
end
|
74
74
|
end
|
@@ -217,9 +217,10 @@ module Lazylead
|
|
217
217
|
retries ||= 0
|
218
218
|
@orig.exec
|
219
219
|
@orig
|
220
|
-
rescue StandardError
|
220
|
+
rescue StandardError => e
|
221
221
|
sleep(props.fetch("attempt_wait", 0).to_f) if props.key? "attempt_wait"
|
222
222
|
retry if (retries += 1) < props.fetch("attempt", 0).to_i
|
223
|
+
raise e if props.key? "rethrow"
|
223
224
|
@orig
|
224
225
|
end
|
225
226
|
end
|
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-2022 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/os.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 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"),
|
@@ -45,6 +45,7 @@ module Lazylead
|
|
45
45
|
# Please note, that this is not a raw stdout.
|
46
46
|
# The output will be modified by String#scrub! in order to avoid invalid byte sequence
|
47
47
|
# in UTF-8 (https://stackoverflow.com/a/24037885/6916890).
|
48
|
+
# @todo #/DEV Add support of multiline string literals, not just array of commands
|
48
49
|
def run(*cmd)
|
49
50
|
return "" if cmd.empty? || cmd.any?(&:nil?)
|
50
51
|
todo = cmd
|
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-2022 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"),
|
@@ -54,8 +54,8 @@ module Lazylead
|
|
54
54
|
# :opts :: the mail configuration like to, from, cc, subject, template.
|
55
55
|
def send(opts)
|
56
56
|
if opts.msg_to.empty?
|
57
|
-
@log.warn "ll-013: Email can't be sent to '#{opts.msg_to}," \
|
58
|
-
"
|
57
|
+
@log.warn "ll-013: Email can't be sent to '#{opts.msg_to}, " \
|
58
|
+
"more: '#{opts}'"
|
59
59
|
else
|
60
60
|
mail = make_email(opts)
|
61
61
|
mail.deliver
|
@@ -116,6 +116,7 @@ module Lazylead
|
|
116
116
|
def send(opts)
|
117
117
|
if opts.msg_to.empty?
|
118
118
|
@log.warn "ll-015: Email can't be sent as 'to' is empty, more: '#{opts}'"
|
119
|
+
""
|
119
120
|
else
|
120
121
|
file = filename(opts)
|
121
122
|
File.open(file, "w") do |f|
|
@@ -125,15 +126,15 @@ module Lazylead
|
|
125
126
|
end
|
126
127
|
@log.debug "Mail '#{opts['subject']}' for #{opts.msg_to} sent to " \
|
127
128
|
"'#{file.to_s.colorize(:light_blue)}'"
|
129
|
+
file
|
128
130
|
end
|
129
131
|
end
|
130
132
|
|
131
133
|
# Assemble file name where email to be print
|
132
134
|
def filename(opts)
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
)
|
135
|
+
dir = @env.fetch("file_postman_dir", ".")
|
136
|
+
FileUtils.mkdir_p(dir)
|
137
|
+
File.join(dir, Zaru.sanitize!("#{Time.now.nsec}-#{opts['subject']}.html"))
|
137
138
|
end
|
138
139
|
end
|
139
140
|
end
|
data/lib/lazylead/requires.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 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/salt.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 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"),
|