rumble 0.2 → 0.3

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
  SHA1:
3
- metadata.gz: 2d297d43a8e26ba75dce04f181b4acdf865c26f6
4
- data.tar.gz: dee37b3ff7a7ceb4a620e4107e945802bc65aec7
3
+ metadata.gz: 5fe3ceb8ceb7f632053c0d10fa4bd91e231c8213
4
+ data.tar.gz: 1a1314e9b877c0abe8e4b111f5410b563ded1f18
5
5
  SHA512:
6
- metadata.gz: e75d73844b1525eca315dc2e94ec296efb2be1afd35f5c94b496ca68034c69a3c9b5ee16c0f04776e06d28a54af86035b4e34ff4a82c85f3605986828fd6b47c
7
- data.tar.gz: c7df34bfb7b3ad162897304c1276897c57f33d7866877d287317905a1b3be887cf08c751c7299306844099841478b1583602afddfe99813a0e598346e04a8952
6
+ metadata.gz: 2f828901369a8684c82fdf7d5c49cfccbd5bc00ec138a8397237ca14cf533b65270434ca828922e11c316f29f3adea23734c024e47db275734aa005b8ea16df4
7
+ data.tar.gz: b7ab787b1a75da441be70643739bda2ed199ee0f94b928e7981f87f0fcc75833d5557e3b40ae04c73bd2bd0911ac6feef4c5bf25ef117fccfd4be7dff6dde657
data/.simplecov CHANGED
@@ -33,6 +33,6 @@ else
33
33
  SimpleCov.start do
34
34
  add_filter "/test/"
35
35
  add_filter "/features/"
36
- minimum_coverage 80
36
+ minimum_coverage 70
37
37
  end
38
38
  end
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Rumble
26
- VERSION = '0.2'.freeze
26
+ VERSION = '0.3'.freeze
27
27
  end
data/lib/rumble.rb CHANGED
@@ -56,16 +56,21 @@ module Rumble
56
56
  puts "Sending #{emails.length} email(s) as #{from}"
57
57
  domain = from.strip.gsub(/^.+@|>$/)
58
58
  emails.each do |array|
59
- first = array[@opts[:col0].to_i].strip
59
+ first = array[@opts[:col0].to_i]
60
+ unless first
61
+ puts Rainbow('First name is absent').red
62
+ next
63
+ end
64
+ first = first.strip
60
65
  last = array[@opts[:col1].to_i]
61
66
  unless last
62
- puts Rainbow('last name is absent').red
67
+ puts Rainbow('Last name is absent').red
63
68
  next
64
69
  end
65
70
  last = last.strip
66
71
  email = array[@opts[:col2].to_i]
67
72
  unless email
68
- puts Rainbow('email is absent').red
73
+ puts Rainbow('Email is absent').red
69
74
  next
70
75
  end
71
76
  email = email.strip.downcase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumble
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko