ban 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ban.rb +1 -0
- data/lib/ban/cli.rb +4 -3
- data/lib/ban/server.rb +1 -0
- data/lib/ban/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODJiZmEzYjU0YjRiN2QzOGI4NzYzN2IwNjY2ZDhjZjgzMjU1MGU5Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTJhNzlhOWUzMzQzYzgyODg0YTJmODMxODVlZDY5NTAzYTE0ZTVkYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTY5Yjc3YWM2YzBiMWI3YzM4OWYyMjFkNzY1MmE4YTdlMzcyMTI2NzJlNjFi
|
10
|
+
YmFjMDA3ZTM4MGU1YzdiZjdjYzE1NGFhODM1YzAwMzM5ODg4OWRjNDg1NmVj
|
11
|
+
OTU5NDJmMGMyYjU0OTM0ZWZmOThlMDMyYzNkNjFjZmFiNDJkNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzU4YTlkYWQyZDQ2MDMyNzljYmVjMjUzYmRjMzZmNTJjZDQzOWZmMDRiZGY2
|
14
|
+
NDEzN2VkYjFmODcyYjhlZjVmOTQ4Njk1YjIzODJlNGEzMDBjZTk3OGVjNzUx
|
15
|
+
ZmU2ZDM2NzNlZjc2ZWYxZjI5MGU1N2QwODdjMTZiNzk3MmU4M2I=
|
data/lib/ban.rb
CHANGED
data/lib/ban/cli.rb
CHANGED
@@ -4,20 +4,21 @@ module Ban
|
|
4
4
|
option :port, type: :numeric, default: 8080
|
5
5
|
option :interface, type: :string, default: '0.0.0.0'
|
6
6
|
option :user, type: :string, default: 'nobody'
|
7
|
-
option :group, type: :string, default: '
|
8
|
-
option :chroot, type: :string, default:
|
7
|
+
option :group, type: :string, default: 'nogroup'
|
8
|
+
option :chroot, type: :string, default: nil
|
9
9
|
option :em_threads, type: :numeric, default: 2
|
10
10
|
desc "server", "starts the ban server"
|
11
11
|
def server
|
12
12
|
device = options[:device]
|
13
13
|
interface = options[:interface]
|
14
14
|
port = options[:port]
|
15
|
+
chroot = options[:chroot] || Dir.mktmpdir
|
15
16
|
|
16
17
|
EM.epoll
|
17
18
|
EM.threadpool_size = options[:em_threads]
|
18
19
|
EM.run do
|
19
20
|
board = Board.new
|
20
|
-
server = Server.new(options[:user], options[:group],
|
21
|
+
server = Server.new(options[:user], options[:group], chroot)
|
21
22
|
|
22
23
|
board.on :event do |event|
|
23
24
|
if event.valid?
|
data/lib/ban/server.rb
CHANGED
data/lib/ban/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Landgraf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|