Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ libtailscale.h
libtailscale.tar*
libtailscale_*.a
libtailscale_*.h
libtailscale.bundle

/tstestcontrol/libtstestcontrol.a
/tstestcontrol/libtstestcontrol.h
Expand Down
3 changes: 2 additions & 1 deletion ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ gemspec

gem "rake", "~> 13.0"
gem "rake-compiler", "~> 1.2.1"
gem "minitest", "~> 5.0"
gem "minitest", "~> 5.0"
gem "base64", "~>0.3"
10 changes: 7 additions & 3 deletions ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@ PATH
remote: .
specs:
tailscale (0.1.0)
base64 (~> 0.3)
ffi (~> 1.15.5)

GEM
remote: https://rubygems.org/
specs:
base64 (0.3.0)
ffi (1.15.5)
minitest (5.16.3)
rake (13.0.6)
rake-compiler (1.2.1)
minitest (5.27.0)
rake (13.3.1)
rake-compiler (1.2.9)
rake

PLATFORMS
arm64-darwin-25
x86_64-linux-gnu

DEPENDENCIES
base64 (~> 0.3)
minitest (~> 5.0)
rake (~> 13.0)
rake-compiler (~> 1.2.1)
Expand Down
15 changes: 8 additions & 7 deletions ruby/ext/libtailscale/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Copyright (c) Tailscale Inc & AUTHORS
# SPDX-License-Identifier: BSD-3-Clause
# frozen_string_literal: true
require 'rbconfig'
require "rbconfig"

open("Makefile", "w") do |f|
f.puts "libtailscale.#{RbConfig::CONFIG['DLEXT']}:"
f.puts "\tgo build -C #{File.expand_path(__dir__)} -buildmode=c-shared -o #{Dir.pwd}/$@ ."
f.puts("libtailscale.#{RbConfig::CONFIG["DLEXT"]}:")
f.puts("\tgo build -C #{File.expand_path(__dir__)} -buildmode=c-shared -o \"#{Dir.pwd}/$@\" .")

f.puts "install: libtailscale.#{RbConfig::CONFIG['DLEXT']}"
f.puts "\tmkdir -p #{RbConfig::CONFIG['sitelibdir']}"
f.puts "\tcp libtailscale.#{RbConfig::CONFIG['DLEXT']} #{RbConfig::CONFIG['sitelibdir']}/"
end
f.puts("install: libtailscale.#{RbConfig::CONFIG["DLEXT"]}")
f.puts("\tmkdir -p \"#{RbConfig::CONFIG["sitelibdir"]}\"")
f.puts("\tcp libtailscale.#{RbConfig::CONFIG["DLEXT"]} \"#{RbConfig::CONFIG["sitelibdir"]}/\"")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the style guide for this project, but I assume this is meant to keep this file in line with the guide/linter; escapes look correct to me, and probably better to standardize on "

end
Loading