refactor devcontainer for simpler ruby install
This commit is contained in:
23
.devcontainer/Dockerfile
Normal file
23
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM mcr.microsoft.com/devcontainers/base:debian-12
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -qqy \
|
||||||
|
build-essential \
|
||||||
|
autoconf \
|
||||||
|
libssl-dev \
|
||||||
|
libyaml-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
rustc \
|
||||||
|
watchman \
|
||||||
|
libsqlite3-dev \
|
||||||
|
pkg-config
|
||||||
|
USER vscode
|
||||||
|
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
||||||
|
ENV PATH="/home/vscode/.rbenv/bin:/home/vscode/.rbenv/shims:$PATH"
|
||||||
|
RUN echo 'eval "$(rbenv init - --no-rehash bash)"' >> ~/.bashrc
|
||||||
|
RUN git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||||
|
RUN rbenv install 3.4.4 && \
|
||||||
|
rbenv global 3.4.4
|
||||||
|
|
||||||
|
# convenience aliases
|
||||||
|
RUN echo 'alias rspec="bundle exec rspec"' >> ~/.bashrc
|
||||||
@@ -3,7 +3,9 @@
|
|||||||
{
|
{
|
||||||
"name": "Ruby",
|
"name": "Ruby",
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.4-bullseye",
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile"
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers-extra/features/npm-package:1": {
|
"ghcr.io/devcontainers-extra/features/npm-package:1": {
|
||||||
"package": "backlog.md"
|
"package": "backlog.md"
|
||||||
@@ -25,7 +27,6 @@
|
|||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "sudo apt update && sudo apt install --no-install-recommends --no-install-suggests -qy watchman",
|
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
// "customizations": {},
|
// "customizations": {},
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@
|
|||||||
/pkg/
|
/pkg/
|
||||||
/spec/reports/
|
/spec/reports/
|
||||||
/tmp/
|
/tmp/
|
||||||
|
/vendor/
|
||||||
|
|
||||||
# rspec failure tracking
|
# rspec failure tracking
|
||||||
.rspec_status
|
.rspec_status
|
||||||
|
|||||||
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
@@ -6,17 +6,14 @@
|
|||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "rdbg",
|
"type": "rdbg",
|
||||||
"name": "Debug current file with rdbg",
|
"name": "rdbg - demo_functionality.rb",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"script": "${file}",
|
"script": "demo_functionality.rb",
|
||||||
"askParameters": true,
|
|
||||||
"rdbgPath": "~/.rbenv/shims/rdbg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "rdbg",
|
"type": "rdbg",
|
||||||
"name": "Attach with rdbg",
|
"name": "rdbg - attach to rspec",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"rdbgPath": "~/.rbenv/shims/rdbg"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
@@ -2,11 +2,13 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"workbench.editor.titleScrollbarSizing": "large",
|
"workbench.editor.titleScrollbarSizing": "large",
|
||||||
"rubyLsp.formatter": "syntax_tree",
|
"rubyLsp.formatter": "syntax_tree",
|
||||||
|
"rubyLsp.addonSettings": {
|
||||||
|
"Ruby LSP RSpec": {
|
||||||
|
"debug": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"[ruby]": {
|
"[ruby]": {
|
||||||
"editor.defaultFormatter": "Shopify.ruby-lsp"
|
"editor.defaultFormatter": "Shopify.ruby-lsp"
|
||||||
},
|
},
|
||||||
"rubyLsp.rubyVersionManager": {
|
|
||||||
"rbenvExecutablePath": "/usr/local/share/rbenv/bin/rbenv",
|
|
||||||
},
|
|
||||||
"rdbg.useBundler": false,
|
"rdbg.useBundler": false,
|
||||||
}
|
}
|
||||||
1
Gemfile
1
Gemfile
@@ -12,6 +12,7 @@ group :development do
|
|||||||
gem "bundler-audit"
|
gem "bundler-audit"
|
||||||
gem "lefthook"
|
gem "lefthook"
|
||||||
gem "tapioca", "~> 0.17"
|
gem "tapioca", "~> 0.17"
|
||||||
|
gem "ruby-lsp-rspec", require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ GEM
|
|||||||
pp (>= 0.6.0)
|
pp (>= 0.6.0)
|
||||||
rdoc (>= 4.0.0)
|
rdoc (>= 4.0.0)
|
||||||
reline (>= 0.4.2)
|
reline (>= 0.4.2)
|
||||||
|
language_server-protocol (3.17.0.5)
|
||||||
lefthook (1.12.2)
|
lefthook (1.12.2)
|
||||||
logger (1.7.0)
|
logger (1.7.0)
|
||||||
method_source (1.1.0)
|
method_source (1.1.0)
|
||||||
@@ -96,6 +97,12 @@ GEM
|
|||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-support (3.13.4)
|
rspec-support (3.13.4)
|
||||||
|
ruby-lsp (0.25.0)
|
||||||
|
language_server-protocol (~> 3.17.0)
|
||||||
|
prism (>= 1.2, < 2.0)
|
||||||
|
rbs (>= 3, < 5)
|
||||||
|
ruby-lsp-rspec (0.1.26)
|
||||||
|
ruby-lsp (~> 0.25.0)
|
||||||
securerandom (0.4.1)
|
securerandom (0.4.1)
|
||||||
sorbet (0.5.12222)
|
sorbet (0.5.12222)
|
||||||
sorbet-static (= 0.5.12222)
|
sorbet-static (= 0.5.12222)
|
||||||
@@ -148,6 +155,7 @@ DEPENDENCIES
|
|||||||
pry
|
pry
|
||||||
rake (~> 13.0)
|
rake (~> 13.0)
|
||||||
rspec (~> 3.0)
|
rspec (~> 3.0)
|
||||||
|
ruby-lsp-rspec
|
||||||
sorbet-runtime
|
sorbet-runtime
|
||||||
sorbet-static-and-runtime
|
sorbet-static-and-runtime
|
||||||
sqlite3 (~> 1.4)
|
sqlite3 (~> 1.4)
|
||||||
|
|||||||
9
sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi
generated
Normal file
9
sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `language_server-protocol` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem language_server-protocol`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
15
sorbet/rbi/gems/ruby-lsp-rspec@0.1.26.rbi
generated
Normal file
15
sorbet/rbi/gems/ruby-lsp-rspec@0.1.26.rbi
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `ruby-lsp-rspec` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem ruby-lsp-rspec`.
|
||||||
|
|
||||||
|
|
||||||
|
# source://ruby-lsp-rspec//lib/ruby_lsp_rspec/version.rb#4
|
||||||
|
module RubyLsp; end
|
||||||
|
|
||||||
|
# source://ruby-lsp-rspec//lib/ruby_lsp_rspec/version.rb#5
|
||||||
|
module RubyLsp::RSpec; end
|
||||||
|
|
||||||
|
# source://ruby-lsp-rspec//lib/ruby_lsp_rspec/version.rb#6
|
||||||
|
RubyLsp::RSpec::VERSION = T.let(T.unsafe(nil), String)
|
||||||
9
sorbet/rbi/gems/ruby-lsp@0.25.0.rbi
generated
Normal file
9
sorbet/rbi/gems/ruby-lsp@0.25.0.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `ruby-lsp` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem ruby-lsp`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
Reference in New Issue
Block a user