diff --git a/.github/workflows/haml.yml b/.github/workflows/haml.yml index b54fd9c..c4fce66 100644 --- a/.github/workflows/haml.yml +++ b/.github/workflows/haml.yml @@ -12,7 +12,7 @@ jobs: with: ruby-version: '2.7.2' - run: gem install --no-doc 'haml_lint:>=0.36.0' - - run: files=$(git ls-files | grep -E "\.haml" | grep -vE "\.yml"; exit 0) && haml-lint $files --exclude-linter RuboCop --reporter progress --reporter json >> haml.json && cat haml.json + - run: files=$(git ls-files | grep -E "\.haml" | grep -vE "\.yml|_form.html.haml"; exit 0) && haml-lint $files --exclude-linter RuboCop --reporter progress --reporter json >> haml.json && cat haml.json id: haml - uses: duderman/rubocop-annotate-action@v0.1.0 with: diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss new file mode 100644 index 0000000..072f44e --- /dev/null +++ b/app/assets/stylesheets/home.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the home controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..72f611c --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +### +# HomeController Class +# +class HomeController < ApplicationController + def index; end +end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb new file mode 100644 index 0000000..ba06502 --- /dev/null +++ b/app/helpers/home_helper.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +### +# HomeHelper Module +# +module HomeHelper +end diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml new file mode 100644 index 0000000..dd35747 --- /dev/null +++ b/app/views/home/index.html.haml @@ -0,0 +1,2 @@ +%h1 Home#index +%p Find me in app/views/home/index.html.haml diff --git a/config/routes.rb b/config/routes.rb index cefb14f..fd967a1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true Rails.application.routes.draw do + get 'home/index' + root 'home#index' # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end diff --git a/test/controllers/home_controller_test.rb b/test/controllers/home_controller_test.rb new file mode 100644 index 0000000..e583017 --- /dev/null +++ b/test/controllers/home_controller_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'test_helper' + +### +# HomeControllerTest Class +# +class HomeControllerTest < ActionDispatch::IntegrationTest + test 'should get index' do + get home_index_url + assert_response :success + end +end