toycol 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfdb9a6d989ee0d0939ff53ded3c9603e08326194e6d8546e09ed0e292557022
4
- data.tar.gz: d9b9779d6c2ca6c01710c6ecd1758384654aac1835ea343345ebc68a155ea8cc
3
+ metadata.gz: 1599308369b344cecc36881661fdf60b1ffa8866903939d5ea1380f87ca5e36b
4
+ data.tar.gz: b5a67a19b19a0357d13f3a55be989dd462f93a07981f5cb1d443cfd9af19be4c
5
5
  SHA512:
6
- metadata.gz: 59d599b9b4c781428193c5574d5c093492875046d57d842ca120195a548c752ab343dee372e6c2042cf82009bb7066978c520f099ba3196d0a788fe60248f8e7
7
- data.tar.gz: 02033640bf6077a6125578bc6ec453c536639eb8882adbef3fd6eec6f0a2ffbedfe32dc9ef7dbb7deda6d85fafd25cdb006a9baf8e57ac4f4d87289fc38638f5
6
+ metadata.gz: 7b9c04a590c8df7f1abfb0ffb7029a3ec55e0a26b4bb4c2fe54dd7b662b792ec1837460c6ba6b21d452bc5c1c0ee8cf5eed3b55b340d594145c4d0996e7a60bb
7
+ data.tar.gz: 6be10814f2a7666b7a95ec77a6e737970db8c4f9f238fdb5f0accef6f03eb3cf1c9106401a47e81494fc17ad8393219d3c0f025e778576065f1b86b3eac5db51
data/lib/toycol/server.rb CHANGED
@@ -55,7 +55,7 @@ module Toycol
55
55
  ::Toycol::REQUEST_METHOD => "",
56
56
  ::Toycol::SERVER_NAME => "toycol_server",
57
57
  ::Toycol::SERVER_PORT => @port.to_s,
58
- ::Toycol::CONTENT_LENGTH => "",
58
+ ::Toycol::CONTENT_LENGTH => "0",
59
59
  ::Toycol::RACK_VERSION => Rack::VERSION,
60
60
  ::Toycol::RACK_INPUT => stringio(""),
61
61
  ::Toycol::RACK_ERRORS => $stderr,
@@ -108,16 +108,17 @@ module Toycol
108
108
  request_method, request_path, = request_line.split
109
109
  request_path, query_string = request_path.split("?")
110
110
 
111
- @env[REQUEST_METHOD] = request_method
112
- @env[PATH_INFO] = request_path
113
- @env[QUERY_STRING] = query_string || ""
111
+ @env[::Toycol::REQUEST_METHOD] = request_method
112
+ @env[::Toycol::PATH_INFO] = request_path
113
+ @env[::Toycol::QUERY_STRING] = query_string || ""
114
+ @env[::Toycol::CONTENT_LENGTH]
114
115
 
115
116
  request_headers.each do |request_header|
116
117
  k, v = request_header.split(":").map(&:strip)
117
- @env[k.tr("-", "_").upcase] = v
118
+ @env["::Toycol::#{k.tr("-", "_").upcase}"] = v
118
119
  end
119
120
 
120
- @env[RACK_INPUT] = stringio(request_body)
121
+ @env[::Toycol::RACK_INPUT] = stringio(request_body)
121
122
  end
122
123
  end
123
124
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Toycol
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toycol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Misaki Shioi