ftw 0.0.34 → 0.0.35

Sign up to get free protection for your applications and to get access to all the features.
data/lib/ftw/protocol.rb CHANGED
@@ -69,7 +69,7 @@ module FTW::Protocol
69
69
 
70
70
  # Encode the given text as in 'chunked' encoding.
71
71
  def encode_chunked(text)
72
- return sprintf("%x%s%s%s", text.size, CRLF, text, CRLF)
72
+ return sprintf("%x%s%s%s", text.bytesize, CRLF, text, CRLF)
73
73
  end # def encode_chunked
74
74
 
75
75
  def write_http_body_chunked(body, io)
@@ -149,15 +149,15 @@ module FTW::Protocol
149
149
  remaining = length
150
150
  while remaining > 0
151
151
  data = @body.read(remaining)
152
- @logger.debug("Read bytes", :length => data.size)
153
- if data.size > remaining
152
+ @logger.debug("Read bytes", :length => data.bytesize)
153
+ if data.bytesize > remaining
154
154
  # Read too much data, only wanted part of this. Push the rest back.
155
155
  yield data[0..remaining]
156
156
  remaining = 0
157
157
  @body.pushback(data[remaining .. -1]) if remaining < 0
158
158
  else
159
159
  yield data
160
- remaining -= data.size
160
+ remaining -= data.bytesize
161
161
  end
162
162
  end
163
163
  end # def read_http_body_length
data/lib/ftw/version.rb CHANGED
@@ -3,5 +3,5 @@ require "ftw/namespace"
3
3
  # :nodoc:
4
4
  module FTW
5
5
  # The version of this library
6
- VERSION = "0.0.34"
6
+ VERSION = "0.0.35"
7
7
  end
@@ -86,7 +86,7 @@ class FTW::WebSocket::Parser
86
86
 
87
87
  # Do we have at least 'length' bytes in the buffer?
88
88
  def have?(length)
89
- return length <= @buffer.size
89
+ return length <= @buffer.bytesize
90
90
  end # def have?
91
91
 
92
92
  # Get 'length' string from the buffer.
metadata CHANGED
@@ -1,164 +1,165 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
5
- prerelease:
4
+ version: 0.0.35
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jordan Sissel
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-17 00:00:00.000000000 Z
12
+ date: 2013-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cabin
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - '>'
19
+ - - ! '>'
19
20
  - !ruby/object:Gem::Version
20
21
  version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
21
25
  none: false
22
- requirement: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '>'
27
+ - - ! '>'
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
- none: false
28
- prerelease: false
29
- type: :runtime
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: http_parser.rb
32
- version_requirements: !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
33
34
  requirements:
34
35
  - - '='
35
36
  - !ruby/object:Gem::Version
36
37
  version: 0.5.3
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
37
41
  none: false
38
- requirement: !ruby/object:Gem::Requirement
39
42
  requirements:
40
43
  - - '='
41
44
  - !ruby/object:Gem::Version
42
45
  version: 0.5.3
43
- none: false
44
- prerelease: false
45
- type: :runtime
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: addressable
48
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
49
50
  requirements:
50
- - - '>='
51
+ - - ! '>='
51
52
  - !ruby/object:Gem::Version
52
53
  version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
53
57
  none: false
54
- requirement: !ruby/object:Gem::Requirement
55
58
  requirements:
56
- - - '>='
59
+ - - ! '>='
57
60
  - !ruby/object:Gem::Version
58
61
  version: '0'
59
- none: false
60
- prerelease: false
61
- type: :runtime
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: backports
64
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
65
66
  requirements:
66
- - - '>='
67
+ - - ! '>='
67
68
  - !ruby/object:Gem::Version
68
69
  version: 2.6.2
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
69
73
  none: false
70
- requirement: !ruby/object:Gem::Requirement
71
74
  requirements:
72
- - - '>='
75
+ - - ! '>='
73
76
  - !ruby/object:Gem::Version
74
77
  version: 2.6.2
75
- none: false
76
- prerelease: false
77
- type: :runtime
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: minitest
80
- version_requirements: !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
81
82
  requirements:
82
- - - '>'
83
+ - - ! '>'
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
85
89
  none: false
86
- requirement: !ruby/object:Gem::Requirement
87
90
  requirements:
88
- - - '>'
91
+ - - ! '>'
89
92
  - !ruby/object:Gem::Version
90
93
  version: '0'
91
- none: false
92
- prerelease: false
93
- type: :development
94
- description: For The Web. Trying to build a solid and sane API for client and server web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
94
+ description: For The Web. Trying to build a solid and sane API for client and server
95
+ web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
95
96
  email:
96
97
  - jls@semicomplete.com
97
98
  executables: []
98
99
  extensions: []
99
100
  extra_rdoc_files: []
100
101
  files:
101
- - lib/ftw.rb
102
- - lib/rack/handler/ftw.rb
103
- - lib/ftw/websocket.rb
104
- - lib/ftw/protocol.rb
105
- - lib/ftw/webserver.rb
106
- - lib/ftw/version.rb
107
- - lib/ftw/response.rb
102
+ - lib/ftw/dns.rb
108
103
  - lib/ftw/pool.rb
109
- - lib/ftw/cookies.rb
110
- - lib/ftw/agent.rb
111
104
  - lib/ftw/namespace.rb
112
- - lib/ftw/dns.rb
105
+ - lib/ftw/websocket/parser.rb
106
+ - lib/ftw/websocket/writer.rb
107
+ - lib/ftw/websocket/rack.rb
108
+ - lib/ftw/websocket/constants.rb
109
+ - lib/ftw/connection.rb
113
110
  - lib/ftw/cacert.pem
114
- - lib/ftw/crlf.rb
111
+ - lib/ftw/response.rb
115
112
  - lib/ftw/poolable.rb
116
- - lib/ftw/request.rb
117
- - lib/ftw/connection.rb
118
- - lib/ftw/server.rb
113
+ - lib/ftw/websocket.rb
119
114
  - lib/ftw/singleton.rb
120
- - lib/ftw/websocket/constants.rb
121
- - lib/ftw/websocket/writer.rb
122
- - lib/ftw/websocket/parser.rb
123
- - lib/ftw/websocket/rack.rb
115
+ - lib/ftw/server.rb
116
+ - lib/ftw/version.rb
117
+ - lib/ftw/cookies.rb
118
+ - lib/ftw/request.rb
124
119
  - lib/ftw/agent/configuration.rb
125
- - lib/ftw/dns/hash.rb
126
- - lib/ftw/dns/dns.rb
120
+ - lib/ftw/webserver.rb
121
+ - lib/ftw/agent.rb
122
+ - lib/ftw/protocol.rb
123
+ - lib/ftw/crlf.rb
127
124
  - lib/ftw/http/headers.rb
128
125
  - lib/ftw/http/message.rb
129
- - test/docs.rb
130
- - test/all.rb
131
- - test/testing.rb
132
- - test/ftw/crlf.rb
126
+ - lib/ftw/dns/dns.rb
127
+ - lib/ftw/dns/hash.rb
128
+ - lib/rack/handler/ftw.rb
129
+ - lib/ftw.rb
133
130
  - test/ftw/singleton.rb
134
- - test/ftw/http/headers.rb
131
+ - test/ftw/crlf.rb
135
132
  - test/ftw/http/dns.rb
133
+ - test/ftw/http/headers.rb
134
+ - test/docs.rb
135
+ - test/testing.rb
136
+ - test/all.rb
136
137
  - README.md
137
138
  homepage: http://github.com/jordansissel/ruby-ftw
138
139
  licenses:
139
140
  - Apache License (2.0)
140
- post_install_message:
141
+ post_install_message:
141
142
  rdoc_options: []
142
143
  require_paths:
143
144
  - lib
144
145
  - lib
145
146
  required_ruby_version: !ruby/object:Gem::Requirement
147
+ none: false
146
148
  requirements:
147
- - - '>='
149
+ - - ! '>='
148
150
  - !ruby/object:Gem::Version
149
151
  version: '0'
150
- none: false
151
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
+ none: false
152
154
  requirements:
153
- - - '>='
155
+ - - ! '>='
154
156
  - !ruby/object:Gem::Version
155
157
  version: '0'
156
- none: false
157
158
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 1.8.24
160
- signing_key:
159
+ rubyforge_project:
160
+ rubygems_version: 1.8.25
161
+ signing_key:
161
162
  specification_version: 3
162
- summary: For The Web. Trying to build a solid and sane API for client and server web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
163
+ summary: For The Web. Trying to build a solid and sane API for client and server web
164
+ stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
163
165
  test_files: []
164
- has_rdoc: