diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..896970f3 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,7 @@ +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version +ARG RUBY_VERSION=3.4.7 +FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION + +# Ensure binding is always 0.0.0.0 +# Binds the server to all IP addresses of the container, so it can be accessed from outside the container. +ENV BINDING="0.0.0.0" diff --git a/.devcontainer/compose.yaml b/.devcontainer/compose.yaml new file mode 100644 index 00000000..a86c93f8 --- /dev/null +++ b/.devcontainer/compose.yaml @@ -0,0 +1,12 @@ +name: "ruby_ui" + +services: + app: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + + volumes: + - ../../ruby_ui:/workspaces/ruby_ui:cached + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0d58ecce..6a5fe068 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,33 +1,29 @@ -// 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 +// For format details, see https://containers.dev/implementors/json_reference/. +// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/ruby { - "name": "RubyUI", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "ghcr.io/rails/devcontainer/images/ruby:3.3.3", + "name": "ruby_ui", + "dockerComposeFile": "compose.yaml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Features to add to the dev container. More info: https://containers.dev/features. - // Make sure RUBY_VERSION matches the Ruby version in .ruby-version "features": { - "ghcr.io/devcontainers/features/github-cli:1": {} + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false + } }, "customizations": { "vscode": { "extensions": [ "testdouble.vscode-standard-ruby", "Shopify.ruby-lsp" - ], - "settings": { - "rubyLsp.rubyVersionManager": { - "identifier": "rbenv" - } - } + ] } }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "onCreateCommand": "bundle install" // Configure tool-specific properties. // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} + // Uncomment to connect as root instead. More info: https://containers.dev/implementors/json_reference/#remoteUser. + // "remoteUser": "root", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bundle check || bundle install" +} \ No newline at end of file diff --git a/.standard.yml b/.standard.yml index c5a0d44b..0bd9950b 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,3 +1,3 @@ -ruby_version: 3.3 +ruby_version: 3.4 format: progress parallel: true diff --git a/.tool-versions b/.tool-versions index 3f7cdb28..b92a57ca 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.3.5 +ruby 3.4.7 diff --git a/LICENSE.txt b/LICENSE.txt index f2420e82..735a5754 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2024 RubyUI +Copyright (c) 2025 RubyUI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal