Skip to content

Commit

Permalink
Sinatra DevContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
wallymathieu committed May 14, 2024
1 parent fc04516 commit 44ef460
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 22 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/sinatra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0']
ruby-version: ['3.0', '3.1']

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
Expand Down
22 changes: 22 additions & 0 deletions sinatra/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "Ruby",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/ruby:3.1-bullseye"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "ruby --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
4 changes: 3 additions & 1 deletion sinatra/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ source "https://rubygems.org"
gem "rake"
gem "sinatra"
gem "minitest"
gem "rack"
gem "rack-test", require: "rack/test"
gem "rack-parser", require: "rack/parser"
gem "nori"
gem "nokogiri"
gem "nokogiri"
gem "rackup", "~> 2.1"
45 changes: 29 additions & 16 deletions sinatra/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
GEM
remote: https://rubygems.org/
specs:
mini_portile2 (2.8.5)
minitest (5.14.4)
mustermann (2.0.2)
base64 (0.2.0)
bigdecimal (3.1.8)
mini_portile2 (2.8.6)
minitest (5.22.3)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nokogiri (1.15.6)
nokogiri (1.16.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nori (2.6.0)
nori (2.7.0)
bigdecimal
racc (1.7.3)
rack (2.2.8.1)
rack (3.0.11)
rack-parser (0.7.0)
rack
rack-protection (2.2.3)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rake (13.0.6)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rake (13.2.1)
ruby2_keywords (0.0.5)
sinatra (2.2.3)
mustermann (~> 2.0)
rack (~> 2.2)
rack-protection (= 2.2.3)
sinatra (4.0.0)
mustermann (~> 3.0)
rack (>= 3.0.0, < 4)
rack-protection (= 4.0.0)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
tilt (2.0.11)
tilt (2.3.0)
webrick (1.8.1)

PLATFORMS
ruby
Expand All @@ -33,8 +44,10 @@ DEPENDENCIES
minitest
nokogiri
nori
rack
rack-parser
rack-test
rackup (~> 2.1)
rake
sinatra

Expand Down

0 comments on commit 44ef460

Please sign in to comment.