lazylead 0.10.4 → 0.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59ec5b9c923e07aa0f71bf625df793b8a3451d5e6910d9a77e0785e8922cc55e
4
- data.tar.gz: 81725aa788eb3a69cce4563cbbf9f087e7ea7fe777edc48b4d17691702765039
3
+ metadata.gz: ef86e7fdc0c41c8f9d7220a580e6afd1c7f9e09e396c14142df99a407eec0d1c
4
+ data.tar.gz: aa452077f1e99ac82c6add4b7dd9ac057d0715f1feea02ed2d6d6e744e322991
5
5
  SHA512:
6
- metadata.gz: eed91c6f6228e9c344cca171f7838c17cd38fa4ea83965b08cac8465840430713cae5a37bfc10a49b549bb405b2cea58577b4bfecab427662a1d0be58add495d
7
- data.tar.gz: 0a9ca2d4ea7aa062f623bb342951ae7c0a07dfba16333571d36653886a3da456d6c745aef13510bfb71787ca826c7b908625c7eea8dfaf254734adb10a3ca2fe
6
+ metadata.gz: 58f54eb88f268b67c48ac5867502637767fb0cb27cbfaf0b6b3edd0b0119774c0fde9d78408b4e81243b279eec1fc9a18c970dfd37bc344f0654fd653ed59709
7
+ data.tar.gz: 131a15331350d5869187b2e8f8546715434138fc66b0d711a6a882a5292bc5937ac44e060f2a6a233dcbd098cef8e568af592ecd85d0c1b8c3f4965ddd8ac9c4
data/lazylead.gemspec CHANGED
@@ -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.10.4"
35
+ s.version = "0.10.5"
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.10.4!
48
+ s.post_install_message = "Thanks for installing Lazylead v0.10.5!
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
@@ -66,6 +66,7 @@ tasks instead of solving technical problems."
66
66
  s.add_runtime_dependency "logging", "2.3.0"
67
67
  s.add_runtime_dependency "mail", "2.7.1"
68
68
  s.add_runtime_dependency "memory_profiler", "1.0.0"
69
+ s.add_runtime_dependency "nokogiri", "1.11.3"
69
70
  s.add_runtime_dependency "openssl", "2.1.2"
70
71
  s.add_runtime_dependency "railties", "6.1.3"
71
72
  s.add_runtime_dependency "require_all", "3.0.0"
@@ -90,7 +91,7 @@ tasks instead of solving technical problems."
90
91
  s.add_development_dependency "rake", "13.0.6"
91
92
  s.add_development_dependency "random-port", "0.5.1"
92
93
  s.add_development_dependency "rdoc", "6.3.2"
93
- s.add_development_dependency "rubocop", "1.18.4"
94
+ s.add_development_dependency "rubocop", "1.19.0"
94
95
  s.add_development_dependency "rubocop-minitest", "0.15.0"
95
96
  s.add_development_dependency "rubocop-performance", "1.11.4"
96
97
  s.add_development_dependency "rubocop-rake", "0.6.0"
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2021 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "requirement"
26
+
27
+ module Lazylead
28
+ # Check that ticket has specified label.
29
+ class HasLabel < Lazylead::Requirement
30
+ #
31
+ # @param label which should be present in ticket.
32
+ #
33
+ def initialize(label, desc: "Has label", score: 0.5)
34
+ super(desc, score, "Labels")
35
+ @label = label
36
+ end
37
+
38
+ def passed(issue)
39
+ return false if issue.labels.empty?
40
+ issue.labels.any? { |l| match?(l) }
41
+ end
42
+
43
+ # Ensure that particular label matches expected label.
44
+ def match?(label)
45
+ @label.eql? label
46
+ end
47
+ end
48
+ end
@@ -23,5 +23,5 @@
23
23
  # OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
25
  module Lazylead
26
- VERSION = "0.10.4"
26
+ VERSION = "0.10.5"
27
27
  end
@@ -143,7 +143,7 @@ module Lazylead
143
143
  end
144
144
 
145
145
  test "description is correct" do
146
- assert_words %w[DATACMNS-1639\ moved\ entity\ instantiators],
146
+ assert_words ["DATACMNS-1639 moved entity instantiators"],
147
147
  NoAuthJira.new("https://jira.spring.io")
148
148
  .issues("key=DATAJDBC-480")
149
149
  .first
@@ -151,7 +151,7 @@ module Lazylead
151
151
  end
152
152
 
153
153
  test "component is correct" do
154
- assert_equal %w[Stream\ Module],
154
+ assert_equal ["Stream Module"],
155
155
  NoAuthJira.new("https://jira.spring.io")
156
156
  .issues("key=XD-3766")
157
157
  .first
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The MIT License
4
+ #
5
+ # Copyright (c) 2019-2021 Yurii Dubinka
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"),
9
+ # to deal in the Software without restriction, including without limitation
10
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ # and/or sell copies of the Software, and to permit persons to whom
12
+ # the Software is furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included
15
+ # in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
+ # OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+ require_relative "../../../test"
26
+ require_relative "../../../../lib/lazylead/task/accuracy/has_label"
27
+
28
+ module Lazylead
29
+ class HasLabelTest < Lazylead::Test
30
+ test "label is present" do
31
+ assert HasLabel.new("Invalid_Reopen").passed(
32
+ OpenStruct.new(
33
+ labels: %w[Invalid_Reopen 10%]
34
+ )
35
+ )
36
+ end
37
+
38
+ test "label is absent" do
39
+ refute HasLabel.new("Invalid_Reopen").passed(
40
+ OpenStruct.new(
41
+ labels: %w[E2E top_priority 10%]
42
+ )
43
+ )
44
+ end
45
+
46
+ test "labels are absent in ticket" do
47
+ refute HasLabel.new("Invalid_Reopen").passed(
48
+ OpenStruct.new(
49
+ labels: []
50
+ )
51
+ )
52
+ end
53
+ end
54
+ end
@@ -55,7 +55,7 @@ module Lazylead
55
55
  )
56
56
  )
57
57
  assert_email "[SVN] Important files have been changed!",
58
- %w[3 dgroup /189.md Add\ description\ for\ 189\ issue]
58
+ ["3", "dgroup", "/189.md", "Add description for 189 issue"]
59
59
  end
60
60
  end
61
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazylead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurii Dubinka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-09 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
166
  version: 1.0.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: nokogiri
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 1.11.3
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '='
179
+ - !ruby/object:Gem::Version
180
+ version: 1.11.3
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: openssl
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -506,14 +520,14 @@ dependencies:
506
520
  requirements:
507
521
  - - '='
508
522
  - !ruby/object:Gem::Version
509
- version: 1.18.4
523
+ version: 1.19.0
510
524
  type: :development
511
525
  prerelease: false
512
526
  version_requirements: !ruby/object:Gem::Requirement
513
527
  requirements:
514
528
  - - '='
515
529
  - !ruby/object:Gem::Version
516
- version: 1.18.4
530
+ version: 1.19.0
517
531
  - !ruby/object:Gem::Dependency
518
532
  name: rubocop-minitest
519
533
  requirement: !ruby/object:Gem::Requirement
@@ -693,6 +707,7 @@ files:
693
707
  - lib/lazylead/task/accuracy/affected_build.rb
694
708
  - lib/lazylead/task/accuracy/attachment.rb
695
709
  - lib/lazylead/task/accuracy/environment.rb
710
+ - lib/lazylead/task/accuracy/has_label.rb
696
711
  - lib/lazylead/task/accuracy/logs.rb
697
712
  - lib/lazylead/task/accuracy/logs_link.rb
698
713
  - lib/lazylead/task/accuracy/onlyll.rb
@@ -756,6 +771,7 @@ files:
756
771
  - test/lazylead/task/accuracy/affected_build_test.rb
757
772
  - test/lazylead/task/accuracy/attachment_test.rb
758
773
  - test/lazylead/task/accuracy/environment_test.rb
774
+ - test/lazylead/task/accuracy/has_label_test.rb
759
775
  - test/lazylead/task/accuracy/logs_link_test.rb
760
776
  - test/lazylead/task/accuracy/logs_test.rb
761
777
  - test/lazylead/task/accuracy/onlyll_test.rb
@@ -795,7 +811,7 @@ licenses:
795
811
  - MIT
796
812
  metadata: {}
797
813
  post_install_message: |-
798
- Thanks for installing Lazylead v0.10.4!
814
+ Thanks for installing Lazylead v0.10.5!
799
815
  Read our blog posts: https://lazylead.org
800
816
  Stay in touch with the community in Telegram: https://t.me/lazylead
801
817
  Follow us on Twitter: https://twitter.com/lazylead
@@ -836,6 +852,7 @@ test_files:
836
852
  - test/lazylead/task/accuracy/affected_build_test.rb
837
853
  - test/lazylead/task/accuracy/attachment_test.rb
838
854
  - test/lazylead/task/accuracy/environment_test.rb
855
+ - test/lazylead/task/accuracy/has_label_test.rb
839
856
  - test/lazylead/task/accuracy/logs_link_test.rb
840
857
  - test/lazylead/task/accuracy/logs_test.rb
841
858
  - test/lazylead/task/accuracy/onlyll_test.rb