File tree 7 files changed +2
-37
lines changed
7 files changed +2
-37
lines changed Original file line number Diff line number Diff line change 1
1
require "rspec/core/rake_task"
2
2
RSpec ::Core ::RakeTask . new ( :spec )
3
3
4
- desc "Build H3 C library"
5
- task :build do
6
- unless Dir . exist? ( "ext/h3/src/build" )
7
- `git submodule update --init --recursive`
8
- print "Building h3..."
9
- `cd ext/h3; make > /dev/null 2>&1`
10
- puts " done."
11
- end
12
- end
13
-
14
- desc "Remove compiled H3 library"
15
- task :clean do
16
- FileUtils . remove_dir ( "ext/h3/src/build" ) if Dir . exist? ( "ext/h3/src/build" )
17
- end
18
-
19
- task spec : :build
20
-
21
- desc "Recompile the H3 C library"
22
- task rebuild : %i[ clean build ]
23
-
24
4
task default : :spec
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,5 +23,4 @@ Gem::Specification.new do |spec|
23
23
spec . add_development_dependency "yard" , "~> 0.9"
24
24
spec . add_development_dependency "pry" , "~> 0.14"
25
25
26
- spec . extensions << "ext/h3/extconf.rb"
27
26
end
Original file line number Diff line number Diff line change @@ -5,12 +5,11 @@ module Bindings
5
5
# When extended, this module sets up FFI to use the H3 C library.
6
6
module Base
7
7
def self . extended ( base )
8
- lib_path = File . expand_path ( __dir__ + "/../../../ext/h3/src/build/lib" )
9
8
base . extend FFI ::Library
10
9
base . extend Gem ::Deprecate
11
10
base . include Structs
12
11
base . include Types
13
- base . ffi_lib [ "#{ lib_path } / libh3.dylib" , "#{ lib_path } / libh3.so" ]
12
+ base . ffi_lib [ "libh3.dylib" , "libh3.so" ]
14
13
base . typedef :ulong_long , :h3_index
15
14
base . typedef :int , :k_distance
16
15
base . typedef :uint , :h3_error_code
Original file line number Diff line number Diff line change 3
3
# require "coveralls"
4
4
# Coveralls.wear!
5
5
6
- begin
7
- require "h3"
8
- rescue LoadError
9
- raise "Could not load h3. Run `rake rebuild` to recompile."
10
- end
6
+ require "h3"
11
7
12
8
# This file was generated by the `rspec --init` command. Conventionally, all
13
9
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
You can’t perform that action at this time.
0 commit comments