boppers 0.0.3 → 0.0.4

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: d57b01f4de1f2472c5b6ee6c84c698aad3f6a302
4
- data.tar.gz: 6cdeb3cb8e621ad6e218bae54f7b6448ce861739
3
+ metadata.gz: 880d01d1b5914389de768e5d00e7dbb90a7dbcb6
4
+ data.tar.gz: 9e527c42c1da3f026ce7a909fd26f433acd1fac9
5
5
  SHA512:
6
- metadata.gz: 6b136924d3bc70057a24d7ad093615dfd8a6d3264758128ffd1faec58d63f2c4a2dd83d7af56b626665c23adc812f53560e980bd4f23f2d0c29d9bf7f54d0db2
7
- data.tar.gz: 8d830fe8c126c43ced453346dcc3261fbb88b7cbe8ac9bd651d37e58f3bc9a635d012a06cd2a721a0c9796f64e9d6bf195ff90e835d0bbdb8784fe690392ed8e
6
+ metadata.gz: bf9c094bcd09bf83f20cf22c986bd49a7f506b83e6d3dc4a8bd25bdcda2c6628a90f58d3ccd53aa52c0596c11a6c9202ae439623015ba6850f5c56a701351b5e
7
+ data.tar.gz: c33b7003fef8a093dc555db43c31ae6675e8252e1a32a68b6e53a83e7dd169e67fb59f36b52877d20c1c5c4b9f254fcc431c2ec07237fe99c55510c07f6a3141
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- boppers (0.0.3)
4
+ boppers (0.0.4)
5
5
  aitch
6
6
  thor
7
7
 
@@ -37,7 +37,9 @@ module Boppers
37
37
  [name]
38
38
  end
39
39
  subscriptions = subscriptions.flatten.compact.map(&:to_sym)
40
-
40
+ p name
41
+ p notifier
42
+ p subscriptions
41
43
  subscriptions.include?(name)
42
44
  end
43
45
  end
@@ -8,6 +8,8 @@ module Boppers
8
8
  red: "\e[31m"
9
9
  }.freeze
10
10
 
11
+ NO_COLOR = "\e[0m"
12
+
11
13
  attr_reader :subscribe
12
14
 
13
15
  def initialize(subscribe: nil)
@@ -15,12 +17,17 @@ module Boppers
15
17
  end
16
18
 
17
19
  def call(title, message, options)
18
- color = COLORS.fetch(options[:color], "\e[0m")
20
+ color = COLORS.fetch(options[:color], NO_COLOR)
21
+ message = message
22
+ .gsub(/^/m, " ")
23
+ .lines
24
+ .map {|line| "#{color}#{line}#{NO_COLOR}" }
25
+ .join
19
26
 
20
27
  puts [
21
- "#{color}## #{title}",
22
- message.gsub(/^/m, " "),
23
- "\e[0m\n"
28
+ "#{color}## #{title}#{NO_COLOR}",
29
+ message,
30
+ "\n"
24
31
  ].join("\n")
25
32
  end
26
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boppers
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boppers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira