tidy_ffi 0.1.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +19 -5
- data/CHANGELOG +1 -0
- data/Gemfile +2 -2
- data/lib/tidy_ffi/lib_tidy.rb +3 -2
- data/lib/tidy_ffi/version.rb +1 -1
- data/spec/lowlevel_spec.rb +7 -7
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 123c2a780a9a4311ea7b66f9a804c786fbb7445b
|
4
|
+
data.tar.gz: 73b1ea18bbc3ecd854a5769fb64df10647f08699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e20d9eded9df09f72d11cc1266537ca091ae64ae42559f335bf1acf10bc67f6b5aff9831f43b83e8ac78580755d178b72a2229a027fe154e8a168d1b26b24492
|
7
|
+
data.tar.gz: '068cc633af949e870860d5744d09fdd30dc64a5605c9f4d2bea2c4376dc20fcf25fcf38ce4ee31315a3d58ebd5554029c06a82a6820259aea042d7000a93be46'
|
data/.travis.yml
CHANGED
@@ -1,9 +1,23 @@
|
|
1
|
+
---
|
1
2
|
before_install:
|
2
|
-
|
3
|
-
|
3
|
+
- sudo apt-get update -qq
|
4
|
+
- sudo apt-get install -qq libtidy-dev
|
4
5
|
rvm:
|
5
6
|
- 1.8.7
|
6
|
-
- ree
|
7
7
|
- 1.9.3
|
8
|
-
-
|
9
|
-
-
|
8
|
+
- 2.1
|
9
|
+
- 2.2
|
10
|
+
- 2.3.1
|
11
|
+
- 2.4.5
|
12
|
+
- 2.5.3
|
13
|
+
- 2.6
|
14
|
+
- jruby-9.2.5.0
|
15
|
+
- ree
|
16
|
+
- ruby-head
|
17
|
+
- jruby-head
|
18
|
+
matrix:
|
19
|
+
allow_failures:
|
20
|
+
- rvm: ree
|
21
|
+
- rvm: ruby-head
|
22
|
+
- rvm: jruby-head
|
23
|
+
fast_finish: true
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
v1.0.0. Support Debian buster by delegating library lookup to FFI gem (thanks to Laurent Arnoud (@spk))
|
1
2
|
v0.1.6. Relax version constraint of the FFI gem dependency
|
2
3
|
v0.1.5. Fix JRuby issues.
|
3
4
|
v0.1.4. Fix the way libtidy is located on the filesystem. Works if libtidy is in /usr/lib64, instead of /usr/lib
|
data/Gemfile
CHANGED
data/lib/tidy_ffi/lib_tidy.rb
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
class TidyFFI::LibTidy #:nodoc:
|
5
5
|
extend FFI::Library
|
6
6
|
|
7
|
-
|
7
|
+
LIB_NAME = 'tidy'.freeze
|
8
|
+
PATHS = Array([LIB_NAME] + Dir['/{opt,usr}/{,local/}lib{,64}/libtidy{,-*}.{dylib,so*}']).freeze
|
8
9
|
begin
|
9
|
-
ffi_lib(
|
10
|
+
ffi_lib(TidyFFI.library_path || PATHS)
|
10
11
|
rescue LoadError
|
11
12
|
raise TidyFFI::LibTidyNotInstalled, "didn't find tidy libs on your system. Please install tidy (http://tidy.sourceforge.net/)"
|
12
13
|
end
|
data/lib/tidy_ffi/version.rb
CHANGED
data/spec/lowlevel_spec.rb
CHANGED
@@ -20,7 +20,7 @@ describe TidyFFI::Interface do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "accepts yes, no, 1, 0, true, false as boolean values" do
|
23
|
-
|
23
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :boolean}})
|
24
24
|
|
25
25
|
%w{yes no 1 0 true false on off YeS}.each do |val|
|
26
26
|
I.option_valid?(:gobbledygook, val).should == true
|
@@ -34,7 +34,7 @@ describe TidyFFI::Interface do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it "accepts a number as a valid integer value" do
|
37
|
-
|
37
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :integer}})
|
38
38
|
|
39
39
|
I.option_valid?(:gobbledygook, 1).should == true
|
40
40
|
I.option_valid?(:gobbledygook, 0).should == true
|
@@ -47,7 +47,7 @@ describe TidyFFI::Interface do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "accepts any string as a valid string value" do
|
50
|
-
|
50
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :string}})
|
51
51
|
|
52
52
|
I.option_valid?(:gobbledygook, 1).should == false
|
53
53
|
I.option_valid?(:gobbledygook, 0).should == false
|
@@ -60,13 +60,13 @@ describe TidyFFI::Interface do
|
|
60
60
|
end
|
61
61
|
|
62
62
|
it "accepts a symbols as a valid string value" do
|
63
|
-
|
63
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :string}})
|
64
64
|
|
65
65
|
I.option_valid?(:gobbledygook, :test).should == true
|
66
66
|
end
|
67
67
|
|
68
68
|
it "accepts number in range as a valid enum value" do
|
69
|
-
|
69
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :enum, :values => ["one", "two"]}})
|
70
70
|
|
71
71
|
I.option_valid?(:gobbledygook, 1).should == true
|
72
72
|
I.option_valid?(:gobbledygook, 0).should == true
|
@@ -74,11 +74,11 @@ describe TidyFFI::Interface do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
it "accepts string representation of enum value" do
|
77
|
-
|
77
|
+
I.stubs(:default_options).returns({:gobbledygook => {:type => :enum, :values => ["one", "two"]}})
|
78
78
|
|
79
79
|
I.option_valid?(:gobbledygook, "one").should == true
|
80
80
|
I.option_valid?(:gobbledygook, "two").should == true
|
81
81
|
I.option_valid?(:gobbledygook, "three").should == false
|
82
82
|
end
|
83
83
|
end
|
84
|
-
end
|
84
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidy_ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Pimenov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project: tidy-ffi
|
73
|
-
rubygems_version: 2.
|
73
|
+
rubygems_version: 2.6.13
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: Tidy library interface via FFI
|