slackit 1.1.2 → 1.1.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
  SHA256:
3
- metadata.gz: f21bec2025a3d5498cf492e0aedcbbdbe275585d51b305322dd6be4bc9134def
4
- data.tar.gz: aa8cb401eca59415f953af3aba0814ba515177f72a625b2b835391e163dba45f
3
+ metadata.gz: 294a5a40c92d77ad4aae1a9dbdcff4f9a5df0f13d8b915d8823cffe94a2ea5fd
4
+ data.tar.gz: 92a6614ca9d0ca0e46a2ffaae3c7e34bbe6b804cc58da96b52916d3df7dfaa18
5
5
  SHA512:
6
- metadata.gz: d05d5270616df81f8dbfeed4b5aab24efeff62659d12b5738dab57527ea1acf334c138b913c98ad67e6b9c1339d3507f048e57a8a5c541bd0759f174ef137c47
7
- data.tar.gz: fc9f62cb5c83c82ed2545517d6d9f04c5b8feb07708633186e6871252d8aade0eba562376d765a0d3927167644611d7275e2996f385aa05826b7f9ec0cf709bc
6
+ metadata.gz: 6b0c3b3ab1d589f55cadc940474a312e6e466f6bb647ebb69fc726e18b2307ff814c02fcec454e386a8572c32621b6ecb0ff6fe5e3fc72ee0a0ce2a51489b756
7
+ data.tar.gz: bdee9987c494cab0db27beab03ea318db5d5d073a33831e1671b9a82fea770e66f1c45046f41239ba6aa713ba3b22a875a72765e4b1eb27ffb936148529923e3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.1.3 (February 6, 2019)
2
+
3
+ IMPROVEMENTS:
4
+
5
+ * Add support for sending a message using newline characters and updated the pipe functionality to also support passing in multiline files. ([@eimlav][])
6
+
7
+ the ability to pipe directly into the app instead of using -m.
8
+
1
9
  ## 1.1.2 (January 31, 2019)
2
10
 
3
11
  IMPROVEMENTS:
data/exe/slackit CHANGED
@@ -63,7 +63,7 @@ def process_arguments
63
63
 
64
64
  begin
65
65
  optparse.parse!
66
- options[:message] = gets.downcase if !STDIN.tty? # override message parameter if data is piped in
66
+ options[:message] = ARGF.read if !STDIN.tty? # override message parameter if data is piped in
67
67
  missing = mandatory.select { |param| options[param].nil? }
68
68
  raise OptionParser::MissingArgument.new(missing.join(', ')) unless missing.empty?
69
69
  rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e
@@ -1,3 +1,3 @@
1
1
  class Slackit
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.1.3'.freeze
3
3
  end
data/lib/slackit.rb CHANGED
@@ -21,6 +21,7 @@ class Slackit
21
21
  headers = { 'Content-Type' => 'application/json' }
22
22
 
23
23
  # payload
24
+ text = text.gsub('\\n', "\n") # ensure newlines are not escaped
24
25
  body = { 'text' => text, 'icon_emoji' => @icon_emoji, 'username' => @username }
25
26
 
26
27
  # add the channel if there is one otherwise the default channel
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slackit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-31 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler