tidy_ffi 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.1.2. Initialize buffer before use
1
2
  v0.1.1. Fixes for new version of FFI gem
2
3
  v0.1.0. Clean class method.
3
4
  v0.0.4. Options validation
@@ -68,6 +68,7 @@ class TidyFFI::Interface
68
68
  # Yields block with new buffer
69
69
  def with_buffer_pointer
70
70
  buf = tidy_buf_object.new
71
+ LibTidy.tidyBufInit(buf)
71
72
  yield buf
72
73
  ensure
73
74
  LibTidy.tidyBufFree(buf)
@@ -19,6 +19,7 @@ class TidyFFI::LibTidy #:nodoc:
19
19
 
20
20
  attach_function :tidySetErrorBuffer, [:pointer, :pointer], :int
21
21
 
22
+ attach_function :tidyBufInit, [:pointer], :void
22
23
  attach_function :tidyBufFree, [:pointer], :void
23
24
 
24
25
  attach_function :tidyGetOptionByName, [:pointer, :string], :pointer
data/test/test_simple.rb CHANGED
@@ -21,13 +21,17 @@ class TestSimple < Test::Unit::TestCase
21
21
  T.clean("test").should =~ %r{<body>\s+test\s+</body>}
22
22
  T.clean("test").should =~ %r{<meta name="generator" content=.+?Tidy.+?>}m
23
23
  end
24
+
25
+ it "doesn't die if called twice (bug #27200)" do
26
+ 2.times { T.with_options(:show_warnings => false).new("test").clean }
27
+ end
24
28
  end
25
29
 
26
30
  context "should have method for errors" do
27
31
  it "have method for errors" do
28
32
  t = T.new("test")
29
33
  t.clean
30
- t.errors.should == "line 1 column 1 - Warning: missing <!DOCTYPE> declaration\nline 1 column 1 - Warning: plain text isn't allowed in <head> elements\nline 1 column 1 - Warning: inserting missing 'title' element\n"
34
+ t.errors.should =~ /Warning/
31
35
  end
32
36
  end
33
37
 
data/tidy_ffi.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tidy_ffi}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Eugene Pimenov"]
9
- s.date = %q{2009-06-07}
9
+ s.date = %q{2009-12-15}
10
10
  s.description = %q{Tidy library interface via FFI}
11
11
  s.email = %q{libc@libc.st}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "lib/tidy_ffi/interface.rb", "lib/tidy_ffi/lib_tidy.rb", "lib/tidy_ffi/options_container.rb", "lib/tidy_ffi/tidy.rb", "lib/tidy_ffi/tidy_ffi_extensions.rb", "lib/tidy_ffi.rb"]
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tidy_ffi", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{tidy-ffi}
18
- s.rubygems_version = %q{1.3.3}
18
+ s.rubygems_version = %q{1.3.5}
19
19
  s.summary = %q{Tidy library interface via FFI}
20
20
  s.test_files = ["test/test_helper.rb", "test/test_lowlevel.rb", "test/test_options.rb", "test/test_simple.rb"]
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidy_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Pimenov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-07 00:00:00 +04:00
12
+ date: 2009-12-15 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements: []
85
85
 
86
86
  rubyforge_project: tidy-ffi
87
- rubygems_version: 1.3.3
87
+ rubygems_version: 1.3.5
88
88
  signing_key:
89
89
  specification_version: 3
90
90
  summary: Tidy library interface via FFI