lazylead 0.4.2 → 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: 4834917c8eacf27d7514a99f4a8eb9f2c9dd7a19735c3ae9653105ecf8cd7463
4
- data.tar.gz: f7d5c5f19e7be4c11de364a27099382b78d748ee091ed0c2c6de47d5b95b21bb
3
+ metadata.gz: cd5d4e1e8d89064bfa868e1c088166d3a42b4c155fde98246979a262854d15b0
4
+ data.tar.gz: fa0d3aefc186740945b1da68318aebe1d597d7b88f70b079644058f5e201126b
5
5
  SHA512:
6
- metadata.gz: 29bd5bdaed8330d9de652ab9d11126a1af79a84acc08b415db14f3a389592ac08e2c0ce1c35bd6733302aca808571a3f65d68183ceba20a7847cbb8e766eb921
7
- data.tar.gz: b80e43c020c05b8b26d3745916934e737f2b7176515ff82fa40f901cd7a8e8a7eb81c2cc016bb845289f22b38eb65854e1c59080f58be6ae584f1f40f5a95e5e
6
+ metadata.gz: 7b018d644048900e19d03bbf8b24847a0b617ba74721f213743687b90d1cc2078ca84f35af29c2660b73207e5fc5b86d4b9e45d3394d9c095645198400602dfe
7
+ data.tar.gz: 842cf53e33f2376891d80dcd7f7802f2a27a37bf26ea42a55c88d4b53925b6a161b3962cbc7df0467c2c1049532db8029977c78776340e938cc20f757f5d89b3
@@ -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.2"
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.2!
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"
@@ -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.2"
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>
@@ -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.2
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-15 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.2!
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