rumble 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +20 -0
- data/.github/workflows/actionlint.yml +42 -0
- data/.github/workflows/codecov.yml +30 -9
- data/.github/workflows/copyrights.yml +31 -0
- data/.github/workflows/markdown-lint.yml +39 -0
- data/.github/workflows/pdd.yml +35 -0
- data/.github/workflows/rake.yml +28 -8
- data/.github/workflows/xcop.yml +31 -0
- data/.github/workflows/yamllint.yml +35 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +28 -1
- data/.rultor.yml +24 -7
- data/.simplecov +1 -1
- data/Gemfile +17 -1
- data/Gemfile.lock +314 -0
- data/LICENSE.txt +1 -1
- data/README.md +13 -12
- data/Rakefile +6 -17
- data/bin/rumble +25 -35
- data/cucumber.yml +20 -0
- data/features/step_definitions/steps.rb +2 -2
- data/features/support/env.rb +1 -1
- data/lib/rumble/cli.rb +10 -9
- data/lib/rumble/version.rb +3 -3
- data/lib/rumble.rb +2 -2
- data/logo.svg +1 -1
- data/renovate.json +6 -0
- data/rumble.gemspec +11 -17
- data/test/test__helper.rb +4 -6
- data/test/test_rumble.rb +126 -4
- metadata +44 -122
- data/.github/ISSUE_TEMPLATE.md +0 -12
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -11
data/Gemfile.lock
ADDED
@@ -0,0 +1,314 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rumble (0.0.0)
|
5
|
+
liquid (= 5.5.0)
|
6
|
+
mail (= 2.8.1)
|
7
|
+
net-smtp (= 0.5.0)
|
8
|
+
net-smtp-proxy (= 2.0.0)
|
9
|
+
openssl (~> 3.0)
|
10
|
+
rainbow (= 3.1.1)
|
11
|
+
redcarpet (= 3.6.0)
|
12
|
+
slop (= 4.10.1)
|
13
|
+
uuidtools (= 2.2.0)
|
14
|
+
|
15
|
+
GEM
|
16
|
+
remote: https://rubygems.org/
|
17
|
+
specs:
|
18
|
+
actionpack (8.0.1)
|
19
|
+
actionview (= 8.0.1)
|
20
|
+
activesupport (= 8.0.1)
|
21
|
+
nokogiri (>= 1.8.5)
|
22
|
+
rack (>= 2.2.4)
|
23
|
+
rack-session (>= 1.0.1)
|
24
|
+
rack-test (>= 0.6.3)
|
25
|
+
rails-dom-testing (~> 2.2)
|
26
|
+
rails-html-sanitizer (~> 1.6)
|
27
|
+
useragent (~> 0.16)
|
28
|
+
actionview (8.0.1)
|
29
|
+
activesupport (= 8.0.1)
|
30
|
+
builder (~> 3.1)
|
31
|
+
erubi (~> 1.11)
|
32
|
+
rails-dom-testing (~> 2.2)
|
33
|
+
rails-html-sanitizer (~> 1.6)
|
34
|
+
activesupport (8.0.1)
|
35
|
+
base64
|
36
|
+
benchmark (>= 0.3)
|
37
|
+
bigdecimal
|
38
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
39
|
+
connection_pool (>= 2.2.5)
|
40
|
+
drb
|
41
|
+
i18n (>= 1.6, < 2)
|
42
|
+
logger (>= 1.4.2)
|
43
|
+
minitest (>= 5.1)
|
44
|
+
securerandom (>= 0.3)
|
45
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
46
|
+
uri (>= 0.13.1)
|
47
|
+
ast (2.4.2)
|
48
|
+
backtrace (0.4.0)
|
49
|
+
base64 (0.2.0)
|
50
|
+
benchmark (0.4.0)
|
51
|
+
bigdecimal (3.1.9)
|
52
|
+
builder (3.3.0)
|
53
|
+
concurrent-ruby (1.3.5)
|
54
|
+
connection_pool (2.5.0)
|
55
|
+
crass (1.0.6)
|
56
|
+
cucumber (9.2.1)
|
57
|
+
builder (~> 3.2)
|
58
|
+
cucumber-ci-environment (> 9, < 11)
|
59
|
+
cucumber-core (> 13, < 14)
|
60
|
+
cucumber-cucumber-expressions (~> 17.0)
|
61
|
+
cucumber-gherkin (> 24, < 28)
|
62
|
+
cucumber-html-formatter (> 20.3, < 22)
|
63
|
+
cucumber-messages (> 19, < 25)
|
64
|
+
diff-lcs (~> 1.5)
|
65
|
+
mini_mime (~> 1.1)
|
66
|
+
multi_test (~> 1.1)
|
67
|
+
sys-uname (~> 1.2)
|
68
|
+
cucumber-ci-environment (10.0.1)
|
69
|
+
cucumber-core (13.0.3)
|
70
|
+
cucumber-gherkin (>= 27, < 28)
|
71
|
+
cucumber-messages (>= 20, < 23)
|
72
|
+
cucumber-tag-expressions (> 5, < 7)
|
73
|
+
cucumber-cucumber-expressions (17.1.0)
|
74
|
+
bigdecimal
|
75
|
+
cucumber-gherkin (27.0.0)
|
76
|
+
cucumber-messages (>= 19.1.4, < 23)
|
77
|
+
cucumber-html-formatter (21.9.0)
|
78
|
+
cucumber-messages (> 19, < 28)
|
79
|
+
cucumber-messages (22.0.0)
|
80
|
+
cucumber-tag-expressions (6.1.2)
|
81
|
+
date (3.4.1)
|
82
|
+
diff-lcs (1.5.1)
|
83
|
+
docile (1.4.1)
|
84
|
+
drb (2.2.1)
|
85
|
+
elapsed (0.0.1)
|
86
|
+
loog (> 0)
|
87
|
+
tago (> 0)
|
88
|
+
erubi (1.13.1)
|
89
|
+
ffi (1.17.1-aarch64-linux-gnu)
|
90
|
+
ffi (1.17.1-aarch64-linux-musl)
|
91
|
+
ffi (1.17.1-arm-linux-gnu)
|
92
|
+
ffi (1.17.1-arm-linux-musl)
|
93
|
+
ffi (1.17.1-arm64-darwin)
|
94
|
+
ffi (1.17.1-x64-mingw-ucrt)
|
95
|
+
ffi (1.17.1-x86-linux-gnu)
|
96
|
+
ffi (1.17.1-x86-linux-musl)
|
97
|
+
ffi (1.17.1-x86_64-darwin)
|
98
|
+
ffi (1.17.1-x86_64-linux-gnu)
|
99
|
+
ffi (1.17.1-x86_64-linux-musl)
|
100
|
+
i18n (1.14.7)
|
101
|
+
concurrent-ruby (~> 1.0)
|
102
|
+
io-console (0.8.0)
|
103
|
+
irb (1.15.1)
|
104
|
+
pp (>= 0.6.0)
|
105
|
+
rdoc (>= 4.0.0)
|
106
|
+
reline (>= 0.4.2)
|
107
|
+
json (2.9.1)
|
108
|
+
language_server-protocol (3.17.0.4)
|
109
|
+
liquid (5.5.0)
|
110
|
+
logger (1.6.5)
|
111
|
+
loofah (2.24.0)
|
112
|
+
crass (~> 1.0.2)
|
113
|
+
nokogiri (>= 1.12.0)
|
114
|
+
loog (0.6.0)
|
115
|
+
mail (2.8.1)
|
116
|
+
mini_mime (>= 0.1.1)
|
117
|
+
net-imap
|
118
|
+
net-pop
|
119
|
+
net-smtp
|
120
|
+
mini_mime (1.1.5)
|
121
|
+
mini_portile2 (2.8.8)
|
122
|
+
minitest (5.25.4)
|
123
|
+
multi_test (1.1.0)
|
124
|
+
net-imap (0.5.5)
|
125
|
+
date
|
126
|
+
net-protocol
|
127
|
+
net-pop (0.1.2)
|
128
|
+
net-protocol
|
129
|
+
net-protocol (0.2.2)
|
130
|
+
timeout
|
131
|
+
net-smtp (0.5.0)
|
132
|
+
net-protocol
|
133
|
+
net-smtp-proxy (2.0.0)
|
134
|
+
proxifier (~> 1.0)
|
135
|
+
nokogiri (1.18.2)
|
136
|
+
mini_portile2 (~> 2.8.2)
|
137
|
+
racc (~> 1.4)
|
138
|
+
nokogiri (1.18.2-aarch64-linux-gnu)
|
139
|
+
racc (~> 1.4)
|
140
|
+
nokogiri (1.18.2-aarch64-linux-musl)
|
141
|
+
racc (~> 1.4)
|
142
|
+
nokogiri (1.18.2-arm-linux-gnu)
|
143
|
+
racc (~> 1.4)
|
144
|
+
nokogiri (1.18.2-arm-linux-musl)
|
145
|
+
racc (~> 1.4)
|
146
|
+
nokogiri (1.18.2-arm64-darwin)
|
147
|
+
racc (~> 1.4)
|
148
|
+
nokogiri (1.18.2-x64-mingw-ucrt)
|
149
|
+
racc (~> 1.4)
|
150
|
+
nokogiri (1.18.2-x86_64-darwin)
|
151
|
+
racc (~> 1.4)
|
152
|
+
nokogiri (1.18.2-x86_64-linux-gnu)
|
153
|
+
racc (~> 1.4)
|
154
|
+
nokogiri (1.18.2-x86_64-linux-musl)
|
155
|
+
racc (~> 1.4)
|
156
|
+
openssl (3.3.0)
|
157
|
+
os (1.1.4)
|
158
|
+
parallel (1.26.3)
|
159
|
+
parser (3.3.7.0)
|
160
|
+
ast (~> 2.4.1)
|
161
|
+
racc
|
162
|
+
pp (0.6.2)
|
163
|
+
prettyprint
|
164
|
+
prettyprint (0.2.0)
|
165
|
+
proxifier (1.0.3)
|
166
|
+
psych (5.2.3)
|
167
|
+
date
|
168
|
+
stringio
|
169
|
+
qbash (0.3.2)
|
170
|
+
backtrace (> 0)
|
171
|
+
elapsed (> 0)
|
172
|
+
loog (> 0)
|
173
|
+
tago (> 0)
|
174
|
+
racc (1.8.1)
|
175
|
+
rack (3.1.9)
|
176
|
+
rack-session (2.1.0)
|
177
|
+
base64 (>= 0.1.0)
|
178
|
+
rack (>= 3.0.0)
|
179
|
+
rack-test (2.2.0)
|
180
|
+
rack (>= 1.3)
|
181
|
+
rackup (2.2.1)
|
182
|
+
rack (>= 3)
|
183
|
+
rails-dom-testing (2.2.0)
|
184
|
+
activesupport (>= 5.0.0)
|
185
|
+
minitest
|
186
|
+
nokogiri (>= 1.6)
|
187
|
+
rails-html-sanitizer (1.6.2)
|
188
|
+
loofah (~> 2.21)
|
189
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
190
|
+
railties (8.0.1)
|
191
|
+
actionpack (= 8.0.1)
|
192
|
+
activesupport (= 8.0.1)
|
193
|
+
irb (~> 1.13)
|
194
|
+
rackup (>= 1.0.0)
|
195
|
+
rake (>= 12.2)
|
196
|
+
thor (~> 1.0, >= 1.2.2)
|
197
|
+
zeitwerk (~> 2.6)
|
198
|
+
rainbow (3.1.1)
|
199
|
+
rake (13.2.1)
|
200
|
+
random-port (0.7.5)
|
201
|
+
tago (> 0)
|
202
|
+
rdoc (6.11.0)
|
203
|
+
psych (>= 4.0.0)
|
204
|
+
redcarpet (3.6.0)
|
205
|
+
regexp_parser (2.10.0)
|
206
|
+
reline (0.6.0)
|
207
|
+
io-console (~> 0.5)
|
208
|
+
rexml (3.4.0)
|
209
|
+
rspec-core (3.13.2)
|
210
|
+
rspec-support (~> 3.13.0)
|
211
|
+
rspec-expectations (3.13.3)
|
212
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
213
|
+
rspec-support (~> 3.13.0)
|
214
|
+
rspec-mocks (3.13.2)
|
215
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
216
|
+
rspec-support (~> 3.13.0)
|
217
|
+
rspec-rails (7.1.0)
|
218
|
+
actionpack (>= 7.0)
|
219
|
+
activesupport (>= 7.0)
|
220
|
+
railties (>= 7.0)
|
221
|
+
rspec-core (~> 3.13)
|
222
|
+
rspec-expectations (~> 3.13)
|
223
|
+
rspec-mocks (~> 3.13)
|
224
|
+
rspec-support (~> 3.13)
|
225
|
+
rspec-support (3.13.2)
|
226
|
+
rubocop (1.71.2)
|
227
|
+
json (~> 2.3)
|
228
|
+
language_server-protocol (>= 3.17.0)
|
229
|
+
parallel (~> 1.10)
|
230
|
+
parser (>= 3.3.0.2)
|
231
|
+
rainbow (>= 2.2.2, < 4.0)
|
232
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
233
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
234
|
+
ruby-progressbar (~> 1.7)
|
235
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
236
|
+
rubocop-ast (1.38.0)
|
237
|
+
parser (>= 3.3.1.0)
|
238
|
+
rubocop-minitest (0.36.0)
|
239
|
+
rubocop (>= 1.61, < 2.0)
|
240
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
241
|
+
rubocop-performance (1.23.1)
|
242
|
+
rubocop (>= 1.48.1, < 2.0)
|
243
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
244
|
+
rubocop-rake (0.6.0)
|
245
|
+
rubocop (~> 1.0)
|
246
|
+
rubocop-rspec (3.4.0)
|
247
|
+
rubocop (~> 1.61)
|
248
|
+
ruby-progressbar (1.13.0)
|
249
|
+
securerandom (0.4.1)
|
250
|
+
simplecov (0.22.0)
|
251
|
+
docile (~> 1.1)
|
252
|
+
simplecov-html (~> 0.11)
|
253
|
+
simplecov_json_formatter (~> 0.1)
|
254
|
+
simplecov-cobertura (2.1.0)
|
255
|
+
rexml
|
256
|
+
simplecov (~> 0.19)
|
257
|
+
simplecov-html (0.13.1)
|
258
|
+
simplecov_json_formatter (0.1.4)
|
259
|
+
slop (4.10.1)
|
260
|
+
stringio (3.1.2)
|
261
|
+
sys-uname (1.3.1)
|
262
|
+
ffi (~> 1.1)
|
263
|
+
tago (0.0.2)
|
264
|
+
thor (1.3.2)
|
265
|
+
timeout (0.4.3)
|
266
|
+
tzinfo (2.0.6)
|
267
|
+
concurrent-ruby (~> 1.0)
|
268
|
+
unicode-display_width (3.1.4)
|
269
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
270
|
+
unicode-emoji (4.0.4)
|
271
|
+
uri (1.0.2)
|
272
|
+
useragent (0.16.11)
|
273
|
+
uuidtools (2.2.0)
|
274
|
+
yard (0.9.37)
|
275
|
+
zeitwerk (2.7.1)
|
276
|
+
|
277
|
+
PLATFORMS
|
278
|
+
aarch64-linux
|
279
|
+
aarch64-linux-gnu
|
280
|
+
aarch64-linux-musl
|
281
|
+
arm-linux
|
282
|
+
arm-linux-gnu
|
283
|
+
arm-linux-musl
|
284
|
+
arm64-darwin
|
285
|
+
arm64-darwin-23
|
286
|
+
x64-mingw-ucrt
|
287
|
+
x86-linux
|
288
|
+
x86-linux-gnu
|
289
|
+
x86-linux-musl
|
290
|
+
x86_64-darwin
|
291
|
+
x86_64-linux
|
292
|
+
x86_64-linux-gnu
|
293
|
+
x86_64-linux-musl
|
294
|
+
|
295
|
+
DEPENDENCIES
|
296
|
+
cucumber (= 9.2.1)
|
297
|
+
minitest (= 5.25.4)
|
298
|
+
os (= 1.1.4)
|
299
|
+
qbash (>= 0.3.1)
|
300
|
+
rake (= 13.2.1)
|
301
|
+
random-port (>= 0.7.5)
|
302
|
+
rspec-rails (= 7.1.0)
|
303
|
+
rubocop (= 1.71.2)
|
304
|
+
rubocop-minitest (= 0.36.0)
|
305
|
+
rubocop-performance (= 1.23.1)
|
306
|
+
rubocop-rake (= 0.6.0)
|
307
|
+
rubocop-rspec (= 3.4.0)
|
308
|
+
rumble!
|
309
|
+
simplecov (= 0.22.0)
|
310
|
+
simplecov-cobertura (= 2.1.0)
|
311
|
+
yard (= 0.9.37)
|
312
|
+
|
313
|
+
BUNDLED WITH
|
314
|
+
2.5.16
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# Command Line Mass-Email Sender
|
2
2
|
|
3
3
|
[](https://www.elegantobjects.org)
|
4
4
|
[](http://www.rultor.com/p/yegor256/rumble)
|
@@ -9,8 +9,6 @@
|
|
9
9
|
[](http://badge.fury.io/rb/rumble)
|
10
10
|
[](https://codeclimate.com/github/yegor256/rumble/maintainability)
|
11
11
|
[](https://codecov.io/github/yegor256/rumble?branch=master)
|
12
|
-
|
13
|
-

|
14
12
|
[](https://hitsofcode.com/view/github/yegor256/0rsk)
|
15
13
|
|
16
14
|
This command line tool helps you send newsletters.
|
@@ -18,18 +16,18 @@ This command line tool helps you send newsletters.
|
|
18
16
|
Install it first:
|
19
17
|
|
20
18
|
```bash
|
21
|
-
|
19
|
+
gem install rumble
|
22
20
|
```
|
23
21
|
|
24
22
|
Run it locally and read its output:
|
25
23
|
|
26
24
|
```bash
|
27
|
-
|
25
|
+
rumble --help
|
28
26
|
```
|
29
27
|
|
30
28
|
Simple liquid letter looks like this:
|
31
29
|
|
32
|
-
```
|
30
|
+
```liquid
|
33
31
|
{{ first }},
|
34
32
|
|
35
33
|
How are you?
|
@@ -41,18 +39,21 @@ Yegor
|
|
41
39
|
The list of emails must contain three columns separated by a comma: first
|
42
40
|
name, last name, and email.
|
43
41
|
|
44
|
-
|
42
|
+
You can't send via HTTP/SMTP proxy, unfortunately (you are welcome
|
43
|
+
to submit a pull request).
|
45
44
|
|
46
45
|
## How to contribute
|
47
46
|
|
48
|
-
Read
|
47
|
+
Read
|
48
|
+
[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
49
49
|
Make sure you build is green before you contribute
|
50
|
-
your pull request. You will need to have
|
50
|
+
your pull request. You will need to have
|
51
|
+
[Ruby](https://www.ruby-lang.org/en/) 2.3+ and
|
51
52
|
[Bundler](https://bundler.io/) installed. Then:
|
52
53
|
|
53
|
-
```
|
54
|
-
|
55
|
-
|
54
|
+
```bash
|
55
|
+
bundle update
|
56
|
+
bundle exec rake
|
56
57
|
```
|
57
58
|
|
58
59
|
If it's clean and you don't see any error messages, submit your pull request.
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -33,7 +33,7 @@ def version
|
|
33
33
|
Gem::Specification.load(Dir['*.gemspec'].first).version
|
34
34
|
end
|
35
35
|
|
36
|
-
task default: %i[clean test features rubocop
|
36
|
+
task default: %i[clean test features rubocop yard]
|
37
37
|
|
38
38
|
require 'rake/testtask'
|
39
39
|
desc 'Run all unit tests'
|
@@ -44,13 +44,10 @@ Rake::TestTask.new(:test) do |test|
|
|
44
44
|
test.verbose = false
|
45
45
|
end
|
46
46
|
|
47
|
-
require '
|
48
|
-
desc 'Build
|
49
|
-
Rake::
|
50
|
-
|
51
|
-
rdoc.title = "#{name} #{version}"
|
52
|
-
rdoc.rdoc_files.include('README*')
|
53
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
47
|
+
require 'yard'
|
48
|
+
desc 'Build Yard documentation'
|
49
|
+
YARD::Rake::YardocTask.new do |t|
|
50
|
+
t.files = ['lib/**/*.rb']
|
54
51
|
end
|
55
52
|
|
56
53
|
require 'rubocop/rake_task'
|
@@ -67,11 +64,3 @@ end
|
|
67
64
|
Cucumber::Rake::Task.new(:'features:html') do |t|
|
68
65
|
t.profile = 'html_report'
|
69
66
|
end
|
70
|
-
|
71
|
-
task :copyright do
|
72
|
-
sh "grep -q -r '#{Date.today.strftime('%Y')}' \
|
73
|
-
--include '*.rb' \
|
74
|
-
--include '*.txt' \
|
75
|
-
--include 'Rakefile' \
|
76
|
-
."
|
77
|
-
end
|
data/bin/rumble
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (c) 2018-
|
2
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,19 +21,21 @@
|
|
21
21
|
|
22
22
|
STDOUT.sync = true
|
23
23
|
|
24
|
-
require 'slop'
|
25
24
|
require 'mail'
|
26
|
-
require '
|
25
|
+
require 'openssl'
|
26
|
+
require 'slop'
|
27
27
|
require_relative '../lib/rumble'
|
28
|
-
require_relative '../lib/rumble/version'
|
29
28
|
require_relative '../lib/rumble/cli'
|
29
|
+
require_relative '../lib/rumble/version'
|
30
30
|
|
31
31
|
begin
|
32
32
|
args = []
|
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)
|
36
|
+
extra = body.split(/[\r\n]+/).map(&:strip).map do |ln|
|
37
|
+
ln.gsub(/^(--(?:user|password)=).+$/, '\1***skipped***')
|
38
|
+
end
|
37
39
|
args += extra
|
38
40
|
puts "Found #{body.split(/\n/).length} lines in #{config}:
|
39
41
|
#{extra.join("\n ")}"
|
@@ -60,8 +62,11 @@ begin
|
|
60
62
|
o.string '--method',
|
61
63
|
'How to deliver them: "smtp" or "sendmail" (default: sendmail)',
|
62
64
|
default: 'sendmail'
|
65
|
+
o.bool '--tls',
|
66
|
+
'Whether TLS must be used or not (default: true)',
|
67
|
+
default: false
|
63
68
|
o.string '--host', 'SMTP host name'
|
64
|
-
o.integer '--port', 'SMTP port number (25
|
69
|
+
o.integer '--port', 'SMTP port number (default: 25)', default: 25
|
65
70
|
o.string '--user', 'SMTP user name'
|
66
71
|
o.string '--password', 'SMTP password'
|
67
72
|
o.string '--proxy', 'HTTP/SOCKS proxy, e.g. "socks:192.168.0.1:8080"'
|
@@ -71,9 +76,9 @@ begin
|
|
71
76
|
o.string '--resume', 'Email address from which we should resume'
|
72
77
|
o.string '--skip', 'File name with emails that opted-out (black list)'
|
73
78
|
o.string '--test', 'Email address to use instead of the real user list'
|
74
|
-
o.string '--col-first', 'First name columm (0
|
75
|
-
o.string '--col-last', 'Last name columm (1
|
76
|
-
o.string '--col-email', 'Email columm (2
|
79
|
+
o.string '--col-first', 'First name columm (default: 0)', default: 0
|
80
|
+
o.string '--col-last', 'Last name columm (default: 1)', default: 1
|
81
|
+
o.string '--col-email', 'Email columm (default: 2)', default: 2
|
77
82
|
o.string '--attach', 'The script to run on each email'
|
78
83
|
end
|
79
84
|
rescue Slop::Error => ex
|
@@ -99,32 +104,17 @@ begin
|
|
99
104
|
raise '--user is required' unless opts[:user]
|
100
105
|
raise '--password is required' unless opts[:password]
|
101
106
|
from = Mail::Address.new(opts[:from])
|
102
|
-
if opts[:proxy]
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
enable_starttls: true,
|
114
|
-
user_name: opts[:user],
|
115
|
-
password: opts[:password]
|
116
|
-
}
|
117
|
-
else
|
118
|
-
delivery_method :smtp, {
|
119
|
-
domain: from.domain,
|
120
|
-
address: opts[:host],
|
121
|
-
port: opts[:port],
|
122
|
-
user_name: opts[:user],
|
123
|
-
password: opts[:password],
|
124
|
-
enable_starttls: true,
|
125
|
-
enable_starttls_auto: true
|
126
|
-
}
|
127
|
-
end
|
107
|
+
raise 'The --proxy option is not supported' if opts[:proxy]
|
108
|
+
puts "Sending to #{opts[:host]}:#{opts[:port]} from #{opts[:from]}"
|
109
|
+
delivery_method :smtp, {
|
110
|
+
domain: from.domain,
|
111
|
+
address: opts[:host],
|
112
|
+
port: opts[:port],
|
113
|
+
user_name: opts[:user],
|
114
|
+
password: opts[:password],
|
115
|
+
authentication: 'plain',
|
116
|
+
enable_starttls_auto: opts[:tls]
|
117
|
+
}
|
128
118
|
else
|
129
119
|
raise "Delivery method #{opts[:method]} is not supported"
|
130
120
|
end
|
data/cucumber.yml
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all
|
11
|
+
# copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
# SOFTWARE.
|
20
|
+
---
|
1
21
|
default: --format pretty
|
2
22
|
travis: --format progress
|
3
23
|
html_report: --format progress --format html --out=features_report.html
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -44,7 +44,7 @@ end
|
|
44
44
|
|
45
45
|
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
|
46
46
|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
|
47
|
-
File.write(file, text.gsub(
|
47
|
+
File.write(file, text.gsub('\\xFF', 0xFF.chr))
|
48
48
|
end
|
49
49
|
|
50
50
|
When(%r{^I run bin/rumble with "([^"]*)"$}) do |arg|
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/lib/rumble/cli.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -20,20 +20,20 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
|
+
require 'csv'
|
23
24
|
require 'English'
|
24
|
-
require 'mail'
|
25
|
-
require 'uuidtools'
|
26
25
|
require 'liquid'
|
27
|
-
require '
|
28
|
-
require '
|
26
|
+
require 'mail'
|
27
|
+
require 'rainbow'
|
29
28
|
require 'redcarpet'
|
30
29
|
require 'redcarpet/render_strip'
|
31
|
-
require '
|
30
|
+
require 'tmpdir'
|
31
|
+
require 'uuidtools'
|
32
32
|
require_relative 'version'
|
33
33
|
|
34
34
|
# Rumble main script.
|
35
35
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
36
|
-
# Copyright:: Copyright (c) 2018-
|
36
|
+
# Copyright:: Copyright (c) 2018-2025 Yegor Bugayenko
|
37
37
|
# License:: MIT
|
38
38
|
class Rumble::CLI
|
39
39
|
# Make an instance.
|
@@ -66,8 +66,9 @@ class Rumble::CLI
|
|
66
66
|
emails.each do |array|
|
67
67
|
email = array[@opts['col-email'].to_i]
|
68
68
|
unless email
|
69
|
-
puts
|
70
|
-
|
69
|
+
puts \
|
70
|
+
"Email is #{Rainbow('absent').red} " \
|
71
|
+
"at the column ##{@opts['col-email'].to_i}: #{array}"
|
71
72
|
next
|
72
73
|
end
|
73
74
|
email = email.strip.downcase
|
data/lib/rumble/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,8 +22,8 @@
|
|
22
22
|
|
23
23
|
# Rumble main module.
|
24
24
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
25
|
-
# Copyright:: Copyright (c) 2018-
|
25
|
+
# Copyright:: Copyright (c) 2018-2025 Yegor Bugayenko
|
26
26
|
# License:: MIT
|
27
27
|
module Rumble
|
28
|
-
VERSION = '0.
|
28
|
+
VERSION = '0.9.0'
|
29
29
|
end
|
data/lib/rumble.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# Rumble module.
|
24
24
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
25
|
-
# Copyright:: Copyright (c) 2018-
|
25
|
+
# Copyright:: Copyright (c) 2018-2025 Yegor Bugayenko
|
26
26
|
# License:: MIT
|
27
27
|
module Rumble
|
28
28
|
# Nothing
|
data/logo.svg
CHANGED