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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e5a60d4a1eff15e91fc861d1a9f2f3d299eebde98cbbe54f90d3709a9f20d9f
4
- data.tar.gz: 66dd9bb13e9800e68f9937e2f854f21903b464dafd1cf7dc6164d9b5733dc1ce
3
+ metadata.gz: 35fe7657a43b3e8a6b31e7446594076c56a4cdc96e52d729e3ae175d15958403
4
+ data.tar.gz: 7ec2ebe902aca47e9e359dbfb65524407123ea590f5639dad633e4f616839b4e
5
5
  SHA512:
6
- metadata.gz: ec25674632907c594c24acaae1be31e58ab14c6632782161713015efdc32070e3086bce5c991dce67650cc177f74ce0dba9297a42dddc74aa1e8a32064c7d0b9
7
- data.tar.gz: 2d721385fe1a08713145bd0399ab05d1c02077fe2811bf919eaeba8f8fffc4e90b4a03acd6f7762acc886b106ee5e043632a0d075195c90db3a3603788adc99e
6
+ metadata.gz: 8aefae4d814d9461b5194e123e4c61050c5208f8e01562c126e9c2355ebd7b837201c8428db3483d1ea66c0984614eebb3cb2d902b7e57b70801ef21becf47f6
7
+ data.tar.gz: ba4dae89e976a5b47821626cce852a50626adabf6cd6a25dd65ab93b4e16220f535798b69b53aa1e6c03a39ff1b8bbe9600edde851314aa4c47986b6d60e89c5
@@ -1,15 +1,11 @@
1
1
  assets:
2
- rubygems.yml: zerocracy/home#assets/rubygems.yml
3
- s3cfg: zerocracy/home#assets/s3cfg
2
+ rubygems.yml: yegor256/home#assets/rubygems.yml
4
3
  install: |
5
- export GEM_HOME=~/.ruby
6
- export GEM_PATH=$GEM_HOME:$GEM_PATH
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 install
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 install
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2018-2019 Yegor Bugayenko
1
+ # Copyright (c) 2018-2020 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
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2018-2019 Yegor Bugayenko
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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <img src="/logo.svg" width="64px" height="64px"/>
2
2
 
3
- [![EO principles respected here](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org)
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](http://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
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-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
25
+ # Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Rumble
28
28
  # Nothing
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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}"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
25
+ # Copyright:: Copyright (c) 2018-2020 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Rumble
28
- VERSION = '0.5.3'
28
+ VERSION = '0.6.0'
29
29
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
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-2019 Yegor Bugayenko
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.5.3
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: 2019-05-22 00:00:00.000000000 Z
11
+ date: 2020-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid