lazylead 0.6.1 → 0.8.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 (113) 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 +119 -3
  6. data/.simplecov +1 -1
  7. data/Gemfile +1 -1
  8. data/Guardfile +2 -2
  9. data/Rakefile +7 -4
  10. data/bin/lazylead +4 -2
  11. data/lazylead.gemspec +33 -29
  12. data/lib/lazylead.rb +2 -2
  13. data/lib/lazylead/allocated.rb +1 -1
  14. data/lib/lazylead/cc.rb +22 -21
  15. data/lib/lazylead/cli/app.rb +3 -3
  16. data/lib/lazylead/confluence.rb +10 -3
  17. data/lib/lazylead/email.rb +1 -21
  18. data/lib/lazylead/exchange.rb +17 -29
  19. data/lib/lazylead/home.rb +1 -1
  20. data/lib/lazylead/log.rb +1 -1
  21. data/lib/lazylead/model.rb +25 -17
  22. data/lib/lazylead/opts.rb +68 -3
  23. data/lib/lazylead/postman.rb +14 -19
  24. data/lib/lazylead/requires.rb +38 -0
  25. data/lib/lazylead/salt.rb +2 -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 +28 -20
  31. data/lib/lazylead/system/synced.rb +1 -1
  32. data/lib/lazylead/task/accuracy/accuracy.rb +23 -30
  33. data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
  34. data/lib/lazylead/task/accuracy/attachment.rb +3 -7
  35. data/lib/lazylead/task/accuracy/environment.rb +1 -1
  36. data/lib/lazylead/task/accuracy/logs.rb +10 -5
  37. data/lib/lazylead/task/accuracy/onlyll.rb +147 -0
  38. data/lib/lazylead/task/accuracy/records.rb +2 -2
  39. data/lib/lazylead/task/accuracy/requirement.rb +1 -1
  40. data/lib/lazylead/task/accuracy/servers.rb +17 -8
  41. data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
  42. data/lib/lazylead/task/accuracy/testcase.rb +3 -3
  43. data/lib/lazylead/task/accuracy/wiki.rb +1 -1
  44. data/lib/lazylead/task/{alert.rb → alert/alert.rb} +6 -6
  45. data/lib/lazylead/task/alert/alertif.rb +75 -0
  46. data/lib/lazylead/task/alert/changed_to.rb +58 -0
  47. data/lib/lazylead/task/assignment.rb +1 -1
  48. data/lib/lazylead/task/confluence_ref.rb +1 -1
  49. data/lib/lazylead/task/echo.rb +1 -1
  50. data/lib/lazylead/task/fix_version.rb +5 -3
  51. data/lib/lazylead/task/loading.rb +94 -0
  52. data/lib/lazylead/task/missing_comment.rb +1 -1
  53. data/lib/lazylead/task/propagate_down.rb +4 -4
  54. data/lib/lazylead/task/savepoint.rb +1 -1
  55. data/lib/lazylead/task/svn/diff.rb +6 -14
  56. data/lib/lazylead/task/svn/grep.rb +41 -13
  57. data/lib/lazylead/task/svn/touch.rb +3 -5
  58. data/lib/lazylead/version.rb +2 -2
  59. data/lib/messages/accuracy.erb +1 -1
  60. data/lib/messages/alertif.erb +134 -0
  61. data/lib/messages/created_recently.erb +110 -0
  62. data/lib/messages/illegal_fixversion_change.erb +8 -2
  63. data/lib/messages/loading.erb +117 -0
  64. data/lib/messages/only_ll.erb +107 -0
  65. data/lib/messages/svn_diff_attachment.erb +18 -8
  66. data/lib/messages/svn_grep.erb +1 -1
  67. data/readme.md +3 -3
  68. data/test/lazylead/allocated_test.rb +1 -1
  69. data/test/lazylead/cc_test.rb +2 -1
  70. data/test/lazylead/cli/app_test.rb +2 -2
  71. data/test/lazylead/confluence_test.rb +1 -1
  72. data/test/lazylead/exchange_test.rb +1 -1
  73. data/test/lazylead/model_test.rb +11 -1
  74. data/test/lazylead/opts_test.rb +48 -1
  75. data/test/lazylead/postman_test.rb +9 -6
  76. data/test/lazylead/salt_test.rb +1 -1
  77. data/test/lazylead/smoke_test.rb +14 -1
  78. data/test/lazylead/smtp_test.rb +2 -5
  79. data/test/lazylead/system/jira_test.rb +10 -1
  80. data/test/lazylead/task/accuracy/accuracy_test.rb +1 -1
  81. data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
  82. data/test/lazylead/task/accuracy/attachment_test.rb +2 -2
  83. data/test/lazylead/task/accuracy/environment_test.rb +1 -1
  84. data/test/lazylead/task/accuracy/logs_test.rb +13 -1
  85. data/test/lazylead/task/accuracy/onlyll_test.rb +138 -0
  86. data/test/lazylead/task/accuracy/records_test.rb +1 -1
  87. data/test/lazylead/task/accuracy/score_test.rb +2 -2
  88. data/test/lazylead/task/accuracy/servers_test.rb +3 -3
  89. data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
  90. data/test/lazylead/task/accuracy/testcase_test.rb +28 -1
  91. data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
  92. data/test/lazylead/task/alert/alertif_test.rb +54 -0
  93. data/test/lazylead/task/{assignee_alert_test.rb → alert/assignee_alert_test.rb} +10 -10
  94. data/test/lazylead/task/alert/changed_to_test.rb +42 -0
  95. data/test/lazylead/task/assignment_test.rb +1 -1
  96. data/test/lazylead/task/confluence_ref_test.rb +1 -1
  97. data/test/lazylead/task/created_recently_test.rb +53 -0
  98. data/test/lazylead/task/duedate_test.rb +5 -12
  99. data/test/lazylead/task/echo_test.rb +1 -1
  100. data/test/lazylead/task/fix_version_test.rb +2 -1
  101. data/test/lazylead/task/loading_test.rb +54 -0
  102. data/test/lazylead/task/missing_comment_test.rb +1 -1
  103. data/test/lazylead/task/propagate_down_test.rb +5 -4
  104. data/test/lazylead/task/savepoint_test.rb +10 -7
  105. data/test/lazylead/task/svn/diff_test.rb +1 -1
  106. data/test/lazylead/task/svn/grep_test.rb +44 -2
  107. data/test/lazylead/task/svn/touch_test.rb +1 -1
  108. data/test/lazylead/version_test.rb +1 -1
  109. data/test/sqlite_test.rb +1 -1
  110. data/test/test.rb +8 -9
  111. data/upgrades/sqlite/001-install-main-lazylead-tables.sql +1 -1
  112. data/upgrades/sqlite/999.testdata.sql +3 -2
  113. metadata +133 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 847a338ce12f9cd01529f1e6a66d810e68cde504e2a0873ecb41b869adcda7cc
4
- data.tar.gz: 8ca65bb46faced2b89f07f1b65002b2890ecf2c78d4d53e74d017a712133d0f4
3
+ metadata.gz: 422600b27880dd0aa96889f7fb8e2f55dc371ac8638dc7065d5e57bc8556aece
4
+ data.tar.gz: 4c8fd293522b890072ef45af8fbefe5cce59594023a38e12ef275e5ef3453d90
5
5
  SHA512:
6
- metadata.gz: f527721696b9f7215efc7628ea39c6cbf18c3145908d715ef5e698de57fcb5b6b28af8d0fe167b54b5418c9f15915071d0ff7ff2c7df3315f107f0d49c4c95d9
7
- data.tar.gz: 1a71de8819ce9aa81fd0e11c4d0248e8b44d846d17f71adb0be18c6a74c9fe58d2ad257fd639f263c29546898cea0725dd6850dbdb417de6e03f541009fbebe0
6
+ metadata.gz: 59932534b571e92e9c8877d365292de759081444ac629c7d59d9b09897519ca19043d6886afc45291df327af3e4eec2524e0019e159ad0564e270eeceb0cad8f
7
+ data.tar.gz: cd6cdbe78ca38b738005fc91184e7fe4390276fcde446da0180f009d406d081cceb5e617ab62a76d9417559b071972d603a1b4adfbe4a70fba98b482d8f84ebf
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
@@ -16,10 +16,13 @@ Layout/LineLength:
16
16
  - "test/**/*"
17
17
 
18
18
  Metrics/AbcSize:
19
- Max: 20
19
+ Max: 21
20
20
  Exclude:
21
21
  - "test/**/*"
22
22
 
23
+ Metrics/CyclomaticComplexity:
24
+ Max: 8
25
+
23
26
  Metrics/BlockLength:
24
27
  Exclude:
25
28
  - "*.gemspec"
@@ -82,12 +85,125 @@ Style/HashTransformValues:
82
85
  Style/FormatStringToken:
83
86
  Exclude:
84
87
  - "lib/lazylead/task/accuracy/accuracy.rb"
85
-
88
+ Style/IfWithBooleanLiteralBranches: # (new in 1.9)
89
+ Enabled: true
86
90
  Lint/RaiseException:
87
91
  Enabled: true
88
-
89
92
  Lint/StructNewOverride:
90
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
91
102
 
92
103
  # @todo #/DEV Add violation regarding methods without documentation using RDoc
93
104
  # https://stackoverflow.com/questions/1681467/how-to-document-ruby-code
105
+
106
+ Layout/SpaceBeforeBrackets: # (new in 1.7)
107
+ Enabled: true
108
+ Lint/AmbiguousAssignment: # (new in 1.7)
109
+ Enabled: true
110
+ Lint/DeprecatedConstants: # (new in 1.8)
111
+ Enabled: true
112
+ Lint/DuplicateBranch: # (new in 1.3)
113
+ Enabled: true
114
+ Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
115
+ Enabled: true
116
+ Lint/EmptyBlock: # (new in 1.1)
117
+ Enabled: true
118
+ Lint/EmptyClass: # (new in 1.3)
119
+ Enabled: true
120
+ Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
121
+ Enabled: true
122
+ Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
123
+ Enabled: true
124
+ Lint/RedundantDirGlobSort: # (new in 1.8)
125
+ Enabled: true
126
+ Lint/ToEnumArguments: # (new in 1.1)
127
+ Enabled: true
128
+ Lint/UnexpectedBlockArity: # (new in 1.5)
129
+ Enabled: true
130
+ Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
131
+ Enabled: true
132
+ Style/ArgumentsForwarding: # (new in 1.1)
133
+ Enabled: true
134
+ Style/CollectionCompact: # (new in 1.2)
135
+ Enabled: true
136
+ Style/DocumentDynamicEvalDefinition: # (new in 1.1)
137
+ Enabled: true
138
+ Style/EndlessMethod: # (new in 1.8)
139
+ Enabled: true
140
+ Style/HashExcept: # (new in 1.7)
141
+ Enabled: true
142
+ Style/NegatedIfElseCondition: # (new in 1.2)
143
+ Enabled: true
144
+ Style/NilLambda: # (new in 1.3)
145
+ Enabled: true
146
+ Style/RedundantArgument: # (new in 1.4)
147
+ Enabled: true
148
+ Style/SwapValues: # (new in 1.1)
149
+ Enabled: true
150
+ Style/HashConversion: # (new in 1.10)
151
+ Enabled: true
152
+ Minitest/AssertInDelta: # (new in 0.10)
153
+ Enabled: true
154
+ Minitest/AssertionInLifecycleHook: # (new in 0.10)
155
+ Enabled: true
156
+ Minitest/AssertKindOf: # (new in 0.10)
157
+ Enabled: true
158
+ Minitest/AssertOutput: # (new in 0.10)
159
+ Enabled: true
160
+ Minitest/AssertPathExists: # (new in 0.10)
161
+ Enabled: true
162
+ Minitest/AssertSilent: # (new in 0.10)
163
+ Enabled: true
164
+ Minitest/LiteralAsActualArgument: # (new in 0.10)
165
+ Enabled: true
166
+ Minitest/MultipleAssertions: # (new in 0.10)
167
+ Enabled: true
168
+ Minitest/RefuteInDelta: # (new in 0.10)
169
+ Enabled: true
170
+ Minitest/RefuteKindOf: # (new in 0.10)
171
+ Enabled: true
172
+ Minitest/RefutePathExists: # (new in 0.10)
173
+ Enabled: true
174
+ Minitest/TestMethodName: # (new in 0.10)
175
+ Enabled: true
176
+ Minitest/UnspecifiedException: # (new in 0.10)
177
+ Enabled: true
178
+ Performance/AncestorsInclude: # (new in 1.7)
179
+ Enabled: true
180
+ Performance/BigDecimalWithNumericArgument: # (new in 1.7)
181
+ Enabled: true
182
+ Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
183
+ Enabled: true
184
+ Performance/CollectionLiteralInLoop: # (new in 1.8)
185
+ Enabled: true
186
+ Performance/ConstantRegexp: # (new in 1.9)
187
+ Enabled: true
188
+ Performance/MethodObjectAsBlock: # (new in 1.9)
189
+ Enabled: true
190
+ Performance/RedundantSortBlock: # (new in 1.7)
191
+ Enabled: true
192
+ Performance/RedundantStringChars: # (new in 1.7)
193
+ Enabled: true
194
+ Performance/ReverseFirst: # (new in 1.7)
195
+ Enabled: true
196
+ Performance/SortReverse: # (new in 1.7)
197
+ Enabled: true
198
+ Performance/Squeeze: # (new in 1.7)
199
+ Enabled: true
200
+ Performance/StringInclude: # (new in 1.7)
201
+ Enabled: true
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)
209
+ Enabled: true
data/.simplecov CHANGED
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
4
4
  [SimpleCov::Formatter::HTMLFormatter]
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/Guardfile 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"),
@@ -25,7 +25,7 @@
25
25
  # Guardfile for Lazylead
26
26
  guard :minitest, all_after_pass: false, all_on_start: false do
27
27
  # with Minitest::Unit
28
- watch(%r{^test/(.*)\/?test_(.*)\.rb$})
28
+ watch(%r{^test/(.*)/?test_(.*)\.rb$})
29
29
  watch(%r{^test/test\.rb$}) { "test" }
30
30
  watch(%r{^lib/lazylead/(.*/)?([^/]+)\.rb$}) do |m|
31
31
  "test/#{m[1]}test_#{m[2]}.rb"
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"),
@@ -25,11 +25,12 @@
25
25
 
26
26
  # When sync mode is true, all output is immediately flushed
27
27
  # to the underlying operating system and is not buffered internally.
28
- STDOUT.sync = true
28
+ $stdout.sync = true
29
29
 
30
30
  require "slop"
31
31
  require "sqlite3"
32
32
  require "colorize"
33
+ require "inifile"
33
34
  require "logging"
34
35
  require "backtrace"
35
36
  require "memory_profiler"
@@ -81,6 +82,7 @@ log.debug "Version: #{Lazylead::VERSION.colorize(:green)}"
81
82
  log.debug "Memory footprint at start is " \
82
83
  "#{Lazylead::Allocated.new.to_s.colorize(:light_blue)}."
83
84
  cmd = lambda do
85
+ IniFile.new(filename: "lazylead.ini").each { |_, k, v| ENV[k] = v }
84
86
  Lazylead::CLI::App.new(
85
87
  log,
86
88
  Lazylead::Schedule.new(log: log),
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.6.1"
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.6.1!
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,42 +55,46 @@ 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.0.3"
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"
62
- s.add_runtime_dependency "get_process_mem", "0.2.5"
63
- s.add_runtime_dependency "jira-ruby", "1.7.1"
64
- s.add_runtime_dependency "json", "2.3.0"
65
- s.add_runtime_dependency "logging", "2.2.2"
61
+ s.add_runtime_dependency "faraday", "1.3.0"
62
+ s.add_runtime_dependency "get_process_mem", "0.2.7"
63
+ s.add_runtime_dependency "inifile", "3.0.0"
64
+ s.add_runtime_dependency "jira-ruby", "2.1.5"
65
+ s.add_runtime_dependency "json", "2.5.1"
66
+ s.add_runtime_dependency "logging", "2.3.0"
66
67
  s.add_runtime_dependency "mail", "2.7.1"
67
- s.add_runtime_dependency "memory_profiler", "0.9.13"
68
+ s.add_runtime_dependency "memory_profiler", "1.0.0"
68
69
  s.add_runtime_dependency "openssl", "2.1.2"
70
+ s.add_runtime_dependency "railties", "6.1.3"
69
71
  s.add_runtime_dependency "require_all", "3.0.0"
70
- s.add_runtime_dependency "rufus-scheduler", "3.6.0"
71
- s.add_runtime_dependency "slop", "4.4"
72
+ s.add_runtime_dependency "rufus-scheduler", "3.7.0"
73
+ s.add_runtime_dependency "slop", "4.8.2"
72
74
  s.add_runtime_dependency "sqlite3", "1.4.2"
73
- s.add_runtime_dependency "tempfile", "0.1.0"
75
+ s.add_runtime_dependency "tempfile", "0.1.1"
74
76
  s.add_runtime_dependency "tilt", "2.0.10"
75
- s.add_runtime_dependency "tzinfo", "1.1"
76
- s.add_runtime_dependency "tzinfo-data", "1.2019.3"
77
- s.add_runtime_dependency "vcs4sql", "0.1.0"
78
- s.add_runtime_dependency "viewpoint", "1.1.0"
79
- s.add_development_dependency "codecov", "0.2.3"
80
- s.add_development_dependency "guard", "2.15.0"
77
+ s.add_runtime_dependency "tzinfo", "2.0.4"
78
+ s.add_runtime_dependency "tzinfo-data", "1.2021.1"
79
+ s.add_runtime_dependency "vcs4sql", "0.1.1"
80
+ s.add_runtime_dependency "viewpoint", "1.1.1"
81
+ s.add_development_dependency "codecov", "0.5.1"
82
+ s.add_development_dependency "guard", "2.16.2"
81
83
  s.add_development_dependency "guard-minitest", "2.4.6"
82
- s.add_development_dependency "minitest", "5.11.3"
84
+ s.add_development_dependency "minitest", "5.14.4"
83
85
  s.add_development_dependency "minitest-fail-fast", "0.1.0"
84
86
  s.add_development_dependency "minitest-hooks", "1.5.0"
85
- s.add_development_dependency "minitest-reporters", "1.3.6"
87
+ s.add_development_dependency "minitest-reporters", "1.4.3"
86
88
  s.add_development_dependency "net-ping", "2.0.8"
87
- s.add_development_dependency "rake", "12.3.3"
88
- s.add_development_dependency "random-port", "0.3.1"
89
- s.add_development_dependency "rdoc", "6.1.1"
90
- s.add_development_dependency "rubocop", "0.82"
91
- s.add_development_dependency "rubocop-minitest", "0.5.1"
92
- s.add_development_dependency "rubocop-performance", "1.5.2"
93
- s.add_development_dependency "rubocop-rspec", "1.33.0"
89
+ s.add_development_dependency "rake", "13.0.3"
90
+ s.add_development_dependency "random-port", "0.5.1"
91
+ s.add_development_dependency "rdoc", "6.3.0"
92
+ s.add_development_dependency "rubocop", "1.11.0"
93
+ s.add_development_dependency "rubocop-minitest", "0.10.3"
94
+ s.add_development_dependency "rubocop-performance", "1.10.1"
95
+ s.add_development_dependency "rubocop-rake", "0.5.1"
96
+ s.add_development_dependency "rubocop-rspec", "2.2.0"
94
97
  s.add_development_dependency "sqlint", "0.1.10"
95
- s.add_development_dependency "xcop", "0.6"
98
+ s.add_development_dependency "tempfile", "0.1.1"
99
+ s.add_development_dependency "xcop", "0.6.2"
96
100
  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"),
@@ -81,12 +81,12 @@ module Lazylead
81
81
 
82
82
  def cc
83
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
84
+ if @text.include? ","
85
+ @text.split(",").map(&:strip).select { |e| e[@regxp] }
86
+ elsif @text[@regxp]
87
+ [@text.strip]
88
+ end
89
+ end
90
90
  end
91
91
 
92
92
  def each(&block)
@@ -126,14 +126,14 @@ module Lazylead
126
126
 
127
127
  def to_h
128
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
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
137
137
  end
138
138
  end
139
139
 
@@ -145,18 +145,19 @@ module Lazylead
145
145
  # License:: MIT
146
146
  class ComponentCC < Lazylead::PredefinedCC
147
147
  def initialize(prj, jira)
148
+ super({})
148
149
  @prj = prj
149
150
  @jira = jira
150
151
  end
151
152
 
152
153
  def to_h
153
154
  @to_h ||= begin
154
- components.each_with_object({}) do |c, h|
155
- email = lead(c.attrs["id"])
156
- next if email.nil? || email.blank?
157
- h[c.attrs["name"]] = email
158
- end
159
- end
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
160
+ end
160
161
  end
161
162
 
162
163
  private