Skip to content

Commit

Permalink
update gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
M4THYOU committed Jul 30, 2022
1 parent c2265f8 commit c4595b8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore swp
*.swp

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: git@github.com:M4THYOU/evil_gem.git
revision: 6709967f448c33418a7443918583f70b606bf3fb
revision: ce962d021b4b851e685a906bcb1c8ee6d837c4ca
branch: main
specs:
evil_gem (0.0.0)
Expand Down Expand Up @@ -76,7 +76,7 @@ GEM
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
bindex (0.8.1)
bootsnap (1.12.0)
bootsnap (1.13.0)
msgpack (~> 1.2)
builder (3.2.4)
capybara (3.37.1)
Expand Down Expand Up @@ -119,7 +119,7 @@ GEM
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.16.2)
msgpack (1.5.3)
msgpack (1.5.4)
net-imap (0.2.3)
digest
net-protocol
Expand All @@ -135,7 +135,7 @@ GEM
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.7-x86_64-darwin)
nokogiri (1.13.8-x86_64-darwin)
racc (~> 1.4)
public_suffix (4.0.7)
puma (5.6.4)
Expand Down Expand Up @@ -192,7 +192,7 @@ GEM
sqlite3 (1.4.4)
stimulus-rails (1.1.0)
railties (>= 6.0.0)
strscan (3.0.3)
strscan (3.0.4)
thor (1.2.1)
timeout (0.3.0)
turbo-rails (1.1.1)
Expand Down
Binary file removed app/controllers/.home_controller.rb.swp
Binary file not shown.
6 changes: 3 additions & 3 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ class HomeController < ApplicationController

def index
if params.has_key?(:query)
@num = Integer(params[:query]) rescue nil
unless @num.nil?
@res = EvenChecker.is_even?(@num)
@query = params[:query]
unless @query.nil?
@res = EvenChecker.is_even?(@query)
end
end

Expand Down
Binary file removed app/views/home/.index.html.erb.swp
Binary file not shown.
8 changes: 4 additions & 4 deletions app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h1>test</h1>
<h1>Check if your number is even!</h1>

<% if @num.nil? %>
<p>invalid integer</p>
<% if @query.nil? %>
<p>Please enter a number:</p>
<% else %>
<p><%= @num %> is even?: <strong><%= @res %></strong></p>
<p><%= @query %> is even?: <strong><%= @res %></strong></p>
<% end %>

<%= form_with url: root_path, method: :get do |form| %>
Expand Down

0 comments on commit c4595b8

Please sign in to comment.