escape_utils 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/escape_utils.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.require_paths = ["lib"]
13
13
  s.rubygems_version = %q{1.4.2}
14
14
  s.summary = %q{Faster string escaping routines for your web apps}
15
- s.test_files = `git ls-files spec`.split("\n")
15
+ s.test_files = `git ls-files test`.split("\n")
16
16
 
17
17
  # tests
18
18
  s.add_development_dependency 'rake-compiler', ">= 0.7.5"
@@ -242,7 +242,7 @@ void gh_buf_attach(gh_buf *buf, char *ptr, size_t asize)
242
242
 
243
243
  int gh_buf_cmp(const gh_buf *a, const gh_buf *b)
244
244
  {
245
- int result = memcmp(a->ptr, b->ptr, MIN(a->size, b->size));
245
+ int result = memcmp(a->ptr, b->ptr, (a->size < b->size) ? a->size : b->size);
246
246
  return (result != 0) ? result :
247
247
  (a->size < b->size) ? -1 : (a->size > b->size) ? 1 : 0;
248
248
  }
@@ -1,3 +1,3 @@
1
1
  module EscapeUtils
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escape_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -210,4 +210,17 @@ rubygems_version: 1.8.23
210
210
  signing_key:
211
211
  specification_version: 3
212
212
  summary: Faster string escaping routines for your web apps
213
- test_files: []
213
+ test_files:
214
+ - test/helper.rb
215
+ - test/html/escape_test.rb
216
+ - test/html/unescape_test.rb
217
+ - test/html_safety_test.rb
218
+ - test/javascript/escape_test.rb
219
+ - test/javascript/unescape_test.rb
220
+ - test/query/escape_test.rb
221
+ - test/query/unescape_test.rb
222
+ - test/uri/escape_test.rb
223
+ - test/uri/unescape_test.rb
224
+ - test/url/escape_test.rb
225
+ - test/url/unescape_test.rb
226
+ - test/xml/escape_test.rb