annyong 0.1.1 → 0.1.2
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.
- data/README.mkd +6 -0
- data/lib/annyong.rb +1 -1
- data/lib/annyong/middleware.rb +1 -1
- metadata +19 -3
data/README.mkd
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Annyong starts a public static Web server in the current directory, allowing people in your local network to browse and download your files.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
7
9
|
$ gem install annyong
|
|
@@ -12,3 +14,7 @@ Annyong starts a public static Web server in the current directory, allowing peo
|
|
|
12
14
|
|
|
13
15
|
* `--port [PORT]` → the port to use (default: 9292)
|
|
14
16
|
* `--host [HOST]` → the host to listen on (default: 0.0.0.0)
|
|
17
|
+
|
|
18
|
+
## Thanks
|
|
19
|
+
|
|
20
|
+
* Doug McInnes (to prevent injecting annyong’s code into public HTML files)
|
data/lib/annyong.rb
CHANGED
data/lib/annyong/middleware.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Annyong
|
|
|
20
20
|
|
|
21
21
|
response_body = ""
|
|
22
22
|
response.each { |part| response_body += part }
|
|
23
|
-
response_body = inject(response_body)
|
|
23
|
+
response_body = inject(response_body) unless env['REQUEST_URI'] =~ /\.html?$/
|
|
24
24
|
|
|
25
25
|
headers["Content-Length"] = response_body.length.to_s
|
|
26
26
|
|
metadata
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: annyong
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 31
|
|
4
5
|
prerelease:
|
|
5
|
-
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 1
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.1.2
|
|
6
11
|
platform: ruby
|
|
7
12
|
authors:
|
|
8
13
|
- "R\xC3\xA9mi Pr\xC3\xA9vost"
|
|
@@ -10,7 +15,7 @@ autorequire:
|
|
|
10
15
|
bindir: bin
|
|
11
16
|
cert_chain: []
|
|
12
17
|
|
|
13
|
-
date: 2011-04-
|
|
18
|
+
date: 2011-04-05 00:00:00 -04:00
|
|
14
19
|
default_executable:
|
|
15
20
|
dependencies:
|
|
16
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -21,6 +26,11 @@ dependencies:
|
|
|
21
26
|
requirements:
|
|
22
27
|
- - ">="
|
|
23
28
|
- !ruby/object:Gem::Version
|
|
29
|
+
hash: 19
|
|
30
|
+
segments:
|
|
31
|
+
- 1
|
|
32
|
+
- 1
|
|
33
|
+
- 0
|
|
24
34
|
version: 1.1.0
|
|
25
35
|
type: :runtime
|
|
26
36
|
version_requirements: *id001
|
|
@@ -54,17 +64,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
54
64
|
requirements:
|
|
55
65
|
- - ">="
|
|
56
66
|
- !ruby/object:Gem::Version
|
|
67
|
+
hash: 3
|
|
68
|
+
segments:
|
|
69
|
+
- 0
|
|
57
70
|
version: "0"
|
|
58
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
72
|
none: false
|
|
60
73
|
requirements:
|
|
61
74
|
- - ">="
|
|
62
75
|
- !ruby/object:Gem::Version
|
|
76
|
+
hash: 3
|
|
77
|
+
segments:
|
|
78
|
+
- 0
|
|
63
79
|
version: "0"
|
|
64
80
|
requirements: []
|
|
65
81
|
|
|
66
82
|
rubyforge_project:
|
|
67
|
-
rubygems_version: 1.
|
|
83
|
+
rubygems_version: 1.6.0
|
|
68
84
|
signing_key:
|
|
69
85
|
specification_version: 3
|
|
70
86
|
summary: Start a public static Web server in the current directory.
|