Skip to content

Commit 14f6bb3

Browse files
authored
Merge pull request #658 from addam128/main
Ruby wrapper
2 parents 8817d8d + b2b5cce commit 14f6bb3

File tree

9 files changed

+435
-72
lines changed

9 files changed

+435
-72
lines changed

.github/workflows/ruby_tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Ruby wrapper building and tests run
2+
3+
on:
4+
push:
5+
branches: ['main', 'dev']
6+
7+
jobs:
8+
test_api:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout repo'
12+
uses: actions/checkout@v4
13+
- name: 'Set up Ruby 3.3'
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: '3.3'
17+
- name: 'Install CMake'
18+
run: |
19+
sudo apt-get update -y
20+
sudo apt-get install -y cmake
21+
- name: 'Build native gem'
22+
run: |
23+
gem build vmaware-rb.gemspec
24+
gem install vmaware-rb-1.0.0.gem
25+
- name: Install test deps
26+
run: |
27+
gem install minitest -v 6.0.0
28+
- name: Run ruby wrapper tests
29+
run: |
30+
ruby gem/test/unit/api.rb

.gitignore

Lines changed: 78 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,78 @@
1-
# Prerequisites
2-
*.d
3-
4-
# Compiled Object files
5-
*.slo
6-
*.lo
7-
*.o
8-
*.obj
9-
10-
# Precompiled Headers
11-
*.gch
12-
*.pch
13-
14-
# Compiled Dynamic libraries
15-
*.so
16-
*.dylib
17-
*.dll
18-
19-
# Fortran module files
20-
*.mod
21-
*.smod
22-
23-
# Compiled Static libraries
24-
*.lai
25-
*.la
26-
*.a
27-
*.li
28-
29-
# Executables
30-
*.out
31-
*.app
32-
main
33-
34-
#Custom
35-
vm
36-
cli
37-
vmaware
38-
tmp
39-
test
40-
tmp.cpp
41-
src/vmtest.cpp
42-
archive/
43-
.vscode/
44-
build/
45-
milestones.md
46-
bin/
47-
notes.md
48-
private/
49-
resources/
50-
releases/
51-
release_notes.txt
52-
*.bk
53-
cmake-build-*/
54-
.idea/*
55-
*.bkp
56-
*copy.hpp
57-
personal_todo.md
58-
notes.txt
59-
auxiliary/test_template.cpp
60-
release_notes.md
61-
src/gui/lib/*
62-
pafish/
63-
list.txt
64-
/.vs
65-
/.vs/CMake Overview
66-
/.vs/ProjectSettings.json
67-
/.vs/slnx.sqlite
68-
/.vs/VSWorkspaceState.json
69-
TODO.md
70-
auxiliary/path*
71-
packages/
72-
auxiliary/test.cpp
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.li
28+
29+
# Executables
30+
*.out
31+
*.app
32+
main
33+
34+
# Ruby artifacts
35+
*.gem
36+
37+
#Custom
38+
vm
39+
cli
40+
vmaware
41+
tmp
42+
test
43+
tmp.cpp
44+
src/vmtest.cpp
45+
archive/
46+
.vscode/
47+
build/
48+
milestones.md
49+
bin/
50+
notes.md
51+
private/
52+
resources/
53+
releases/
54+
release_notes.txt
55+
*.bk
56+
cmake-build-*/
57+
.idea/*
58+
*.bkp
59+
*copy.hpp
60+
personal_todo.md
61+
notes.txt
62+
auxiliary/test_template.cpp
63+
release_notes.md
64+
src/gui/lib/*
65+
pafish/
66+
list.txt
67+
/.vs
68+
/.vs/CMake Overview
69+
/.vs/ProjectSettings.json
70+
/.vs/slnx.sqlite
71+
/.vs/VSWorkspaceState.json
72+
TODO.md
73+
auxiliary/path*
74+
packages/
75+
auxiliary/test.cpp
76+
.devcontainer/
77+
78+
!gem/test/

gem/Readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# VMAware-rb
2+
3+
_A `ruby` wrapper for VMAware._
4+
5+
## Notes
6+
- The gem is not supported on windows.
7+
- Builds a native gem.
8+
- Only exports two functions: `vm?` (`VM::detect`) and `confidence`(`VM::percentage`) in their default invocation.
9+
10+
> If building under `gem install vmaware-rb` starts complaining about a missing `make install` step, update your rubygems (`gem update --system`).

0 commit comments

Comments
 (0)