Skip to content

Commit

Permalink
Ajustes pós Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
peimelo committed Oct 13, 2021
1 parent 6d47771 commit 4152ca9
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.0.2
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.1'
ruby '3.0.2'

gem 'rails', '~> 6.1.3', '>= 6.1.3.2'
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
gem 'puma', '~> 5.0'
gem 'sass-rails', '>= 6'
gem 'webpacker', '~> 5.0'
Expand Down
166 changes: 83 additions & 83 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
actioncable (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailbox (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (>= 2.7.1)
actionmailer (6.1.3.2)
actionpack (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailer (6.1.4.1)
actionpack (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.3.2)
actionview (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionpack (6.1.4.1)
actionview (= 6.1.4.1)
activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.3.2)
actionpack (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actiontext (6.1.4.1)
actionpack (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
nokogiri (>= 1.8.5)
actionview (6.1.3.2)
activesupport (= 6.1.3.2)
actionview (6.1.4.1)
activesupport (= 6.1.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.3.2)
activesupport (= 6.1.3.2)
activejob (6.1.4.1)
activesupport (= 6.1.4.1)
globalid (>= 0.3.6)
activemodel (6.1.3.2)
activesupport (= 6.1.3.2)
activerecord (6.1.3.2)
activemodel (= 6.1.3.2)
activesupport (= 6.1.3.2)
activestorage (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activesupport (= 6.1.3.2)
activemodel (6.1.4.1)
activesupport (= 6.1.4.1)
activerecord (6.1.4.1)
activemodel (= 6.1.4.1)
activesupport (= 6.1.4.1)
activestorage (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activesupport (= 6.1.4.1)
marcel (~> 1.0.0)
mini_mime (~> 1.0.2)
activesupport (6.1.3.2)
mini_mime (>= 1.1.0)
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
bcrypt (3.1.16)
bindex (0.8.1)
bootsnap (1.7.5)
bootsnap (1.9.1)
msgpack (~> 1.0)
builder (3.2.4)
bullet (6.1.4)
bullet (6.1.5)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
Expand All @@ -80,7 +80,7 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
crass (1.0.6)
devise (4.8.0)
bcrypt (~> 3.0)
Expand All @@ -89,9 +89,9 @@ GEM
responders
warden (~> 1.2.3)
erubi (1.10.0)
ffi (1.15.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
ffi (1.15.4)
globalid (0.5.2)
activesupport (>= 5.0)
groupdate (5.2.2)
activesupport (>= 5)
i18n (1.8.10)
Expand All @@ -114,66 +114,66 @@ GEM
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
listen (3.5.1)
listen (3.7.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.9.1)
loofah (2.12.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.0.3)
mini_mime (1.1.2)
minitest (5.14.4)
msgpack (1.4.2)
nio4r (2.5.7)
nokogiri (1.11.4-x86_64-darwin)
nio4r (2.5.8)
nokogiri (1.12.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.11.4-x86_64-linux)
nokogiri (1.12.5-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
pg (1.2.3)
public_suffix (4.0.6)
puma (5.3.1)
puma (5.5.2)
nio4r (~> 2.0)
pundit (2.1.0)
pundit (2.1.1)
activesupport (>= 3.0.0)
racc (1.5.2)
rack (2.2.3)
rack-mini-profiler (2.3.2)
rack-mini-profiler (2.3.3)
rack (>= 1.2.0)
rack-proxy (0.6.5)
rack-proxy (0.7.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.3.2)
actioncable (= 6.1.3.2)
actionmailbox (= 6.1.3.2)
actionmailer (= 6.1.3.2)
actionpack (= 6.1.3.2)
actiontext (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activemodel (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
rails (6.1.4.1)
actioncable (= 6.1.4.1)
actionmailbox (= 6.1.4.1)
actionmailer (= 6.1.4.1)
actionpack (= 6.1.4.1)
actiontext (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activemodel (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
bundler (>= 1.15.0)
railties (= 6.1.3.2)
railties (= 6.1.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
railties (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
method_source
rake (>= 0.8.7)
rake (>= 0.13)
thor (~> 1.0)
rake (13.0.3)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -182,7 +182,7 @@ GEM
actionpack (>= 5.0)
railties (>= 5.0)
rolify (6.0.0)
rubyzip (2.3.0)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
Expand All @@ -200,7 +200,7 @@ GEM
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
spring (2.1.1)
spring (3.0.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -224,16 +224,16 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.6.0)
webdrivers (4.6.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (5.3.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
Expand All @@ -259,7 +259,7 @@ DEPENDENCIES
puma (~> 5.0)
pundit (~> 2.1)
rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.2)
rails (~> 6.1.4, >= 6.1.4.1)
rolify (~> 6.0)
sass-rails (>= 6)
selenium-webdriver
Expand All @@ -273,7 +273,7 @@ DEPENDENCIES
webpacker (~> 5.0)

RUBY VERSION
ruby 3.0.1p64
ruby 3.0.2p107

BUNDLED WITH
2.2.17
2.2.26
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This repository is part of the [Curso Ruby on Rails 6 MVC](https://www.youtube.c
<tr>
<td>Ruby version</td>
<td>
3.0.1
3.0.2
</td>
</tr>
<tr>
<td>Rails version</td>
<td>
6.1.3.x
6.1.4.1
</td>
</tr>
<tr>
Expand Down Expand Up @@ -69,6 +69,7 @@ gem (replace with the values ​​you want):
# ... your content above

gmail:
mailer_sender: 'Sender <your@email.com>'
user_name: your@email.com
password: your_password
```
Expand Down
3 changes: 0 additions & 3 deletions app/assets/stylesheets/articles.scss

This file was deleted.

8 changes: 8 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
module ApplicationHelper
def month_day_comma_year(datetime)
datetime.strftime('%B %e, %Y')
end

def render_if(condition, template, record)
render template, record if condition
end

def sub_masked_email(email)
email.gsub(/(?<=.{2}).*@.*(?=\S{2})/, '****@****')
end
end
5 changes: 0 additions & 5 deletions app/helpers/articles_helper.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/articles/_article_detail.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= month_day_comma_year(article.created_at) %> by
<%= article.user.email %> in
<%= sub_masked_email(article.user.email) %> in
<%= article.category.name %>
4 changes: 3 additions & 1 deletion app/views/comments/_comment.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title"><%= month_day_comma_year(comment.created_at) %></h5>
<h6 class="card-subtitle mb-2 text-muted">Commenter: <%= comment.user.email %></h6>
<h6 class="card-subtitle mb-2 text-muted">
Commenter: <%= sub_masked_email(comment.user.email) %>
</h6>
<p class="card-text"><%= comment.body %></p>
<%= link_to 'Destroy', article_comment_path(@article, comment),
method: :delete,
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_account_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if user_signed_in? %>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<%= current_user.email %>
<%= sub_masked_email(current_user.email) %>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li>
Expand Down
2 changes: 1 addition & 1 deletion config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
D9ng+nF3b3VRsubAtdEA2ORzuR7rVYouD+iznaAXIjn1espw3HVPzHO6wIaJdXobQCo0X2AtYTXGtZCfuf63xiJhOQl33gfpMT+At8ZSWbSIepHa4+GEl5eeVLKXErmAm+MZvAZi+QDPAMJ9IUlBxdLbaIzy2CUUcIE+d87CTcO5d7Lq3d4B9WnWqTw9xl3BojFRMcnrN7XFvh8h7ERvOyncOd/G8z5kv7/HQNTQolGQgouD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