rumble 0.9.0 → 0.9.1

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: 8c20964e58895fdeea22718df431e8d62641ca63a9cdeea5392c56de5ec83d1f
4
- data.tar.gz: 98b2eb4b246660e42970eddf45d57baf9bf9a8548464520414eaabff0e7e4bfe
3
+ metadata.gz: 0c3b0045bdd0ef83c7efadfd18997dc0ad3ebba7494431118485db409e20a246
4
+ data.tar.gz: 6d5aa57aa9bac097b548d940a6968dac5f6a0c5db57e12a1afd5bf244a65962d
5
5
  SHA512:
6
- metadata.gz: 84b5a137fd6033a1ae42f629f4008e4f895889be84311e445625f5e5d7c0f0f9431ef4113c36b3ee8ce400dbd69d9ec1cdf0c368eb93e26446da4133b6853e7e
7
- data.tar.gz: '0687de7a94ad1b70df386bad7a83382e06f9b9dcd0efcc412f408f292e163e7d4bc4fd090ef19cf3da78a33b985f6530271a043492854c632db80e35c6bcfe60'
6
+ metadata.gz: d7cd624ee219cbb850728eddd22a46afcb6c1d28182f21647c5a9390d960e0482f609019f348267dbe1aaa7830e8b3336717722fecb11b2eb590f1ecc606238d
7
+ data.tar.gz: f4a1809697a594b7e73d59af18b698bdd70eec187100f169e8b846d37c12d7114d6e606d92ff2264f3dcd8a01a3861817e77b3d6ae53dc58c146bb1c89907251
data/bin/rumble CHANGED
@@ -33,12 +33,10 @@ begin
33
33
  config = File.expand_path('~/.rumble')
34
34
  if File.exist?(config)
35
35
  body = File.read(config)
36
- extra = body.split(/[\r\n]+/).map(&:strip).map do |ln|
37
- ln.gsub(/^(--(?:user|password)=).+$/, '\1***skipped***')
38
- end
36
+ extra = body.split(/[\r\n]+/).map(&:strip)
39
37
  args += extra
40
- puts "Found #{body.split(/\n/).length} lines in #{config}:
41
- #{extra.join("\n ")}"
38
+ puts "Found #{body.split(/\n/).length} lines in #{config}:"
39
+ puts extra.map { |ln| ln.gsub(/^(--(?:user|password)=).+$/, '\1***skipped***') }.join("\n ")
42
40
  else
43
41
  puts "Default config file #{config} not found"
44
42
  end
@@ -105,7 +103,7 @@ begin
105
103
  raise '--password is required' unless opts[:password]
106
104
  from = Mail::Address.new(opts[:from])
107
105
  raise 'The --proxy option is not supported' if opts[:proxy]
108
- puts "Sending to #{opts[:host]}:#{opts[:port]} from #{opts[:from]}"
106
+ puts "Sending to #{opts[:host]}:#{opts[:port]} (as #{opts[:user]}) from #{opts[:from]}"
109
107
  delivery_method :smtp, {
110
108
  domain: from.domain,
111
109
  address: opts[:host],
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2018-2025 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Rumble
28
- VERSION = '0.9.0'
28
+ VERSION = '0.9.1'
29
29
  end
data/test/test_rumble.rb CHANGED
@@ -49,6 +49,27 @@ class TestRumble < Minitest::Test
49
49
  end
50
50
  end
51
51
 
52
+ def test_with_live_gmail
53
+ skip('This is live test')
54
+ cfg = File.absolute_path(File.join(Dir.home, '.rumble'))
55
+ skip('No ~/.rumble file available') unless File.exist?(cfg)
56
+ Dir.mktmpdir do |home|
57
+ letter = File.join(home, 'letter.liquid')
58
+ File.write(letter, 'it is a test, please delete it')
59
+ qbash(
60
+ [
61
+ Shellwords.escape(File.join(__dir__, '../bin/rumble')),
62
+ '--method=smtp',
63
+ '--subject', 'rumble test email',
64
+ '--test', 'rumble+test@yegor256.com',
65
+ '--tls',
66
+ '--from', Shellwords.escape('Tester <yegor@zerocracy.com>'),
67
+ '--letter', Shellwords.escape(letter)
68
+ ]
69
+ )
70
+ end
71
+ end
72
+
52
73
  def test_with_mailhog
53
74
  skip('Works only on Ubuntu') if OS.mac? || OS.windows?
54
75
  Dir.mktmpdir do |home|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumble
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko