simpleserver 0.0.4 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe4f0e502d1837a44eeafccdb044a73478d68f0f
4
- data.tar.gz: 0898865771aa7a23b20c2820839c7f118fac9a41
3
+ metadata.gz: c88b704c515e167ab98829eed4708d2391de1f5e
4
+ data.tar.gz: c88399b3be0d9bde2d3c264a4de0446e976b7875
5
5
  SHA512:
6
- metadata.gz: baaf884abea8760ef7dcff050f62eb9b10c5e6cb3546ed55a2d23c1100bd519c0bda398ba2fcb847dc0f7640a6cdb6d02518829775674052d0c6f676183f39fa
7
- data.tar.gz: 1d8029bb799daa98f7e343fe430f3cecc3f04e5f36f09b6f68f4e718a21aa40dc825a555dd2a7ccc62a8b494839f3d59614533d82a8442c6ba5c787be3fed649
6
+ metadata.gz: 6c79767c05e3faa386aadafe0c1be11d5bfa6c7e50739ff4332a98293d9c3d5147c1904e3c05513e10246777fee113b19492e7f254b93f19f27fad56f48791c7
7
+ data.tar.gz: 0b46d85e0a03f7a31ef4ee81f8b088ea6419001af61d4fac17d85d7f29de53a631e9416d3588e8fdb3073906dd399cd9e6936f0f6eefafa6a0ca0431ba2b0bad
@@ -1,3 +1,3 @@
1
1
  module Simpleserver
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/simpleserver.rb CHANGED
@@ -21,16 +21,14 @@ module Simpleserver
21
21
  @status = "404 Not Found"
22
22
  end
23
23
 
24
- client.puts buildResponse(protocol, body)
24
+ response = "#{protocol} #{@status}\n"
25
+ response += "Content-Type: text/html\n"
26
+ response += "Content-Length: #{body.length}\n"
27
+ response += "Connection: close\n\n"
28
+ response += body
29
+
30
+ client.puts response
25
31
  client.close
26
32
  end
27
33
  end
28
-
29
- def buildResponse(protocol, body)
30
- response = "#{protocol} #{@status}\n"
31
- response += "Content-Type: text/html\n"
32
- response += "Content-Length: #{body.length}\n"
33
- response += "Connection: close\n\n"
34
- response += body
35
- end
36
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpleserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Lien
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler