lazylead 0.7.0 → 0.8.2

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +7 -2
  3. data/.docker/Dockerfile +17 -6
  4. data/.docs/duedate_expired.md +1 -1
  5. data/.rubocop.yml +71 -2
  6. data/Gemfile +1 -1
  7. data/Rakefile +7 -4
  8. data/bin/lazylead +1 -1
  9. data/lazylead.gemspec +26 -25
  10. data/lib/lazylead.rb +2 -2
  11. data/lib/lazylead/allocated.rb +1 -1
  12. data/lib/lazylead/cc.rb +17 -23
  13. data/lib/lazylead/cli/app.rb +1 -1
  14. data/lib/lazylead/confluence.rb +2 -2
  15. data/lib/lazylead/email.rb +1 -1
  16. data/lib/lazylead/exchange.rb +1 -1
  17. data/lib/lazylead/home.rb +1 -1
  18. data/lib/lazylead/log.rb +1 -1
  19. data/lib/lazylead/model.rb +6 -8
  20. data/lib/lazylead/opts.rb +6 -3
  21. data/lib/lazylead/postman.rb +1 -1
  22. data/{Guardfile → lib/lazylead/requires.rb} +13 -8
  23. data/lib/lazylead/salt.rb +1 -1
  24. data/lib/lazylead/schedule.rb +1 -1
  25. data/lib/lazylead/smtp.rb +1 -1
  26. data/lib/lazylead/system/empty.rb +1 -1
  27. data/lib/lazylead/system/fake.rb +1 -1
  28. data/lib/lazylead/system/jira.rb +20 -18
  29. data/lib/lazylead/system/synced.rb +1 -1
  30. data/lib/lazylead/task/accuracy/accuracy.rb +24 -30
  31. data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
  32. data/lib/lazylead/task/accuracy/attachment.rb +3 -3
  33. data/lib/lazylead/task/accuracy/environment.rb +1 -1
  34. data/lib/lazylead/task/accuracy/logs.rb +6 -3
  35. data/lib/lazylead/task/accuracy/onlyll.rb +7 -10
  36. data/lib/lazylead/task/accuracy/records.rb +2 -2
  37. data/lib/lazylead/task/accuracy/requirement.rb +1 -1
  38. data/lib/lazylead/task/accuracy/screenshots.rb +51 -0
  39. data/lib/lazylead/task/accuracy/servers.rb +3 -3
  40. data/lib/lazylead/task/accuracy/stacktrace.rb +1 -1
  41. data/lib/lazylead/task/accuracy/testcase.rb +3 -3
  42. data/lib/lazylead/task/accuracy/wiki.rb +1 -1
  43. data/lib/lazylead/task/{alert.rb → alert/alert.rb} +6 -6
  44. data/lib/lazylead/task/alert/alertif.rb +75 -0
  45. data/lib/lazylead/task/alert/changed_to.rb +58 -0
  46. data/lib/lazylead/task/assignment.rb +1 -1
  47. data/lib/lazylead/task/confluence_ref.rb +1 -1
  48. data/lib/lazylead/task/echo.rb +1 -1
  49. data/lib/lazylead/task/fix_version.rb +1 -1
  50. data/lib/lazylead/task/loading.rb +94 -0
  51. data/lib/lazylead/task/missing_comment.rb +1 -1
  52. data/lib/lazylead/task/propagate_down.rb +3 -3
  53. data/lib/lazylead/task/savepoint.rb +1 -1
  54. data/lib/lazylead/task/svn/diff.rb +29 -7
  55. data/lib/lazylead/task/svn/grep.rb +2 -2
  56. data/lib/lazylead/task/svn/touch.rb +2 -2
  57. data/lib/lazylead/version.rb +2 -2
  58. data/lib/messages/accuracy.erb +1 -1
  59. data/lib/messages/alertif.erb +134 -0
  60. data/lib/messages/created_recently.erb +110 -0
  61. data/lib/messages/loading.erb +117 -0
  62. data/readme.md +26 -18
  63. data/test/lazylead/allocated_test.rb +1 -1
  64. data/test/lazylead/cc_test.rb +1 -1
  65. data/test/lazylead/cli/app_test.rb +2 -2
  66. data/test/lazylead/confluence_test.rb +1 -1
  67. data/test/lazylead/exchange_test.rb +1 -1
  68. data/test/lazylead/model_test.rb +1 -1
  69. data/test/lazylead/opts_test.rb +1 -1
  70. data/test/lazylead/postman_test.rb +1 -1
  71. data/test/lazylead/salt_test.rb +1 -1
  72. data/test/lazylead/smoke_test.rb +1 -1
  73. data/test/lazylead/smtp_test.rb +2 -5
  74. data/test/lazylead/system/jira_test.rb +10 -1
  75. data/test/lazylead/task/accuracy/accuracy_test.rb +1 -1
  76. data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
  77. data/test/lazylead/task/accuracy/attachment_test.rb +2 -2
  78. data/test/lazylead/task/accuracy/environment_test.rb +1 -1
  79. data/test/lazylead/task/accuracy/logs_test.rb +13 -1
  80. data/test/lazylead/task/accuracy/onlyll_test.rb +1 -1
  81. data/test/lazylead/task/accuracy/records_test.rb +1 -1
  82. data/test/lazylead/task/accuracy/score_test.rb +29 -2
  83. data/test/lazylead/task/accuracy/screenshots_test.rb +84 -0
  84. data/test/lazylead/task/accuracy/servers_test.rb +1 -1
  85. data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
  86. data/test/lazylead/task/accuracy/testcase_test.rb +28 -1
  87. data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
  88. data/test/lazylead/task/alert/alertif_test.rb +54 -0
  89. data/test/lazylead/task/{assignee_alert_test.rb → alert/assignee_alert_test.rb} +10 -10
  90. data/test/lazylead/task/alert/changed_to_test.rb +42 -0
  91. data/test/lazylead/task/assignment_test.rb +1 -1
  92. data/test/lazylead/task/confluence_ref_test.rb +1 -1
  93. data/test/lazylead/task/created_recently_test.rb +53 -0
  94. data/test/lazylead/task/duedate_test.rb +5 -12
  95. data/test/lazylead/task/echo_test.rb +1 -1
  96. data/test/lazylead/task/fix_version_test.rb +1 -1
  97. data/test/lazylead/task/loading_test.rb +54 -0
  98. data/test/lazylead/task/missing_comment_test.rb +1 -1
  99. data/test/lazylead/task/propagate_down_test.rb +1 -1
  100. data/test/lazylead/task/savepoint_test.rb +3 -3
  101. data/test/lazylead/task/svn/diff_test.rb +8 -4
  102. data/test/lazylead/task/svn/grep_test.rb +1 -1
  103. data/test/lazylead/task/svn/touch_test.rb +1 -1
  104. data/test/lazylead/version_test.rb +1 -1
  105. data/test/sqlite_test.rb +1 -1
  106. data/test/test.rb +15 -5
  107. data/upgrades/sqlite/001-install-main-lazylead-tables.sql +1 -1
  108. data/upgrades/sqlite/999.testdata.sql +1 -1
  109. metadata +82 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5a5b0412fc9cb5796b066940c57e50785b64920718a09ecd4ef8794fc8b3908
4
- data.tar.gz: 148b21d628c91d27abee8fb1bb86aeaf78cfdc96b01f9cbed16c9f4f8b5c7ef3
3
+ metadata.gz: fde968b00a6b6868ea644d731c54d23d08f365b133926fa2cf13699e982a0802
4
+ data.tar.gz: 3340adabd89a6699cf0ba2fdc723ccc9e372d505b8b14b81cd7eef6c816c7fdc
5
5
  SHA512:
6
- metadata.gz: 58539cbff1ccdc9c392aaa67af4e6dc0ade92311cbf2118202392b069de15f3872f833d2081b59d97439029901b569fe72e6a54e22ddfe011c06cddef576b6e2
7
- data.tar.gz: 658f24b1dde5272d17c6cdd77f570f71de818f83a7acda9c5b3cdebf497f514e7f890862963caa49e577f2c566829be7d247bee1e236ec1248cdf0fbc4a58de2
6
+ metadata.gz: ecbf953aa53ae51b6ed4cc056794f3b8eb9e693d07cc3262070a95592546f9d45797f4ebdf4bbbacc650ad369033e9fd433e6d1975fd3f37688f5c7c3c321ee9
7
+ data.tar.gz: f2dae8c55b5b98ddca9fe769a007eb4ea40d6c2b52675fa47911bc924d9ad7b56453f1a4c3705275f2ba2840d9d662ffde58bd92c179ea2af5a2da5baf1b3156
data/.circleci/config.yml CHANGED
@@ -22,7 +22,9 @@ jobs:
22
22
  set -e
23
23
  COMMIT_URL="https://github.com/dgroup/lazylead/commit/${CIRCLE_SHA1}"
24
24
  sed -i "s/0\.0\.0/${DOCKER_RELEASE_TAGS}/g" lib/lazylead/version.rb
25
- docker build --build-arg release_tags="${CIRCLE_SHA1}, ${CIRCLE_BRANCH}, ${COMMIT_URL}" --build-arg version="${DOCKER_RELEASE_TAGS:7}" \
25
+ docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
26
+ --build-arg VCS_REF=`git rev-parse --short HEAD` \
27
+ --build-arg version=${DOCKER_RELEASE_TAGS} \
26
28
  -t dgroup/lazylead:$CIRCLE_BRANCH . \
27
29
  -f .docker/Dockerfile
28
30
  echo "Available LL images:"
@@ -42,7 +44,10 @@ jobs:
42
44
  command: |
43
45
  sed -i "s/0\.0\.0/${DOCKER_RELEASE_TAGS}/g" .docker/vcs.dockerfile
44
46
  sed -i "s/0\.0\.0/${DOCKER_RELEASE_TAGS}/g" lib/lazylead/version.rb
45
- docker build -t dgroup/lazylead:${DOCKER_RELEASE_TAGS}-vcs . -f .docker/vcs.dockerfile
47
+ docker build -t dgroup/lazylead:${DOCKER_RELEASE_TAGS}-vcs . -f .docker/vcs.dockerfile \
48
+ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
49
+ --build-arg VCS_REF=`git rev-parse --short HEAD` \
50
+ --build-arg version=${DOCKER_RELEASE_TAGS}
46
51
  docker push dgroup/lazylead:${DOCKER_RELEASE_TAGS}-vcs
47
52
  - run:
48
53
  name: "Reset tag to master"
data/.docker/Dockerfile CHANGED
@@ -1,14 +1,25 @@
1
1
  FROM ruby:2.6.5-alpine
2
2
 
3
- ARG release_tags
4
3
  ARG version
5
-
6
- LABEL about="https://github.com/dgroup/lazylead" \
7
- ci.contact="yurii.dubinka@gmail.com" \
8
- ci.release.tag="${release_tags}" \
9
- ll.docker.issues="https://github.com/dgroup/lazylead/issues?utf8=✓&q=label%3Adocker"
4
+ ARG BUILD_DATE
5
+ ARG VCS_REF
6
+
7
+ LABEL ll.docker.issues="https://github.com/dgroup/lazylead/issues?utf8=✓&q=label%3Adocker" \
8
+ org.label-schema.build-date=${BUILD_DATE} \
9
+ org.label-schema.name="lazylead" \
10
+ org.label-schema.description="Eliminate the annoying work within ticketing systems (Jira, GitHub, Trello). Allows automating (without admin access) daily actions like tickets fields verification, email notifications by JQL/GQL, meeting requests to your (or teammates) calendar." \
11
+ org.label-schema.url="https://lazylead.org/" \
12
+ org.label-schema.vcs-ref=${VCS_REF} \
13
+ org.label-schema.vcs-url="https://github.com/dgroup/lazylead" \
14
+ org.label-schema.vendor="Yurii Dubinka" \
15
+ org.label-schema.version=${version} \
16
+ org.label-schema.schema-version="1.0"
10
17
 
11
18
  ENV APP_HOME=/lazylead
19
+ ENV VERSION=${version}
20
+ ENV VCS_REF=${VCS_REF}
21
+ ENV COMMIT_URL="https://github.com/dgroup/lazylead/commit/${VCS_REF}"
22
+ ENV BUILD_DATE=${BUILD_DATE}
12
23
 
13
24
  WORKDIR $APP_HOME
14
25
 
@@ -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
@@ -3,6 +3,7 @@ require:
3
3
  - rubocop-performance
4
4
 
5
5
  AllCops:
6
+ NewCops: enable
6
7
  DisplayCopNames: true
7
8
  DisplayStyleGuide: true
8
9
  TargetRubyVersion: 2.6
@@ -85,12 +86,20 @@ Style/HashTransformValues:
85
86
  Style/FormatStringToken:
86
87
  Exclude:
87
88
  - "lib/lazylead/task/accuracy/accuracy.rb"
88
-
89
+ Style/IfWithBooleanLiteralBranches: # (new in 1.9)
90
+ Enabled: true
89
91
  Lint/RaiseException:
90
92
  Enabled: true
91
-
92
93
  Lint/StructNewOverride:
93
94
  Enabled: true
95
+ Lint/NumberedParameterAssignment: # (new in 1.9)
96
+ Enabled: true
97
+ Lint/OrAssignmentToConstant: # (new in 1.9)
98
+ Enabled: true
99
+ Lint/SymbolConversion: # (new in 1.9)
100
+ Enabled: true
101
+ Lint/TripleQuotes: # (new in 1.9)
102
+ Enabled: true
94
103
 
95
104
  # @todo #/DEV Add violation regarding methods without documentation using RDoc
96
105
  # https://stackoverflow.com/questions/1681467/how-to-document-ruby-code
@@ -139,3 +148,63 @@ Style/RedundantArgument: # (new in 1.4)
139
148
  Enabled: true
140
149
  Style/SwapValues: # (new in 1.1)
141
150
  Enabled: true
151
+ Style/HashConversion: # (new in 1.10)
152
+ Enabled: true
153
+ Minitest/AssertInDelta: # (new in 0.10)
154
+ Enabled: true
155
+ Minitest/AssertionInLifecycleHook: # (new in 0.10)
156
+ Enabled: true
157
+ Minitest/AssertKindOf: # (new in 0.10)
158
+ Enabled: true
159
+ Minitest/AssertOutput: # (new in 0.10)
160
+ Enabled: true
161
+ Minitest/AssertPathExists: # (new in 0.10)
162
+ Enabled: true
163
+ Minitest/AssertSilent: # (new in 0.10)
164
+ Enabled: true
165
+ Minitest/LiteralAsActualArgument: # (new in 0.10)
166
+ Enabled: true
167
+ Minitest/MultipleAssertions: # (new in 0.10)
168
+ Enabled: true
169
+ Minitest/RefuteInDelta: # (new in 0.10)
170
+ Enabled: true
171
+ Minitest/RefuteKindOf: # (new in 0.10)
172
+ Enabled: true
173
+ Minitest/RefutePathExists: # (new in 0.10)
174
+ Enabled: true
175
+ Minitest/TestMethodName: # (new in 0.10)
176
+ Enabled: true
177
+ Minitest/UnspecifiedException: # (new in 0.10)
178
+ Enabled: true
179
+ Performance/AncestorsInclude: # (new in 1.7)
180
+ Enabled: true
181
+ Performance/BigDecimalWithNumericArgument: # (new in 1.7)
182
+ Enabled: true
183
+ Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
184
+ Enabled: true
185
+ Performance/CollectionLiteralInLoop: # (new in 1.8)
186
+ Enabled: true
187
+ Performance/ConstantRegexp: # (new in 1.9)
188
+ Enabled: true
189
+ Performance/MethodObjectAsBlock: # (new in 1.9)
190
+ Enabled: true
191
+ Performance/RedundantSortBlock: # (new in 1.7)
192
+ Enabled: true
193
+ Performance/RedundantStringChars: # (new in 1.7)
194
+ Enabled: true
195
+ Performance/ReverseFirst: # (new in 1.7)
196
+ Enabled: true
197
+ Performance/SortReverse: # (new in 1.7)
198
+ Enabled: true
199
+ Performance/Squeeze: # (new in 1.7)
200
+ Enabled: true
201
+ Performance/StringInclude: # (new in 1.7)
202
+ Enabled: true
203
+ Performance/Sum: # (new in 1.8)
204
+ Enabled: true
205
+ Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
206
+ Enabled: true
207
+ Performance/RedundantSplitRegexpArgument: # (new in 1.10)
208
+ Enabled: true
209
+ Gemspec/DateAssignment: # (new in 1.10)
210
+ Enabled: true
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2020 Yurii Dubinka
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-2020 Yurii Dubinka
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"),
@@ -125,9 +125,12 @@ end
125
125
 
126
126
  task :docker do
127
127
  puts "Building docker image..."
128
- system "docker-compose -f .docker/docker-compose.yml build "\
129
- " --build-arg release_tags='latest 1.0'"\
130
- " --build-arg version=1.0"
128
+ system <<~CMD
129
+ docker-compose -f .docker/docker-compose.yml build \
130
+ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
131
+ --build-arg VCS_REF=`git rev-parse --short HEAD` \
132
+ --build-arg version=1.0
133
+ CMD
131
134
  system "docker-compose -f .docker/docker-compose.yml rm --force -s lazylead"
132
135
  system "docker-compose -f .docker/docker-compose.yml up"
133
136
  end
data/bin/lazylead CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # The MIT License
5
5
  #
6
- # Copyright (c) 2019-2020 Yurii Dubinka
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-2020 Yurii Dubinka
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.7.0"
35
+ s.version = "0.8.2"
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.7.0!
48
+ s.post_install_message = "Thanks for installing Lazylead v0.8.2!
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,46 +55,47 @@ 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.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
- s.add_runtime_dependency "faraday", "1.0.1"
61
+ s.add_runtime_dependency "faraday", "1.3.0"
62
62
  s.add_runtime_dependency "get_process_mem", "0.2.7"
63
63
  s.add_runtime_dependency "inifile", "3.0.0"
64
- s.add_runtime_dependency "jira-ruby", "1.7.1"
64
+ s.add_runtime_dependency "jira-ruby", "2.1.5"
65
65
  s.add_runtime_dependency "json", "2.5.1"
66
66
  s.add_runtime_dependency "logging", "2.3.0"
67
67
  s.add_runtime_dependency "mail", "2.7.1"
68
- s.add_runtime_dependency "memory_profiler", "0.9.13"
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.1"
70
+ s.add_runtime_dependency "railties", "6.1.3"
71
71
  s.add_runtime_dependency "require_all", "3.0.0"
72
- s.add_runtime_dependency "rufus-scheduler", "3.6.0"
73
- s.add_runtime_dependency "slop", "4.4"
72
+ s.add_runtime_dependency "rubyzip", "2.3.0"
73
+ s.add_runtime_dependency "rufus-scheduler", "3.7.0"
74
+ s.add_runtime_dependency "slop", "4.8.2"
74
75
  s.add_runtime_dependency "sqlite3", "1.4.2"
75
- s.add_runtime_dependency "tempfile", "0.1.0"
76
+ s.add_runtime_dependency "tempfile", "0.1.1"
76
77
  s.add_runtime_dependency "tilt", "2.0.10"
77
78
  s.add_runtime_dependency "tzinfo", "2.0.4"
78
- s.add_runtime_dependency "tzinfo-data", "1.2020.6"
79
+ s.add_runtime_dependency "tzinfo-data", "1.2021.1"
79
80
  s.add_runtime_dependency "vcs4sql", "0.1.1"
80
- s.add_runtime_dependency "viewpoint", "1.1.0"
81
- s.add_development_dependency "codecov", "0.2.15"
82
- s.add_development_dependency "guard", "2.15.0"
81
+ s.add_runtime_dependency "viewpoint", "1.1.1"
82
+ s.add_development_dependency "codecov", "0.5.1"
83
+ s.add_development_dependency "guard", "2.16.2"
83
84
  s.add_development_dependency "guard-minitest", "2.4.6"
84
- s.add_development_dependency "minitest", "5.14.3"
85
+ s.add_development_dependency "minitest", "5.14.4"
85
86
  s.add_development_dependency "minitest-fail-fast", "0.1.0"
86
87
  s.add_development_dependency "minitest-hooks", "1.5.0"
87
- s.add_development_dependency "minitest-reporters", "1.3.6"
88
+ s.add_development_dependency "minitest-reporters", "1.4.3"
88
89
  s.add_development_dependency "net-ping", "2.0.8"
89
- s.add_development_dependency "rake", "12.3.3"
90
- s.add_development_dependency "random-port", "0.3.1"
90
+ s.add_development_dependency "rake", "13.0.3"
91
+ s.add_development_dependency "random-port", "0.5.1"
91
92
  s.add_development_dependency "rdoc", "6.3.0"
92
- s.add_development_dependency "rubocop", "1.8.1"
93
- s.add_development_dependency "rubocop-minitest", "0.5.1"
94
- s.add_development_dependency "rubocop-performance", "1.5.2"
93
+ s.add_development_dependency "rubocop", "1.12.0"
94
+ s.add_development_dependency "rubocop-minitest", "0.11.0"
95
+ s.add_development_dependency "rubocop-performance", "1.10.2"
95
96
  s.add_development_dependency "rubocop-rake", "0.5.1"
96
- s.add_development_dependency "rubocop-rspec", "1.33.0"
97
- s.add_development_dependency "sqlint", "0.1.10"
98
- s.add_development_dependency "tempfile", "0.1.0"
97
+ s.add_development_dependency "rubocop-rspec", "2.2.0"
98
+ s.add_development_dependency "sqlint", "0.2.0"
99
+ s.add_development_dependency "tempfile", "0.1.1"
99
100
  s.add_development_dependency "xcop", "0.6.2"
100
101
  end
data/lib/lazylead.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2020 Yurii Dubinka
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"
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2020 Yurii Dubinka
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-2020 Yurii Dubinka
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"),
@@ -80,13 +80,11 @@ module Lazylead
80
80
  end
81
81
 
82
82
  def cc
83
- @cc ||= begin
84
- if @text.include? ","
85
- @text.split(",").map(&:strip).select { |e| e[@regxp] }
86
- elsif @text[@regxp]
87
- [@text.strip]
88
- end
89
- end
83
+ @cc ||= if @text.include? ","
84
+ @text.split(",").map(&:strip).select { |e| e[@regxp] }
85
+ elsif @text[@regxp]
86
+ [@text.strip]
87
+ end
90
88
  end
91
89
 
92
90
  def each(&block)
@@ -125,15 +123,13 @@ module Lazylead
125
123
  end
126
124
 
127
125
  def to_h
128
- @to_h ||= begin
129
- if @orig.is_a? Hash
130
- @orig.each_with_object({}) do |i, o|
131
- o[i.first] = Lazylead::PlainCC.new(i.last).cc
132
- end
133
- else
134
- {}
135
- end
136
- end
126
+ @to_h ||= if @orig.is_a? Hash
127
+ @orig.each_with_object({}) do |i, o|
128
+ o[i.first] = Lazylead::PlainCC.new(i.last).cc
129
+ end
130
+ else
131
+ {}
132
+ end
137
133
  end
138
134
  end
139
135
 
@@ -151,12 +147,10 @@ module Lazylead
151
147
  end
152
148
 
153
149
  def to_h
154
- @to_h ||= begin
155
- components.each_with_object({}) do |c, h|
156
- email = lead(c.attrs["id"])
157
- next if email.nil? || email.blank?
158
- h[c.attrs["name"]] = email
159
- end
150
+ @to_h ||= components.each_with_object({}) do |c, h|
151
+ email = lead(c.attrs["id"])
152
+ next if email.nil? || email.blank?
153
+ h[c.attrs["name"]] = email
160
154
  end
161
155
  end
162
156
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2020 Yurii Dubinka
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-2020 Yurii Dubinka
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"),
@@ -115,7 +115,7 @@ module Lazylead
115
115
  .select { |cmnt| @confl.any? { |c| cmnt.include? c.url } }
116
116
  .flat_map(&:split)
117
117
  .select { |cmnt| @confl.any? { |c| cmnt.start_with? c.url } }
118
- .map(&method(:to_page_id))
118
+ .map { |url| to_page_id(url) }
119
119
  .reject(&:blank?)
120
120
  .uniq
121
121
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License
4
4
  #
5
- # Copyright (c) 2019-2020 Yurii Dubinka
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"),