diff --git a/.build_version b/.build_version deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore index 6ae1fe5..c1c4704 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /node_modules /.irbrc_history .~lock* +.build_version \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 66ac4bf..dda0271 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,8 +6,9 @@ "configurations": [ { "type": "ruby_lsp", - "name": "Attach debugger", - "request": "attach" + "name": "Debug server", + "request": "attach", + "preLaunchTask": "dev" }, { "type": "ruby_lsp", diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2b3522d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "command": "dev", + "label": "dev", + "isBackground": true + } + ] +} \ No newline at end of file diff --git a/app/views/home/show.html.erb b/app/views/home/show.html.erb index b2993c1..6f689df 100644 --- a/app/views/home/show.html.erb +++ b/app/views/home/show.html.erb @@ -1,4 +1,7 @@ -

Dashboard

+

A11yDive

+ +

Dashboard

+

<%= Report.count %> @@ -13,4 +16,4 @@ <%= Check.count %> <%= link_to Check.model_name.human(count: Check.count), :checks %> -

\ No newline at end of file +

diff --git a/bin/dev b/bin/dev index eda330c..edcb0e0 100755 --- a/bin/dev +++ b/bin/dev @@ -8,4 +8,4 @@ fi # Default to port 3000 if not specified export PORT="${PORT:-3000}" -exec foreman start -f Procfile.dev "$@" +exec foreman start -f /app/Procfile.dev "$@" diff --git a/config/application.rb b/config/application.rb index 09748e2..3160f19 100644 --- a/config/application.rb +++ b/config/application.rb @@ -35,6 +35,7 @@ module A11yist # config.time_zone = "Europe/Zurich" # config.eager_load_paths << Rails.root.join("extras") - config.build_version = (File.read(Rails.root.join(".build_version")) || "-").freeze + build_version_file = Rails.root.join(".build_version") + config.build_version = (File.exist?(build_version_file) && File.read(build_version_file) || "dev").freeze end end