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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79ff573dedf8b70b0d2e87e4ffc295fbfbf242b5
4
- data.tar.gz: 5bc7b84df19c357ca90677946941bfc0a5d442f3
3
+ metadata.gz: 123c2a780a9a4311ea7b66f9a804c786fbb7445b
4
+ data.tar.gz: 73b1ea18bbc3ecd854a5769fb64df10647f08699
5
5
  SHA512:
6
- metadata.gz: cacfe277cfa0c1086c81cc6c02ecbf169b038850ae5f9e9d96fc346c9d05145e5b0cf73277ba60bd411e2197881ef34350dad35500e914ae42f5d50db7018d31
7
- data.tar.gz: 80f8620f10c35eedb0d1ae595ccf435366315c0f96a77611ea505dc1db99050fe51ce6f9ffadef8797f319338f59652b2c4e04366684c36f91887d084541fae4
6
+ metadata.gz: e20d9eded9df09f72d11cc1266537ca091ae64ae42559f335bf1acf10bc67f6b5aff9831f43b83e8ac78580755d178b72a2229a027fe154e8a168d1b26b24492
7
+ data.tar.gz: '068cc633af949e870860d5744d09fdd30dc64a5605c9f4d2bea2c4376dc20fcf25fcf38ce4ee31315a3d58ebd5554029c06a82a6820259aea042d7000a93be46'
data/.travis.yml CHANGED
@@ -1,9 +1,23 @@
1
+ ---
1
2
  before_install:
2
- - sudo apt-get update -qq
3
- - sudo apt-get install -qq libtidy-dev
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
- - jruby-18mode
9
- - jruby-19mode
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
@@ -1,6 +1,6 @@
1
1
  source :rubygems
2
2
  gemspec
3
3
 
4
- gem 'rspec', '~> 2.0'
4
+ gem 'rspec'
5
5
  gem 'rake'
6
- gem 'rr'
6
+ gem 'mocha'
@@ -4,9 +4,10 @@
4
4
  class TidyFFI::LibTidy #:nodoc:
5
5
  extend FFI::Library
6
6
 
7
- paths = Array(TidyFFI.library_path || Dir['/{opt,usr}/{,local/}lib{,64}/libtidy{,-*}.{dylib,so*}'])
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(*paths)
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
@@ -1,3 +1,3 @@
1
1
  module TidyFFI
2
- VERSION = "0.1.6"
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -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
- stub(I).default_options { {:gobbledygook => {:type => :boolean}} }
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
- stub(I).default_options { {:gobbledygook => {:type => :integer}} }
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
- stub(I).default_options { {:gobbledygook => {:type => :string}} }
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
- stub(I).default_options { {:gobbledygook => {:type => :string}} }
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
- stub(I).default_options { {:gobbledygook => {:type => :enum, :values => ["one", "two"]}} }
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
- stub(I).default_options { {:gobbledygook => {:type => :enum, :values => ["one", "two"]}} }
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
@@ -2,5 +2,5 @@ require 'tidy_ffi'
2
2
  require 'rspec'
3
3
 
4
4
  RSpec.configure do |config|
5
- config.mock_with :rr
5
+ config.mock_with :mocha
6
6
  end
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.1.6
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: 2015-03-23 00:00:00.000000000 Z
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.4.5
73
+ rubygems_version: 2.6.13
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Tidy library interface via FFI