Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 13a2793

Browse files
committed
it works with single file ruby script
0 parents  commit 13a2793

File tree

20 files changed

+3368
-0
lines changed

20 files changed

+3368
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
node_modules/
3+
out/
4+
npm-debug.log

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- "5.5"
4+
- "4.2.1"
5+
- "0.12.9"
6+
sudo: false

.vscode/launch.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Launch Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceRoot}"
11+
],
12+
"sourceMaps": true,
13+
"outDir": "${workspaceRoot}/out"
14+
},
15+
{
16+
"name": "ruby debug server",
17+
"type": "node",
18+
"request": "launch",
19+
"runtimeArgs": [ "--nolazy" ],
20+
"program": "${workspaceRoot}/src/main.ts",
21+
"stopOnEntry": false,
22+
"args": [ "--server=4711" ],
23+
"sourceMaps": true,
24+
"outDir": "${workspaceRoot}/out",
25+
"cwd": "${workspaceRoot}"
26+
},
27+
{
28+
"name": "ruby test",
29+
"type": "mock",
30+
"request": "launch",
31+
"program": "${workspaceRoot}/test.rb",
32+
"stopOnEntry": true
33+
},
34+
{
35+
"name": "Run Tests",
36+
"type": "node",
37+
"request": "launch",
38+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
39+
"runtimeArgs": [ "--nolazy" ],
40+
"args": [
41+
"-u", "tdd",
42+
"--timeout", "999999",
43+
"--colors",
44+
"./out/tests/"
45+
],
46+
"sourceMaps": true,
47+
"outDir": "${workspaceRoot}/out",
48+
"cwd": "${workspaceRoot}"
49+
}
50+
]
51+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Place your settings in this file to overwrite default and user settings.FALSE
2+
{
3+
"javascript.validate.enable": false,
4+
"files.trimTrailingWhitespace": true,
5+
"eslint.enable": false,
6+
"editor.insertSpaces": false
7+
}

.vscode/tasks.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "npm",
4+
"isShellCommand": true,
5+
"isWatching": true,
6+
"showOutput": "always",
7+
"args": [
8+
"run", "watch"
9+
],
10+
"problemMatcher": "$tsc-watch"
11+
}

.vscodeignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.vscode/**/*
2+
.gitignore
3+
src/**/*
4+
out/tests/**/*
5+
node_modules/**/*
6+
**/*.js.map

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Peng Lv
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

images/debug-ruby-script.gif

454 KB
Loading

images/ruby.png

88.8 KB
Loading

package.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "Ruby",
3+
"displayName": "Ruby",
4+
"version": "0.1.0",
5+
"publisher": "rebornix",
6+
"description": "Provides Ruby language and debugging support for Visual Studio Code",
7+
"author": {
8+
"name": "Peng Lv"
9+
},
10+
"engines": {
11+
"vscode": "^0.10.1"
12+
},
13+
"license": "MIT",
14+
"icon": "images/ruby.png",
15+
"categories": [
16+
"Debuggers"
17+
],
18+
"private": false,
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/rebornix/vscode-ruby.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/rebornix/vscode-ruby/issues"
25+
},
26+
"dependencies": {
27+
"vscode-debugprotocol": "~1.6.0-pre4",
28+
"vscode-debugadapter": "~1.6.0-pre8",
29+
"xmldom": "^0.1.19"
30+
},
31+
"devDependencies": {
32+
"typescript": "^1.6.2"
33+
},
34+
"scripts": {
35+
"prepublish": "tsc -p ./src",
36+
"compile": "tsc -p ./src",
37+
"watch": "tsc -w -p ./src"
38+
},
39+
"contributes": {
40+
"debuggers": [
41+
{
42+
"type": "Ruby",
43+
"label": "Ruby Debugger",
44+
45+
"enableBreakpointsFor": { "languageIds": [ "ruby" ] },
46+
47+
"program": "./out/main.js",
48+
"runtime": "node",
49+
50+
"configurationAttributes": {
51+
"launch": {
52+
"required": [ "program" ],
53+
"properties": {
54+
"program": {
55+
"type": "string",
56+
"description": "Workspace relative path to a text file.",
57+
"default": "test.rb"
58+
},
59+
"stopOnEntry": {
60+
"type": "boolean",
61+
"description": "Automatically stop after launch.",
62+
"default": true
63+
}
64+
}
65+
}
66+
},
67+
68+
"initialConfigurations": [
69+
{
70+
"name": "Ruby Debugger",
71+
"type": "Ruby",
72+
"request": "launch",
73+
"program": "main.rb",
74+
"stopOnEntry": true
75+
}
76+
]
77+
}
78+
]
79+
}
80+
}

0 commit comments

Comments
 (0)