cleaver 0.0.2 → 0.0.5

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
  SHA1:
3
- metadata.gz: 0790c9f6f250b2e139fc6e376c9f81c2f9b0a2a5
4
- data.tar.gz: c344e05a2eb17c76252f12cb0528904663dc65ab
3
+ metadata.gz: b3155d90be5f911e6d1b3aed0ea9471b84914190
4
+ data.tar.gz: 092725cb4281606765309eddea4dffcf59531cfa
5
5
  SHA512:
6
- metadata.gz: 86d8965422bf2e62d08aa718a5d8b17dd083955dcb254a64848189038ac572c818c3199d17bf4bd73796ffd7dec1882afe5032bd132d450f127a6797edaf7750
7
- data.tar.gz: efbb803e9b9be58eb9374256a9b46d3d071c33b73be539af0f556c0b07e5bda436200fc74a43b4db379684d271a88ecbfb93b22c0499e986c7a8f4efd53ab023
6
+ metadata.gz: e3bd19ad7d8e5acbdd431a713a0d38603a95e9fde90a6f738c436a2dbdcfbaf0af6c012f30fffb3a6db2a0ba63d98b7ef73af45420fe7cace96d3abc4325d08b
7
+ data.tar.gz: 00a71254abf4196837778313914ae88f54efeaf7e069028b41f89b3b55ee3957f842e8c3dee181776205c1457beb7c2929bd9deb09f70c0162aa756368d6b5c0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cleaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - neelp22
@@ -45,15 +45,7 @@ email:
45
45
  executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
- files:
49
- - ".gitignore"
50
- - Gemfile
51
- - LICENSE.txt
52
- - README.md
53
- - Rakefile
54
- - cleaver.gemspec
55
- - lib/cleaver.rb
56
- - lib/cleaver/version.rb
48
+ files: []
57
49
  homepage: http://rubygems.org/gems/cleaver
58
50
  licenses:
59
51
  - MIT
data/.gitignore DELETED
@@ -1,22 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- *.bundle
19
- *.so
20
- *.o
21
- *.a
22
- mkmf.log
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 neelp22
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/README.md DELETED
@@ -1,29 +0,0 @@
1
- # Cleaver
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'cleaver'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install cleaver
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it ( https://github.com/[my-github-username]/cleaver/fork )
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create a new Pull Request
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
data/cleaver.gemspec DELETED
@@ -1,25 +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 'cleaver/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "cleaver"
8
- spec.version = Cleaver::VERSION
9
- spec.authors = ["neelp22"]
10
- spec.email = ["neelp22@gmail.com"]
11
- spec.summary = %q{"Parses HTTP Request bodies when using Ruby's TCP class to create a server"}
12
- spec.description = spec.summary
13
- spec.homepage = "http://rubygems.org/gems/cleaver"
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
24
-
25
-
data/lib/cleaver.rb DELETED
@@ -1,36 +0,0 @@
1
- require "cleaver/version"
2
-
3
- module Cleaver
4
-
5
- attr_accessor :header, :params
6
-
7
- def initialize(params, header)
8
- @header = header
9
- @params = params
10
- end
11
-
12
- def self.parse(client)
13
- request_header = ''
14
- content_length_line = ''
15
- i = 0
16
- while i < 11
17
- line = client.gets
18
- if line.include?("Content-Length")
19
- content_length_line = line
20
- end
21
- request_header += line
22
- i += 1
23
- end
24
- content_length = content_length_line.split(' ')[1].to_i
25
- params = {}
26
- params_string = client.read(content_length).split('&').each do |el|
27
- params_arr = el.split('=')
28
- params[params_arr[0].to_sym] = params_arr[1]
29
- end
30
-
31
- instance = new(params, request_header)
32
-
33
- return instance
34
- end
35
-
36
- end
@@ -1,3 +0,0 @@
1
- module Cleaver
2
- VERSION = "0.0.2"
3
- end