ffi-http-parser 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +3 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.yardopts +1 -0
- data/ChangeLog.md +11 -0
- data/LICENSE.txt +20 -0
- data/README.md +66 -0
- data/Rakefile +40 -0
- data/ffi-http-parser.gemspec +60 -0
- data/gemspec.yml +17 -0
- data/lib/ffi/http/parser.rb +2 -0
- data/lib/ffi/http/parser/instance.rb +398 -0
- data/lib/ffi/http/parser/parser.rb +31 -0
- data/lib/ffi/http/parser/settings.rb +22 -0
- data/lib/ffi/http/parser/types.rb +50 -0
- data/lib/ffi/http/parser/version.rb +10 -0
- data/spec/callback_examples.rb +26 -0
- data/spec/instance_spec.rb +458 -0
- data/spec/parser_spec.rb +24 -0
- data/spec/spec_helper.rb +5 -0
- metadata +133 -0
data/spec/parser_spec.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ffi/http/parser'
|
3
|
+
|
4
|
+
describe FFI::HTTP::Parser do
|
5
|
+
it "should have a VERSION constant" do
|
6
|
+
subject.const_get('VERSION').should_not be_empty
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "new" do
|
10
|
+
it "should create a new Instance object" do
|
11
|
+
subject.new.should be_kind_of(Instance)
|
12
|
+
end
|
13
|
+
|
14
|
+
context "when given a block" do
|
15
|
+
it "should yield the new Instance object" do
|
16
|
+
expected = nil
|
17
|
+
|
18
|
+
subject.new { |parser| expected = parser }
|
19
|
+
|
20
|
+
expected.should be_kind_of(Instance)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ffi-http-parser
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Postmodern
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-06-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ffi
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rubygems-tasks
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0.2'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.2'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.4'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.4'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: yard
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.7'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0.7'
|
78
|
+
description: Ruby FFI bindings to the http-parser library.
|
79
|
+
email: postmodern.mod3@gmail.com
|
80
|
+
executables: []
|
81
|
+
extensions: []
|
82
|
+
extra_rdoc_files:
|
83
|
+
- ChangeLog.md
|
84
|
+
- LICENSE.txt
|
85
|
+
- README.md
|
86
|
+
files:
|
87
|
+
- .document
|
88
|
+
- .gitignore
|
89
|
+
- .rspec
|
90
|
+
- .yardopts
|
91
|
+
- ChangeLog.md
|
92
|
+
- LICENSE.txt
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- ffi-http-parser.gemspec
|
96
|
+
- gemspec.yml
|
97
|
+
- lib/ffi/http/parser.rb
|
98
|
+
- lib/ffi/http/parser/instance.rb
|
99
|
+
- lib/ffi/http/parser/parser.rb
|
100
|
+
- lib/ffi/http/parser/settings.rb
|
101
|
+
- lib/ffi/http/parser/types.rb
|
102
|
+
- lib/ffi/http/parser/version.rb
|
103
|
+
- spec/callback_examples.rb
|
104
|
+
- spec/instance_spec.rb
|
105
|
+
- spec/parser_spec.rb
|
106
|
+
- spec/spec_helper.rb
|
107
|
+
homepage: https://github.com/postmodern/ffi-http-parser#readme
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements:
|
127
|
+
- http-parser 1.0
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 1.8.24
|
130
|
+
signing_key:
|
131
|
+
specification_version: 3
|
132
|
+
summary: FFI bindings for http-parser
|
133
|
+
test_files: []
|