lazylead 0.12.0 → 0.13.0

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.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.0pdd.yml +3 -0
  3. data/.circleci/config.yml +0 -13
  4. data/.github/workflows/build.yml +39 -0
  5. data/.github/workflows/release.yml +15 -0
  6. data/.rubocop.yml +5 -1
  7. data/.rultor.yml +2 -2
  8. data/Gemfile +1 -1
  9. data/Rakefile +17 -9
  10. data/bin/lazylead +5 -5
  11. data/lazylead.gemspec +16 -20
  12. data/lib/lazylead/allocated.rb +1 -1
  13. data/lib/lazylead/cc.rb +1 -1
  14. data/lib/lazylead/cli/app.rb +3 -3
  15. data/lib/lazylead/confluence.rb +1 -1
  16. data/lib/lazylead/email.rb +1 -1
  17. data/lib/lazylead/exchange.rb +3 -3
  18. data/lib/lazylead/home.rb +2 -2
  19. data/lib/lazylead/log.rb +1 -1
  20. data/lib/lazylead/model.rb +2 -2
  21. data/lib/lazylead/opts.rb +1 -1
  22. data/lib/lazylead/os.rb +2 -1
  23. data/lib/lazylead/postman.rb +4 -4
  24. data/lib/lazylead/requires.rb +1 -1
  25. data/lib/lazylead/salt.rb +1 -1
  26. data/lib/lazylead/schedule.rb +1 -1
  27. data/lib/lazylead/smtp.rb +1 -1
  28. data/lib/lazylead/system/empty.rb +1 -1
  29. data/lib/lazylead/system/fake.rb +1 -1
  30. data/lib/lazylead/system/jira.rb +5 -3
  31. data/lib/lazylead/system/synced.rb +1 -1
  32. data/lib/lazylead/task/accuracy/accuracy.rb +3 -3
  33. data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
  34. data/lib/lazylead/task/accuracy/attachment.rb +1 -1
  35. data/lib/lazylead/task/accuracy/environment.rb +1 -1
  36. data/lib/lazylead/task/accuracy/has_label.rb +1 -1
  37. data/lib/lazylead/task/accuracy/logs.rb +1 -1
  38. data/lib/lazylead/task/accuracy/logs_link.rb +1 -1
  39. data/lib/lazylead/task/accuracy/memes.rb +1 -1
  40. data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
  41. data/lib/lazylead/task/accuracy/records.rb +1 -1
  42. data/lib/lazylead/task/accuracy/records_link.rb +1 -1
  43. data/lib/lazylead/task/accuracy/required.rb +1 -1
  44. data/lib/lazylead/task/accuracy/requirement.rb +1 -1
  45. data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
  46. data/lib/lazylead/task/accuracy/servers.rb +1 -1
  47. data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
  48. data/lib/lazylead/task/accuracy/testcase.rb +1 -1
  49. data/lib/lazylead/task/accuracy/wiki.rb +1 -1
  50. data/lib/lazylead/task/accuracy/wiki_url.rb +1 -1
  51. data/lib/lazylead/task/alert/alert.rb +1 -1
  52. data/lib/lazylead/task/alert/alertif.rb +1 -1
  53. data/lib/lazylead/task/alert/changed_to.rb +1 -1
  54. data/lib/lazylead/task/assignment.rb +1 -1
  55. data/lib/lazylead/task/confluence_ref.rb +1 -1
  56. data/lib/lazylead/task/echo.rb +1 -1
  57. data/lib/lazylead/task/fix_version.rb +1 -1
  58. data/lib/lazylead/task/git/git.rb +1 -1
  59. data/lib/lazylead/task/loading.rb +1 -1
  60. data/lib/lazylead/task/micromanager.rb +1 -1
  61. data/lib/lazylead/task/missing_comment.rb +1 -1
  62. data/lib/lazylead/task/propagate_down.rb +1 -1
  63. data/lib/lazylead/task/savepoint.rb +1 -1
  64. data/lib/lazylead/task/svn/diff.rb +1 -1
  65. data/lib/lazylead/task/svn/grep.rb +1 -1
  66. data/lib/lazylead/task/svn/svn.rb +1 -1
  67. data/lib/lazylead/task/svn/touch.rb +42 -14
  68. data/lib/lazylead/version.rb +2 -2
  69. data/lib/lazylead.rb +1 -1
  70. data/license.txt +1 -1
  71. data/readme.md +14 -12
  72. data/test/lazylead/allocated_test.rb +1 -1
  73. data/test/lazylead/cc_test.rb +7 -7
  74. data/test/lazylead/cli/app_test.rb +1 -1
  75. data/test/lazylead/confluence_test.rb +1 -1
  76. data/test/lazylead/exchange_test.rb +10 -10
  77. data/test/lazylead/file_postman_test.rb +1 -1
  78. data/test/lazylead/model_test.rb +2 -2
  79. data/test/lazylead/opts_test.rb +1 -1
  80. data/test/lazylead/postman_test.rb +7 -7
  81. data/test/lazylead/retry_test.rb +1 -1
  82. data/test/lazylead/salt_test.rb +1 -1
  83. data/test/lazylead/smoke_test.rb +2 -2
  84. data/test/lazylead/smtp_test.rb +7 -7
  85. data/test/lazylead/stdout_postman_test.rb +1 -1
  86. data/test/lazylead/system/jira_test.rb +53 -54
  87. data/test/lazylead/task/accuracy/accuracy_test.rb +11 -11
  88. data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
  89. data/test/lazylead/task/accuracy/attachment_test.rb +4 -4
  90. data/test/lazylead/task/accuracy/environment_test.rb +1 -1
  91. data/test/lazylead/task/accuracy/has_label_test.rb +1 -1
  92. data/test/lazylead/task/accuracy/logs_link_test.rb +1 -1
  93. data/test/lazylead/task/accuracy/logs_test.rb +1 -1
  94. data/test/lazylead/task/accuracy/memes_test.rb +1 -1
  95. data/test/lazylead/task/accuracy/onlyll_test.rb +21 -21
  96. data/test/lazylead/task/accuracy/records_llink_test.rb +1 -1
  97. data/test/lazylead/task/accuracy/records_test.rb +1 -1
  98. data/test/lazylead/task/accuracy/score_test.rb +4 -4
  99. data/test/lazylead/task/accuracy/screenshots_test.rb +3 -3
  100. data/test/lazylead/task/accuracy/servers_test.rb +1 -1
  101. data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
  102. data/test/lazylead/task/accuracy/testcase_test.rb +1 -1
  103. data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
  104. data/test/lazylead/task/accuracy/wiki_url_test.rb +1 -1
  105. data/test/lazylead/task/alert/alertif_test.rb +5 -5
  106. data/test/lazylead/task/alert/assignee_alert_test.rb +1 -1
  107. data/test/lazylead/task/alert/changed_to_test.rb +5 -5
  108. data/test/lazylead/task/assignment_test.rb +5 -5
  109. data/test/lazylead/task/confluence_ref_test.rb +8 -8
  110. data/test/lazylead/task/created_recently_test.rb +4 -4
  111. data/test/lazylead/task/duedate_test.rb +14 -14
  112. data/test/lazylead/task/echo_test.rb +1 -1
  113. data/test/lazylead/task/fix_version_test.rb +6 -5
  114. data/test/lazylead/task/loading_test.rb +7 -7
  115. data/test/lazylead/task/micromanager_test.rb +5 -5
  116. data/test/lazylead/task/missing_comment_test.rb +4 -4
  117. data/test/lazylead/task/propagate_down_test.rb +1 -1
  118. data/test/lazylead/task/savepoint_test.rb +1 -1
  119. data/test/lazylead/task/svn/diff_test.rb +14 -15
  120. data/test/lazylead/task/svn/grep_test.rb +4 -3
  121. data/test/lazylead/task/svn/touch_test.rb +74 -6
  122. data/test/lazylead/version_test.rb +1 -1
  123. data/test/sqlite_test.rb +1 -1
  124. data/test/test.rb +10 -3
  125. metadata +33 -98
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43563f79f164a2094eda0d74d373eaa3e90d564b1d653e49adb8c1c588d049d8
4
- data.tar.gz: 3d7491056be166fed7667721827723dce02ddc7d529a4ac08c690d871e2df8d0
3
+ metadata.gz: 359acf575a8e7cc8b4e4896446c74390715249ae8f1ed547af526d3300e5b520
4
+ data.tar.gz: 0c324152b043999546f503aa55f66147e2749106d68ffe61325e6dbabf0256bf
5
5
  SHA512:
6
- metadata.gz: a2417a507a95b490d518c875635588c7eaedde588dd7c62c359f445d227afadae0625f52e05f998db69d45aa8c92f33910337f278b01ef42ea1904110ed01b7f
7
- data.tar.gz: a8bb2a796784644fffdde7de78fe3726a4a718f0f769a19d030316f0dcaa6b57fbb6ff32e0e19a98d833a85dc246afadb1170a6c4c392761e0ada75918780c21
6
+ metadata.gz: 18373c1b59c44cc8cd4cfde55fb6ec573851b1f51d78c7e6a5a7d5b6ddd2b3428c86430b3c913923624fa9ba31aff9274c5b4b1c46399ae942e0e1bc61335d59
7
+ data.tar.gz: 9978b72b3c076526cfc1023b39bfe48476a93cb8d19a3d56077d9c7b9962e54e52de1a873b8df29365764fae02ab391540ffb86c7fd8f59a35e444e3fd82ff1c
data/.0pdd.yml CHANGED
@@ -4,5 +4,8 @@ alerts:
4
4
  suppress:
5
5
  - on-found-puzzle
6
6
  - on-lost-puzzle
7
+ - on-scope
8
+ format:
9
+ - title-length=250
7
10
  tags:
8
11
  - pdd
data/.circleci/config.yml CHANGED
@@ -3,16 +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: rubocop -A
15
- - run: bundle exec rake test rubocop sqlint xcop
16
6
  deploy:
17
7
  machine: true
18
8
  steps:
@@ -58,11 +48,8 @@ workflows:
58
48
  version: 2
59
49
  build_and_test:
60
50
  jobs:
61
- - test
62
51
  - deploy:
63
52
  filters:
64
53
  branches:
65
54
  only:
66
55
  - master
67
- requires:
68
- - test
@@ -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
@@ -154,6 +154,10 @@ Style/SwapValues: # (new in 1.1)
154
154
  Enabled: true
155
155
  Style/HashConversion: # (new in 1.10)
156
156
  Enabled: true
157
+ Style/RedundantStringEscape: # (new in 1.7)
158
+ Enabled: true
159
+ Exclude:
160
+ - "test/lazylead/task/svn/grep_test.rb"
157
161
  Minitest/AssertInDelta: # (new in 0.10)
158
162
  Enabled: true
159
163
  Minitest/AssertionInLifecycleHook: # (new in 0.10)
@@ -210,7 +214,7 @@ Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
210
214
  Enabled: true
211
215
  Performance/RedundantSplitRegexpArgument: # (new in 1.10)
212
216
  Enabled: true
213
- Gemspec/DateAssignment: # (new in 1.10)
217
+ Gemspec/DeprecatedAttributeAssignment: # (new in 1.10)
214
218
  Enabled: true
215
219
  Gemspec/RequireMFA:
216
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 xcop
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 xcop
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-2021 Yurii Dubinka
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-2021 Yurii Dubinka
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 xcop copyright docker]
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
- require "xcop/rake_task"
93
- desc "Validate all XML/XSL/XSD/HTML files for formatting"
94
- Xcop::RakeTask.new :xcop do |task|
95
- task.license = "license.txt"
96
- task.includes = %w[**/*.xml **/*.xsl **/*.xsd **/*.html]
97
- task.excludes = %w[target/**/* coverage/**/* wp/**/* test/resources/*]
98
- end
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-2021 Yurii Dubinka
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["smtp_host"],
95
- smtp_port: ENV["smtp_port"],
96
- smtp_user: ENV["smtp_user"],
97
- smtp_pass: ENV["smtp_pass"]
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-2021 Yurii Dubinka
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.12.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.12.0!
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", "2.1.0"
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
61
  s.add_runtime_dependency "jira-ruby", "2.2.0"
65
- s.add_runtime_dependency "json", "2.6.1"
66
- s.add_runtime_dependency "logging", "2.3.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,20 +68,20 @@ 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.8.1"
75
- s.add_runtime_dependency "slop", "4.9.1"
76
- s.add_runtime_dependency "sqlite3", "1.4.2"
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"
77
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.2021.5"
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.15.0"
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
87
  s.add_development_dependency "minitest-reporters", "1.5.0"
@@ -92,14 +89,13 @@ tasks instead of solving technical problems."
92
89
  s.add_development_dependency "rake", "13.0.6"
93
90
  s.add_development_dependency "random-port", "0.5.1"
94
91
  s.add_development_dependency "rdoc", "6.4.0"
95
- s.add_development_dependency "rubocop", "1.24.1"
96
- s.add_development_dependency "rubocop-minitest", "0.17.0"
97
- s.add_development_dependency "rubocop-performance", "1.13.1"
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.7.0"
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.0"
98
+ s.add_development_dependency "sqlint", "0.2.1"
102
99
  s.add_development_dependency "tempfile", "0.1.2"
103
- s.add_development_dependency "xcop", "0.6.3"
104
100
  s.metadata = { "rubygems_mfa_required" => "false" }
105
101
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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["MT_CPU"]
73
+ pool: opts[:max_connections] || ENV.fetch("MT_CPU", nil)
74
74
  )
75
75
  @log.debug "Database connection established"
76
76
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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
- " more: '#{opts}'"
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-2021 Yurii Dubinka
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["LL_HOME"]
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-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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[v.slice(2, v.length - 3)] if v.respond_to?(:start_with?) && v.start_with?("${")
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
data/lib/lazylead/opts.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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-2021 Yurii Dubinka
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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
- " more: '#{opts}'"
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
@@ -133,7 +133,7 @@ module Lazylead
133
133
  # Assemble file name where email to be print
134
134
  def filename(opts)
135
135
  dir = @env.fetch("file_postman_dir", ".")
136
- FileUtils.mkdir_p(dir) unless File.exist?(dir)
136
+ FileUtils.mkdir_p(dir)
137
137
  File.join(dir, Zaru.sanitize!("#{Time.now.nsec}-#{opts['subject']}.html"))
138
138
  end
139
139
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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/smtp.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -47,8 +47,8 @@ module Lazylead
47
47
  @salt = salt
48
48
  @log = log
49
49
  @log.debug "Initiate a Jira client using following opts: " \
50
- "#{@opts.except 'password', :password} " \
51
- " and salt #{@salt.id} (found=#{@salt.specified?})"
50
+ "#{@opts.except 'password', :password} " \
51
+ "and salt #{@salt.id} (found=#{@salt.specified?})"
52
52
  end
53
53
 
54
54
  # Find the jira issues by 'JQL'
@@ -132,6 +132,8 @@ module Lazylead
132
132
  end
133
133
 
134
134
  def email
135
+ return @usr["emailAddress"] unless @usr["emailAddress"].nil?
136
+ return id if id.include?("@")
135
137
  @usr["emailAddress"]
136
138
  end
137
139
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),
@@ -98,8 +98,8 @@ module Lazylead
98
98
  comment = [
99
99
  "Hi [~#{reporter}],",
100
100
  "",
101
- "The triage accuracy is '{color:#{color}}#{@score}{color}'" \
102
- " (~{color:#{color}}#{@accuracy}%{color}), here are the reasons why:",
101
+ "The triage accuracy is '{color:#{color}}#{@score}{color}' " \
102
+ "(~{color:#{color}}#{@accuracy}%{color}), here are the reasons why:",
103
103
  "|| Ticket requirement || Status || Field ||"
104
104
  ]
105
105
  @opts[:rules].each do |r|
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2021 Yurii Dubinka
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"),