Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a8c457c
Add hi to readme
Ethan-Stone1 Feb 9, 2026
972b821
Windows local run: start.ps1, Puma workers, tzinfo-data, Bullet foote…
zhouyijun111 Feb 11, 2026
9ce628a
Revert "Windows local run: start.ps1, Puma workers, tzinfo-data, Bull…
zhouyijun111 Feb 11, 2026
752fdcc
Add Github Test Coverage to README
Ethan-Stone1 Feb 12, 2026
4fdcb17
Clean up README and delete 'hi chat'
Ethan-Stone1 Feb 12, 2026
61f741c
Spelling mistake
Ethan-Stone1 Feb 12, 2026
e968d65
Merge pull request #42 from cs169/Badges
zhouyijun111 Feb 20, 2026
1aa6521
Fix price field not loading on ticket edit page (#44)
li-xinwei Feb 22, 2026
3ae9a07
Add CodeCov in ci
Ethan-Stone1 Feb 23, 2026
50a01c2
Add testing for non PR's
Ethan-Stone1 Feb 23, 2026
2b7d2b1
Add Postgres to ci
Ethan-Stone1 Feb 23, 2026
22c5c0e
Bug fix
Ethan-Stone1 Feb 23, 2026
2310753
Use correct DB in testing
Ethan-Stone1 Feb 23, 2026
f203046
Still upload failing tests to CodeCov
Ethan-Stone1 Feb 23, 2026
a944f20
Merge pull request #47 from cs169/fix/issue-44-ticket-edit-price-field
Ethan-Stone1 Feb 23, 2026
34cf6df
Add CodeCov Badge to README
Ethan-Stone1 Feb 23, 2026
bfb16bc
Move CodeCov to existing Specs testing
Ethan-Stone1 Feb 23, 2026
965a065
Indentation Error, Matrix Suite Flag
Ethan-Stone1 Feb 23, 2026
7b23f8d
Merge pull request #51 from cs169/Badges
zhouyijun111 Feb 23, 2026
9c68cb1
Slight renaming
Ethan-Stone1 Feb 25, 2026
db306bc
Add failing tests for persisting favourites param across schedule tabs
sikesbc Feb 25, 2026
7187d9f
Fix favs param getting lost when switching schedule tabs
sikesbc Feb 25, 2026
b505f27
Add qlty.sh Badges
Ethan-Stone1 Feb 25, 2026
21dd179
Update README
Ethan-Stone1 Feb 27, 2026
1802e35
Merge pull request #53 from cs169/Badges
Ethan-Stone1 Feb 27, 2026
178e99b
Merge pull request #52 from cs169/persist-favourites-45
Ethan-Stone1 Feb 27, 2026
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
7 changes: 7 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,10 @@ jobs:
# $CCTR sum-coverage coverage/codeclimate.*.json
# $CCTR upload-coverage --id "6d21ff1a59b134f3741779d50325f7bd5183cbe6b205051573d955705148960f"
# $CCTR after-build --id "6d21ff1a59b134f3741779d50325f7bd5183cbe6b205051573d955705148960f"
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage.xml
flags: ${{ matrix.suite }}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## Srping 2024 CS169L
# [Snap!Con](https://snapcon.org) Base Repository
[![Specs](https://github.com/snap-cloud/snapcon/actions/workflows/spec.yml/badge.svg)](https://github.com/snap-cloud/snapcon/actions/workflows/spec.yml)
[![Pivotal Tracker](doc/pivotal_tracker_logo.png)](https://www.pivotaltracker.com/n/projects/2487653)
[![Maintainability](https://api.codeclimate.com/v1/badges/b7b0d559a03bf218663a/maintainability)](https://codeclimate.com/github/snap-cloud/snapcon/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/b7b0d559a03bf218663a/test_coverage)](https://codeclimate.com/github/snap-cloud/snapcon/test_coverage)
[![Maintainability](https://qlty.sh/gh/snap-cloud/projects/snapcon/maintainability.svg)](https://qlty.sh/gh/snap-cloud/projects/snapcon)
[![Code Coverage](https://qlty.sh/gh/snap-cloud/projects/snapcon/coverage.svg)](https://qlty.sh/gh/snap-cloud/projects/snapcon)
[![codecov](https://codecov.io/gh/snap-cloud/snapcon/branch/snapcon/graph/badge.svg?token=EViEwaSjH4)](https://codecov.io/gh/snap-cloud/snapcon)
<a href="https://heroku.com/deploy?template=https://github.com/snap-cloud/snapcon/tree/v1.0">
<img src="https://www.herokucdn.com/deploy/button.svg" height="20px" alt="Deploy">
</a>

# [Snap!Con](https://snapcon.org)
## Spring 2026 CS169L Repository
[![Specs](https://github.com/cs169/snapcon/actions/workflows/spec.yml/badge.svg)](https://github.com/cs169/snapcon/actions/workflows/spec.yml)
[![codecov](https://codecov.io/gh/cs169/snapcon/graph/badge.svg?token=kw6lq9NkSW)](https://codecov.io/gh/cs169/snapcon)

Forked From:
## Open Source Event Manager - [osem.io](https://osem.io)

Expand Down
8 changes: 6 additions & 2 deletions app/controllers/schedules_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def show
event_schedules = @program.event_schedule_for_fullcalendar

unless event_schedules
redirect_to events_conference_schedule_path(@conference.short_title)
redirect_to events_conference_schedule_path(@conference.short_title, favourites: @favourites.presence)
return
end

Expand Down Expand Up @@ -80,14 +80,18 @@ def happening_now
event_ids = @events_schedules.map { |es| es.event.id }
favourited_events(event_ids)

if current_user && @favourites
@events_schedules.keep_if { |es| es.event.planned_for_user?(current_user) }
end

respond_to do |format|
format.html
format.json { render json: @events_schedules.to_json(root: false, include: :event) }
end
end

def vertical_schedule
redirect_to conference_schedule_path(@conference)
redirect_to conference_schedule_path(@conference, favourites: @favourites.presence)
end

def app
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/tickets/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
= render partial: 'shared/help', locals: { id: 'accepted_help', show_event_variables: true, show_ticket_variables: true}
.form-group
= f.label :price
= f.number_field :price, class: 'form-control'
= f.number_field :price, class: 'form-control', value: f.object.price.to_f, step: 0.01, min: 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a nil price an issue?

- if Ticket.where(conference: @conference).empty?
.form-group
= f.label :price_currency, 'Currency'
Expand Down
2 changes: 1 addition & 1 deletion app/views/schedules/_schedule_tabs.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%li.program{ class: ('active' if active == 'program'), role: 'presentation' }
= link_to('All events', events_conference_schedule_path(@conference.short_title, favourites: @favourites))
%li.program{ class: ('active' if active == 'now'), role: 'presentation' }
= link_to('Happening Now', happening_now_conference_schedule_path(@conference.short_title))
= link_to('Happening Now', happening_now_conference_schedule_path(@conference.short_title, favourites: @favourites))
%li.schedule{ class: ('active' if active == 'vertical_schedule'), role: 'presentation' }
= link_to('Schedule', vertical_schedule_conference_schedule_path(@conference.short_title, favourites: @favourites))
.pull-right
Expand Down
42 changes: 42 additions & 0 deletions spec/controllers/schedules_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,36 @@
expect(response.body).to include('code')
end
end

context 'with favourites parameter' do
let(:user) { create(:user) }
let!(:scheduled_event3) do
create(:event, program: program, state: 'confirmed')
end
let!(:event_schedule3) do
create(:event_schedule, event: scheduled_event3, schedule: selected_schedule,
start_time: Time.now.in_time_zone(conference2.timezone).strftime('%a, %d %b %Y %H:%M:%S'))
end

before do
sign_in user
scheduled_event1.favourite_users << user
end

it 'shows only favourited events when favourites=true' do
get :happening_now, params: { conference_id: conference2.short_title, favourites: 'true' }
events = assigns(:events_schedules).map(&:event)
expect(events).to include(scheduled_event1)
expect(events).not_to include(scheduled_event3)
end

it 'shows all happening events when favourites is not set' do
get :happening_now, params: { conference_id: conference2.short_title }
events = assigns(:events_schedules).map(&:event)
expect(events).to include(scheduled_event1)
expect(events).to include(scheduled_event3)
end
end
end

describe 'GET #vertical_schedule' do
Expand All @@ -105,5 +135,17 @@
expect(response).to have_http_status(:found)
end
end

context 'preserves favourites parameter' do
it 'includes favourites=true in redirect when set' do
get :vertical_schedule, params: { conference_id: conference.short_title, favourites: 'true' }
expect(response).to redirect_to(conference_schedule_path(conference, favourites: true))
end

it 'does not include favourites in redirect when not set' do
get :vertical_schedule, params: { conference_id: conference.short_title }
expect(response).to redirect_to(conference_schedule_path(conference))
end
end
end
end