rumble 0.8.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 +1 -1
- data/.github/workflows/actionlint.yml +3 -2
- data/.github/workflows/codecov.yml +6 -4
- data/.github/workflows/copyrights.yml +4 -3
- data/.github/workflows/markdown-lint.yml +3 -2
- data/.github/workflows/pdd.yml +3 -2
- data/.github/workflows/rake.yml +4 -4
- data/.github/workflows/xcop.yml +3 -2
- data/.github/workflows/yamllint.yml +3 -2
- data/.gitignore +1 -1
- data/.rubocop.yml +8 -2
- data/.rultor.yml +3 -3
- data/.simplecov +1 -1
- data/Gemfile +12 -8
- data/Gemfile.lock +144 -102
- data/LICENSE.txt +1 -1
- data/Rakefile +2 -10
- data/bin/rumble +18 -11
- data/cucumber.yml +1 -1
- data/features/step_definitions/steps.rb +1 -1
- 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/rumble.gemspec +11 -10
- data/test/test__helper.rb +1 -1
- data/test/test_rumble.rb +126 -4
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c20964e58895fdeea22718df431e8d62641ca63a9cdeea5392c56de5ec83d1f
|
4
|
+
data.tar.gz: 98b2eb4b246660e42970eddf45d57baf9bf9a8548464520414eaabff0e7e4bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84b5a137fd6033a1ae42f629f4008e4f895889be84311e445625f5e5d7c0f0f9431ef4113c36b3ee8ce400dbd69d9ec1cdf0c368eb93e26446da4133b6853e7e
|
7
|
+
data.tar.gz: '0687de7a94ad1b70df386bad7a83382e06f9b9dcd0efcc412f408f292e163e7d4bc4fd090ef19cf3da78a33b985f6530271a043492854c632db80e35c6bcfe60'
|
data/.0pdd.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,7 +28,8 @@ name: actionlint
|
|
28
28
|
- master
|
29
29
|
jobs:
|
30
30
|
actionlint:
|
31
|
-
|
31
|
+
timeout-minutes: 15
|
32
|
+
runs-on: ubuntu-24.04
|
32
33
|
steps:
|
33
34
|
- uses: actions/checkout@v4
|
34
35
|
- name: Download actionlint
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -25,15 +25,17 @@ name: codecov
|
|
25
25
|
- master
|
26
26
|
jobs:
|
27
27
|
codecov:
|
28
|
-
|
28
|
+
timeout-minutes: 15
|
29
|
+
runs-on: ubuntu-24.04
|
29
30
|
steps:
|
30
31
|
- uses: actions/checkout@v4
|
31
32
|
- uses: ruby/setup-ruby@v1
|
32
33
|
with:
|
33
|
-
ruby-version: 3.
|
34
|
+
ruby-version: 3.3
|
34
35
|
bundler-cache: true
|
36
|
+
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
35
37
|
- run: bundle install
|
36
38
|
- run: bundle exec rake
|
37
|
-
- uses: codecov/codecov-action@
|
39
|
+
- uses: codecov/codecov-action@v5
|
38
40
|
with:
|
39
41
|
token: ${{ secrets.CODECOV_TOKEN }}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,8 @@ name: copyrights
|
|
24
24
|
pull_request:
|
25
25
|
jobs:
|
26
26
|
copyrights:
|
27
|
-
|
27
|
+
timeout-minutes: 15
|
28
|
+
runs-on: ubuntu-24.04
|
28
29
|
steps:
|
29
30
|
- uses: actions/checkout@v4
|
30
|
-
- uses: yegor256/copyrights-action@0.0.
|
31
|
+
- uses: yegor256/copyrights-action@0.0.8
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -32,7 +32,8 @@ concurrency:
|
|
32
32
|
cancel-in-progress: true
|
33
33
|
jobs:
|
34
34
|
markdown-lint:
|
35
|
-
|
35
|
+
timeout-minutes: 15
|
36
|
+
runs-on: ubuntu-24.04
|
36
37
|
steps:
|
37
38
|
- uses: actions/checkout@v4
|
38
39
|
- uses: articulate/actions-markdownlint@v1
|
data/.github/workflows/pdd.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,7 +28,8 @@ name: pdd
|
|
28
28
|
- master
|
29
29
|
jobs:
|
30
30
|
pdd:
|
31
|
-
|
31
|
+
timeout-minutes: 15
|
32
|
+
runs-on: ubuntu-24.04
|
32
33
|
steps:
|
33
34
|
- uses: actions/checkout@v4
|
34
35
|
- uses: volodya-lombrozo/pdd-action@master
|
data/.github/workflows/rake.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,11 +28,10 @@ name: rake
|
|
28
28
|
- master
|
29
29
|
jobs:
|
30
30
|
rake:
|
31
|
-
name: test
|
32
31
|
strategy:
|
33
32
|
matrix:
|
34
|
-
os: [ubuntu-
|
35
|
-
ruby: [3.
|
33
|
+
os: [ubuntu-24.04, macos-15, windows-2022]
|
34
|
+
ruby: [3.3]
|
36
35
|
runs-on: ${{ matrix.os }}
|
37
36
|
steps:
|
38
37
|
- uses: actions/checkout@v4
|
@@ -40,5 +39,6 @@ jobs:
|
|
40
39
|
with:
|
41
40
|
ruby-version: ${{ matrix.ruby }}
|
42
41
|
bundler-cache: true
|
42
|
+
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
43
43
|
- run: bundle install
|
44
44
|
- run: bundle exec rake
|
data/.github/workflows/xcop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,8 @@ name: xcop
|
|
24
24
|
pull_request:
|
25
25
|
jobs:
|
26
26
|
xcop:
|
27
|
-
|
27
|
+
timeout-minutes: 15
|
28
|
+
runs-on: ubuntu-24.04
|
28
29
|
steps:
|
29
30
|
- uses: actions/checkout@v4
|
30
31
|
- uses: g4s8/xcop-action@master
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,7 +28,8 @@ name: yamllint
|
|
28
28
|
- master
|
29
29
|
jobs:
|
30
30
|
yamllint:
|
31
|
-
|
31
|
+
timeout-minutes: 15
|
32
|
+
runs-on: ubuntu-24.04
|
32
33
|
steps:
|
33
34
|
- uses: actions/checkout@v4
|
34
35
|
- uses: ibiqlik/action-yamllint@v3
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,14 +24,20 @@ AllCops:
|
|
24
24
|
- 'assets/**/*'
|
25
25
|
- 'vendor/**/**'
|
26
26
|
DisplayCopNames: true
|
27
|
-
TargetRubyVersion:
|
27
|
+
TargetRubyVersion: 3.0
|
28
28
|
NewCops: enable
|
29
29
|
SuggestExtensions: false
|
30
|
+
require:
|
31
|
+
- rubocop-minitest
|
32
|
+
- rubocop-performance
|
33
|
+
- rubocop-rake
|
30
34
|
|
31
35
|
Layout/EndOfLine:
|
32
36
|
EnforcedStyle: lf
|
33
37
|
Metrics/CyclomaticComplexity:
|
34
38
|
Max: 22
|
39
|
+
Metrics/ClassLength:
|
40
|
+
Max: 200
|
35
41
|
Metrics/MethodLength:
|
36
42
|
Enabled: false
|
37
43
|
Layout/MultilineMethodCallIndentation:
|
data/.rultor.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2018-
|
1
|
+
# Copyright (c) 2018-2025 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -19,7 +19,7 @@
|
|
19
19
|
# SOFTWARE.
|
20
20
|
---
|
21
21
|
docker:
|
22
|
-
image: yegor256/rultor-
|
22
|
+
image: yegor256/rultor-ruby
|
23
23
|
assets:
|
24
24
|
rubygems.yml: yegor256/home#assets/rubygems.yml
|
25
25
|
install: |
|
@@ -29,7 +29,7 @@ release:
|
|
29
29
|
pre: false
|
30
30
|
script: |-
|
31
31
|
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
|
32
|
-
bundle exec rake
|
32
|
+
DOCKER_SUDO=true bundle exec rake
|
33
33
|
rm -rf *.gem
|
34
34
|
sed -i "s/0\.0\.0/${tag}/g" lib/rumble/version.rb
|
35
35
|
git add lib/rumble/version.rb
|
data/.simplecov
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/Gemfile
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
|
@@ -23,14 +23,18 @@
|
|
23
23
|
source 'https://rubygems.org'
|
24
24
|
gemspec
|
25
25
|
|
26
|
-
gem 'cucumber', '9.2.
|
27
|
-
gem 'minitest', '5.
|
26
|
+
gem 'cucumber', '9.2.1', require: false
|
27
|
+
gem 'minitest', '5.25.4', require: false
|
28
|
+
gem 'os', '1.1.4', require: false
|
29
|
+
gem 'qbash', '>=0.3.1', require: false
|
28
30
|
gem 'rake', '13.2.1', require: false
|
29
|
-
gem '
|
30
|
-
gem '
|
31
|
-
gem 'rubocop
|
31
|
+
gem 'random-port', '>=0.7.5', require: false
|
32
|
+
gem 'rspec-rails', '7.1.0', require: false
|
33
|
+
gem 'rubocop', '1.71.2', require: false
|
34
|
+
gem 'rubocop-minitest', '0.36.0', require: false
|
35
|
+
gem 'rubocop-performance', '1.23.1', require: false
|
32
36
|
gem 'rubocop-rake', '0.6.0', require: false
|
33
|
-
gem 'rubocop-rspec', '3.0
|
37
|
+
gem 'rubocop-rspec', '3.4.0', require: false
|
34
38
|
gem 'simplecov', '0.22.0', require: false
|
35
39
|
gem 'simplecov-cobertura', '2.1.0', require: false
|
36
|
-
gem 'yard', '0.9.
|
40
|
+
gem 'yard', '0.9.37', require: false
|
data/Gemfile.lock
CHANGED
@@ -6,6 +6,7 @@ PATH
|
|
6
6
|
mail (= 2.8.1)
|
7
7
|
net-smtp (= 0.5.0)
|
8
8
|
net-smtp-proxy (= 2.0.0)
|
9
|
+
openssl (~> 3.0)
|
9
10
|
rainbow (= 3.1.1)
|
10
11
|
redcarpet (= 3.6.0)
|
11
12
|
slop (= 4.10.1)
|
@@ -14,40 +15,45 @@ PATH
|
|
14
15
|
GEM
|
15
16
|
remote: https://rubygems.org/
|
16
17
|
specs:
|
17
|
-
actionpack (
|
18
|
-
actionview (=
|
19
|
-
activesupport (=
|
18
|
+
actionpack (8.0.1)
|
19
|
+
actionview (= 8.0.1)
|
20
|
+
activesupport (= 8.0.1)
|
20
21
|
nokogiri (>= 1.8.5)
|
21
|
-
racc
|
22
22
|
rack (>= 2.2.4)
|
23
23
|
rack-session (>= 1.0.1)
|
24
24
|
rack-test (>= 0.6.3)
|
25
25
|
rails-dom-testing (~> 2.2)
|
26
26
|
rails-html-sanitizer (~> 1.6)
|
27
|
-
|
28
|
-
|
27
|
+
useragent (~> 0.16)
|
28
|
+
actionview (8.0.1)
|
29
|
+
activesupport (= 8.0.1)
|
29
30
|
builder (~> 3.1)
|
30
31
|
erubi (~> 1.11)
|
31
32
|
rails-dom-testing (~> 2.2)
|
32
33
|
rails-html-sanitizer (~> 1.6)
|
33
|
-
activesupport (
|
34
|
+
activesupport (8.0.1)
|
34
35
|
base64
|
36
|
+
benchmark (>= 0.3)
|
35
37
|
bigdecimal
|
36
|
-
concurrent-ruby (~> 1.0, >= 1.
|
38
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
37
39
|
connection_pool (>= 2.2.5)
|
38
40
|
drb
|
39
41
|
i18n (>= 1.6, < 2)
|
42
|
+
logger (>= 1.4.2)
|
40
43
|
minitest (>= 5.1)
|
41
|
-
|
42
|
-
tzinfo (~> 2.0)
|
44
|
+
securerandom (>= 0.3)
|
45
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
46
|
+
uri (>= 0.13.1)
|
43
47
|
ast (2.4.2)
|
48
|
+
backtrace (0.4.0)
|
44
49
|
base64 (0.2.0)
|
45
|
-
|
50
|
+
benchmark (0.4.0)
|
51
|
+
bigdecimal (3.1.9)
|
46
52
|
builder (3.3.0)
|
47
|
-
concurrent-ruby (1.3.
|
48
|
-
connection_pool (2.
|
53
|
+
concurrent-ruby (1.3.5)
|
54
|
+
connection_pool (2.5.0)
|
49
55
|
crass (1.0.6)
|
50
|
-
cucumber (9.2.
|
56
|
+
cucumber (9.2.1)
|
51
57
|
builder (~> 3.2)
|
52
58
|
cucumber-ci-environment (> 9, < 11)
|
53
59
|
cucumber-core (> 13, < 14)
|
@@ -60,7 +66,7 @@ GEM
|
|
60
66
|
multi_test (~> 1.1)
|
61
67
|
sys-uname (~> 1.2)
|
62
68
|
cucumber-ci-environment (10.0.1)
|
63
|
-
cucumber-core (13.0.
|
69
|
+
cucumber-core (13.0.3)
|
64
70
|
cucumber-gherkin (>= 27, < 28)
|
65
71
|
cucumber-messages (>= 20, < 23)
|
66
72
|
cucumber-tag-expressions (> 5, < 7)
|
@@ -68,48 +74,54 @@ GEM
|
|
68
74
|
bigdecimal
|
69
75
|
cucumber-gherkin (27.0.0)
|
70
76
|
cucumber-messages (>= 19.1.4, < 23)
|
71
|
-
cucumber-html-formatter (21.
|
72
|
-
cucumber-messages (> 19, <
|
77
|
+
cucumber-html-formatter (21.9.0)
|
78
|
+
cucumber-messages (> 19, < 28)
|
73
79
|
cucumber-messages (22.0.0)
|
74
|
-
cucumber-tag-expressions (6.1.
|
75
|
-
date (3.
|
80
|
+
cucumber-tag-expressions (6.1.2)
|
81
|
+
date (3.4.1)
|
76
82
|
diff-lcs (1.5.1)
|
77
|
-
docile (1.4.
|
83
|
+
docile (1.4.1)
|
78
84
|
drb (2.2.1)
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
ffi (1.17.
|
84
|
-
ffi (1.17.
|
85
|
-
ffi (1.17.
|
86
|
-
ffi (1.17.
|
87
|
-
ffi (1.17.
|
88
|
-
ffi (1.17.
|
89
|
-
ffi (1.17.
|
90
|
-
ffi (1.17.
|
91
|
-
|
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)
|
92
101
|
concurrent-ruby (~> 1.0)
|
93
|
-
io-console (0.
|
94
|
-
irb (1.
|
102
|
+
io-console (0.8.0)
|
103
|
+
irb (1.15.1)
|
104
|
+
pp (>= 0.6.0)
|
95
105
|
rdoc (>= 4.0.0)
|
96
106
|
reline (>= 0.4.2)
|
97
|
-
json (2.
|
98
|
-
language_server-protocol (3.17.0.
|
107
|
+
json (2.9.1)
|
108
|
+
language_server-protocol (3.17.0.4)
|
99
109
|
liquid (5.5.0)
|
100
|
-
|
110
|
+
logger (1.6.5)
|
111
|
+
loofah (2.24.0)
|
101
112
|
crass (~> 1.0.2)
|
102
113
|
nokogiri (>= 1.12.0)
|
114
|
+
loog (0.6.0)
|
103
115
|
mail (2.8.1)
|
104
116
|
mini_mime (>= 0.1.1)
|
105
117
|
net-imap
|
106
118
|
net-pop
|
107
119
|
net-smtp
|
108
120
|
mini_mime (1.1.5)
|
109
|
-
|
121
|
+
mini_portile2 (2.8.8)
|
122
|
+
minitest (5.25.4)
|
110
123
|
multi_test (1.1.0)
|
111
|
-
|
112
|
-
net-imap (0.4.14)
|
124
|
+
net-imap (0.5.5)
|
113
125
|
date
|
114
126
|
net-protocol
|
115
127
|
net-pop (0.1.2)
|
@@ -120,99 +132,121 @@ GEM
|
|
120
132
|
net-protocol
|
121
133
|
net-smtp-proxy (2.0.0)
|
122
134
|
proxifier (~> 1.0)
|
123
|
-
nokogiri (1.
|
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)
|
124
141
|
racc (~> 1.4)
|
125
|
-
nokogiri (1.
|
142
|
+
nokogiri (1.18.2-arm-linux-gnu)
|
126
143
|
racc (~> 1.4)
|
127
|
-
nokogiri (1.
|
144
|
+
nokogiri (1.18.2-arm-linux-musl)
|
128
145
|
racc (~> 1.4)
|
129
|
-
nokogiri (1.
|
146
|
+
nokogiri (1.18.2-arm64-darwin)
|
130
147
|
racc (~> 1.4)
|
131
|
-
nokogiri (1.
|
148
|
+
nokogiri (1.18.2-x64-mingw-ucrt)
|
132
149
|
racc (~> 1.4)
|
133
|
-
nokogiri (1.
|
150
|
+
nokogiri (1.18.2-x86_64-darwin)
|
134
151
|
racc (~> 1.4)
|
135
|
-
nokogiri (1.
|
152
|
+
nokogiri (1.18.2-x86_64-linux-gnu)
|
136
153
|
racc (~> 1.4)
|
137
|
-
|
138
|
-
|
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)
|
139
160
|
ast (~> 2.4.1)
|
140
161
|
racc
|
162
|
+
pp (0.6.2)
|
163
|
+
prettyprint
|
164
|
+
prettyprint (0.2.0)
|
141
165
|
proxifier (1.0.3)
|
142
|
-
psych (5.
|
166
|
+
psych (5.2.3)
|
167
|
+
date
|
143
168
|
stringio
|
144
|
-
|
145
|
-
|
146
|
-
|
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)
|
147
178
|
rack (>= 3.0.0)
|
148
|
-
rack-test (2.
|
179
|
+
rack-test (2.2.0)
|
149
180
|
rack (>= 1.3)
|
150
|
-
rackup (2.1
|
181
|
+
rackup (2.2.1)
|
151
182
|
rack (>= 3)
|
152
|
-
webrick (~> 1.8)
|
153
183
|
rails-dom-testing (2.2.0)
|
154
184
|
activesupport (>= 5.0.0)
|
155
185
|
minitest
|
156
186
|
nokogiri (>= 1.6)
|
157
|
-
rails-html-sanitizer (1.6.
|
187
|
+
rails-html-sanitizer (1.6.2)
|
158
188
|
loofah (~> 2.21)
|
159
|
-
nokogiri (
|
160
|
-
railties (
|
161
|
-
actionpack (=
|
162
|
-
activesupport (=
|
163
|
-
irb
|
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)
|
164
194
|
rackup (>= 1.0.0)
|
165
195
|
rake (>= 12.2)
|
166
196
|
thor (~> 1.0, >= 1.2.2)
|
167
197
|
zeitwerk (~> 2.6)
|
168
198
|
rainbow (3.1.1)
|
169
199
|
rake (13.2.1)
|
170
|
-
|
200
|
+
random-port (0.7.5)
|
201
|
+
tago (> 0)
|
202
|
+
rdoc (6.11.0)
|
171
203
|
psych (>= 4.0.0)
|
172
204
|
redcarpet (3.6.0)
|
173
|
-
regexp_parser (2.
|
174
|
-
reline (0.
|
205
|
+
regexp_parser (2.10.0)
|
206
|
+
reline (0.6.0)
|
175
207
|
io-console (~> 0.5)
|
176
|
-
rexml (3.
|
177
|
-
|
178
|
-
rspec-core (3.13.0)
|
208
|
+
rexml (3.4.0)
|
209
|
+
rspec-core (3.13.2)
|
179
210
|
rspec-support (~> 3.13.0)
|
180
|
-
rspec-expectations (3.13.
|
211
|
+
rspec-expectations (3.13.3)
|
181
212
|
diff-lcs (>= 1.2.0, < 2.0)
|
182
213
|
rspec-support (~> 3.13.0)
|
183
|
-
rspec-mocks (3.13.
|
214
|
+
rspec-mocks (3.13.2)
|
184
215
|
diff-lcs (>= 1.2.0, < 2.0)
|
185
216
|
rspec-support (~> 3.13.0)
|
186
|
-
rspec-rails (
|
187
|
-
actionpack (>=
|
188
|
-
activesupport (>=
|
189
|
-
railties (>=
|
217
|
+
rspec-rails (7.1.0)
|
218
|
+
actionpack (>= 7.0)
|
219
|
+
activesupport (>= 7.0)
|
220
|
+
railties (>= 7.0)
|
190
221
|
rspec-core (~> 3.13)
|
191
222
|
rspec-expectations (~> 3.13)
|
192
223
|
rspec-mocks (~> 3.13)
|
193
224
|
rspec-support (~> 3.13)
|
194
|
-
rspec-support (3.13.
|
195
|
-
rubocop (1.
|
225
|
+
rspec-support (3.13.2)
|
226
|
+
rubocop (1.71.2)
|
196
227
|
json (~> 2.3)
|
197
228
|
language_server-protocol (>= 3.17.0)
|
198
229
|
parallel (~> 1.10)
|
199
230
|
parser (>= 3.3.0.2)
|
200
231
|
rainbow (>= 2.2.2, < 4.0)
|
201
|
-
regexp_parser (>=
|
202
|
-
|
203
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
232
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
233
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
204
234
|
ruby-progressbar (~> 1.7)
|
205
|
-
unicode-display_width (>= 2.4.0, <
|
206
|
-
rubocop-ast (1.
|
235
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
236
|
+
rubocop-ast (1.38.0)
|
207
237
|
parser (>= 3.3.1.0)
|
208
|
-
rubocop-
|
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)
|
209
242
|
rubocop (>= 1.48.1, < 2.0)
|
210
243
|
rubocop-ast (>= 1.31.1, < 2.0)
|
211
244
|
rubocop-rake (0.6.0)
|
212
245
|
rubocop (~> 1.0)
|
213
|
-
rubocop-rspec (3.0
|
246
|
+
rubocop-rspec (3.4.0)
|
214
247
|
rubocop (~> 1.61)
|
215
248
|
ruby-progressbar (1.13.0)
|
249
|
+
securerandom (0.4.1)
|
216
250
|
simplecov (0.22.0)
|
217
251
|
docile (~> 1.1)
|
218
252
|
simplecov-html (~> 0.11)
|
@@ -220,22 +254,25 @@ GEM
|
|
220
254
|
simplecov-cobertura (2.1.0)
|
221
255
|
rexml
|
222
256
|
simplecov (~> 0.19)
|
223
|
-
simplecov-html (0.
|
257
|
+
simplecov-html (0.13.1)
|
224
258
|
simplecov_json_formatter (0.1.4)
|
225
259
|
slop (4.10.1)
|
226
|
-
stringio (3.1.
|
227
|
-
|
228
|
-
sys-uname (1.3.0)
|
260
|
+
stringio (3.1.2)
|
261
|
+
sys-uname (1.3.1)
|
229
262
|
ffi (~> 1.1)
|
230
|
-
|
231
|
-
|
263
|
+
tago (0.0.2)
|
264
|
+
thor (1.3.2)
|
265
|
+
timeout (0.4.3)
|
232
266
|
tzinfo (2.0.6)
|
233
267
|
concurrent-ruby (~> 1.0)
|
234
|
-
unicode-display_width (
|
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)
|
235
273
|
uuidtools (2.2.0)
|
236
|
-
|
237
|
-
|
238
|
-
zeitwerk (2.6.16)
|
274
|
+
yard (0.9.37)
|
275
|
+
zeitwerk (2.7.1)
|
239
276
|
|
240
277
|
PLATFORMS
|
241
278
|
aarch64-linux
|
@@ -245,6 +282,7 @@ PLATFORMS
|
|
245
282
|
arm-linux-gnu
|
246
283
|
arm-linux-musl
|
247
284
|
arm64-darwin
|
285
|
+
arm64-darwin-23
|
248
286
|
x64-mingw-ucrt
|
249
287
|
x86-linux
|
250
288
|
x86-linux-gnu
|
@@ -255,18 +293,22 @@ PLATFORMS
|
|
255
293
|
x86_64-linux-musl
|
256
294
|
|
257
295
|
DEPENDENCIES
|
258
|
-
cucumber (= 9.2.
|
259
|
-
minitest (= 5.
|
296
|
+
cucumber (= 9.2.1)
|
297
|
+
minitest (= 5.25.4)
|
298
|
+
os (= 1.1.4)
|
299
|
+
qbash (>= 0.3.1)
|
260
300
|
rake (= 13.2.1)
|
261
|
-
|
262
|
-
|
263
|
-
rubocop
|
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)
|
264
306
|
rubocop-rake (= 0.6.0)
|
265
|
-
rubocop-rspec (= 3.0
|
307
|
+
rubocop-rspec (= 3.4.0)
|
266
308
|
rumble!
|
267
309
|
simplecov (= 0.22.0)
|
268
310
|
simplecov-cobertura (= 2.1.0)
|
269
|
-
yard (= 0.9.
|
311
|
+
yard (= 0.9.37)
|
270
312
|
|
271
313
|
BUNDLED WITH
|
272
|
-
2.5.
|
314
|
+
2.5.16
|
data/LICENSE.txt
CHANGED
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 yard
|
36
|
+
task default: %i[clean test features rubocop yard]
|
37
37
|
|
38
38
|
require 'rake/testtask'
|
39
39
|
desc 'Run all unit tests'
|
@@ -64,11 +64,3 @@ end
|
|
64
64
|
Cucumber::Rake::Task.new(:'features:html') do |t|
|
65
65
|
t.profile = 'html_report'
|
66
66
|
end
|
67
|
-
|
68
|
-
task :copyright do
|
69
|
-
sh "grep -q -r '#{Date.today.strftime('%Y')}' \
|
70
|
-
--include '*.rb' \
|
71
|
-
--include '*.txt' \
|
72
|
-
--include 'Rakefile' \
|
73
|
-
."
|
74
|
-
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,18 +21,21 @@
|
|
21
21
|
|
22
22
|
STDOUT.sync = true
|
23
23
|
|
24
|
-
require 'slop'
|
25
24
|
require 'mail'
|
25
|
+
require 'openssl'
|
26
|
+
require 'slop'
|
26
27
|
require_relative '../lib/rumble'
|
27
|
-
require_relative '../lib/rumble/version'
|
28
28
|
require_relative '../lib/rumble/cli'
|
29
|
+
require_relative '../lib/rumble/version'
|
29
30
|
|
30
31
|
begin
|
31
32
|
args = []
|
32
33
|
config = File.expand_path('~/.rumble')
|
33
34
|
if File.exist?(config)
|
34
35
|
body = File.read(config)
|
35
|
-
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
|
36
39
|
args += extra
|
37
40
|
puts "Found #{body.split(/\n/).length} lines in #{config}:
|
38
41
|
#{extra.join("\n ")}"
|
@@ -59,8 +62,11 @@ begin
|
|
59
62
|
o.string '--method',
|
60
63
|
'How to deliver them: "smtp" or "sendmail" (default: sendmail)',
|
61
64
|
default: 'sendmail'
|
65
|
+
o.bool '--tls',
|
66
|
+
'Whether TLS must be used or not (default: true)',
|
67
|
+
default: false
|
62
68
|
o.string '--host', 'SMTP host name'
|
63
|
-
o.integer '--port', 'SMTP port number (25
|
69
|
+
o.integer '--port', 'SMTP port number (default: 25)', default: 25
|
64
70
|
o.string '--user', 'SMTP user name'
|
65
71
|
o.string '--password', 'SMTP password'
|
66
72
|
o.string '--proxy', 'HTTP/SOCKS proxy, e.g. "socks:192.168.0.1:8080"'
|
@@ -70,9 +76,9 @@ begin
|
|
70
76
|
o.string '--resume', 'Email address from which we should resume'
|
71
77
|
o.string '--skip', 'File name with emails that opted-out (black list)'
|
72
78
|
o.string '--test', 'Email address to use instead of the real user list'
|
73
|
-
o.string '--col-first', 'First name columm (0
|
74
|
-
o.string '--col-last', 'Last name columm (1
|
75
|
-
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
|
76
82
|
o.string '--attach', 'The script to run on each email'
|
77
83
|
end
|
78
84
|
rescue Slop::Error => ex
|
@@ -98,15 +104,16 @@ begin
|
|
98
104
|
raise '--user is required' unless opts[:user]
|
99
105
|
raise '--password is required' unless opts[:password]
|
100
106
|
from = Mail::Address.new(opts[:from])
|
101
|
-
raise 'The --proxy option is not
|
107
|
+
raise 'The --proxy option is not supported' if opts[:proxy]
|
108
|
+
puts "Sending to #{opts[:host]}:#{opts[:port]} from #{opts[:from]}"
|
102
109
|
delivery_method :smtp, {
|
103
110
|
domain: from.domain,
|
104
111
|
address: opts[:host],
|
105
112
|
port: opts[:port],
|
106
113
|
user_name: opts[:user],
|
107
114
|
password: opts[:password],
|
108
|
-
|
109
|
-
enable_starttls_auto:
|
115
|
+
authentication: 'plain',
|
116
|
+
enable_starttls_auto: opts[:tls]
|
110
117
|
}
|
111
118
|
else
|
112
119
|
raise "Delivery method #{opts[:method]} is not supported"
|
data/cucumber.yml
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/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
data/rumble.gemspec
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
|
@@ -27,7 +27,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
27
27
|
require_relative 'lib/rumble/version'
|
28
28
|
Gem::Specification.new do |s|
|
29
29
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
30
|
-
s.required_ruby_version = '>=
|
30
|
+
s.required_ruby_version = '>= 3.0'
|
31
31
|
s.name = 'rumble'
|
32
32
|
s.version = Rumble::VERSION
|
33
33
|
s.license = 'MIT'
|
@@ -40,13 +40,14 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
41
41
|
s.rdoc_options = ['--charset=UTF-8']
|
42
42
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
43
|
-
s.
|
44
|
-
s.
|
45
|
-
s.
|
46
|
-
s.
|
47
|
-
s.
|
48
|
-
s.
|
49
|
-
s.
|
50
|
-
s.
|
43
|
+
s.add_dependency 'liquid', '5.5.0'
|
44
|
+
s.add_dependency 'mail', '2.8.1'
|
45
|
+
s.add_dependency 'net-smtp', '0.5.0'
|
46
|
+
s.add_dependency 'net-smtp-proxy', '2.0.0'
|
47
|
+
s.add_dependency 'openssl', '~>3.0'
|
48
|
+
s.add_dependency 'rainbow', '3.1.1'
|
49
|
+
s.add_dependency 'redcarpet', '3.6.0'
|
50
|
+
s.add_dependency 'slop', '4.10.1'
|
51
|
+
s.add_dependency 'uuidtools', '2.2.0'
|
51
52
|
s.metadata['rubygems_mfa_required'] = 'true'
|
52
53
|
end
|
data/test/test__helper.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/test/test_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
|
@@ -21,18 +21,22 @@
|
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
23
|
require 'minitest/autorun'
|
24
|
-
require '
|
24
|
+
require 'os'
|
25
|
+
require 'qbash'
|
26
|
+
require 'random-port'
|
27
|
+
require 'shellwords'
|
25
28
|
require 'slop'
|
29
|
+
require 'tmpdir'
|
26
30
|
require_relative '../lib/rumble'
|
27
31
|
require_relative '../lib/rumble/cli'
|
28
32
|
|
29
33
|
# Rumble main module test.
|
30
34
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2018-
|
35
|
+
# Copyright:: Copyright (c) 2018-2025 Yegor Bugayenko
|
32
36
|
# License:: MIT
|
33
37
|
class TestRumble < Minitest::Test
|
34
38
|
def test_basic
|
35
|
-
Dir.mktmpdir
|
39
|
+
Dir.mktmpdir do |dir|
|
36
40
|
letter = File.join(dir, 'letter.liquid')
|
37
41
|
File.write(letter, 'Hi {{first}}, how are you?')
|
38
42
|
Rumble::CLI.new(
|
@@ -44,4 +48,122 @@ class TestRumble < Minitest::Test
|
|
44
48
|
).send
|
45
49
|
end
|
46
50
|
end
|
51
|
+
|
52
|
+
def test_with_mailhog
|
53
|
+
skip('Works only on Ubuntu') if OS.mac? || OS.windows?
|
54
|
+
Dir.mktmpdir do |home|
|
55
|
+
flag = File.join(home, 'sent.txt')
|
56
|
+
letter = File.join(home, 'letter.liquid')
|
57
|
+
File.write(letter, 'Hi!')
|
58
|
+
host = 'localhost'
|
59
|
+
RandomPort::Pool::SINGLETON.acquire(2) do |smtp, http|
|
60
|
+
daemon("#{docker} run --rm -p #{smtp}:1025 -p #{http}:8025 mailhog/mailhog", flag)
|
61
|
+
wait_for(host, http)
|
62
|
+
qbash(
|
63
|
+
[
|
64
|
+
Shellwords.escape(File.join(__dir__, '../bin/rumble')),
|
65
|
+
'--method=smtp',
|
66
|
+
'--port', smtp,
|
67
|
+
'--host', host,
|
68
|
+
'--user=foo', '--password=foo',
|
69
|
+
'--subject', 'testing',
|
70
|
+
'--test', 'to@example.com',
|
71
|
+
'--from', Shellwords.escape('tester <from@example.com>'),
|
72
|
+
'--letter', Shellwords.escape(letter)
|
73
|
+
]
|
74
|
+
)
|
75
|
+
FileUtils.touch(flag)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_with_mailhog_with_tls
|
81
|
+
skip('Works only on Ubuntu') if OS.mac? || OS.windows?
|
82
|
+
Dir.mktmpdir do |home|
|
83
|
+
flag = File.join(home, 'sent.txt')
|
84
|
+
letter = File.join(home, 'letter.liquid')
|
85
|
+
File.write(letter, 'Hi!')
|
86
|
+
host = 'localhost'
|
87
|
+
certs = File.join(home, 'certs')
|
88
|
+
FileUtils.mkdir_p(certs)
|
89
|
+
qbash("openssl genrsa -out #{Shellwords.escape(File.join(certs, 'key.pem'))} 2048", log: $stdout)
|
90
|
+
qbash(
|
91
|
+
[
|
92
|
+
'openssl req -x509 -new -nodes',
|
93
|
+
"-key #{Shellwords.escape(File.join(certs, 'key.pem'))}",
|
94
|
+
'-sha256 -days 1024',
|
95
|
+
"-out #{Shellwords.escape(File.join(certs, 'cert.pem'))}",
|
96
|
+
'-subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"'
|
97
|
+
],
|
98
|
+
log: $stdout
|
99
|
+
)
|
100
|
+
RandomPort::Pool::SINGLETON.acquire(2) do |smtp, http|
|
101
|
+
daemon(
|
102
|
+
[
|
103
|
+
"#{docker} run --rm",
|
104
|
+
"-p #{smtp}:1025",
|
105
|
+
"-p #{http}:8025",
|
106
|
+
"-v #{Shellwords.escape(certs)}:/etc/certs",
|
107
|
+
'-e MH_TLS_BIND_ADDR=:1025',
|
108
|
+
'-e MH_STORAGE=maildir',
|
109
|
+
'-e MH_MAILDIR_PATH=/tmp/mailhog',
|
110
|
+
'-e MH_TLS_CERT_FILE=/etc/certs/cert.pem',
|
111
|
+
'-e MH_TLS_PRIV_KEY=/etc/certs/key.pem',
|
112
|
+
'mailhog/mailhog'
|
113
|
+
],
|
114
|
+
flag
|
115
|
+
)
|
116
|
+
wait_for(host, http)
|
117
|
+
qbash(
|
118
|
+
[
|
119
|
+
Shellwords.escape(File.join(__dir__, '../bin/rumble')),
|
120
|
+
'--method=smtp',
|
121
|
+
'--port', smtp,
|
122
|
+
'--host', host,
|
123
|
+
'--tls',
|
124
|
+
'--user=foo', '--password=foo',
|
125
|
+
'--subject', 'testing',
|
126
|
+
'--test', 'to@example.com',
|
127
|
+
'--from', Shellwords.escape('tester <from@example.com>'),
|
128
|
+
'--letter', Shellwords.escape(letter)
|
129
|
+
]
|
130
|
+
)
|
131
|
+
FileUtils.touch(flag)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
private
|
137
|
+
|
138
|
+
def docker
|
139
|
+
if ENV['DOCKER_SUDO'] == 'true'
|
140
|
+
'sudo docker'
|
141
|
+
else
|
142
|
+
'docker'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def wait_for(host, port)
|
147
|
+
start = Time.now
|
148
|
+
loop do
|
149
|
+
TCPSocket.new(host, port).close
|
150
|
+
break
|
151
|
+
rescue Errno::ECONNREFUSED => e
|
152
|
+
sleep(1)
|
153
|
+
puts "Waiting for mailhog at #{host}:#{port}: #{e.message}"
|
154
|
+
raise e if Time.now - start > 120
|
155
|
+
retry
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
def daemon(cmd, flag)
|
160
|
+
Thread.new do
|
161
|
+
qbash(cmd, log: $stdout) do |pid|
|
162
|
+
loop do
|
163
|
+
break if File.exist?(flag)
|
164
|
+
end
|
165
|
+
Process.kill('KILL', pid)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
47
169
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rumble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.0.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: openssl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rainbow
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,7 +184,7 @@ licenses:
|
|
170
184
|
- MIT
|
171
185
|
metadata:
|
172
186
|
rubygems_mfa_required: 'true'
|
173
|
-
post_install_message:
|
187
|
+
post_install_message:
|
174
188
|
rdoc_options:
|
175
189
|
- "--charset=UTF-8"
|
176
190
|
require_paths:
|
@@ -179,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
193
|
requirements:
|
180
194
|
- - ">="
|
181
195
|
- !ruby/object:Gem::Version
|
182
|
-
version: '
|
196
|
+
version: '3.0'
|
183
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
199
|
- - ">="
|
@@ -187,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
201
|
version: '0'
|
188
202
|
requirements: []
|
189
203
|
rubygems_version: 3.4.10
|
190
|
-
signing_key:
|
204
|
+
signing_key:
|
191
205
|
specification_version: 4
|
192
206
|
summary: Command Line Newsletter Sending Tool
|
193
207
|
test_files: []
|