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
@@ -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"),
@@ -39,7 +39,7 @@ module Lazylead
39
39
  "exchange_to"
40
40
  Exchange.new(Log.new, NoSalt.new).send(
41
41
  Opts.new(
42
- to: ENV["exchange_to"],
42
+ to: ENV.fetch("exchange_to", nil),
43
43
  tickets: NoAuthJira.new("https://jira.spring.io")
44
44
  .issues("key = DATAJDBC-480"),
45
45
  "subject" => "[DD] PDTN!",
@@ -57,12 +57,12 @@ module Lazylead
57
57
  Exchange.new(
58
58
  Log.new,
59
59
  Salt.new("exchange_salt"),
60
- "exchange_url" => ENV["exchange_url"],
61
- "exchange_user" => ENV["enc_exchange_usr"],
62
- "exchange_password" => ENV["enc_exchange_psw"]
60
+ "exchange_url" => ENV.fetch("exchange_url", nil),
61
+ "exchange_user" => ENV.fetch("enc_exchange_usr", nil),
62
+ "exchange_password" => ENV.fetch("enc_exchange_psw", nil)
63
63
  ).send(
64
64
  Opts.new(
65
- to: ENV["exchange_to"],
65
+ to: ENV.fetch("exchange_to", nil),
66
66
  tickets: NoAuthJira.new("https://jira.spring.io")
67
67
  .issues("key = DATAJDBC-480"),
68
68
  "subject" => "[DD] Enc PDTN!",
@@ -79,12 +79,12 @@ module Lazylead
79
79
  Exchange.new(
80
80
  Log.new,
81
81
  Salt.new("exchange_salt"),
82
- "exchange_url" => ENV["exchange_url"],
83
- "exchange_user" => ENV["enc_exchange_usr"],
84
- "exchange_password" => ENV["enc_exchange_psw"]
82
+ "exchange_url" => ENV.fetch("exchange_url", nil),
83
+ "exchange_user" => ENV.fetch("enc_exchange_usr", nil),
84
+ "exchange_password" => ENV.fetch("enc_exchange_psw", nil)
85
85
  ).send(
86
86
  Opts.new(
87
- to: ENV["exchange_to"],
87
+ to: ENV.fetch("exchange_to", nil),
88
88
  "attachments" => "readme.md",
89
89
  "subject" => "[LL] Attachments",
90
90
  "template" => "lib/messages/savepoint.erb"
@@ -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"),
@@ -80,7 +80,7 @@ module Lazylead
80
80
  vcs4sql: "upgrades/sqlite",
81
81
  testdata: true
82
82
  )
83
- refute ORM::Task.find(260).to_h?
83
+ refute_predicate ORM::Task.find(260), :to_h?
84
84
  end
85
85
 
86
86
  test "second ticketing system is found" do
@@ -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"),
@@ -41,15 +41,15 @@ module Lazylead
41
41
  Smtp.new(
42
42
  Log.new,
43
43
  NoSalt.new,
44
- smtp_host: ENV["LL_SMTP_HOST"],
45
- smtp_port: ENV["LL_SMTP_PORT"],
46
- smtp_user: ENV["LL_SMTP_USER"],
47
- smtp_pass: ENV["LL_SMTP_PASS"]
44
+ smtp_host: ENV.fetch("LL_SMTP_HOST", nil),
45
+ smtp_port: ENV.fetch("LL_SMTP_PORT", nil),
46
+ smtp_user: ENV.fetch("LL_SMTP_USER", nil),
47
+ smtp_pass: ENV.fetch("LL_SMTP_PASS", nil)
48
48
  ).enable
49
49
  Postman.new.send(
50
50
  Opts.new(
51
- "to" => ENV["LL_SMTP_TO"],
52
- "from" => ENV["LL_SMTP_FROM"],
51
+ "to" => ENV.fetch("LL_SMTP_TO", nil),
52
+ "from" => ENV.fetch("LL_SMTP_FROM", nil),
53
53
  "attachments" => ["readme.md"],
54
54
  "subject" => "[LL] Attachments",
55
55
  "template" => "lib/messages/savepoint.erb"
@@ -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"),
@@ -41,7 +41,7 @@ module Lazylead
41
41
  f << "EnvTest=value"
42
42
  f.flush
43
43
  IniFile.new(filename: f).each { |_, k, v| ENV[k] = v }
44
- assert_equal "value", ENV["EnvTest"]
44
+ assert_equal "value", ENV.fetch("EnvTest", nil)
45
45
  end
46
46
  end
47
47
  test "ini file not found" do
@@ -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,14 +46,14 @@ module Lazylead
46
46
  skip "Not implemented yet" unless env? "LL_SMTP_HOST", "LL_SMTP_USER"
47
47
  Smtp.new(
48
48
  Log.new, NoSalt.new,
49
- smtp_host: ENV["LL_SMTP_HOST"],
50
- smtp_port: ENV["LL_SMTP_PORT"],
51
- smtp_user: ENV["LL_SMTP_USER"],
52
- smtp_pass: ENV["LL_SMTP_PASS"]
49
+ smtp_host: ENV.fetch("LL_SMTP_HOST", nil),
50
+ smtp_port: ENV.fetch("LL_SMTP_PORT", nil),
51
+ smtp_user: ENV.fetch("LL_SMTP_USER", nil),
52
+ smtp_pass: ENV.fetch("LL_SMTP_PASS", nil)
53
53
  ).enable
54
54
  Mail.deliver do
55
- from ENV["LL_SMTP_FROM"]
56
- to ENV["LL_SMTP_TO"]
55
+ from ENV.fetch("LL_SMTP_FROM", nil)
56
+ to ENV.fetch("LL_SMTP_TO", nil)
57
57
  subject "Testing"
58
58
  body "Good, it works"
59
59
  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"),
@@ -31,9 +31,9 @@ require_relative "../../../lib/lazylead/system/jira"
31
31
  module Lazylead
32
32
  class JiraTest < Lazylead::Test
33
33
  test "found issue by id" do
34
- assert_equal "DATAJDBC-480",
35
- NoAuthJira.new("https://jira.spring.io")
36
- .issues("key in ('DATAJDBC-480')")
34
+ assert_equal "JAVA-150",
35
+ NoAuthJira.new("https://jira.mongodb.org")
36
+ .issues("key in ('JAVA-150')")
37
37
  .first
38
38
  .key
39
39
  end
@@ -46,20 +46,20 @@ module Lazylead
46
46
  vcs4sql: "upgrades/sqlite",
47
47
  testdata: true
48
48
  )
49
- assert_equal "DATAJDBC-500",
49
+ assert_equal "JAVA-150",
50
50
  ORM::Task.find(4)
51
51
  .system
52
52
  .connect
53
- .issues("key in ('DATAJDBC-500')")
53
+ .issues("key in ('JAVA-150')")
54
54
  .first
55
55
  .key,
56
- "Id mismatch for https://jira.spring.io/browse/DATAJDBC-500"
56
+ "Id mismatch for https://jira.mongodb.org/browse/JAVA-150"
57
57
  end
58
58
 
59
59
  test "group by assignee" do
60
60
  assert_equal 2,
61
- NoAuthJira.new("https://jira.spring.io")
62
- .issues("filter=16743")
61
+ NoAuthJira.new("https://jira.mongodb.org")
62
+ .issues("filter=46202")
63
63
  .group_by(&:assignee)
64
64
  .min_by { |a| a.first.id }
65
65
  .length,
@@ -67,58 +67,58 @@ module Lazylead
67
67
  end
68
68
 
69
69
  test "issue reporter fetched successfully" do
70
- assert_equal "Mark Paluch",
71
- NoAuthJira.new("https://jira.spring.io")
72
- .issues("key in ('DATAJDBC-480')")
70
+ assert_equal "Joseph Wang",
71
+ NoAuthJira.new("https://jira.mongodb.org")
72
+ .issues("key in ('JAVA-150')")
73
73
  .first
74
74
  .reporter
75
75
  .name
76
76
  end
77
77
 
78
78
  test "issue url fetched successfully" do
79
- assert_equal "https://jira.spring.io/browse/DATAJDBC-480",
80
- NoAuthJira.new("https://jira.spring.io")
81
- .issues("key in ('DATAJDBC-480')")
79
+ assert_equal "https://jira.mongodb.org/browse/JAVA-150",
80
+ NoAuthJira.new("https://jira.mongodb.org")
81
+ .issues("key in ('JAVA-150')")
82
82
  .first
83
83
  .url
84
84
  end
85
85
 
86
86
  test "issue history found" do
87
- greater_or_eq 8,
88
- NoAuthJira.new("https://jira.spring.io")
89
- .issues("key='DATAJDBC-480'", expand: "changelog")
87
+ greater_or_eq 10,
88
+ NoAuthJira.new("https://jira.mongodb.org")
89
+ .issues("key='JAVA-150'", expand: "changelog")
90
90
  .first
91
91
  .history
92
92
  .size
93
93
  end
94
94
 
95
95
  test "issue history not found" do
96
- assert_empty NoAuthJira.new("https://jira.spring.io")
97
- .issues("key='DATAJDBC-480'")
96
+ assert_empty NoAuthJira.new("https://jira.mongodb.org")
97
+ .issues("key='JAVA-150'")
98
98
  .first
99
99
  .history
100
100
  end
101
101
 
102
102
  test "2nd issue history item is correct" do
103
- assert_equal "396918",
104
- NoAuthJira.new("https://jira.spring.io")
105
- .issues("key='DATAJDBC-480'", expand: "changelog")
103
+ assert_equal "24893",
104
+ NoAuthJira.new("https://jira.mongodb.org")
105
+ .issues("key='JAVA-150'", expand: "changelog")
106
106
  .first
107
107
  .history[2]["id"]
108
108
  end
109
109
 
110
110
  test "issue has expected status" do
111
111
  assert_equal "Closed",
112
- NoAuthJira.new("https://jira.spring.io")
113
- .issues("key='DATAJDBC-480'")
112
+ NoAuthJira.new("https://jira.mongodb.org")
113
+ .issues("key='JAVA-150'")
114
114
  .first
115
115
  .status
116
116
  end
117
117
 
118
118
  test "issue has 1 field" do
119
119
  assert_equal 1,
120
- NoAuthJira.new("https://jira.spring.io")
121
- .issues("key='DATAJDBC-480'", fields: ["summary"])
120
+ NoAuthJira.new("https://jira.mongodb.org")
121
+ .issues("key='JAVA-150'", fields: ["summary"])
122
122
  .first
123
123
  .fields
124
124
  .size
@@ -143,47 +143,46 @@ module Lazylead
143
143
  end
144
144
 
145
145
  test "description is correct" do
146
- assert_words ["DATACMNS-1639 moved entity instantiators"],
147
- NoAuthJira.new("https://jira.spring.io")
148
- .issues("key=DATAJDBC-480")
146
+ assert_words ["We've multiple colos"],
147
+ NoAuthJira.new("https://jira.mongodb.org")
148
+ .issues("key=JAVA-150")
149
149
  .first
150
150
  .description
151
151
  end
152
152
 
153
153
  test "component is correct" do
154
- assert_equal ["Stream Module"],
155
- NoAuthJira.new("https://jira.spring.io")
156
- .issues("key=XD-3766")
154
+ assert_equal ["GridFS"],
155
+ NoAuthJira.new("https://jira.mongodb.org")
156
+ .issues("key=JAVA-192")
157
157
  .first
158
158
  .components
159
159
  end
160
160
 
161
- test "field found" do
162
- assert_includes NoAuthJira.new("https://jira.spring.io")
163
- .issues("key=DATAJDBC-480")
161
+ test "description available as field" do
162
+ assert_includes NoAuthJira.new("https://jira.mongodb.org")
163
+ .issues("key=JAVA-192")
164
164
  .first["description"],
165
- "DATACMNS-1639 moved "
165
+ ".files.drop() + .chunks.drop()"
166
166
  end
167
167
 
168
168
  test "field not found" do
169
- assert NoAuthJira.new("https://jira.spring.io")
170
- .issues("key=DATAJDBC-480")
171
- .first["absent field"]
172
- .blank?
169
+ assert_predicate NoAuthJira.new("https://jira.mongodb.org")
170
+ .issues("key=JAVA-150")
171
+ .first["absent field"], :blank?
173
172
  end
174
173
 
175
174
  test "labels found" do
176
- assert_includes NoAuthJira.new("https://jira.spring.io")
177
- .issues("key=XD-3766")
175
+ assert_includes NoAuthJira.new("https://jira.mongodb.org")
176
+ .issues("key=JAVA-295")
178
177
  .first
179
178
  .labels,
180
- "Spring"
179
+ "android"
181
180
  end
182
181
 
183
182
  test "bulk search in few iterations" do
184
183
  assert_equal 3,
185
- NoAuthJira.new("https://jira.spring.io")
186
- .issues("key>DATAJDBC-500 and key < DATAJDBC-504", max_results: 1)
184
+ NoAuthJira.new("https://jira.mongodb.org")
185
+ .issues("key>JAVA-150 and key < JAVA-154", max_results: 1)
187
186
  .size
188
187
  end
189
188
 
@@ -191,23 +190,23 @@ module Lazylead
191
190
  refute_empty Jira.new(
192
191
  "username" => nil,
193
192
  "password" => nil,
194
- "site" => "https://jira.spring.io",
193
+ "site" => "https://jira.mongodb.org",
195
194
  "context_path" => ""
196
- ).issues("key=DATAJDBC-480")
195
+ ).issues("key=JAVA-150")
197
196
  end
198
197
 
199
198
  test "sprint is found" do
200
- assert_equal "Sprint 68",
201
- NoAuthJira.new("https://jira.spring.io")
202
- .issues("key=XD-3744", fields: ["customfield_10480"])
199
+ assert_equal "Java Sprint 25",
200
+ NoAuthJira.new("https://jira.mongodb.org")
201
+ .issues("key=JAVA-192", fields: ["customfield_10557"])
203
202
  .first
204
- .sprint("customfield_10480")
203
+ .sprint("customfield_10557")
205
204
  end
206
205
 
207
206
  test "bulk search in few iterations with limit" do
208
207
  assert_equal 3,
209
- NoAuthJira.new("https://jira.spring.io")
210
- .issues("key > DATAJDBC-500", max_results: 1, "limit" => 3)
208
+ NoAuthJira.new("https://jira.mongodb.org")
209
+ .issues("key > JAVA-150", max_results: 1, "limit" => 3)
211
210
  .size
212
211
  end
213
212
  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"),
@@ -35,7 +35,7 @@ module Lazylead
35
35
  test "detect affected build" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::Accuracy.new.run(
38
- NoAuthJira.new("https://jira.spring.io"),
38
+ NoAuthJira.new("https://jira.mongodb.org"),
39
39
  Postman.new,
40
40
  Opts.new(
41
41
  "from" => "ll@fake.com",
@@ -54,14 +54,14 @@ module Lazylead
54
54
  "90-100" => "https://meme.com?id=wow.gif"
55
55
  }.to_json.to_s,
56
56
  "docs" => "https://github.com/dgroup/lazylead/blob/master/.github/ISSUE_TEMPLATE/bug_report.md",
57
- "jql" => "key in (DATAJDBC-490, DATAJDBC-492, DATAJDBC-493)",
57
+ "jql" => "key=JAVA-151",
58
58
  "max_results" => 200,
59
59
  "subject" => "[LL] Raised tickets",
60
60
  "template" => "lib/messages/accuracy.erb"
61
61
  )
62
62
  )
63
63
  assert_email "[LL] Raised tickets",
64
- "DATAJDBC-493", "0.5", "100%", "MyeongHyeonLee", "Deadlock occurs"
64
+ "JAVA-151", "0.5", "100%", "Tsz Ming Wong", "Dot allowed in key names"
65
65
  end
66
66
 
67
67
  test "construct accuracy from orm" do
@@ -79,7 +79,7 @@ module Lazylead
79
79
  Lazylead::Smtp.new.enable
80
80
  assert_equal 1,
81
81
  Task::Accuracy.new.run(
82
- NoAuthJira.new("https://jira.spring.io"),
82
+ NoAuthJira.new("https://jira.mongodb.org"),
83
83
  Postman.new,
84
84
  Opts.new(
85
85
  "from" => "ll@fake.com",
@@ -90,7 +90,7 @@ module Lazylead
90
90
  "0" => "#FF4F33",
91
91
  "57" => "#19DD1E"
92
92
  }.to_json.to_s,
93
- "jql" => "key > DATAJDBC-490",
93
+ "jql" => "key > JAVA-500",
94
94
  "limit" => "1",
95
95
  "subject" => "[LL] Raised tickets",
96
96
  "template" => "lib/messages/accuracy.erb"
@@ -101,7 +101,7 @@ module Lazylead
101
101
  test "score is correct" do
102
102
  Lazylead::Smtp.new.enable
103
103
  Task::Accuracy.new.run(
104
- NoAuthJira.new("https://jira.spring.io"),
104
+ NoAuthJira.new("https://jira.mongodb.org"),
105
105
  Postman.new,
106
106
  Opts.new(
107
107
  "from" => "ll@fake.com",
@@ -113,14 +113,14 @@ module Lazylead
113
113
  "30" => "#FEC15E",
114
114
  "50" => "#19DD1E"
115
115
  }.to_json.to_s,
116
- "jql" => "key=DATAMONGO-1532",
116
+ "jql" => "key=JAVA-4344",
117
117
  "silent" => "true",
118
- "subject" => "[LL] Check DATAMONGO-1532",
118
+ "subject" => "[LL] Check JAVA-4344",
119
119
  "template" => "lib/messages/accuracy.erb"
120
120
  )
121
121
  )
122
- assert_email "[LL] Check DATAMONGO-1532",
123
- "DATAMONGO-1532", "3", "42.86%"
122
+ assert_email "[LL] Check JAVA-4344",
123
+ "JAVA-4344", "3", "42.86%"
124
124
  end
125
125
  end
126
126
  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"),
@@ -35,14 +35,14 @@ module Lazylead
35
35
  end
36
36
 
37
37
  def matches?(attach)
38
- "ConfigServerLogWithException.txt".eql? attach.attrs["filename"]
38
+ "Main.java".eql? attach.attrs["filename"]
39
39
  end
40
40
  end
41
41
 
42
42
  test "attachment is present" do
43
43
  assert Txt.new.passed(
44
- NoAuthJira.new("https://jira.spring.io")
45
- .issues("key=XD-3761", fields: ["attachment"])
44
+ NoAuthJira.new("https://jira.mongodb.org")
45
+ .issues("key=JAVA-8", fields: ["attachment"])
46
46
  .first
47
47
  )
48
48
  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"),
@@ -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"),