pvincent
1 year ago
8 changed files with 106 additions and 33 deletions
-
2.rubocop.yml
-
6.vscode/extensions.json
-
45Gemfile
-
57Gemfile.lock
-
6app/controllers/application_controller.rb
-
13app/controllers/main_controller.rb
-
4app/views/main/home.html.erb
-
6test/controllers/main_controller_test.rb
@ -0,0 +1,2 @@ |
|||
Style/FrozenStringLiteralComment: |
|||
Enabled: false |
@ -1,18 +1,23 @@ |
|||
# MainController for basic routes |
|||
class MainController < ApplicationController |
|||
def home |
|||
logger.info "efficient logging for dark theme" |
|||
logger.info 'efficient logging for dark theme' |
|||
end |
|||
|
|||
def about |
|||
logger.debug "some debugging info" |
|||
logger.debug 'some debugging info' |
|||
|
|||
logger.info "relevant information" |
|||
logger.info 'relevant information' |
|||
logger.info "multiline\nline2\nline3" |
|||
|
|||
logger.warn "a warning" |
|||
logger.warn 'a warning' |
|||
# logger.error "an error" |
|||
|
|||
# raise "this is an error" |
|||
# sleep 3 |
|||
end |
|||
|
|||
def mymethod |
|||
puts 'hello world' |
|||
end |
|||
end |
@ -1,8 +1,8 @@ |
|||
<div> |
|||
<h1 class="text-4xl font-bold">HOME</h1> |
|||
<h2 class="text-2xl bg-gray-400"> |
|||
<div class="text-2xl bg-gray-400"> |
|||
this is a welcome message. |
|||
</h2> |
|||
</div> |
|||
<div class="italic text-2xl"> |
|||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur provident dolor quod laboriosam facere quas, excepturi quasi consequuntur quo pariatur recusandae, eaque doloremque voluptas, a commodi officia ducimus animi incidunt. |
|||
</div> |
|||
|
@ -1,12 +1,12 @@ |
|||
require "test_helper" |
|||
require 'test_helper' |
|||
|
|||
class MainControllerTest < ActionDispatch::IntegrationTest |
|||
test "should get home" do |
|||
test 'should get home' do |
|||
get main_home_url |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should get about" do |
|||
test 'should get about' do |
|||
get main_about_url |
|||
assert_response :success |
|||
end |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue