Method: Rugged.features

Defined in:
ext/rugged/rugged.c

.featuresArray

Returns an array representing the features that libgit2 was compiled with — this includes ‘:threads` (thread support), `:https` and `:ssh`.

Rugged.features #=> [:threads, :https]

Returns:

  • (Array)
[View source]

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'ext/rugged/rugged.c', line 102

static VALUE rb_git_features(VALUE self)
{
	VALUE ret_arr = rb_ary_new();

	int caps = git_libgit2_features();

	if (caps & GIT_FEATURE_THREADS)
		rb_ary_push(ret_arr, CSTR2SYM("threads"));

	if (caps & GIT_FEATURE_HTTPS)
		rb_ary_push(ret_arr, CSTR2SYM("https"));

	if (caps & GIT_FEATURE_SSH)
		rb_ary_push(ret_arr, CSTR2SYM("ssh"));

	return ret_arr;
}