waitress-core 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -4
  3. data/LICENSE +21 -21
  4. data/Rakefile +13 -13
  5. data/bin/waitress +22 -22
  6. data/ext/Thanks.md +1 -1
  7. data/ext/waitress_http11/ext_help.h +15 -15
  8. data/ext/waitress_http11/extconf.rb +6 -6
  9. data/ext/waitress_http11/http11.c +532 -532
  10. data/ext/waitress_http11/http11_parser.c +1216 -1216
  11. data/ext/waitress_http11/http11_parser.h +49 -49
  12. data/ext/waitress_http11/http11_parser.java.rl +171 -171
  13. data/ext/waitress_http11/http11_parser.rl +165 -165
  14. data/ext/waitress_http11/http11_parser_common.rl +55 -55
  15. data/ext/waitress_http11/http11_wrb_parser.h +91 -91
  16. data/lib/waitress/chef.rb +113 -113
  17. data/lib/waitress/configure.rb +121 -121
  18. data/lib/waitress/evalbind.rb +9 -9
  19. data/lib/waitress/handlers/dirhandler.rb +39 -39
  20. data/lib/waitress/handlers/handler.rb +57 -57
  21. data/lib/waitress/handlers/handler404.rb +25 -25
  22. data/lib/waitress/handlers/libhandler.rb +58 -58
  23. data/lib/waitress/kernel.rb +182 -182
  24. data/lib/waitress/parse/query.rb +60 -60
  25. data/lib/waitress/request.rb +45 -45
  26. data/lib/waitress/resources/default_config.rb +52 -52
  27. data/lib/waitress/resources/http/404.html +18 -18
  28. data/lib/waitress/resources/http/css/hack.css +37 -37
  29. data/lib/waitress/resources/http/css/waitress.css +57 -57
  30. data/lib/waitress/resources/http/fonts/svg/latin/hack-bold-latin-webfont.svg +240 -240
  31. data/lib/waitress/resources/http/fonts/svg/latin/hack-bolditalic-latin-webfont.svg +240 -240
  32. data/lib/waitress/resources/http/fonts/svg/latin/hack-italic-latin-webfont.svg +240 -240
  33. data/lib/waitress/resources/http/fonts/svg/latin/hack-regular-latin-webfont.svg +240 -240
  34. data/lib/waitress/resources/http/index.html +15 -15
  35. data/lib/waitress/response.rb +105 -105
  36. data/lib/waitress/server.rb +160 -161
  37. data/lib/waitress/util.rb +707 -707
  38. data/lib/waitress/version.rb +3 -3
  39. data/lib/waitress/vhost.rb +217 -217
  40. data/lib/waitress.rb +99 -106
  41. data/lib/waitress_http11.bundle +0 -0
  42. data/waitress-core.gemspec +29 -29
  43. metadata +4 -4
  44. data/lib/waitress_http11.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a90d9f1fe81a9fc287b1230c33cd7c1a7930678
4
- data.tar.gz: 127398505ecf3b7ed773e060238592c213a65707
3
+ metadata.gz: 1f2df476e9af2dc3f9b978c075e4e9692b0252ee
4
+ data.tar.gz: db4607789c360eb881d5311f3b5fe7604dec348a
5
5
  SHA512:
6
- metadata.gz: 48da2ee16c74e316c9454ceecc54e409bc17d4a20b0b94f4580e22ecac31234cf944c164dd1e28be901f2d457044382e50a0043328f789dd61be7c9d3b4083d8
7
- data.tar.gz: 11f1c4bdaac01a492fda256af110788a921a933f2d15b01374073229b7d8dffdd08b2ab61510d0e915015c852c77ef730e7079a678a880e17b644d32ac9d6c4f
6
+ metadata.gz: cfb19a5cbc11798f5b3b0bd15e84623d364612fa0aa9cbd5489c53a0c2b473fc86d868913aa50383a9dcbd4c17ccbb38f946730bec582d2b2967d69d6878fe67
7
+ data.tar.gz: de2bc24877d18daaff2c9bacc8215a58b6b14a58de4ff27aeaa3691fb28a7fa3694ea21989bd89f3600385600d3e7e1b66e3dded4d68d5760b885d182849b75e
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in waitress-core.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in waitress-core.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Jaci R Brunning
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Jaci R Brunning
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Rakefile CHANGED
@@ -1,13 +1,13 @@
1
- require 'rake/extensiontask'
2
- require 'rake/testtask'
3
-
4
- spec = Gem::Specification.load('waitress-core.gemspec')
5
- Rake::ExtensionTask.new('waitress_http11', spec)
6
-
7
- task default: %w[test]
8
-
9
- Rake::TestTask.new do |t|
10
- t.libs << "test"
11
- t.test_files = FileList['test/unit.rb']
12
- t.verbose = true
13
- end
1
+ require 'rake/extensiontask'
2
+ require 'rake/testtask'
3
+
4
+ spec = Gem::Specification.load('waitress-core.gemspec')
5
+ Rake::ExtensionTask.new('waitress_http11', spec)
6
+
7
+ task default: %w[test]
8
+
9
+ Rake::TestTask.new do |t|
10
+ t.libs << "test"
11
+ t.test_files = FileList['test/unit.rb']
12
+ t.verbose = true
13
+ end
data/bin/waitress CHANGED
@@ -1,22 +1,22 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "waitress"
4
- require "optparse"
5
-
6
- trap("INT") { exit }
7
-
8
- conf = nil
9
-
10
- @options = {}
11
-
12
- OptionParser.new do |o|
13
- o.on("-h", "--home HOME_DIR", "Change the home directory for Waitress (default: ~/.waitress)") { |x| @options[:home] = x }
14
- end.parse!
15
-
16
- if @options.include? :home
17
- @conf = Waitress.serve! true, @options[:home]
18
- else
19
- @conf = Waitress.serve! true
20
- end
21
- @conf.run
22
- @conf.join
1
+ #!/usr/bin/env ruby
2
+
3
+ require "waitress"
4
+ require "optparse"
5
+
6
+ trap("INT") { exit }
7
+
8
+ conf = nil
9
+
10
+ @options = {}
11
+
12
+ OptionParser.new do |o|
13
+ o.on("-h", "--home HOME_DIR", "Change the home directory for Waitress (default: ~/.waitress)") { |x| @options[:home] = x }
14
+ end.parse!
15
+
16
+ if @options.include? :home
17
+ @conf = Waitress.serve! true, @options[:home]
18
+ else
19
+ @conf = Waitress.serve! true
20
+ end
21
+ @conf.run
22
+ @conf.join
data/ext/Thanks.md CHANGED
@@ -1 +1 @@
1
- The Native Extensions for the HTTP Parser are taken from the [mongrel project](https://github.com/mongrel/mongrel)
1
+ The Native Extensions for the HTTP Parser are taken from the [mongrel project](https://github.com/mongrel/mongrel)
@@ -1,15 +1,15 @@
1
- #ifndef ext_help_h
2
- #define ext_help_h
3
-
4
- #define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
5
- #define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
6
- #define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
7
- #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
8
-
9
- #ifdef DEBUG
10
- #define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
11
- #else
12
- #define TRACE()
13
- #endif
14
-
15
- #endif
1
+ #ifndef ext_help_h
2
+ #define ext_help_h
3
+
4
+ #define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
5
+ #define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
6
+ #define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
7
+ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
8
+
9
+ #ifdef DEBUG
10
+ #define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
11
+ #else
12
+ #define TRACE()
13
+ #endif
14
+
15
+ #endif
@@ -1,6 +1,6 @@
1
- require 'mkmf'
2
-
3
- dir_config("waitress_http11")
4
- have_library("c", "main")
5
-
6
- create_makefile("waitress_http11")
1
+ require 'mkmf'
2
+
3
+ dir_config("waitress_http11")
4
+ have_library("c", "main")
5
+
6
+ create_makefile("waitress_http11")