gopher2000 0.2.2 → 0.5.5
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 +7 -0
- data/.ruby-version +1 -0
- data/.travis.yml +8 -0
- data/Gemfile +1 -16
- data/README.markdown +3 -1
- data/bin/gopher2000 +1 -1
- data/examples/default_route.rb +0 -0
- data/examples/figlet.rb +28 -0
- data/examples/nyan.rb +0 -0
- data/examples/simple.rb +2 -2
- data/examples/twitter.rb +0 -0
- data/examples/weather.rb +0 -0
- data/gopher2000.gemspec +5 -5
- data/lib/gopher2000.rb +1 -1
- data/lib/gopher2000/base.rb +83 -37
- data/lib/gopher2000/dispatcher.rb +13 -4
- data/lib/gopher2000/dsl.rb +1 -1
- data/lib/gopher2000/handlers/directory_handler.rb +5 -7
- data/lib/gopher2000/rendering/base.rb +42 -1
- data/lib/gopher2000/rendering/menu.rb +104 -15
- data/lib/gopher2000/request.rb +13 -2
- data/lib/gopher2000/server.rb +11 -4
- data/lib/gopher2000/version.rb +1 -1
- data/spec/application_spec.rb +12 -12
- data/spec/dispatching_spec.rb +38 -17
- data/spec/dsl_spec.rb +76 -67
- data/spec/handlers/directory_handler_spec.rb +35 -35
- data/spec/helpers_spec.rb +1 -1
- data/spec/rendering/base_spec.rb +16 -9
- data/spec/rendering/menu_spec.rb +40 -18
- data/spec/rendering_spec.rb +7 -7
- data/spec/request_spec.rb +21 -10
- data/spec/response_spec.rb +5 -5
- data/spec/routing_spec.rb +21 -21
- data/spec/server_spec.rb +23 -7
- metadata +117 -65
- data/.rvmrc +0 -1
data/spec/rendering_spec.rb
CHANGED
|
@@ -18,11 +18,11 @@ describe Gopher::Application do
|
|
|
18
18
|
describe "find_template" do
|
|
19
19
|
it "should check in menus" do
|
|
20
20
|
@s.menus['foo'] = "bar"
|
|
21
|
-
@s.find_template('foo').
|
|
21
|
+
expect(@s.find_template('foo')).to eq(["bar", Gopher::Rendering::Menu])
|
|
22
22
|
end
|
|
23
23
|
it "should check in text_templates" do
|
|
24
24
|
@s.text_templates['foo'] = "bar"
|
|
25
|
-
@s.find_template('foo').
|
|
25
|
+
expect(@s.find_template('foo')).to eq(["bar", Gopher::Rendering::Text])
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -37,7 +37,7 @@ describe Gopher::Application do
|
|
|
37
37
|
@params
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
@s.render(:foo).
|
|
40
|
+
expect(@s.render(:foo)).to eq("xyz")
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
it "has access to request obj" do
|
|
@@ -46,7 +46,7 @@ describe Gopher::Application do
|
|
|
46
46
|
@request
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
@s.render(:foo).
|
|
49
|
+
expect(@s.render(:foo)).to eq("abc")
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
it "rendering text access to request obj" do
|
|
@@ -55,7 +55,7 @@ describe Gopher::Application do
|
|
|
55
55
|
@request
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
@s.render(:foo).
|
|
58
|
+
expect(@s.render(:foo)).to eq("abc")
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
@@ -66,11 +66,11 @@ describe Gopher::Application do
|
|
|
66
66
|
|
|
67
67
|
it "should use custom template if provided" do
|
|
68
68
|
@s.not_found do ; end
|
|
69
|
-
@s.not_found_template.
|
|
69
|
+
expect(@s.not_found_template).to eq(:not_found)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
it "should use default otherwise" do
|
|
73
|
-
@s.not_found_template.
|
|
73
|
+
expect(@s.not_found_template).to eq(:'internal/not_found')
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
data/spec/request_spec.rb
CHANGED
|
@@ -3,28 +3,39 @@ require File.join(File.dirname(__FILE__), '/spec_helper')
|
|
|
3
3
|
describe Gopher::Request do
|
|
4
4
|
it 'should split raw request' do
|
|
5
5
|
request = Gopher::Request.new("foo\tbar")
|
|
6
|
-
request.selector.
|
|
7
|
-
request.input.
|
|
6
|
+
expect(request.selector).to eq("/foo")
|
|
7
|
+
expect(request.input).to eq("bar")
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
it "
|
|
10
|
+
it "normalizes by adding a slash to the front" do
|
|
11
11
|
request = Gopher::Request.new("foo")
|
|
12
|
-
request.selector.
|
|
13
|
-
|
|
12
|
+
expect(request.selector).to eq("/foo")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
it "should be ok with just selector" do
|
|
16
|
+
request = Gopher::Request.new("/foo")
|
|
17
|
+
expect(request.selector).to eq("/foo")
|
|
18
|
+
expect(request.input).to eq(nil)
|
|
14
19
|
end
|
|
15
20
|
|
|
16
21
|
it "should accept ip_address" do
|
|
17
22
|
request = Gopher::Request.new("foo", "bar")
|
|
18
|
-
request.ip_address.
|
|
23
|
+
expect(request.ip_address).to eq("bar")
|
|
19
24
|
end
|
|
20
25
|
|
|
21
26
|
it "valid? == true for valid selectors" do
|
|
22
|
-
request = Gopher::Request.new("x" *
|
|
23
|
-
request.valid
|
|
27
|
+
request = Gopher::Request.new("x" * 254, "bar")
|
|
28
|
+
expect(request.valid?).to eq(true)
|
|
24
29
|
end
|
|
25
30
|
|
|
26
31
|
it "valid? == false for invalid selectors" do
|
|
27
|
-
request = Gopher::Request.new("x" *
|
|
28
|
-
request.valid
|
|
32
|
+
request = Gopher::Request.new("x" * 255, "bar")
|
|
33
|
+
expect(request.valid?).to eq(false)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'detects urls' do
|
|
37
|
+
request = Gopher::Request.new("URL:http://github.com/muffinista/gopher2000")
|
|
38
|
+
expect(request).to be_url
|
|
39
|
+
expect(request.url).to eql('http://github.com/muffinista/gopher2000')
|
|
29
40
|
end
|
|
30
41
|
end
|
data/spec/response_spec.rb
CHANGED
|
@@ -8,17 +8,17 @@ describe Gopher::Response do
|
|
|
8
8
|
|
|
9
9
|
it "gets size for string results" do
|
|
10
10
|
@response.body = "hi"
|
|
11
|
-
@response.size.
|
|
11
|
+
expect(@response.size).to eq(2)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "gets size for stringio results" do
|
|
15
15
|
@response.body = StringIO.new("12345")
|
|
16
|
-
@response.size.
|
|
16
|
+
expect(@response.size).to eq(5)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "defaults to 0 size for weird objects" do
|
|
20
|
-
@response.body =
|
|
21
|
-
@response.size.
|
|
20
|
+
@response.body = double(Object)
|
|
21
|
+
expect(@response.size).to eq(0)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
|
|
@@ -28,6 +28,6 @@ describe Gopher::Response do
|
|
|
28
28
|
temp_file.flush
|
|
29
29
|
|
|
30
30
|
@response.body = File.new(temp_file.path)
|
|
31
|
-
@response.size.
|
|
31
|
+
expect(@response.size).to eq(10)
|
|
32
32
|
end
|
|
33
33
|
end
|
data/spec/routing_spec.rb
CHANGED
|
@@ -16,30 +16,30 @@ describe Gopher::Application do
|
|
|
16
16
|
"hi"
|
|
17
17
|
end
|
|
18
18
|
junk, block = @router.lookup("sfssfdfsfsd")
|
|
19
|
-
block.class.
|
|
19
|
+
expect(block.class).to eql(UnboundMethod)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
describe "globify" do
|
|
24
24
|
it "should add glob if none yet" do
|
|
25
|
-
@router.globify("/foo").
|
|
25
|
+
expect(@router.globify("/foo")).to eq("/foo/?*")
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
it "should be ok with trailing slashes" do
|
|
29
|
-
@router.globify("/foo/").
|
|
29
|
+
expect(@router.globify("/foo/")).to eq("/foo/?*")
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
it "shouldn't add glob if there is one already" do
|
|
33
|
-
@router.globify("/foo/*").
|
|
33
|
+
expect(@router.globify("/foo/*")).to eq("/foo/*")
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
describe "mount" do
|
|
38
38
|
before(:each) do
|
|
39
|
-
@h =
|
|
40
|
-
@h.
|
|
39
|
+
@h = double(Gopher::Handlers::DirectoryHandler)
|
|
40
|
+
expect(@h).to receive(:application=).with(@router)
|
|
41
41
|
|
|
42
|
-
Gopher::Handlers::DirectoryHandler.
|
|
42
|
+
expect(Gopher::Handlers::DirectoryHandler).to receive(:new).with({:bar => :baz, :mount_point => "/foo"}).and_return(@h)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it "should work" do
|
|
@@ -50,42 +50,42 @@ describe Gopher::Application do
|
|
|
50
50
|
describe "compile" do
|
|
51
51
|
it "should generate a basic string for routes without keys" do
|
|
52
52
|
lookup, keys, block = @router.compile! "/foo" do; end
|
|
53
|
-
lookup.to_s.
|
|
54
|
-
keys.
|
|
53
|
+
expect(lookup.to_s).to eq(/^\/foo$/.to_s)
|
|
54
|
+
expect(keys).to eq([])
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
context "with keys" do
|
|
58
58
|
it "should generate a lookup and keys for routes with keys" do
|
|
59
59
|
lookup, keys, block = @router.compile! "/foo/:bar" do; end
|
|
60
|
-
lookup.to_s.
|
|
60
|
+
expect(lookup.to_s).to eq("(?-mix:^\\/foo\\/([^\\/?#]+)$)")
|
|
61
61
|
|
|
62
|
-
keys.
|
|
62
|
+
expect(keys).to eq(["bar"])
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
it "should match correctly" do
|
|
66
66
|
lookup, keys, block = @router.compile! "/foo/:bar" do; end
|
|
67
|
-
lookup.to_s.
|
|
67
|
+
expect(lookup.to_s).to eq("(?-mix:^\\/foo\\/([^\\/?#]+)$)")
|
|
68
68
|
|
|
69
|
-
lookup.match("/foo/baz").
|
|
70
|
-
lookup.match("/foo2/baz").
|
|
71
|
-
lookup.match("/baz/foo/baz").
|
|
72
|
-
lookup.match("/foo/baz/bar").
|
|
69
|
+
expect(lookup.match("/foo/baz")).not_to be_nil
|
|
70
|
+
expect(lookup.match("/foo2/baz")).to be_nil
|
|
71
|
+
expect(lookup.match("/baz/foo/baz")).to be_nil
|
|
72
|
+
expect(lookup.match("/foo/baz/bar")).to be_nil
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
context "with splat" do
|
|
77
77
|
it "should work with splats" do
|
|
78
78
|
lookup, keys, block = @router.compile! "/foo/*" do; end
|
|
79
|
-
lookup.to_s.
|
|
80
|
-
keys.
|
|
79
|
+
expect(lookup.to_s).to eq("(?-mix:^\\/foo\\/(.*?)$)")
|
|
80
|
+
expect(keys).to eq(["splat"])
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
it "should match correctly" do
|
|
84
84
|
lookup, keys, block = @router.compile! "/foo/*" do; end
|
|
85
85
|
|
|
86
|
-
lookup.match("/foo/baz/bar/bam").
|
|
87
|
-
lookup.match("/foo2/baz").
|
|
88
|
-
lookup.match("/baz/foo/baz").
|
|
86
|
+
expect(lookup.match("/foo/baz/bar/bam")).not_to be_nil
|
|
87
|
+
expect(lookup.match("/foo2/baz")).to be_nil
|
|
88
|
+
expect(lookup.match("/baz/foo/baz")).to be_nil
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
end
|
data/spec/server_spec.rb
CHANGED
|
@@ -18,20 +18,36 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
18
18
|
|
|
19
19
|
@host = "0.0.0.0"
|
|
20
20
|
@port = 12345
|
|
21
|
+
@environment = 'test'
|
|
21
22
|
|
|
22
23
|
@application.config[:host] = @host
|
|
23
24
|
@application.config[:port] = @port
|
|
25
|
+
@application.config[:env] = @environment
|
|
24
26
|
|
|
25
27
|
@request = Gopher::Request.new("foo", "bar")
|
|
26
28
|
|
|
27
|
-
@response = Gopher::Response.new
|
|
29
|
+
@response = Gopher::Response.new
|
|
28
30
|
@response.code = :success
|
|
29
31
|
@response.body = "hi"
|
|
30
32
|
end
|
|
31
33
|
|
|
34
|
+
it "returns host" do
|
|
35
|
+
@application.config[:host] = 'gopher-site.test'
|
|
36
|
+
expect(@application.host).to eql('gopher-site.test')
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "returns port" do
|
|
40
|
+
expect(@application.port).to eql(@port)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it "returns environment" do
|
|
44
|
+
expect(@application.env).to eql(@environment)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
|
|
32
48
|
it "should work in non-blocking mode" do
|
|
33
49
|
@application.fake_response = @response
|
|
34
|
-
@application.
|
|
50
|
+
allow(@application).to receive(:non_blocking?).and_return(false)
|
|
35
51
|
|
|
36
52
|
::EM.run {
|
|
37
53
|
server = Gopher::Server.new(@application)
|
|
@@ -42,7 +58,7 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
42
58
|
socket.send_data("123\n")
|
|
43
59
|
|
|
44
60
|
socket.onopen = lambda {
|
|
45
|
-
socket.data.last.chomp.
|
|
61
|
+
expect(socket.data.last.chomp).to eq("hi\r\n.")
|
|
46
62
|
EM.stop
|
|
47
63
|
}
|
|
48
64
|
}
|
|
@@ -60,7 +76,7 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
60
76
|
socket.send_data("123\n")
|
|
61
77
|
|
|
62
78
|
socket.onopen = lambda {
|
|
63
|
-
socket.data.last.chomp.
|
|
79
|
+
expect(socket.data.last.chomp).to eq("hi\r\n.")
|
|
64
80
|
EM.stop
|
|
65
81
|
}
|
|
66
82
|
}
|
|
@@ -78,7 +94,7 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
78
94
|
socket.send_data("123\n")
|
|
79
95
|
|
|
80
96
|
socket.onopen = lambda {
|
|
81
|
-
socket.data.last.chomp.
|
|
97
|
+
expect(socket.data.last.chomp).to eq("hi\r\n.")
|
|
82
98
|
EM.stop
|
|
83
99
|
}
|
|
84
100
|
}
|
|
@@ -100,7 +116,7 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
100
116
|
socket.send_data("123\n")
|
|
101
117
|
|
|
102
118
|
socket.onopen = lambda {
|
|
103
|
-
socket.data.last.chomp.
|
|
119
|
+
expect(socket.data.last.chomp).to eq("hi")
|
|
104
120
|
EM.stop
|
|
105
121
|
}
|
|
106
122
|
}
|
|
@@ -118,7 +134,7 @@ if ENV["WITH_SERVER_SPECS"].to_i == 1
|
|
|
118
134
|
socket.send_data("123\n")
|
|
119
135
|
|
|
120
136
|
socket.onopen = lambda {
|
|
121
|
-
socket.data.last.chomp.
|
|
137
|
+
expect(socket.data.last.chomp).to eq("hi\r\n.")
|
|
122
138
|
EM.stop
|
|
123
139
|
}
|
|
124
140
|
}
|
metadata
CHANGED
|
@@ -1,126 +1,169 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gopher2000
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.5.5
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Colin Mitchell
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rspec
|
|
16
|
-
requirement:
|
|
17
|
-
none: false
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - ">="
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '0'
|
|
22
20
|
type: :development
|
|
23
21
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
25
27
|
- !ruby/object:Gem::Dependency
|
|
26
28
|
name: redcarpet
|
|
27
|
-
requirement:
|
|
28
|
-
none: false
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
30
|
requirements:
|
|
30
|
-
- -
|
|
31
|
+
- - ">="
|
|
31
32
|
- !ruby/object:Gem::Version
|
|
32
33
|
version: '0'
|
|
33
34
|
type: :development
|
|
34
35
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
36
41
|
- !ruby/object:Gem::Dependency
|
|
37
42
|
name: yard
|
|
38
|
-
requirement:
|
|
39
|
-
none: false
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
44
|
requirements:
|
|
41
|
-
- -
|
|
45
|
+
- - ">="
|
|
42
46
|
- !ruby/object:Gem::Version
|
|
43
47
|
version: '0'
|
|
44
48
|
type: :development
|
|
45
49
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
47
55
|
- !ruby/object:Gem::Dependency
|
|
48
56
|
name: shoulda
|
|
49
|
-
requirement:
|
|
50
|
-
none: false
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
51
58
|
requirements:
|
|
52
|
-
- -
|
|
59
|
+
- - ">="
|
|
53
60
|
- !ruby/object:Gem::Version
|
|
54
61
|
version: '0'
|
|
55
62
|
type: :development
|
|
56
63
|
prerelease: false
|
|
57
|
-
version_requirements:
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
58
69
|
- !ruby/object:Gem::Dependency
|
|
59
70
|
name: rdoc
|
|
60
|
-
requirement:
|
|
61
|
-
none: false
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
62
72
|
requirements:
|
|
63
|
-
- -
|
|
73
|
+
- - ">="
|
|
64
74
|
- !ruby/object:Gem::Version
|
|
65
75
|
version: '0'
|
|
66
76
|
type: :development
|
|
67
77
|
prerelease: false
|
|
68
|
-
version_requirements:
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: simplecov
|
|
71
|
-
requirement:
|
|
72
|
-
none: false
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
86
|
requirements:
|
|
74
|
-
- -
|
|
87
|
+
- - "~>"
|
|
75
88
|
- !ruby/object:Gem::Version
|
|
76
|
-
version:
|
|
89
|
+
version: 0.16.1
|
|
77
90
|
type: :development
|
|
78
91
|
prerelease: false
|
|
79
|
-
version_requirements:
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: 0.16.1
|
|
80
97
|
- !ruby/object:Gem::Dependency
|
|
81
98
|
name: watchr
|
|
82
|
-
requirement:
|
|
83
|
-
none: false
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
84
100
|
requirements:
|
|
85
|
-
- -
|
|
101
|
+
- - ">="
|
|
86
102
|
- !ruby/object:Gem::Version
|
|
87
103
|
version: '0'
|
|
88
104
|
type: :development
|
|
89
105
|
prerelease: false
|
|
90
|
-
version_requirements:
|
|
91
|
-
- !ruby/object:Gem::Dependency
|
|
92
|
-
name: eventmachine
|
|
93
|
-
requirement: &12044580 !ruby/object:Gem::Requirement
|
|
94
|
-
none: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
95
107
|
requirements:
|
|
96
|
-
- -
|
|
108
|
+
- - ">="
|
|
97
109
|
- !ruby/object:Gem::Version
|
|
98
110
|
version: '0'
|
|
99
|
-
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: artii
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 2.0.1
|
|
118
|
+
type: :runtime
|
|
100
119
|
prerelease: false
|
|
101
|
-
version_requirements:
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 2.0.1
|
|
102
125
|
- !ruby/object:Gem::Dependency
|
|
103
126
|
name: eventmachine
|
|
104
|
-
requirement:
|
|
105
|
-
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - "~>"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: 1.2.5
|
|
132
|
+
type: :runtime
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
135
|
requirements:
|
|
107
|
-
- -
|
|
136
|
+
- - "~>"
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 1.2.5
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: logging
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
108
144
|
- !ruby/object:Gem::Version
|
|
109
145
|
version: '0'
|
|
110
146
|
type: :runtime
|
|
111
147
|
prerelease: false
|
|
112
|
-
version_requirements:
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
113
153
|
- !ruby/object:Gem::Dependency
|
|
114
|
-
name:
|
|
115
|
-
requirement:
|
|
116
|
-
none: false
|
|
154
|
+
name: mimemagic
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
117
156
|
requirements:
|
|
118
|
-
- -
|
|
157
|
+
- - ">="
|
|
119
158
|
- !ruby/object:Gem::Version
|
|
120
159
|
version: '0'
|
|
121
160
|
type: :runtime
|
|
122
161
|
prerelease: false
|
|
123
|
-
version_requirements:
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
124
167
|
description: Gopher2000 is a ruby-based Gopher server. It is built for speedy, enjoyable
|
|
125
168
|
development of all sorts of gopher sites.
|
|
126
169
|
email:
|
|
@@ -130,14 +173,16 @@ executables:
|
|
|
130
173
|
extensions: []
|
|
131
174
|
extra_rdoc_files: []
|
|
132
175
|
files:
|
|
133
|
-
- .gitignore
|
|
134
|
-
- .
|
|
176
|
+
- ".gitignore"
|
|
177
|
+
- ".ruby-version"
|
|
178
|
+
- ".travis.yml"
|
|
135
179
|
- Gemfile
|
|
136
180
|
- LICENSE.txt
|
|
137
181
|
- README.markdown
|
|
138
182
|
- Rakefile
|
|
139
183
|
- bin/gopher2000
|
|
140
184
|
- examples/default_route.rb
|
|
185
|
+
- examples/figlet.rb
|
|
141
186
|
- examples/nyan.rb
|
|
142
187
|
- examples/simple.rb
|
|
143
188
|
- examples/twitter.rb
|
|
@@ -179,33 +224,40 @@ files:
|
|
|
179
224
|
homepage: https://github.com/muffinista/gopher2000
|
|
180
225
|
licenses:
|
|
181
226
|
- WTFPL
|
|
227
|
+
metadata: {}
|
|
182
228
|
post_install_message:
|
|
183
229
|
rdoc_options: []
|
|
184
230
|
require_paths:
|
|
185
231
|
- lib
|
|
186
232
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
|
-
none: false
|
|
188
233
|
requirements:
|
|
189
|
-
- -
|
|
234
|
+
- - ">="
|
|
190
235
|
- !ruby/object:Gem::Version
|
|
191
236
|
version: '0'
|
|
192
|
-
segments:
|
|
193
|
-
- 0
|
|
194
|
-
hash: -1373198557486184416
|
|
195
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
|
-
none: false
|
|
197
238
|
requirements:
|
|
198
|
-
- -
|
|
239
|
+
- - ">="
|
|
199
240
|
- !ruby/object:Gem::Version
|
|
200
241
|
version: '0'
|
|
201
|
-
segments:
|
|
202
|
-
- 0
|
|
203
|
-
hash: -1373198557486184416
|
|
204
242
|
requirements: []
|
|
205
|
-
|
|
206
|
-
rubygems_version: 1.8.17
|
|
243
|
+
rubygems_version: 3.0.3
|
|
207
244
|
signing_key:
|
|
208
|
-
specification_version:
|
|
245
|
+
specification_version: 4
|
|
209
246
|
summary: Gopher2000 - A Gopher server for the next millenium
|
|
210
|
-
test_files:
|
|
211
|
-
|
|
247
|
+
test_files:
|
|
248
|
+
- spec/application_spec.rb
|
|
249
|
+
- spec/dispatching_spec.rb
|
|
250
|
+
- spec/dsl_spec.rb
|
|
251
|
+
- spec/gopher_spec.rb
|
|
252
|
+
- spec/handlers/directory_handler_spec.rb
|
|
253
|
+
- spec/helpers_spec.rb
|
|
254
|
+
- spec/rendering/base_spec.rb
|
|
255
|
+
- spec/rendering/menu_spec.rb
|
|
256
|
+
- spec/rendering_spec.rb
|
|
257
|
+
- spec/request_spec.rb
|
|
258
|
+
- spec/response_spec.rb
|
|
259
|
+
- spec/routing_spec.rb
|
|
260
|
+
- spec/sandbox/old/socks.txt
|
|
261
|
+
- spec/sandbox/socks.txt
|
|
262
|
+
- spec/server_spec.rb
|
|
263
|
+
- spec/spec_helper.rb
|