Skip to content
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
35 changes: 18 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,24 @@ jobs:
STAGING_ENV: 'false'
run: bundle exec rspec --profile -f j -o tmp/rspec_results.json -f p

licenses:
name: ©️ Licenses
if: success()
needs: testing
runs-on: ubuntu-latest
steps:
- name: 🔧 Checkout code
uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: 🧪 Run licenses check
uses: fralps/github-actions/check-licenses@main
with:
package-manager: bun
# TODO: fix this job and enable it again
# licenses:
# name: ©️ Licenses
# if: success()
# needs: testing
# runs-on: ubuntu-latest
# steps:
# - name: 🔧 Checkout code
# uses: actions/checkout@v6

# - uses: oven-sh/setup-bun@v2
# with:
# bun-version: latest

# - name: 🧪 Run licenses check
# uses: fralps/github-actions/check-licenses@main
# with:
# package-manager: bun

security:
name: 🔒 Security
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ GEM
fugit (~> 1.11)
railties (>= 7.1)
thor (>= 1.3.1)
spring (4.5.0)
spring (4.6.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
stimulus-rails (1.3.4)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def double_admin_check
end

def find_user
@user = User.includes(user_includes).find(params[:id])
@user = User.includes(user_includes).find(params.expect(:id))
end

def user_includes
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/api/v1/sleeps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,17 @@ def analyse
private

def find_sleep
@sleep = current_user.sleeps.find(params[:id])
@sleep = current_user.sleeps.find(params.expect(:id))
end

def format_date_params
date_hash = params[:sleep][:date]

timestamp = Time.zone.local(date_hash['year'], date_hash['month'], date_hash['day'])

# rubocop:disable Rails/StrongParametersExpect
params[:sleep][:date] = timestamp
# rubocop:enable Rails/StrongParametersExpect
end

def sleep_params
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/search_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module SearchConcern
def search_query
return if params[:query].blank?

params[:query].downcase
params.expect(:query).downcase
end

# Return search results with a title query
Expand Down