erik_server 0.0.1 → 0.0.2

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: 3a6737fdb9cb3d2e4abec76a70cfc3cfb43ee907
4
- data.tar.gz: d51807f63751baad70a34c2637bc196fa16df001
3
+ metadata.gz: 68ed15efc4a8e8ecdf3d7ef98ed7879e567acf8b
4
+ data.tar.gz: 2f2319383f31cb36b4e5d375f3af00cd23db4402
5
5
  SHA512:
6
- metadata.gz: f9d939330b732c18e7826961164226cdba0ed93231d92a484d46cbc8a0b79d8e2df20089d6a86c0b5816ef10c51282b7695ede62272f37a61fab2506135115b4
7
- data.tar.gz: 1d03704db3ed7d9048d9a0c6c8f87db8b642b02ae6c7225b69c1a9fbc45c78fb46cebf6f5b70fc3465f39e11dc2194c3905933ab2208062c121b7923a657bfc8
6
+ metadata.gz: 33ef96608d98e5ca532c6dd1af9ffef9c61e85435d9fb622cb693fca560a3ad6fbf9d09e853d510d8b85770b810e6c04061e8323c206a53526236673c75986d3
7
+ data.tar.gz: af6c09a45668c0c981bda4eea479270dcd7f8a152e0a71229922ef9ff8d1054e207c9d381e991f8f4ceac4f9e49f04dc1b20b52cd58c293004390b796298565c
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erik_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Nilsen
@@ -41,19 +41,11 @@ dependencies:
41
41
  description: A simple server made with ruby
42
42
  email:
43
43
  - enilsen16@live.com
44
- executables:
45
- - server
44
+ executables: []
46
45
  extensions: []
47
46
  extra_rdoc_files: []
48
47
  files:
49
- - Gemfile
50
- - LICENSE.txt
51
48
  - README.md
52
- - Rakefile
53
- - bin/server
54
- - lib/server.rb
55
- - lib/server/version.rb
56
- - server.gemspec
57
49
  homepage: ''
58
50
  licenses:
59
51
  - MIT
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in server.gemspec
4
- gemspec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Erik Nilsen
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
data/bin/server DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'socket'
4
-
5
- server = TCPServer.new 1337
6
-
7
- loop do
8
- client = server.accept
9
- request = clients.gets
10
- verb, path,protocol = request.spilt(" ")
11
- path ="." + path
12
-
13
- if File.file?(path)
14
- body = File.open(path, "r"){|file| file.read}
15
- status = "200 OK"
16
- else
17
- body = "File not found\n"
18
- status = "404 Not Found"
19
- end
20
-
21
- response = "#{protocol} #{status}\n"
22
- response += "Content-Type: text/html\n"
23
- response += "Content-Length: #{body.length}\n"
24
- response += "Connection: close\n\n"
25
- response += body
26
-
27
- client.puts response
28
- client.close
29
- end
@@ -1,3 +0,0 @@
1
- module Server
2
- VERSION = "0.0.1"
3
- end
data/lib/server.rb DELETED
@@ -1,5 +0,0 @@
1
- require "server/version"
2
-
3
- module Server
4
- # Your code goes here...
5
- end
data/server.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'server/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "erik_server"
8
- spec.version = Server::VERSION
9
- spec.authors = ["Erik Nilsen"]
10
- spec.email = ["enilsen16@live.com"]
11
- spec.summary = %q{A simple server}
12
- spec.description = %q{A simple server made with ruby}
13
- spec.homepage = ""
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake"
23
- end