rumble 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/bin/rumble +4 -6
- data/lib/rumble/version.rb +1 -1
- data/test/test_rumble.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3b0045bdd0ef83c7efadfd18997dc0ad3ebba7494431118485db409e20a246
|
4
|
+
data.tar.gz: 6d5aa57aa9bac097b548d940a6968dac5f6a0c5db57e12a1afd5bf244a65962d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
-
|
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],
|
data/lib/rumble/version.rb
CHANGED
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|
|