mt 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mt +11 -2
- data/mt.gemspec +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: a23473fb977675b5914cef0a509bcb651c36640b
|
4
|
+
data.tar.gz: 5e77ffee6b7d25fd3fc72d8989f55087e5769fca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18276e7a8fe8583ce6e6e6f81716405391fecfc400f33877fb4de98ad319eecf33b562d5d5d659a1ae7a8e9196b45483d43960a5472a852eba225d0cbe00d20f
|
7
|
+
data.tar.gz: e01488b7c93fee68396039a17c1c28c39a7c44b57263e9aff5d8816d46e146b1b334dcfd4b8b4c377a2a7ab39340d752a77cc73c5881f12564ca1c359cf5a239
|
data/bin/mt
CHANGED
@@ -2,7 +2,17 @@
|
|
2
2
|
|
3
3
|
require 'socket'
|
4
4
|
|
5
|
-
|
5
|
+
port = ARGV.fetch(0, 25)
|
6
|
+
|
7
|
+
begin
|
8
|
+
server = TCPServer.open(port)
|
9
|
+
puts "Listening on port #{port}"
|
10
|
+
rescue Errno::EACCES
|
11
|
+
puts "Couldn't bind to port #{port}."
|
12
|
+
exit 1
|
13
|
+
end
|
14
|
+
|
15
|
+
Signal.trap("INT") { exit 0 }
|
6
16
|
|
7
17
|
loop do
|
8
18
|
client = server.accept
|
@@ -27,7 +37,6 @@ loop do
|
|
27
37
|
|
28
38
|
puts '---'
|
29
39
|
puts res.join
|
30
|
-
puts '---'
|
31
40
|
|
32
41
|
client.puts "250 OK"
|
33
42
|
client.gets
|
data/mt.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fake a SMTP server and print email to stdout.
|
14
14
|
email:
|