sendl 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sendcat +8 -8
- data/lib/sendl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bd7334d59a95bc0da19f85b334add9d2d583149
|
4
|
+
data.tar.gz: fad2bc93e30d66c0155a3635cbdfca172cb29bc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85fc52dd2b964df5e13d586be01b4cc8e025d682925d7138805e0cbedf50120ea07383cbd180959fff227af82040174871297bd1ae7f5faa12bbfde2975fad89
|
7
|
+
data.tar.gz: 58745532e6d50d1f13f5b006bd14d3fb78f068954ba2db4b529b400737bc7019102dd38101537ea72603d488890fceb1219933a096c4e02d33440368f5c467c8
|
data/bin/sendcat
CHANGED
@@ -13,7 +13,7 @@ require 'tempfile'
|
|
13
13
|
def message_from_editor
|
14
14
|
tempfile = Tempfile.new('sendcat')
|
15
15
|
editor = ENV['EDITOR'] || "vi"
|
16
|
-
|
16
|
+
|
17
17
|
File.open(tempfile, "w") do |f|
|
18
18
|
f.puts
|
19
19
|
f.puts '#----------------------------------------------------------------------'
|
@@ -24,7 +24,7 @@ def message_from_editor
|
|
24
24
|
f.puts '#'
|
25
25
|
f.puts '#----------------------------------------------------------------------'
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
if not system("#{editor} #{tempfile.path}")
|
29
29
|
STDERR.puts("error getting your message from #{editor}, exiting!")
|
30
30
|
exit(1)
|
@@ -61,7 +61,7 @@ Sending files with Sendcat
|
|
61
61
|
The simplest way is sending one file:
|
62
62
|
|
63
63
|
$ sendcat somefile
|
64
|
-
https://sendc.at/dl/
|
64
|
+
https://sendc.at/dl/D4f80PoBQlFJGLLyLdnhkVBPRixn9ntBV7CzaAvsFHBk4iauIbnJvn
|
65
65
|
somefile: 100% |========================| 377B 1.2KB/s ETA: 00:00:00
|
66
66
|
Files shared successfully (>'.'<)
|
67
67
|
|
@@ -108,13 +108,13 @@ end
|
|
108
108
|
files = []
|
109
109
|
recipients = []
|
110
110
|
|
111
|
-
# look for emails anywhere in ARGV
|
111
|
+
# look for emails anywhere in ARGV
|
112
112
|
recipients = ARGV.grep(email_regex)
|
113
113
|
# copycat getopt behavior and modify ARGV
|
114
114
|
recipients.each{|r| ARGV.delete(r)}
|
115
115
|
|
116
116
|
# should handle:
|
117
|
-
# sendl sudara@alonetone.com file
|
117
|
+
# sendl sudara@alonetone.com file
|
118
118
|
# sendl sudara@alonetone.com will@will_j.net file
|
119
119
|
# sendl sudara@alonetone.com will@will_j.net file1 file2
|
120
120
|
# sendl -t sudara@alonetone.com -t will@will_j.net -f file1 -f file2
|
@@ -123,16 +123,16 @@ recipients.each{|r| ARGV.delete(r)}
|
|
123
123
|
if not STDIN.tty?
|
124
124
|
# Buffer STDIN to a temp file.
|
125
125
|
stdin_tmpfile = Tempfile.new 'sendcat'
|
126
|
-
|
126
|
+
|
127
127
|
at_exit do
|
128
128
|
stdin_tmpfile.unlink
|
129
129
|
end
|
130
|
-
|
130
|
+
|
131
131
|
while data = STDIN.read(10_000)
|
132
132
|
stdin_tmpfile.write(data)
|
133
133
|
end
|
134
134
|
stdin_tmpfile.close
|
135
|
-
|
135
|
+
|
136
136
|
files << Sendl::File.new(stdin_tmpfile.path, (opts[:filename] || "STDIN"))
|
137
137
|
end
|
138
138
|
|
data/lib/sendl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Jessop
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project: sendl
|
182
|
-
rubygems_version: 2.4.
|
182
|
+
rubygems_version: 2.4.5.1
|
183
183
|
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: Lib for accessing the sendcat file sending service
|