ext/ostn02c.rb in national_grid-0.1.1 vs ext/ostn02c.rb in national_grid-0.1.2

- old
+ new

@@ -10,18 +10,18 @@ def compile puts "Compiling libostn02" FileUtils.mkdir_p object_path Dir.chdir object_path do - system RbConfig.expand("$(CC) -I#{include_path} $(CPPFLAGS) $(CFLAGS) -c #{sources.join(" ")}") + run RbConfig.expand("$(CC) -I#{include_path} $(CPPFLAGS) $(CFLAGS) -c #{sources.join(" ")}") end end def package puts "Packaging libostn02" FileUtils.mkdir_p lib_path - system RbConfig.expand("$(AR) -crsv #{library} #{objects}") + run RbConfig.expand("$(AR) -crsv #{library} #{objects}") end def sources Dir.glob(File.join(include_path, "*.c")) end @@ -46,7 +46,12 @@ File.join(output_path, "obj") end def output_path File.expand_path("../tmp/ostn02c", __dir__) + end + + def run(command) + puts command + system command end end