Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump'n lint'n such #797

Merged
merged 2 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sidekiq_unique_jobs/lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.create(digest, job_id, lock_info = {})
#
def initialize(key, time: nil)
@key = get_key(key)
time = time.is_a?(Float) ? time : time.to_f
time = time.to_f unless time.is_a?(Float)
return unless time.nonzero?

@created_at = time
Expand Down
1 change: 1 addition & 0 deletions myapp/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ REDIS_URL=redis://localhost:6379/7
SECRET_KEY_BASE=10167c7f7654ed02b3557b05b88ece1866a9748a2e8e064016f76cb74ddae38264f7403ba65f301d63c21d770e0ee2ac6906f245e904b3b140d12297f67e0db1
RAILS_MIN_THREADS=10
RAILS_MAX_THREADS=10
TEST_PORT=3001
WEB_CONCURRENCY=2
WEB_CONSOLE_WHITELISTED_IPS="127.0.0.1 ::1 127.0.0.0/8"
1 change: 1 addition & 0 deletions myapp/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit_from:
- ../.rubocop.yml

AllCops:
TargetRubyVersion: 2.7
Include:
- "myapp/**/*"
- "**/*.rb"
Expand Down
3 changes: 1 addition & 2 deletions myapp/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ruby 3.2.2
nodejs 19.1.0
nodejs 20.4.0
yarn 1.22.19
direnv 2.32.2
10 changes: 4 additions & 6 deletions myapp/app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
as: resource_name,
url: confirmation_path(resource_name),
html: {
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%#= render "devise/shared/error_messages", resource: resource %>
Expand All @@ -18,14 +18,12 @@
autofocus: true,
autocomplete: "email",
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline"
%>
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" %>
</div>

<div class="mb-4">
<%= f.submit "Resend Confirmation Info",
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
%>
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" %>
</div>

<%= render "devise/shared/links" %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

<p>You can confirm your account email through the link below:</p>

<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
<p><%= link_to "Confirm my account", confirmation_url(@resource, confirmation_token: @token) %></p>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p>Someone has requested a link to change your password. You can do this through the link below.</p>

<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p><%= link_to "Change my password", edit_password_url(@resource, reset_password_token: @token) %></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
2 changes: 1 addition & 1 deletion myapp/app/views/devise/mailer/unlock_instructions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<p>Click the link below to unlock your account:</p>

<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
<p><%= link_to "Unlock my account", unlock_url(@resource, unlock_token: @token) %></p>
22 changes: 8 additions & 14 deletions myapp/app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
as: resource_name,
url: user_password_path(resource_name),
html: {
method: :put,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
method: :put,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%#= render "devise/shared/error_messages", resource: resource %>

Expand All @@ -18,33 +17,28 @@

<div class="mb-4">
<%= f.label :password, "New Password",
class: "block font-bold mb-2 text-gray-700 text-sm"
%>
class: "block font-bold mb-2 text-gray-700 text-sm" %>
<% if @minimum_password_length %>
<small><em class="text-gray-600">(<%= @minimum_password_length %> characters minimum)</em></small>
<% end %>
<%= f.password_field :password,
autofocus: true,
autocomplete: "new-password",
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
%>
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" %>
</div>

<div class="mb-4">
<%= f.label :password_confirmation,
"Confirm New Password",
class: "block font-bold mb-2 text-gray-700 text-sm"
%>
class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.password_field :password_confirmation,
autocomplete: "off",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
%>
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>
</div>

<div class="mb-4">
<%= f.submit "Change My Password",
class: "button bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full"
%>
class: "button bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full" %>
</div>

<%= render "devise/shared/links" %>
Expand Down
7 changes: 3 additions & 4 deletions myapp/app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
as: resource_name,
url: password_path(resource_name),
html: {
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%#= render "devise/shared/error_messages", resource: resource %>
Expand All @@ -15,8 +15,7 @@
<div class="mb-4">
<%= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.email_field :email, autofocus: true, autocomplete: "email",
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
%>
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" %>
</div>

<div class="mb-4">
Expand Down
36 changes: 16 additions & 20 deletions myapp/app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,46 @@
<h1 class="font-hairline mb-6 text-center">Edit <%= resource_name.to_s.humanize %></h1>

<%= form_for(resource,
as: resource_name,
url: registration_path(resource_name),
html: {
method: :put,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
as: resource_name,
url: registration_path(resource_name),
html: {
method: :put,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%#= render "devise/shared/error_messages", resource: resource %>
<%= devise_error_messages! %>

<div class="mb-4">
<%= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm" %><br />
<%= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm" %><br>
<%= f.email_field :email,
autofocus: true,
autocomplete: "email",
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" %>
autofocus: true,
autocomplete: "email",
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" %>
</div>

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>

<div class="mb-4">
<%= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm" %> <i>(leave blank if you don't want to change it)</i><br />
<%= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm" %> <i>(leave blank if you don't want to change it)</i><br>
<%= f.password_field :password, autocomplete: "new-password", class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>

</div>

<div class="mb-4">
<%= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.password_field :password_confirmation,
autocomplete: "new-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
%>
autocomplete: "new-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>
</div>

<div class="mb-4">
<%= f.label :current_password, class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.password_field :current_password,
autocomplete: "current-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"

%>
autocomplete: "current-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>
</div>

<div class="actions">
Expand Down
14 changes: 5 additions & 9 deletions myapp/app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
as: resource_name,
url: registration_path(resource_name),
html: {
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%= devise_error_messages! %>

Expand All @@ -26,22 +25,19 @@
<% end %>
<%= f.password_field :password,
autocomplete: "new-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
%>
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>
</div>

<div class="mb-4">
<%= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm" %>
<%= f.password_field :password_confirmation,
autocomplete: "new-password",
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
%>
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" %>
</div>

<div class="mb-4">
<%= f.submit "Sign Up",
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
%>
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" %>
</div>

<%= render "devise/shared/links" %>
Expand Down
25 changes: 11 additions & 14 deletions myapp/app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,48 @@
as: resource_name,
url: session_path(resource_name),
html: {
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%= devise_simple_error_messages! %>

<% if flash.present? %>
<div class="bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-4" role="alert">
<p class="font-bold">Oops!</p>
<%- flash.each do |name, msg| -%>
<%= content_tag :p,
msg.humanize,
id: "flash_#{name}" if msg.is_a?(String) %>
<%= if msg.is_a?(String)
content_tag :p,
msg.humanize,
id: "flash_#{name}"
end %>
<%- end -%>
</div>
<% end %>

<div class="mb-4">
<%= f.label :email, class: "block text-gray-700 text-sm font-bold mb-2" %>
<%= f.email_field :email, autofocus: true, autocomplete: "email",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight foucs:outline-none focus:shadow-outline"
%>
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight foucs:outline-none focus:shadow-outline" %>
</div>

<div class="mb-4">
<%= f.label :password, class: "block text-gray-700 text-sm font-bold mb-2" %>
<%= f.password_field :password,
autocomplete: "current-password",
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
%>
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" %>
</div>

<% if devise_mapping.rememberable? %>
<div class="mb-4">
<%= f.check_box :remember_me, class: "mr-2 leading-tight" %>
<%= f.label :remember_me,
class: "align-baseline inline-block text-gray-700 text-sm"
%>
class: "align-baseline inline-block text-gray-700 text-sm" %>
</div>
<% end %>

<div class="mb-4">
<%= f.submit "Log in",
class: "button bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full"
%>
class: "button bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full" %>
</div>

<%= render "devise/shared/links" %>
Expand Down
19 changes: 6 additions & 13 deletions myapp/app/views/devise/shared/_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Log in", new_session_path(resource_name),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%><br/>
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %><br>
<% end %>

<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot Password?", new_user_password_path(resource_name),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%> <br/>
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %> <br>
<% end %>

<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%><br />
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %><br>
<% end %>


<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation info?", new_user_confirmation_path(resource_name),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%><br />
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %><br>
<% end %>

<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock info?", new_user_unlock_path(resource_name),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%><br />
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %><br>
<% end %>

<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider),
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800"
%><br />
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" %><br>
<% end %>
<% end %>
13 changes: 5 additions & 8 deletions myapp/app/views/devise/unlocks/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
as: resource_name,
url: unlock_path(resource_name),
html: {
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
method: :post,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
}) do |f| %>

<%= devise_error_messages! %>

Expand All @@ -17,14 +16,12 @@
<%= f.email_field :email,
autofocus: true,
autocomplete: "email",
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
%>
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" %>
</div>

<div class="mb-4">
<%= f.submit "Resend unlock instructions",
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
%>
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" %>
</div>

<%= render "devise/shared/links" %>
Expand Down
Loading