lazylead 0.4.0 → 0.4.3

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: d8f6929a5583f40fca08c1d1293b77cf2f19ea22b1844eb9888a860b79c86b7c
4
- data.tar.gz: 07b70000fe7e00aeb7c33b321d1f35c99dccb8220f477650b90a693ea8688c0c
3
+ metadata.gz: cd5d4e1e8d89064bfa868e1c088166d3a42b4c155fde98246979a262854d15b0
4
+ data.tar.gz: fa0d3aefc186740945b1da68318aebe1d597d7b88f70b079644058f5e201126b
5
5
  SHA512:
6
- metadata.gz: 1699bbdc2484d6a77715b11bb0f666e70e18e3bc5927d79ee02cee3bfcc4e6bf6d848a74a5c287990e56d059f669f07dc9e450f7af6992b63881288f481e062e
7
- data.tar.gz: 0c471418e7ed2a92d740d0e362c0bcd9ce37eca1538272eab8abe0eff4fb3b01df1559b5f16d7af9ed3dfa52d06ebb5ff1c6a10cb897df7aeab3e119f8fe63c3
6
+ metadata.gz: 7b018d644048900e19d03bbf8b24847a0b617ba74721f213743687b90d1cc2078ca84f35af29c2660b73207e5fc5b86d4b9e45d3394d9c095645198400602dfe
7
+ data.tar.gz: 842cf53e33f2376891d80dcd7f7802f2a27a37bf26ea42a55c88d4b53925b6a161b3962cbc7df0467c2c1049532db8029977c78776340e938cc20f757f5d89b3
@@ -73,7 +73,7 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
73
73
  '{
74
74
  "jql": "filter=222",
75
75
  "to": "lead@fake.com",
76
- "rules": "Lazylead::RequirementAffectedBuild",
76
+ "rules": "Lazylead::AffectedBuild",
77
77
  "colors": "{ "0": "#FF4F33", "35": "#FF9F33", "57": "#19DD1E", "90": "#0FA81A" }",
78
78
  "docs": "https://github.com/dgroup/lazylead/blob/master/.github/ISSUE_TEMPLATE/bug_report.md",
79
79
  "max_results": "200",
@@ -104,4 +104,4 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
104
104
 
105
105
  #### How can I add my own rules?
106
106
  The custom rules should extend `Lazylead::Requirement` class and placed it to the `lib/lazylead/task/accuracy` folder.
107
- After that, you need to mention your custom rules in `rules` option in the column `properties` from `tasks` table
107
+ After that, you need to mention your custom rules in `rules` option in the column `properties` from `tasks` table
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
@@ -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.4.0"
35
+ s.version = "0.4.3"
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.4.0!
48
+ s.post_install_message = "Thanks for installing Lazylead v0.4.3!
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
@@ -82,6 +82,7 @@ tasks instead of solving technical problems."
82
82
  s.add_development_dependency "minitest-fail-fast", "0.1.0"
83
83
  s.add_development_dependency "minitest-hooks", "1.5.0"
84
84
  s.add_development_dependency "minitest-reporters", "1.3.6"
85
+ s.add_development_dependency "net-ping", "2.0.8"
85
86
  s.add_development_dependency "rake", "12.3.3"
86
87
  s.add_development_dependency "random-port", "0.3.1"
87
88
  s.add_development_dependency "rdoc", "6.1.1"
@@ -98,7 +98,7 @@ module Lazylead
98
98
  sys = system.connect
99
99
  opts = props
100
100
  opts = detect_cc(sys) if opts.key? "cc"
101
- action.constantize.new(log).run(sys, postman, opts)
101
+ action.constantize.new.run(sys, postman, opts)
102
102
  end
103
103
 
104
104
  def detect_cc(sys)
@@ -143,7 +143,7 @@ module Lazylead
143
143
  @log.debug "'#{name}' is started."
144
144
  @log.warn "No postman, stub is used." unless props.key? "postman"
145
145
  @log.warn "No team." if team.nil?
146
- @orig.exec @log
146
+ @orig.exec
147
147
  @log.debug "'#{name}' is completed"
148
148
  rescue StandardError => e
149
149
  msg = <<~MSG
@@ -33,7 +33,7 @@ module Lazylead
33
33
  # License:: MIT
34
34
  class Opts
35
35
  extend Forwardable
36
- def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :merge
36
+ def_delegators :@origin, :[], :[]=, :to_s, :key?, :fetch, :merge, :except
37
37
 
38
38
  def initialize(origin = {})
39
39
  @origin = origin
@@ -58,17 +58,19 @@ module Lazylead
58
58
 
59
59
  # Return all svn commits for particular date range in repo
60
60
  def svn_log(opts)
61
- url = opts["svn_url"]
62
- usr = decrypt(opts["svn_user"])
63
- psw = decrypt(opts["svn_password"])
64
61
  now = if opts.key? "now"
65
62
  DateTime.parse(opts["now"])
66
63
  else
67
64
  DateTime.now
68
65
  end
69
66
  start = (now.to_time - opts["period"].to_i).to_datetime
70
- raw = `svn log --no-auth-cache --username #{usr} --password #{psw}
71
- --xml -v -r {#{start}}:{#{now}} #{url}`
67
+ cmd = [
68
+ "svn log --no-auth-cache",
69
+ "--username #{decrypt(opts['svn_user'])}",
70
+ "--password #{decrypt(opts['svn_password'])}",
71
+ "--xml -v -r {#{start}}:{#{now}} #{opts['svn_url']}"
72
+ ]
73
+ raw = `#{cmd.join(" ")}`
72
74
  Nokogiri.XML(raw, nil, "UTF-8")
73
75
  end
74
76
 
@@ -23,5 +23,5 @@
23
23
  # OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
25
  module Lazylead
26
- VERSION = "0.4.0"
26
+ VERSION = "0.4.3"
27
27
  end
@@ -106,7 +106,7 @@
106
106
  padding: 3.6px 6.3px 2.7px
107
107
  }
108
108
  </style>
109
- <title>RCA</title>
109
+ <title>SVN touch</title>
110
110
  </head>
111
111
  <body>
112
112
  <p>Hi,</p>
@@ -62,5 +62,9 @@ module Lazylead
62
62
  test "to hash" do
63
63
  assert_kind_of Hash, Opts.new("one" => "1", "two" => nil).to_h
64
64
  end
65
+
66
+ test "except keys" do
67
+ assert_equal 1, Opts.new("one" => "1", "two" => "2").except("one").size
68
+ end
65
69
  end
66
70
  end
@@ -25,39 +25,37 @@
25
25
  require "mail"
26
26
  require_relative "../../test"
27
27
  require_relative "../../../lib/lazylead/smtp"
28
-
28
+ require_relative "../../../lib/lazylead/opts"
29
29
  require_relative "../../../lib/lazylead/postman"
30
30
  require_relative "../../../lib/lazylead/task/touch"
31
31
 
32
32
  module Lazylead
33
33
  class SvnTouchTest < Lazylead::Test
34
- # @todo #/DEV Find stable svn repo which can be used for stable test, for
35
- # now only floating repo used for testing locally. Also, create a new
36
- # method "ping" which can be used during tests like
37
- # skip "No connection available to svn repo" unless ping("https://svn.com")
38
34
  test "important files changed in svn repo" do
39
- skip "No svn credentials provided" unless env? "svn_url",
40
- "svn_user",
41
- "svn_password"
35
+ skip "No svn credentials provided" unless env? "svn_touch_user",
36
+ "svn_touch_password"
37
+ skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
42
38
  Lazylead::Smtp.new.enable
43
39
  Task::SvnTouch.new.run(
44
40
  nil,
45
41
  Postman.new,
46
- "svn_url" => ENV["svn_url"],
47
- "svn_user" => ENV["svn_user"],
48
- "svn_password" => ENV["svn_password"],
49
- "commit_url" => "https://view.commit.com?rev=",
50
- "user" => "https://user.com?id=",
51
- "to" => "lead@fake.com",
52
- "from" => "ll@fake.com",
53
- "now" => "2020-07-12T17:24:45+01:00",
54
- "period" => "864000",
55
- "files" => "checkstyle.xml,checkstyle_suppressions.xml",
56
- "subject" => "[SVN] Static analysis configuration has been changed!",
57
- "template" => "lib/messages/svn_touch.erb"
42
+ Opts.new(
43
+ "svn_url" => "https://svn.riouxsvn.com/touch4ll",
44
+ "svn_user" => ENV["svn_touch_user"],
45
+ "svn_password" => ENV["svn_touch_password"],
46
+ "commit_url" => "https://view.commit.com?rev=",
47
+ "user" => "https://user.com?id=",
48
+ "to" => "lead@fake.com",
49
+ "from" => "ll@fake.com",
50
+ "now" => "2020-08-17T00:00:00+01:00",
51
+ "period" => "864000",
52
+ "files" => "189.md,absent.txt",
53
+ "subject" => "[SVN] Important files have been changed!",
54
+ "template" => "lib/messages/svn_touch.erb"
55
+ )
58
56
  )
59
- assert_email "[SVN] Static analysis configuration has been changed!",
60
- %w[revision user ticket]
57
+ assert_email "[SVN] Important files have been changed!",
58
+ %w[3 dgroup /189.md Add\ description\ for\ 189\ issue]
61
59
  end
62
60
  end
63
61
  end
@@ -110,5 +110,14 @@ module Lazylead
110
110
  .first
111
111
  .body.parts.first.body.raw_source
112
112
  end
113
+
114
+ # Ping remote host
115
+ # https://github.com/eitoball/net-ping
116
+ # https://stackoverflow.com/a/35508446/6916890
117
+ # https://rubygems.org/gems/net-ping/versions/2.0.8
118
+ def ping?(host)
119
+ require "net/ping"
120
+ Net::Ping::External.new(host).ping?
121
+ end
113
122
  end
114
123
  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.4.0
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurii Dubinka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2020-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -388,6 +388,20 @@ dependencies:
388
388
  - - '='
389
389
  - !ruby/object:Gem::Version
390
390
  version: 1.3.6
391
+ - !ruby/object:Gem::Dependency
392
+ name: net-ping
393
+ requirement: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - '='
396
+ - !ruby/object:Gem::Version
397
+ version: 2.0.8
398
+ type: :development
399
+ prerelease: false
400
+ version_requirements: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - '='
403
+ - !ruby/object:Gem::Version
404
+ version: 2.0.8
391
405
  - !ruby/object:Gem::Dependency
392
406
  name: rake
393
407
  requirement: !ruby/object:Gem::Requirement
@@ -553,6 +567,7 @@ files:
553
567
  - ".github/ISSUE_TEMPLATE/bug_report.md"
554
568
  - ".github/ISSUE_TEMPLATE/feature_request.md"
555
569
  - ".github/PULL_REQUEST_TEMPLATE.md"
570
+ - ".github/dependabot.yml"
556
571
  - ".github/tasks.yml"
557
572
  - ".github/trello.md"
558
573
  - ".gitignore"
@@ -643,7 +658,7 @@ licenses:
643
658
  - MIT
644
659
  metadata: {}
645
660
  post_install_message: |-
646
- Thanks for installing Lazylead v0.4.0!
661
+ Thanks for installing Lazylead v0.4.3!
647
662
  Read our blog posts: https://lazylead.org
648
663
  Stay in touch with the community in Telegram: https://t.me/lazylead
649
664
  Follow us on Twitter: https://twitter.com/lazylead