Update and connect to drone #1

Merged
atomaka merged 11 commits from deploy into main 2023-03-08 19:25:28 -05:00
14 changed files with 87 additions and 53 deletions
Showing only changes of commit 91e2a5f4ff - Show all commits

View file

@ -17,10 +17,11 @@ gem "bootsnap", require: false
# gem "image_processing", "~> 1.2" # gem "image_processing", "~> 1.2"
group :development, :test do group :development, :test do
gem "debug", platforms: %i[ mri mingw x64_mingw ] gem "debug", platforms: %i[mri mingw x64_mingw]
end end
group :development do group :development do
gem "standard"
gem "web-console" gem "web-console"
end end

View file

@ -68,6 +68,7 @@ GEM
tzinfo (~> 2.0) tzinfo (~> 2.0)
addressable (2.8.1) addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.14.0) bootsnap (1.14.0)
msgpack (~> 1.2) msgpack (~> 1.2)
@ -102,6 +103,8 @@ GEM
jbuilder (2.11.5) jbuilder (2.11.5)
actionview (>= 5.0.0) actionview (>= 5.0.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
loofah (2.19.1) loofah (2.19.1)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
@ -128,6 +131,9 @@ GEM
nio4r (2.5.8) nio4r (2.5.8)
nokogiri (1.14.2-x86_64-linux) nokogiri (1.14.2-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
parallel (1.22.1)
parser (3.2.1.1)
ast (~> 2.4.1)
public_suffix (5.0.0) public_suffix (5.0.0)
puma (6.1.1) puma (6.1.1)
nio4r (~> 2.0) nio4r (~> 2.0)
@ -161,11 +167,28 @@ GEM
rake (>= 12.2) rake (>= 12.2)
thor (~> 1.0) thor (~> 1.0)
zeitwerk (~> 2.5) zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6) rake (13.0.6)
regexp_parser (2.6.1) regexp_parser (2.6.1)
reline (0.3.1) reline (0.3.1)
io-console (~> 0.5) io-console (~> 0.5)
rexml (3.2.5) rexml (3.2.5)
rubocop (1.44.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.27.0)
parser (>= 3.2.1.0)
rubocop-performance (1.15.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2) rubyzip (2.3.2)
selenium-webdriver (4.6.1) selenium-webdriver (4.6.1)
childprocess (>= 0.5, < 5.0) childprocess (>= 0.5, < 5.0)
@ -180,6 +203,10 @@ GEM
activesupport (>= 5.2) activesupport (>= 5.2)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.6.1-x86_64-linux) sqlite3 (1.6.1-x86_64-linux)
standard (1.24.3)
language_server-protocol (~> 3.17.0.2)
rubocop (= 1.44.1)
rubocop-performance (= 1.15.2)
stimulus-rails (1.1.1) stimulus-rails (1.1.1)
railties (>= 6.0.0) railties (>= 6.0.0)
tailwindcss-rails (2.0.21-x86_64-linux) tailwindcss-rails (2.0.21-x86_64-linux)
@ -192,6 +219,7 @@ GEM
railties (>= 6.0.0) railties (>= 6.0.0)
tzinfo (2.0.5) tzinfo (2.0.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
web-console (4.2.0) web-console (4.2.0)
actionview (>= 6.0.0) actionview (>= 6.0.0)
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
@ -223,6 +251,7 @@ DEPENDENCIES
selenium-webdriver selenium-webdriver
sprockets-rails sprockets-rails
sqlite3 sqlite3
standard
stimulus-rails stimulus-rails
tailwindcss-rails (~> 2.0) tailwindcss-rails (~> 2.0)
turbo-rails turbo-rails

View file

@ -1,5 +1,5 @@
class CreditCardBillsController < ApplicationController class CreditCardBillsController < ApplicationController
before_action :set_credit_card_bill, only: %i[ show edit update destroy ] before_action :set_credit_card_bill, only: %i[show edit update destroy]
# GET /credit_card_bills or /credit_card_bills.json # GET /credit_card_bills or /credit_card_bills.json
def index def index
@ -58,6 +58,7 @@ class CreditCardBillsController < ApplicationController
end end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_credit_card_bill def set_credit_card_bill
@credit_card_bill = CreditCardBill.find(params[:id]) @credit_card_bill = CreditCardBill.find(params[:id])

View file

@ -1,5 +1,5 @@
class ExpensesController < ApplicationController class ExpensesController < ApplicationController
before_action :set_expense, only: %i[ show edit update destroy ] before_action :set_expense, only: %i[show edit update destroy]
# GET /expenses or /expenses.json # GET /expenses or /expenses.json
def index def index
@ -58,6 +58,7 @@ class ExpensesController < ApplicationController
end end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_expense def set_expense
@expense = Expense.find(params[:id]) @expense = Expense.find(params[:id])

View file

@ -1,5 +1,5 @@
class IncomesController < ApplicationController class IncomesController < ApplicationController
before_action :set_income, only: %i[ show edit update destroy ] before_action :set_income, only: %i[show edit update destroy]
# GET /incomes or /incomes.json # GET /incomes or /incomes.json
def index def index
@ -58,6 +58,7 @@ class IncomesController < ApplicationController
end end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_income def set_income
@income = Income.find(params[:id]) @income = Income.find(params[:id])

View file

@ -1,5 +1,5 @@
class MembersController < ApplicationController class MembersController < ApplicationController
before_action :set_member, only: %i[ show edit update destroy ] before_action :set_member, only: %i[show edit update destroy]
# GET /members or /members.json # GET /members or /members.json
def index def index
@ -58,6 +58,7 @@ class MembersController < ApplicationController
end end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_member def set_member
@member = Member.find(params[:id]) @member = Member.find(params[:id])

View file

@ -3,7 +3,7 @@ class Expense < ApplicationRecord
monthly: 12, monthly: 12,
annually: 1, annually: 1,
weekly: 52, weekly: 52,
quarterly: 4, quarterly: 4
}.freeze }.freeze
enum :period, PERIOD_OCCURENCES.keys enum :period, PERIOD_OCCURENCES.keys

View file

@ -53,7 +53,7 @@ Rails.application.configure do
config.log_level = :info config.log_level = :info
# Prepend all log lines with the following tags. # Prepend all log lines with the following tags.
config.log_tags = [ :request_id ] config.log_tags = [:request_id]
# Use a different cache store in production. # Use a different cache store in production.
# config.cache_store = :mem_cache_store # config.cache_store = :mem_cache_store
@ -83,7 +83,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
if ENV["RAILS_LOG_TO_STDOUT"].present? if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT) logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger) config.logger = ActiveSupport::TaggedLogging.new(logger)
end end

View file

@ -4,7 +4,7 @@
# the maximum value specified for Puma. Default is set to 5 threads for minimum # the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record. # and maximum; this matches the default thread size of Active Record.
# #
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count threads min_threads_count, max_threads_count
@ -15,7 +15,7 @@ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
# #
port ENV.fetch("PORT") { 3000 } port ENV.fetch("PORT", 3000)
# Specifies the `environment` that Puma will run in. # Specifies the `environment` that Puma will run in.
# #

View file

@ -17,7 +17,7 @@ class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest
test "should create credit_card_bill" do test "should create credit_card_bill" do
assert_difference("CreditCardBill.count") do assert_difference("CreditCardBill.count") do
post credit_card_bills_url, params: { credit_card_bill: { amount: @credit_card_bill.amount, description: @credit_card_bill.description } } post credit_card_bills_url, params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
end end
assert_redirected_to credit_card_bill_url(CreditCardBill.last) assert_redirected_to credit_card_bill_url(CreditCardBill.last)
@ -34,7 +34,7 @@ class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest
end end
test "should update credit_card_bill" do test "should update credit_card_bill" do
patch credit_card_bill_url(@credit_card_bill), params: { credit_card_bill: { amount: @credit_card_bill.amount, description: @credit_card_bill.description } } patch credit_card_bill_url(@credit_card_bill), params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
assert_redirected_to credit_card_bill_url(@credit_card_bill) assert_redirected_to credit_card_bill_url(@credit_card_bill)
end end

View file

@ -17,7 +17,7 @@ class ExpensesControllerTest < ActionDispatch::IntegrationTest
test "should create expense" do test "should create expense" do
assert_difference("Expense.count") do assert_difference("Expense.count") do
post expenses_url, params: { expense: { credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period } } post expenses_url, params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}}
end end
assert_redirected_to expense_url(Expense.last) assert_redirected_to expense_url(Expense.last)
@ -34,7 +34,7 @@ class ExpensesControllerTest < ActionDispatch::IntegrationTest
end end
test "should update expense" do test "should update expense" do
patch expense_url(@expense), params: { expense: { credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period } } patch expense_url(@expense), params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}}
assert_redirected_to expense_url(@expense) assert_redirected_to expense_url(@expense)
end end

View file

@ -17,7 +17,7 @@ class IncomesControllerTest < ActionDispatch::IntegrationTest
test "should create income" do test "should create income" do
assert_difference("Income.count") do assert_difference("Income.count") do
post incomes_url, params: { income: { amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id } } post incomes_url, params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}}
end end
assert_redirected_to income_url(Income.last) assert_redirected_to income_url(Income.last)
@ -34,7 +34,7 @@ class IncomesControllerTest < ActionDispatch::IntegrationTest
end end
test "should update income" do test "should update income" do
patch income_url(@income), params: { income: { amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id } } patch income_url(@income), params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}}
assert_redirected_to income_url(@income) assert_redirected_to income_url(@income)
end end

View file

@ -17,7 +17,7 @@ class MembersControllerTest < ActionDispatch::IntegrationTest
test "should create member" do test "should create member" do
assert_difference("Member.count") do assert_difference("Member.count") do
post members_url, params: { member: { name: @member.name, pays: @member.pays } } post members_url, params: {member: {name: @member.name, pays: @member.pays}}
end end
assert_redirected_to member_url(Member.last) assert_redirected_to member_url(Member.last)
@ -34,7 +34,7 @@ class MembersControllerTest < ActionDispatch::IntegrationTest
end end
test "should update member" do test "should update member" do
patch member_url(@member), params: { member: { name: @member.name, pays: @member.pays } } patch member_url(@member), params: {member: {name: @member.name, pays: @member.pays}}
assert_redirected_to member_url(@member) assert_redirected_to member_url(@member)
end end