uv-rays 0.3.0 → 1.0.0

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: 558fed8aba820a41ca678d1eff92f5ffcfe7ffda
4
- data.tar.gz: 973e700f3dc30174988ed0e43305bedfd1045adc
3
+ metadata.gz: bd457c8b149750fd3140f434315ab4afae8c236c
4
+ data.tar.gz: 01a7be34bc192504d27801c7e52beeb428b4ed57
5
5
  SHA512:
6
- metadata.gz: 4b165b0a04fde386e7ec551f1047bf21dd2086c311281f1c243ad39f825cdcd3a99d48ae6ea0ad04b6c4a498ce687c480679ed792a2d7d16f90f1fc062fa9727
7
- data.tar.gz: 2bd96402a8f3be5ce823a7f8c893c2fea25060125ba21aafd677fd0aeb55f895ae28c2ec82a7efc1a126eed67ccc55052578981c488897c08351dd867cee825d
6
+ metadata.gz: 3c66c0c34a8870225204bedcbf1cf8f06cb9ff8a8caffcc8155ce6a6fe11db287057e74a199cdba5523a54d9ea5cec649a067d20b4dccfa0f33d37791a0660bc
7
+ data.tar.gz: c29c16d4a43773714bebd2b9239954bff11463d99c2a2fd1326d52a3f6472ded829a84bdde1f3a8792ce75261663f38b498a06d58c0750eb9cb93bc0f70ad118
@@ -23,6 +23,7 @@ module UV
23
23
  @delimiter = options[:delimiter]
24
24
  @indicator = options[:indicator]
25
25
  @size_limit = options[:size_limit]
26
+ @min_length = options[:min_length] || 1
26
27
  @verbose = options[:verbose] if @size_limit
27
28
 
28
29
  raise ArgumentError, 'no delimiter provided' unless @delimiter
@@ -76,6 +77,9 @@ module UV
76
77
  raise 'input buffer exceeded limit' if @verbose
77
78
  end
78
79
 
80
+ # Check min-length is met
81
+ entities.select! {|msg| msg.length > @min_length}
82
+
79
83
  return entities
80
84
  end
81
85
 
@@ -1,3 +1,3 @@
1
1
  module UV
2
- VERSION = '0.3.0'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -9,6 +9,12 @@ describe UV::BufferedTokenizer do
9
9
  })
10
10
  end
11
11
 
12
+ it "should not return empty messages" do
13
+ msg1 = "\n\rtest\n\r\n\rwhoa\n\r\n\r"
14
+
15
+ result = @buffer.extract(msg1)
16
+ expect(result).to eq(['test', 'whoa'])
17
+ end
12
18
 
13
19
  it "should not return anything when a complete message is not available" do
14
20
  msg1 = "test"
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uv-rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libuv
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.11.20
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.11.20
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bisect
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tzinfo
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cookiejar
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ipaddress
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: addressable
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: http-parser
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 1.0.4
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.0.4
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '2.14'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '2.14'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '10.1'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '10.1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: yard
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  description: Opinionated abstractions for Libuv
@@ -158,6 +158,10 @@ extensions: []
158
158
  extra_rdoc_files:
159
159
  - README.md
160
160
  files:
161
+ - LICENSE
162
+ - README.md
163
+ - Rakefile
164
+ - lib/uv-rays.rb
161
165
  - lib/uv-rays/abstract_tokenizer.rb
162
166
  - lib/uv-rays/buffered_tokenizer.rb
163
167
  - lib/uv-rays/connection.rb
@@ -165,16 +169,11 @@ files:
165
169
  - lib/uv-rays/http/request.rb
166
170
  - lib/uv-rays/http/response.rb
167
171
  - lib/uv-rays/http_endpoint.rb
172
+ - lib/uv-rays/scheduler.rb
168
173
  - lib/uv-rays/scheduler/cron.rb
169
174
  - lib/uv-rays/scheduler/time.rb
170
- - lib/uv-rays/scheduler.rb
171
175
  - lib/uv-rays/tcp_server.rb
172
176
  - lib/uv-rays/version.rb
173
- - lib/uv-rays.rb
174
- - Rakefile
175
- - uv-rays.gemspec
176
- - README.md
177
- - LICENSE
178
177
  - spec/abstract_tokenizer_spec.rb
179
178
  - spec/buffered_tokenizer_spec.rb
180
179
  - spec/connection_spec.rb
@@ -182,6 +181,7 @@ files:
182
181
  - spec/scheduler_cron_spec.rb
183
182
  - spec/scheduler_spec.rb
184
183
  - spec/scheduler_time_spec.rb
184
+ - uv-rays.gemspec
185
185
  homepage: https://github.com/cotag/uv-rays
186
186
  licenses:
187
187
  - MIT
@@ -192,17 +192,17 @@ require_paths:
192
192
  - lib
193
193
  required_ruby_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - '>='
195
+ - - ">="
196
196
  - !ruby/object:Gem::Version
197
197
  version: 1.9.2
198
198
  required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  requirements:
200
- - - '>='
200
+ - - ">="
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
204
  rubyforge_project:
205
- rubygems_version: 2.0.14
205
+ rubygems_version: 2.2.2
206
206
  signing_key:
207
207
  specification_version: 4
208
208
  summary: Abstractions for working with Libuv