lazylead 0.11.4 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.0pdd.yml +3 -0
  3. data/.circleci/config.yml +0 -12
  4. data/.docs/accuracy.sql +35 -0
  5. data/.github/workflows/build.yml +39 -0
  6. data/.github/workflows/release.yml +15 -0
  7. data/.rubocop.yml +11 -2
  8. data/.rultor.yml +2 -2
  9. data/Gemfile +1 -1
  10. data/Rakefile +17 -9
  11. data/bin/lazylead +5 -5
  12. data/lazylead.gemspec +22 -25
  13. data/lib/lazylead/allocated.rb +1 -1
  14. data/lib/lazylead/cc.rb +1 -1
  15. data/lib/lazylead/cli/app.rb +3 -3
  16. data/lib/lazylead/confluence.rb +4 -3
  17. data/lib/lazylead/email.rb +1 -1
  18. data/lib/lazylead/exchange.rb +3 -3
  19. data/lib/lazylead/home.rb +2 -2
  20. data/lib/lazylead/log.rb +1 -1
  21. data/lib/lazylead/model.rb +4 -3
  22. data/lib/lazylead/opts.rb +1 -1
  23. data/lib/lazylead/os.rb +2 -1
  24. data/lib/lazylead/postman.rb +8 -7
  25. data/lib/lazylead/requires.rb +1 -1
  26. data/lib/lazylead/salt.rb +1 -1
  27. data/lib/lazylead/schedule.rb +5 -9
  28. data/lib/lazylead/smtp.rb +1 -1
  29. data/lib/lazylead/system/empty.rb +1 -1
  30. data/lib/lazylead/system/fake.rb +1 -1
  31. data/lib/lazylead/system/jira.rb +5 -3
  32. data/lib/lazylead/system/synced.rb +1 -1
  33. data/lib/lazylead/task/accuracy/accuracy.rb +3 -3
  34. data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
  35. data/lib/lazylead/task/accuracy/attachment.rb +1 -1
  36. data/lib/lazylead/task/accuracy/environment.rb +1 -1
  37. data/lib/lazylead/task/accuracy/has_label.rb +1 -1
  38. data/lib/lazylead/task/accuracy/logs.rb +1 -1
  39. data/lib/lazylead/task/accuracy/logs_link.rb +1 -1
  40. data/lib/lazylead/task/accuracy/memes.rb +1 -1
  41. data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
  42. data/lib/lazylead/task/accuracy/records.rb +9 -2
  43. data/lib/lazylead/task/accuracy/records_link.rb +1 -1
  44. data/lib/lazylead/task/accuracy/required.rb +1 -1
  45. data/lib/lazylead/task/accuracy/requirement.rb +1 -1
  46. data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
  47. data/lib/lazylead/task/accuracy/servers.rb +1 -1
  48. data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
  49. data/lib/lazylead/task/accuracy/testcase.rb +1 -1
  50. data/lib/lazylead/task/accuracy/wiki.rb +1 -1
  51. data/lib/lazylead/task/accuracy/wiki_url.rb +1 -1
  52. data/lib/lazylead/task/alert/alert.rb +1 -1
  53. data/lib/lazylead/task/alert/alertif.rb +1 -1
  54. data/lib/lazylead/task/alert/changed_to.rb +1 -1
  55. data/lib/lazylead/task/assignment.rb +1 -1
  56. data/lib/lazylead/task/confluence_ref.rb +1 -1
  57. data/lib/lazylead/task/echo.rb +2 -2
  58. data/lib/lazylead/task/fix_version.rb +1 -1
  59. data/lib/lazylead/task/git/git.rb +82 -0
  60. data/lib/lazylead/task/loading.rb +2 -3
  61. data/lib/lazylead/task/micromanager.rb +1 -1
  62. data/lib/lazylead/task/missing_comment.rb +1 -1
  63. data/lib/lazylead/task/propagate_down.rb +3 -3
  64. data/lib/lazylead/task/savepoint.rb +1 -1
  65. data/lib/lazylead/task/svn/diff.rb +1 -1
  66. data/lib/lazylead/task/svn/grep.rb +1 -1
  67. data/lib/lazylead/task/svn/svn.rb +1 -1
  68. data/lib/lazylead/task/svn/touch.rb +42 -14
  69. data/lib/lazylead/version.rb +2 -2
  70. data/lib/lazylead.rb +1 -1
  71. data/license.txt +1 -1
  72. data/readme.md +20 -15
  73. data/test/lazylead/allocated_test.rb +1 -1
  74. data/test/lazylead/cc_test.rb +7 -7
  75. data/test/lazylead/cli/app_test.rb +1 -1
  76. data/test/lazylead/confluence_test.rb +1 -1
  77. data/test/lazylead/exchange_test.rb +10 -10
  78. data/test/lazylead/file_postman_test.rb +47 -0
  79. data/test/lazylead/model_test.rb +2 -2
  80. data/test/lazylead/opts_test.rb +1 -1
  81. data/test/lazylead/postman_test.rb +7 -39
  82. data/test/lazylead/retry_test.rb +12 -1
  83. data/test/lazylead/salt_test.rb +1 -1
  84. data/test/lazylead/smoke_test.rb +2 -2
  85. data/test/lazylead/smtp_test.rb +7 -7
  86. data/test/lazylead/stdout_postman_test.rb +48 -0
  87. data/test/lazylead/system/jira_test.rb +53 -54
  88. data/test/lazylead/task/accuracy/accuracy_test.rb +11 -11
  89. data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
  90. data/test/lazylead/task/accuracy/attachment_test.rb +4 -4
  91. data/test/lazylead/task/accuracy/environment_test.rb +1 -1
  92. data/test/lazylead/task/accuracy/has_label_test.rb +1 -1
  93. data/test/lazylead/task/accuracy/logs_link_test.rb +1 -1
  94. data/test/lazylead/task/accuracy/logs_test.rb +1 -1
  95. data/test/lazylead/task/accuracy/memes_test.rb +1 -1
  96. data/test/lazylead/task/accuracy/onlyll_test.rb +21 -21
  97. data/test/lazylead/task/accuracy/records_llink_test.rb +1 -1
  98. data/test/lazylead/task/accuracy/records_test.rb +35 -12
  99. data/test/lazylead/task/accuracy/score_test.rb +4 -4
  100. data/test/lazylead/task/accuracy/screenshots_test.rb +3 -3
  101. data/test/lazylead/task/accuracy/servers_test.rb +1 -1
  102. data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
  103. data/test/lazylead/task/accuracy/testcase_test.rb +1 -1
  104. data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
  105. data/test/lazylead/task/accuracy/wiki_url_test.rb +1 -1
  106. data/test/lazylead/task/alert/alertif_test.rb +5 -5
  107. data/test/lazylead/task/alert/assignee_alert_test.rb +1 -1
  108. data/test/lazylead/task/alert/changed_to_test.rb +5 -5
  109. data/test/lazylead/task/assignment_test.rb +5 -5
  110. data/test/lazylead/task/confluence_ref_test.rb +8 -8
  111. data/test/lazylead/task/created_recently_test.rb +4 -4
  112. data/test/lazylead/task/duedate_test.rb +14 -14
  113. data/test/lazylead/task/echo_test.rb +1 -1
  114. data/test/lazylead/task/fix_version_test.rb +6 -5
  115. data/test/lazylead/task/loading_test.rb +7 -7
  116. data/test/lazylead/task/micromanager_test.rb +5 -5
  117. data/test/lazylead/task/missing_comment_test.rb +4 -4
  118. data/test/lazylead/task/propagate_down_test.rb +1 -1
  119. data/test/lazylead/task/savepoint_test.rb +1 -1
  120. data/test/lazylead/task/svn/diff_test.rb +14 -15
  121. data/test/lazylead/task/svn/grep_test.rb +4 -3
  122. data/test/lazylead/task/svn/touch_test.rb +74 -6
  123. data/test/lazylead/version_test.rb +1 -1
  124. data/test/sqlite_test.rb +1 -1
  125. data/test/test.rb +10 -3
  126. metadata +49 -107
@@ -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"),
@@ -36,20 +36,20 @@ module Lazylead
36
36
  test "last change to Done" do
37
37
  Smtp.new.enable
38
38
  Lazylead::Task::AlertIf.new.run(
39
- NoAuthJira.new("https://jira.spring.io"),
39
+ NoAuthJira.new("https://jira.mongodb.org"),
40
40
  Postman.new,
41
41
  Opts.new(
42
- "to_status" => "Done",
42
+ "to_status" => "Closed",
43
43
  "to" => "lead@company.com",
44
44
  "from" => "ll@company.com",
45
45
  "rules" => "Lazylead::ToStatus",
46
- "jql" => "key=XD-3064",
46
+ "jql" => "key=JAVA-500",
47
47
  "subject" => "[LL] alert if",
48
48
  "template" => "lib/messages/alertif.erb"
49
49
  )
50
50
  )
51
51
  assert_email "[LL] alert if",
52
- "XD-3064", "Critical", "Done", "Glenn Renfro", "Thomas Risberg", "HdfsMongoDB"
52
+ "JAVA-500", "Major - P3", "Closed", "Uladzimir Mihura", "Jeffrey Yemin", "m/r out:db and out:sharded options"
53
53
  end
54
54
  end
55
55
  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"),
@@ -30,12 +30,12 @@ require_relative "../../../../lib/lazylead/task/alert/changed_to"
30
30
 
31
31
  module Lazylead
32
32
  class ToStatusTest < Lazylead::Test
33
- test "last change to Done" do
33
+ test "last change to Closed" do
34
34
  assert Lazylead::ToStatus.new.passed(
35
- NoAuthJira.new("https://jira.spring.io")
36
- .issues("key=XD-3064", Opts.new.jira_defaults.merge(expand: "changelog"))
35
+ NoAuthJira.new("https://jira.mongodb.org")
36
+ .issues("key=JAVA-151", Opts.new.jira_defaults.merge(expand: "changelog"))
37
37
  .first,
38
- Opts.new("to_status" => "Done")
38
+ Opts.new("to_status" => "Closed")
39
39
  )
40
40
  end
41
41
  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,20 +35,20 @@ module Lazylead
35
35
  test "alert in case assignee changed by not authorized person" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::Assignment.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
  "to" => "lead@company.com",
42
42
  "from" => "ll@company.com",
43
- "jql" => "key in ('DATAJDBC-480') and assignee is not empty",
43
+ "jql" => "key=JAVA-4190",
44
44
  "allowed" => "tom,mike,bob",
45
45
  "subject" => "Assignment: How dare you?",
46
46
  "template" => "lib/messages/illegal_assignee_change.erb"
47
47
  )
48
48
  )
49
49
  assert_email "Assignment: How dare you?",
50
- "DATAJDBC-480", "01-Apr", "Minor", "Mark Paluch", "tom,mike,bob",
51
- "EntityInstantiators"
50
+ "JAVA-4190", "Jeffrey Yemin", "Valentin Kavalenka",
51
+ "Client side builder for operators supported by $search", "Nihal Jain"
52
52
  end
53
53
  end
54
54
  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"),
@@ -47,17 +47,17 @@ module Lazylead
47
47
  "JIRA_PASS"
48
48
  Task::ConfluenceRef.new.run(
49
49
  Jira.new(
50
- username: ENV["JIRA_USER"],
51
- password: ENV["JIRA_PASS"],
52
- site: ENV["JIRA_URL"],
50
+ username: ENV.fetch("JIRA_USER", nil),
51
+ password: ENV.fetch("JIRA_PASS", nil),
52
+ site: ENV.fetch("JIRA_URL", nil),
53
53
  context_path: ""
54
54
  ), "",
55
- "jql" => ENV["CONFLUENCE_JQL"],
55
+ "jql" => ENV.fetch("CONFLUENCE_JQL", nil),
56
56
  "confluences" => [
57
57
  {
58
- "url" => ENV["CONFLUENCE_URL"], "app" => ENV["CONFLUENCE_APP_ID"],
59
- "name" => ENV["CONFLUENCE_NAME"], "type" => "com.atlassian.confluence",
60
- "user" => ENV["CONFLUENCE_USER"], "pass" => ENV["CONFLUENCE_PASS"]
58
+ "url" => ENV.fetch("CONFLUENCE_URL", nil), "app" => ENV.fetch("CONFLUENCE_APP_ID", nil),
59
+ "name" => ENV.fetch("CONFLUENCE_NAME", nil), "type" => "com.atlassian.confluence",
60
+ "user" => ENV.fetch("CONFLUENCE_USER", nil), "pass" => ENV.fetch("CONFLUENCE_PASS", nil)
61
61
  }
62
62
  ].to_json
63
63
  )
@@ -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"),
@@ -37,18 +37,18 @@ module Lazylead
37
37
  test "issues were fetched" do
38
38
  Smtp.new.enable
39
39
  Task::Alert.new.run(
40
- NoAuthJira.new("https://jira.spring.io"),
40
+ NoAuthJira.new("https://jira.mongodb.org"),
41
41
  Postman.new,
42
42
  Opts.new(
43
43
  "from" => "fake@email.com",
44
44
  "to" => "my@team.com",
45
- "sql" => "labels=xd and key in (XD-3766, SGF-726)",
45
+ "sql" => "key in (JAVA-4403, JAVA-4417)",
46
46
  "subject" => "[CR] 20min ago!",
47
47
  "template" => "lib/messages/created_recently.erb"
48
48
  )
49
49
  )
50
50
  assert_email "[CR] 20min ago!",
51
- "XD-3766", "SGF-726"
51
+ "JAVA-4403", "JAVA-4417"
52
52
  end
53
53
  end
54
54
  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"),
@@ -39,16 +39,16 @@ module Lazylead
39
39
  test "issues were fetched" do
40
40
  Smtp.new.enable
41
41
  Task::AssigneeAlert.new.run(
42
- NoAuthJira.new("https://jira.spring.io"),
42
+ NoAuthJira.new("https://jira.mongodb.org"),
43
43
  Postman.new,
44
44
  Opts.new(
45
45
  "from" => "fake@email.com",
46
- "sql" => "filter=16743",
46
+ "sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
47
47
  "subject" => "[DD] PDTN!",
48
48
  "template" => "lib/messages/due_date_expired.erb"
49
49
  )
50
50
  )
51
- assert_equal(2, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "[DD] PDTN!" })
51
+ greater_or_eq(1, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "[DD] PDTN!" })
52
52
  end
53
53
 
54
54
  test "configuration properties merged successfully" do
@@ -72,27 +72,27 @@ module Lazylead
72
72
  test "html msg has ticket details" do
73
73
  Smtp.new.enable
74
74
  Task::AssigneeAlert.new.run(
75
- NoAuthJira.new("https://jira.spring.io"),
75
+ NoAuthJira.new("https://jira.mongodb.org"),
76
76
  Postman.new,
77
77
  Opts.new(
78
78
  "from" => "fake@email.com",
79
- "sql" => "key in ('STS-3599')",
79
+ "sql" => "key=VSCODE-333",
80
80
  "subject" => "[DD] HMCHT!",
81
81
  "template" => "lib/messages/due_date_expired.erb"
82
82
  )
83
83
  )
84
84
  assert_email "[DD] HMCHT!",
85
- "STS-3599", "2013-11-08", "Major", "Miles Parker", "Use JavaFX WebView"
85
+ "VSCODE-333", "2023-06-28", "Major - P3", "Rhys Howell", "Renew VSCODE automated publishing token"
86
86
  end
87
87
 
88
88
  test "send notification about bunch of tickets" do
89
89
  Smtp.new.enable
90
90
  Task::Alert.new.run(
91
- NoAuthJira.new("https://jira.spring.io"),
91
+ NoAuthJira.new("https://jira.mongodb.org"),
92
92
  Postman.new,
93
93
  Opts.new(
94
94
  "from" => "fake@email.com",
95
- "sql" => "key in ('STS-3599')",
95
+ "sql" => "key=DOCS-19",
96
96
  "subject" => "ALRT: Frozen",
97
97
  "template" => "lib/messages/due_date_expired.erb",
98
98
  "to" => "big.boss@example.com",
@@ -100,17 +100,17 @@ module Lazylead
100
100
  )
101
101
  )
102
102
  assert_email "ALRT: Frozen",
103
- "Hi Boss", "STS-3599", "2013-11-08", "Major", "Miles Parker", "Use JavaFX WebView"
103
+ "Hi Boss", "DOCS-19", "2012-09-28", "Major - P3", "Michael Conigliaro", "MongoDB exit code reference"
104
104
  end
105
105
 
106
106
  test "cc got notification" do
107
107
  Smtp.new.enable
108
108
  Task::Alert.new.run(
109
- NoAuthJira.new("https://jira.spring.io"),
109
+ NoAuthJira.new("https://jira.mongodb.org"),
110
110
  Postman.new,
111
111
  Opts.new(
112
112
  "from" => "fake@email.com",
113
- "sql" => "key in ('STS-3599')",
113
+ "sql" => "key=JAVA-295",
114
114
  "subject" => "CC: Watching",
115
115
  "template" => "lib/messages/due_date_expired.erb",
116
116
  "to" => "big.boss@example.com",
@@ -126,11 +126,11 @@ module Lazylead
126
126
  test "reporter got alert about his/her tickets with expired DD" do
127
127
  Smtp.new.enable
128
128
  Task::ReporterAlert.new.run(
129
- NoAuthJira.new("https://jira.spring.io"),
129
+ NoAuthJira.new("https://jira.mongodb.org"),
130
130
  Postman.new,
131
131
  Opts.new(
132
132
  "from" => "fake@email.com",
133
- "sql" => "filter=16743",
133
+ "sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
134
134
  "subject" => "DD Expired!",
135
135
  "template" => "lib/messages/due_date_expired.erb"
136
136
  )
@@ -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,12 +35,12 @@ module Lazylead
35
35
  test "alert in case fixvesion changed by not authorized person" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::FixVersion.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
  "to" => "lead@company.com",
42
42
  "from" => "ll@company.com",
43
- "jql" => "key in ('DATAJDBC-480') and fixVersion is not empty",
43
+ "jql" => "key=JAVA-5020",
44
44
  "allowed" => "tom,mike,bob",
45
45
  "fields" => "description,reporter,priority,summary,created,fixVersions",
46
46
  "subject" => "FixVersion: How dare you?",
@@ -48,8 +48,9 @@ module Lazylead
48
48
  )
49
49
  )
50
50
  assert_email "FixVersion: How dare you?",
51
- "DATAJDBC-480", "01-Apr-2020", "Minor", "Mark Paluch", "tom,mike,bob",
52
- "EntityInstantiators"
51
+ "JAVA-5020", "Minor - P4", "4.10.0", "16-Jun-2023 04:53:47 PM",
52
+ "Replace @Evolving with @Sealed where appropriate and possible",
53
+ "tom,mike,bob"
53
54
  end
54
55
  end
55
56
  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,15 +35,15 @@ module Lazylead
35
35
  test "notify about team loading" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::Loading.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
  "to" => "lead@company.com",
42
42
  "from" => "ll@company.com",
43
- "jql" => "key in (STS-3599, XD-3739, XD-3744)",
44
- "team" => "mclaren:Tom McLaren,milesparker:Mi Pa,grussell:Gary Ru",
43
+ "jql" => "key in (JAVA-2515, JAVA-2514, JAVA-2142, JAVA-2139, JAVA-2137)",
44
+ "team" => "ross@mongodb.com:Ross Lawley,jeff.yemin@mongodb.com:Jeffrey Yemin,mclaren:Tom McLaren",
45
45
  "user_link" => "https://user.com?id=",
46
- "search_link" => "https://jira.spring.io/issues/?jql=",
46
+ "search_link" => "https://jira.mongodb.org/issues/?jql=",
47
47
  "fields" => "assignee,duedate,customfield_10480",
48
48
  "sprint" => "customfield_10480",
49
49
  "subject" => "[LL] Team loading",
@@ -51,8 +51,8 @@ module Lazylead
51
51
  )
52
52
  )
53
53
  assert_email "[LL] Team loading",
54
- "grussell", "Gary Ru", "Sprint 68", "1",
55
- "Miles Parker", "No sprint: 1", "2013-11-08",
54
+ "ross@mongodb.com", "Ross Lawley", "No sprint: 1",
55
+ "jeff.yemin@mongodb.com", "Jeffrey Yemin", "No sprint: 4",
56
56
  "Tom McLaren", "0"
57
57
  end
58
58
  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,14 +35,14 @@ module Lazylead
35
35
  test "alert in case duedate changed by not authorized person" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::Micromanager.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
  "to" => "lead@company.com",
42
42
  "from" => "ll@company.com",
43
- "jql" => "key in ('STS-3599','SPR-6541') and duedate is not empty",
43
+ "jql" => "duedate is not EMPTY and key in (DOCS-194, DOCS-144, DOCS-143)",
44
44
  "fields" => "assignee,duedate,priority,created,summary,reporter",
45
- "allowed" => "tom,mike,bob",
45
+ "allowed" => "matulef,mike,bob",
46
46
  "period" => "86400",
47
47
  "now" => "2009-12-10T00:04:00.000+0000",
48
48
  "subject" => "DD: How dare you?",
@@ -50,7 +50,7 @@ module Lazylead
50
50
  )
51
51
  )
52
52
  assert_email "DD: How dare you?",
53
- "SPR-6541", "Major", "(kdonald)", "2009-12-10", "Spring's Maven Central", "tom,mike,bob"
53
+ "DOCS-144", "Major - P3", "2012-03-01", "New Documentation Review: Glossary", "matulef,mike,bob"
54
54
  end
55
55
 
56
56
  test "since for past 1 min" 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"),
@@ -35,13 +35,13 @@ module Lazylead
35
35
  test "alert in case missing comment" do
36
36
  Lazylead::Smtp.new.enable
37
37
  Task::MissingComment.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
  "to" => "lead@company.com",
42
42
  "addressee" => "Tom",
43
43
  "from" => "ll@company.com",
44
- "jql" => "key=DATAJDBC-523",
44
+ "jql" => "key=JAVA-65",
45
45
  "text" => "ftp.com/demo.avi",
46
46
  "details" => "reference to <code>ftp.com/demo.avi</code>",
47
47
  "subject" => "Expected ftp link is missing",
@@ -50,7 +50,7 @@ module Lazylead
50
50
  )
51
51
  )
52
52
  assert_email "Expected ftp link is missing",
53
- "DATAJDBC-523", "Major", "Mark Paluch", "https://github.com/spring-projects/spring-data-jdbc/commit/aadbb667ed1d61139d5ac51a06eb3dd1b39316db#diff-510a5041bb8a0575e97fedf105606b83R130"
53
+ "JAVA-65", "Minor - P4", "http://github.com/mongodb/mongo-java-driver/commit/729fc494e5305d362eea95b01c381f2a7daf2652"
54
54
  end
55
55
  end
56
56
  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"),
@@ -30,14 +30,14 @@ require_relative "../../../../lib/lazylead/postman"
30
30
  require_relative "../../../../lib/lazylead/task/svn/diff"
31
31
 
32
32
  module Lazylead
33
+ # @todo #/DEV Svn::Diff Add test to check engine structure without email sending
33
34
  class DiffTest < Lazylead::Test
34
35
  # @todo #/DEV Right now its impossible to check that attachment is present in email as we
35
36
  # removing the directory with attachments once SVN::Diff is sent the email through the postman.
36
37
  # Think about how to test this case in automatically, because for now we are doing it manually
37
38
  # during the development.
38
39
  test "changes since revision" do
39
- skip "No svn credentials provided" unless env? "svn_log_user",
40
- "svn_log_password"
40
+ skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
41
41
  skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
42
42
  Lazylead::Smtp.new.enable
43
43
  Task::Svn::Diff.new.run(
@@ -46,8 +46,8 @@ module Lazylead
46
46
  Opts.new(
47
47
  "from" => "svnlog@test.com",
48
48
  "svn_url" => "https://svn.riouxsvn.com/touch4ll",
49
- "svn_user" => ENV["svn_log_user"],
50
- "svn_password" => ENV["svn_log_password"],
49
+ "svn_user" => ENV.fetch("svn_log_user", nil),
50
+ "svn_password" => ENV.fetch("svn_log_password", nil),
51
51
  "commit_url" => "https://view.commit.com?rev=",
52
52
  "user" => "https://user.com?id=",
53
53
  "to" => "lead@fake.com",
@@ -62,8 +62,7 @@ module Lazylead
62
62
  end
63
63
 
64
64
  test "changes since revision with attachment" do
65
- skip "No svn credentials provided" unless env? "svn_log_user",
66
- "svn_log_password"
65
+ skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
67
66
  skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
68
67
  skip "No postman credentials provided" unless env? "LL_SMTP_HOST",
69
68
  "LL_SMTP_PORT",
@@ -74,22 +73,22 @@ module Lazylead
74
73
  Lazylead::Smtp.new(
75
74
  Log.new.verbose,
76
75
  NoSalt.new,
77
- smtp_host: ENV["LL_SMTP_HOST"],
78
- smtp_port: ENV["LL_SMTP_PORT"],
79
- smtp_user: ENV["LL_SMTP_USER"],
80
- smtp_pass: ENV["LL_SMTP_PASS"]
76
+ smtp_host: ENV.fetch("LL_SMTP_HOST", nil),
77
+ smtp_port: ENV.fetch("LL_SMTP_PORT", nil),
78
+ smtp_user: ENV.fetch("LL_SMTP_USER", nil),
79
+ smtp_pass: ENV.fetch("LL_SMTP_PASS", nil)
81
80
  ).enable
82
81
  Task::Svn::Diff.new.run(
83
82
  [],
84
83
  Postman.new,
85
84
  Opts.new(
86
- "from" => ENV["LL_SMTP_FROM"],
85
+ "from" => ENV.fetch("LL_SMTP_FROM", nil),
87
86
  "svn_url" => "https://svn.riouxsvn.com/touch4ll",
88
- "svn_user" => ENV["svn_log_user"],
89
- "svn_password" => ENV["svn_log_password"],
87
+ "svn_user" => ENV.fetch("svn_log_user", nil),
88
+ "svn_password" => ENV.fetch("svn_log_password", nil),
90
89
  "commit_url" => "https://view.commit.com?rev=",
91
90
  "user" => "https://user.com?id=",
92
- "to" => ENV["LL_SMTP_TO"],
91
+ "to" => ENV.fetch("LL_SMTP_TO", nil),
93
92
  "since_rev" => "1",
94
93
  "subject" => "[SVN] Changed since rev1",
95
94
  "template" => "lib/messages/svn_diff.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"),
@@ -31,6 +31,7 @@ require_relative "../../../../lib/lazylead/task/svn/grep"
31
31
  require_relative "../../../../lib/lazylead/task/svn/svn"
32
32
 
33
33
  module Lazylead
34
+ # @todo #/DEV Svn::Grep Add test to check engine structure without email sending
34
35
  class GrepTest < Lazylead::Test
35
36
  test "changes with text" do
36
37
  skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
@@ -43,8 +44,8 @@ module Lazylead
43
44
  "from" => "svnlog@test.com",
44
45
  "text" => "ping",
45
46
  "svn_url" => "https://svn.riouxsvn.com/touch4ll",
46
- "svn_user" => ENV["svn_log_user"],
47
- "svn_password" => ENV["svn_log_password"],
47
+ "svn_user" => ENV.fetch("svn_log_user", nil),
48
+ "svn_password" => ENV.fetch("svn_log_password", nil),
48
49
  "commit_url" => "https://view.commit.com?rev=",
49
50
  "user" => "https://user.com?id=",
50
51
  "to" => "lead@fake.com",