shatty 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/shatty.gemspec +5 -2
- data/web.rb +2 -3
- metadata +51 -3
data/shatty.gemspec
CHANGED
@@ -2,13 +2,16 @@ Gem::Specification.new do |spec|
|
|
2
2
|
files = %x{git ls-files}.split("\n")
|
3
3
|
|
4
4
|
spec.name = "shatty"
|
5
|
-
spec.version = "0.0.
|
5
|
+
spec.version = "0.0.6"
|
6
6
|
spec.summary = "shatty"
|
7
7
|
spec.description = "shatty"
|
8
8
|
spec.license = "none chosen yet"
|
9
9
|
|
10
10
|
# Note: You should set the version explicitly.
|
11
|
-
spec.add_dependency "cabin"
|
11
|
+
spec.add_dependency "cabin"
|
12
|
+
spec.add_dependency "clamp"
|
13
|
+
spec.add_dependency "ftw"
|
14
|
+
spec.add_dependency "uuidtools"
|
12
15
|
spec.files = files
|
13
16
|
spec.require_paths << "lib"
|
14
17
|
spec.bindir = "bin"
|
data/web.rb
CHANGED
@@ -66,9 +66,8 @@ server = FTW::WebServer.new("0.0.0.0", port) do |request, response|
|
|
66
66
|
elsif request.method == "GET"
|
67
67
|
response.status = 200
|
68
68
|
response["Content-Type"] = "text/plain"
|
69
|
-
if request["user-agent"] =~ /^curl
|
70
|
-
# Curl. Send raw text.
|
71
|
-
puts "curl request"
|
69
|
+
if request["user-agent"] =~ /^(curl|Wget)/
|
70
|
+
# Curl or wget. Send raw text.
|
72
71
|
response.body = session.raw
|
73
72
|
else
|
74
73
|
response.body = session.enumerator
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shatty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- - ! '
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
@@ -24,7 +24,55 @@ dependencies:
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- - ! '
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: clamp
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: ftw
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: uuidtools
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
28
76
|
- !ruby/object:Gem::Version
|
29
77
|
version: '0'
|
30
78
|
description: shatty
|