pvincent
2 years 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 |
class MainController < ApplicationController |
||||
def home |
def home |
||||
logger.info "efficient logging for dark theme" |
|
||||
|
logger.info 'efficient logging for dark theme' |
||||
end |
end |
||||
|
|
||||
def about |
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.info "multiline\nline2\nline3" |
||||
|
|
||||
logger.warn "a warning" |
|
||||
|
logger.warn 'a warning' |
||||
# logger.error "an error" |
# logger.error "an error" |
||||
|
|
||||
# raise "this is an error" |
# raise "this is an error" |
||||
# sleep 3 |
# sleep 3 |
||||
end |
end |
||||
|
|
||||
|
def mymethod |
||||
|
puts 'hello world' |
||||
|
end |
||||
end |
end |
@ -1,8 +1,8 @@ |
|||||
<div> |
<div> |
||||
<h1 class="text-4xl font-bold">HOME</h1> |
<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. |
this is a welcome message. |
||||
</h2> |
|
||||
|
</div> |
||||
<div class="italic text-2xl"> |
<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. |
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> |
</div> |
||||
|
@ -1,12 +1,12 @@ |
|||||
require "test_helper" |
|
||||
|
require 'test_helper' |
||||
|
|
||||
class MainControllerTest < ActionDispatch::IntegrationTest |
class MainControllerTest < ActionDispatch::IntegrationTest |
||||
test "should get home" do |
|
||||
|
test 'should get home' do |
||||
get main_home_url |
get main_home_url |
||||
assert_response :success |
assert_response :success |
||||
end |
end |
||||
|
|
||||
test "should get about" do |
|
||||
|
test 'should get about' do |
||||
get main_about_url |
get main_about_url |
||||
assert_response :success |
assert_response :success |
||||
end |
end |
||||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue