wsoc 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data.tar.gz.sig +4 -0
  2. data/COPYING.txt +339 -0
  3. data/History.rdoc +16 -0
  4. data/Manifest.txt +42 -0
  5. data/README.rdoc +58 -0
  6. data/Rakefile +27 -0
  7. data/bin/wsoc_server +12 -0
  8. data/config.ru +9 -0
  9. data/lib/wsoc.rb +21 -0
  10. data/lib/wsoc/app.rb +147 -0
  11. data/lib/wsoc/config.rb +46 -0
  12. data/lib/wsoc/course.rb +69 -0
  13. data/lib/wsoc/course_specs.rb +124 -0
  14. data/lib/wsoc/helpers.rb +34 -0
  15. data/lib/wsoc/helpers/course.rb +148 -0
  16. data/lib/wsoc/helpers/rendering.rb +111 -0
  17. data/lib/wsoc/runner.rb +123 -0
  18. data/lib/wsoc/specs.rb +62 -0
  19. data/lib/wsoc/version.rb +24 -0
  20. data/public/css/layout.css +44 -0
  21. data/public/css/specs.css +11 -0
  22. data/public/js/jquery-1.3.2.min.js +19 -0
  23. data/tasks/yard.rb +12 -0
  24. data/views/course_absolute_start.erb +19 -0
  25. data/views/course_cookies_get.erb +13 -0
  26. data/views/course_cookies_start.erb +13 -0
  27. data/views/course_empty_start.erb +23 -0
  28. data/views/course_fail.erb +11 -0
  29. data/views/course_frames_frame.erb +15 -0
  30. data/views/course_frames_iframe.erb +15 -0
  31. data/views/course_frames_start.erb +15 -0
  32. data/views/course_javascript_start.erb +19 -0
  33. data/views/course_loop_next.erb +13 -0
  34. data/views/course_loop_start.erb +19 -0
  35. data/views/course_pass.erb +9 -0
  36. data/views/course_redirects_start.erb +17 -0
  37. data/views/course_relative_start.erb +27 -0
  38. data/views/course_remote_next.erb +9 -0
  39. data/views/course_remote_start.erb +31 -0
  40. data/views/course_start.erb +22 -0
  41. data/views/layout.erb +24 -0
  42. data/views/specs.erb +48 -0
  43. data/views/welcome.erb +38 -0
  44. metadata +161 -0
  45. metadata.gz.sig +0 -0
@@ -0,0 +1,48 @@
1
+ <link rel="stylesheet" type="text/css" href="/css/specs.css" />
2
+ <script type="text/javascript">
3
+ $(document).ready(function() {
4
+ function hide_specs() {
5
+ $("#specs").hide();
6
+
7
+ $("#hide_specs").css({'color': 'gray', 'text-decoration': 'none'});
8
+ $("#view_specs").css({'color': 'black', 'text-decoration': 'underline'});
9
+ }
10
+
11
+ function view_specs() {
12
+ $("#specs").show();
13
+
14
+ $("#hide_specs").css({'color': 'black', 'text-decoration': 'underline'});
15
+ $("#view_specs").css({'color': 'gray', 'text-decoration': 'none'});
16
+ }
17
+
18
+ hide_specs();
19
+
20
+ $("#view_specs").click(view_specs);
21
+ $("#hide_specs").click(hide_specs);
22
+ });
23
+ </script>
24
+
25
+ <h2>Specs</h2>
26
+
27
+ <p>
28
+ The Web Spider Obstacle Course Specs provide a list of URLs that must
29
+ visit or ignore. This listing of URLs and expected behaviors provides further
30
+ information that can be used in the testing of Web Spiders.
31
+ </p>
32
+
33
+ <p>
34
+ <a href="#" id="view_specs">View</a> | <a href="#" id="hide_specs">Hide</a>
35
+ </p>
36
+
37
+ <ul id="specs">
38
+ <% @specs.each do |spec| %>
39
+ <li class="spec_<%= spec[:behavior] %>">
40
+ <p class="spec_message"><%=h spec[:message] %></p>
41
+ <pre class="spec_url"><%=h spec[:url] %></pre>
42
+ </li>
43
+ <% end %>
44
+ </ul>
45
+
46
+ <h2>Download</h2>
47
+
48
+ <p><a href="/specs.json">JSON</a> | <a href="/specs.yaml">YAML</a></p>
@@ -0,0 +1,38 @@
1
+ <h2>Welcome</h2>
2
+
3
+ <p>
4
+ Welcome to the Web Spider Obstacle Course (WSOC). The WSOC is an example web
5
+ server that tests the thoroughness and resilience of Web Spiders.
6
+ </p>
7
+
8
+ <p>
9
+ For a Web Spider to begin the Obstacle Course, it must start at the
10
+ following URL:
11
+ </p>
12
+ <pre><%=h course_start %></pre>
13
+
14
+ <p>
15
+ For a Web Spider to complete the Obstacle Course successfully, it must
16
+ attempt to spider the links within the <kbd><%=h course_dir %></kbd>
17
+ directory of the WSOC server. While spidering links a successful Web Spider
18
+ must observe the following criteria:
19
+ </p>
20
+ <ol>
21
+ <li>Must not make a request more than once for a given link.</li>
22
+ <li>Must not access other servers besides the WSOC server.</li>
23
+ <li>
24
+ Must not access pages that are outside of the <kbd><%=h course_dir %></kbd>
25
+ directory on the WSOC server.
26
+ </li>
27
+ <li>
28
+ Should perform the expected behavior (<kbd>visit</kbd>, <kbd>ignore</kbd>
29
+ or <kbd>fail</kbd>) for a given link, as listed in the
30
+ <a href="/specs">Web Spider Obstacle Course Specs</a>.
31
+ </ol>
32
+
33
+ <p>
34
+ If a Web Spider accesses a page that is not present, the WSOC server will
35
+ redirect the spider to the following URL indicating failure of the
36
+ Obstacle Course:
37
+ </p>
38
+ <pre><%=h course_fail %></pre>
metadata ADDED
@@ -0,0 +1,161 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wsoc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Postmodern
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA9wb3N0
14
+ bW9kZXJuLm1vZDMxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
15
+ ARkWA2NvbTAeFw0wOTA2MDMwNDU5MDNaFw0xMDA2MDMwNDU5MDNaMEYxGDAWBgNV
16
+ BAMMD3Bvc3Rtb2Rlcm4ubW9kMzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYK
17
+ CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
18
+ 1wvANkTDHFgVih5XLjuTwTZjgBq1lBGybXJiH6Id1lY2JOMqM5FB1DDHVvvij94i
19
+ mJabN0zkzu6VKWC70y0IwOxY7CPokr0eFdK/D0y7mCq1P8QITv76i2YqAl0eYqIt
20
+ W+IhIkANQ7E6uMZIZcdnfadC6lPAtlKkqtd9crvRbFgr6e3kyflmohbRnTEJHoRd
21
+ 7SHHsybE6DSn7oTDs6XBTNrNIn5VfZA0z01eeos/+zBm1zKJOK2+/7xtLLDuDU9G
22
+ +Rd+ltUBbvxUrMNZmDG29pnmN2xTRH+Q8HxD2AxlvM5SRpK6OeZaHV7PaCCAVZ4L
23
+ T9BFl1sfMvRlABeGEkSyuQIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE
24
+ sDAdBgNVHQ4EFgQUKwsd+PqEYmBvyaTyoL+uRuk+PhEwDQYJKoZIhvcNAQEFBQAD
25
+ ggEBAB4TvHsrlbcXcKg6gX5BIb9tI+zGkpzo0Z7jnxMEcNO7NGGwmzafDBI/xZYv
26
+ xkRH3/HXbGGYDOi6Q6gWt5GujSx0bOImDtYTJTH8jnzN92HzEK5WdScm1QpZKF1e
27
+ cezArMbxbSPaosxTCtG6LQTkE28lFQsmFZ5xzouugS4h5+LVJiVMmiP+l3EfkjFa
28
+ GOURU+rNEMPWo8MCWivGW7jes6BMzWHcW7DQ0scNVmIcCIgdyMmpscuAEOSeghy9
29
+ /fFs57Ey2OXBL55nDOyvN/ZQ2Vab05UH4t+GCxjAPeirzL/29FBtePT6VD44c38j
30
+ pDj+ws7QjtH/Qcrr1l9jfN0ehDs=
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2010-01-02 00:00:00 -08:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: json
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.2.0
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: sinatra
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.4
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: yard
58
+ type: :development
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.5.2
65
+ version:
66
+ - !ruby/object:Gem::Dependency
67
+ name: hoe
68
+ type: :development
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 2.4.0
75
+ version:
76
+ description: |-
77
+ The Web Spider Obstacle Course (WSOC) is an example web server that tests
78
+ the thoroughness and resilience of Web Spiders.
79
+ email:
80
+ - postmodern.mod3@gmail.com
81
+ executables:
82
+ - wsoc_server
83
+ extensions: []
84
+
85
+ extra_rdoc_files:
86
+ - COPYING.txt
87
+ - Manifest.txt
88
+ files:
89
+ - COPYING.txt
90
+ - History.rdoc
91
+ - Manifest.txt
92
+ - README.rdoc
93
+ - Rakefile
94
+ - config.ru
95
+ - bin/wsoc_server
96
+ - lib/wsoc.rb
97
+ - lib/wsoc/config.rb
98
+ - lib/wsoc/specs.rb
99
+ - lib/wsoc/course_specs.rb
100
+ - lib/wsoc/helpers.rb
101
+ - lib/wsoc/helpers/rendering.rb
102
+ - lib/wsoc/helpers/course.rb
103
+ - lib/wsoc/course.rb
104
+ - lib/wsoc/app.rb
105
+ - lib/wsoc/runner.rb
106
+ - lib/wsoc/version.rb
107
+ - tasks/yard.rb
108
+ - public/css/layout.css
109
+ - public/css/specs.css
110
+ - public/js/jquery-1.3.2.min.js
111
+ - views/layout.erb
112
+ - views/specs.erb
113
+ - views/course_pass.erb
114
+ - views/course_fail.erb
115
+ - views/course_start.erb
116
+ - views/course_relative_start.erb
117
+ - views/course_absolute_start.erb
118
+ - views/course_empty_start.erb
119
+ - views/course_javascript_start.erb
120
+ - views/course_frames_start.erb
121
+ - views/course_frames_frame.erb
122
+ - views/course_frames_iframe.erb
123
+ - views/course_loop_start.erb
124
+ - views/course_loop_next.erb
125
+ - views/course_remote_start.erb
126
+ - views/course_remote_next.erb
127
+ - views/course_cookies_start.erb
128
+ - views/course_cookies_get.erb
129
+ - views/course_redirects_start.erb
130
+ - views/welcome.erb
131
+ has_rdoc: yard
132
+ homepage: http://github.com/postmodern/wsoc
133
+ licenses: []
134
+
135
+ post_install_message:
136
+ rdoc_options:
137
+ - --main
138
+ - README.rdoc
139
+ require_paths:
140
+ - lib
141
+ required_ruby_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ version:
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: "0"
152
+ version:
153
+ requirements: []
154
+
155
+ rubyforge_project: wsoc
156
+ rubygems_version: 1.3.5
157
+ signing_key:
158
+ specification_version: 3
159
+ summary: The Web Spider Obstacle Course (WSOC) is an example web server that tests the thoroughness and resilience of Web Spiders.
160
+ test_files: []
161
+
Binary file