codebug 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/codebug +25 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7be4c6204d456f53e61dcb6c30ac8325626defa552c4882209b5377b942f9800
|
4
|
+
data.tar.gz: c3dc171e97397dcbe8aaa155b6c720829b503e55fe29af4e8b9a6db76962373a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 81914c21ca88a24d1a5331fde52a547648229ccd2c1d538571aa5851a0c1f0aa313b536770609db4ebf1f8af2f1111a46c4c048dbf449aa241686913f1e547d7
|
7
|
+
data.tar.gz: 60597c6f734f5984ada7dad976d7776a38a81a37c4d3bcea1817fc925e1f16f574a6e051a7323a33e20e5ac685a6ee9016265f894926bd52c1e265f0936a213c
|
data/bin/codebug
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
begin
|
7
|
+
program = ARGV[0]
|
8
|
+
raise ArgumentError unless program
|
9
|
+
|
10
|
+
vscode_launch_file = JSON.load_file('.vscode/launch.json')
|
11
|
+
new_config = {
|
12
|
+
"name": "debug #{program}",
|
13
|
+
"type": 'Ruby',
|
14
|
+
"request": 'launch',
|
15
|
+
"program": "${workspaceRoot}/#{program}"
|
16
|
+
}
|
17
|
+
vscode_launch_file['configurations'].push(new_config)
|
18
|
+
File.open('.vscode/launch.json', 'w') do |f|
|
19
|
+
f.puts JSON.pretty_generate(vscode_launch_file)
|
20
|
+
end
|
21
|
+
rescue ArgumentError => _e
|
22
|
+
puts 'Error: Please pass arg (eg <my_file_name>.rb)'
|
23
|
+
rescue Errno::ENOENT => _e
|
24
|
+
puts 'ERROR: Please create a launch file (.vscode/launch.json)'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: codebug
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ian Heraty
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-13 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
executables:
|
16
|
+
- codebug
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/codebug
|
21
|
+
homepage: https://rubygems.org/gems/codebug
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata:
|
25
|
+
source_code_uri: https://github.com/BigGreenCompany/codebug
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubygems_version: 3.3.7
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: a util for creating a vscode launch config for a ruby file
|
45
|
+
test_files: []
|