Top Level Namespace
Defined Under Namespace
Modules: ActiveSupport, Couchbase, Rails
Constant Summary
collapse
- SDK_VERSION =
Couchbase::VERSION[:sdk]
Instance Method Summary
collapse
Instance Method Details
#check_version(name, extra_locations = []) ⇒ Object
45
46
47
48
49
50
51
52
53
|
# File 'ext/extconf.rb', line 45
def check_version(name, = [])
executable = which(name, )
puts "-- check #{name} (#{executable})"
version = nil
IO.popen([executable, "--version"]) do |io|
version = io.read.split("\n").first
end
[executable, version]
end
|
#sys(*cmd) ⇒ Object
74
75
76
77
78
|
# File 'ext/extconf.rb', line 74
def sys(*cmd)
puts "-- #{Dir.pwd}"
puts "-- #{cmd.join(' ')}"
system(*cmd) || abort("failed to execute command: #{$?.inspect}\n#{cmd.join(' ')}")
end
|
#which(name, extra_locations = []) ⇒ Object
36
37
38
39
40
41
42
43
|
# File 'ext/extconf.rb', line 36
def which(name, = [])
ENV.fetch("PATH", "")
.split(File::PATH_SEPARATOR)
.prepend(*)
.select { |path| File.directory?(path) }
.map { |path| [path, name].join(File::SEPARATOR) + RbConfig::CONFIG["EXEEXT"] }
.find { |file| File.executable?(file) }
end
|