rumble 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rultor.yml +5 -15
- data/.simplecov +1 -1
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/bin/rumble +2 -1
- data/features/step_definitions/steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/lib/rumble.rb +2 -2
- data/lib/rumble/cli.rb +13 -2
- data/lib/rumble/version.rb +3 -3
- data/rumble.gemspec +1 -1
- data/test/test__helper.rb +1 -1
- data/test/test_rumble.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35fe7657a43b3e8a6b31e7446594076c56a4cdc96e52d729e3ae175d15958403
|
4
|
+
data.tar.gz: 7ec2ebe902aca47e9e359dbfb65524407123ea590f5639dad633e4f616839b4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aefae4d814d9461b5194e123e4c61050c5208f8e01562c126e9c2355ebd7b837201c8428db3483d1ea66c0984614eebb3cb2d902b7e57b70801ef21becf47f6
|
7
|
+
data.tar.gz: ba4dae89e976a5b47821626cce852a50626adabf6cd6a25dd65ab93b4e16220f535798b69b53aa1e6c03a39ff1b8bbe9600edde851314aa4c47986b6d60e89c5
|
data/.rultor.yml
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
assets:
|
2
|
-
rubygems.yml:
|
3
|
-
s3cfg: zerocracy/home#assets/s3cfg
|
2
|
+
rubygems.yml: yegor256/home#assets/rubygems.yml
|
4
3
|
install: |
|
5
|
-
|
6
|
-
|
7
|
-
sudo apt-get -y update
|
8
|
-
sudo gem install pdd
|
4
|
+
pdd -f /dev/null
|
5
|
+
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
9
6
|
release:
|
10
7
|
script: |-
|
11
|
-
bundle
|
12
|
-
rake
|
8
|
+
bundle exec rake
|
13
9
|
rm -rf *.gem
|
14
10
|
sed -i "s/1\.0\.snapshot/${tag}/g" lib/rumble/version.rb
|
15
11
|
git add lib/rumble/version.rb
|
@@ -17,15 +13,9 @@ release:
|
|
17
13
|
gem build rumble.gemspec
|
18
14
|
chmod 0600 ../rubygems.yml
|
19
15
|
gem push *.gem --config-file ../rubygems.yml
|
20
|
-
commanders:
|
21
|
-
- yegor256
|
22
|
-
architect:
|
23
|
-
- yegor256
|
24
16
|
merge:
|
25
17
|
script: |-
|
26
|
-
bundle
|
27
|
-
rake
|
28
|
-
pdd
|
18
|
+
bundle exec rake
|
29
19
|
deploy:
|
30
20
|
script: |-
|
31
21
|
echo "There is nothing to deploy"
|
data/.simplecov
CHANGED
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
<img src="/logo.svg" width="64px" height="64px"/>
|
2
2
|
|
3
|
-
[![EO principles respected here](
|
3
|
+
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
|
4
4
|
[![Managed by Zerocracy](https://www.0crat.com/badge/C3RFVLU72.svg)](https://www.0crat.com/p/C3RFVLU72)
|
5
5
|
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/rumble)](http://www.rultor.com/p/yegor256/rumble)
|
6
|
-
[![We recommend RubyMine](
|
6
|
+
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
|
7
7
|
|
8
8
|
[![Build Status](https://travis-ci.org/yegor256/rumble.svg)](https://travis-ci.org/yegor256/rumble)
|
9
9
|
[![Build status](https://ci.appveyor.com/api/projects/status/orvfo2qgmd1d7a2i?svg=true)](https://ci.appveyor.com/project/yegor256/rumble)
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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/bin/rumble
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (c) 2018-
|
2
|
+
# Copyright (c) 2018-2020 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
|
@@ -74,6 +74,7 @@ begin
|
|
74
74
|
o.string '--col-first', 'First name columm (0 by default)', default: 0
|
75
75
|
o.string '--col-last', 'Last name columm (1 by default)', default: 1
|
76
76
|
o.string '--col-email', 'Email columm (2 by default)', default: 2
|
77
|
+
o.string '--attach', 'The script to run on each email'
|
77
78
|
end
|
78
79
|
rescue Slop::Error => ex
|
79
80
|
raise "#{ex.message}, try --help"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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-2020 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.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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-2020 Yegor Bugayenko
|
26
26
|
# License:: MIT
|
27
27
|
module Rumble
|
28
28
|
# Nothing
|
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-2020 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,10 +20,12 @@
|
|
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 'English'
|
23
24
|
require 'mail'
|
24
25
|
require 'uuidtools'
|
25
26
|
require 'liquid'
|
26
27
|
require 'csv'
|
28
|
+
require 'tmpdir'
|
27
29
|
require 'redcarpet'
|
28
30
|
require 'redcarpet/render_strip'
|
29
31
|
require 'rainbow'
|
@@ -31,7 +33,7 @@ require_relative 'version'
|
|
31
33
|
|
32
34
|
# Rumble main script.
|
33
35
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
34
|
-
# Copyright:: Copyright (c) 2018-
|
36
|
+
# Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
|
35
37
|
# License:: MIT
|
36
38
|
class Rumble::CLI
|
37
39
|
# Make an instance.
|
@@ -114,6 +116,15 @@ at the column ##{@opts['col-email'].to_i}: #{array}"
|
|
114
116
|
body html
|
115
117
|
end
|
116
118
|
end
|
119
|
+
if @opts[:attach]
|
120
|
+
Dir.mktmpdir do |dir|
|
121
|
+
`#{@opts[:attach]} "#{email}" "#{name}" "#{dir}"`
|
122
|
+
raise 'Failed to exec' unless $CHILD_STATUS.success?
|
123
|
+
Dir[File.join(dir, '*')].each do |f|
|
124
|
+
mail.add_file(filename: File.basename(f), content: IO.read(f))
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
117
128
|
mail.deliver! unless @opts[:dry]
|
118
129
|
total += 1
|
119
130
|
puts "#{Rainbow('done').green} ##{total}"
|
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-2020 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-2020 Yegor Bugayenko
|
26
26
|
# License:: MIT
|
27
27
|
module Rumble
|
28
|
-
VERSION = '0.
|
28
|
+
VERSION = '0.6.0'
|
29
29
|
end
|
data/rumble.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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__helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 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-2020 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
|
@@ -28,7 +28,7 @@ require_relative '../lib/rumble/cli'
|
|
28
28
|
|
29
29
|
# Rumble main module test.
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2018-
|
31
|
+
# Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
|
32
32
|
# License:: MIT
|
33
33
|
class TestRumble < Minitest::Test
|
34
34
|
def test_basic
|
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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|