Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
d826ca0
Merge pull request #38 from sydweisberg/edit_profile
sydweisberg Nov 18, 2024
f04172c
Added search icon and refined some scaling
mollyd13 Nov 18, 2024
c1a12b5
tiniest little scaling change
mollyd13 Nov 18, 2024
baec482
Merge pull request #39 from sydweisberg/station_dropdown_styling
sydweisberg Nov 18, 2024
636d3c6
Fixed countdown page/rental functionality by removing it from session…
emruckle Nov 19, 2024
9912ff3
Fixed CSS on user sign-in page
sydweisberg Nov 19, 2024
b5f5184
Merge pull request #41 from sydweisberg/signin_page_css
sydweisberg Nov 19, 2024
10a22d7
Prevented users from accessing other profile pages
sydweisberg Nov 19, 2024
9163adc
Merge pull request #42 from sydweisberg/user_profile_linking_validation
sydweisberg Nov 19, 2024
1f9d2a9
Merge branch 'redirect_current_rental' into track_user_hours
emruckle Nov 20, 2024
2d8634e
Tracking number of hours ridden by users. Only whole hours are displa…
emruckle Nov 20, 2024
8810165
Flash alerts for invalid rentals (not selecting a bike), and invalid …
emruckle Nov 20, 2024
2cd4502
Added log in flash alert for when the user does not enter valid crede…
emruckle Nov 20, 2024
b5c6bba
User sign up flash alerts.
emruckle Nov 20, 2024
48a9011
Allowed user to delete their profile via button
sydweisberg Nov 20, 2024
c8d88f5
Merge pull request #43 from sydweisberg/track_user_hours
sydweisberg Nov 20, 2024
9f5f8c7
Merge branch 'master' into flash_alerts
sydweisberg Nov 20, 2024
ba947e4
Merge pull request #44 from sydweisberg/flash_alerts
sydweisberg Nov 20, 2024
ee4b834
Allow user to sort by available bikes.
mollyd13 Nov 21, 2024
a6ac592
Make the number of available bikes clickable.
mollyd13 Nov 21, 2024
7f9fb39
Select station id from dropdown
mollyd13 Nov 21, 2024
3b2cf2f
Show station names instead of IDs and sort them alphabetically.
mollyd13 Nov 21, 2024
2c861bc
Wee bit of styling.
mollyd13 Nov 21, 2024
c75c51a
User can have five rentals at once. Issue with not returning the righ…
emruckle Nov 21, 2024
8444073
Fixed wrong rental being returned bug.
emruckle Nov 21, 2024
d88b5cb
Changed where Rent a Bike! button links to, added a view active renta…
emruckle Nov 21, 2024
e7fe27a
Created a thank you for returning your bike page.
emruckle Nov 21, 2024
edb9a77
Put two buttons in button div.
emruckle Nov 21, 2024
a74a6b0
Merge pull request #46 from sydweisberg/sort_by_num_bikes
sydweisberg Nov 21, 2024
d0c2e83
Merge pull request #47 from sydweisberg/return_bike_dropdown
sydweisberg Nov 21, 2024
630b0f3
Changed application time zone to EST... was this bad?
emruckle Nov 21, 2024
065fca6
Merge branch 'master' into secret_branch
emruckle Nov 21, 2024
efa521b
User foreign key in Rental set to nil when profile deleted
sydweisberg Nov 21, 2024
849dfa7
Merge branch 'master' into delete_profile
sydweisberg Nov 21, 2024
c7898c8
Merge pull request #49 from sydweisberg/delete_profile
sydweisberg Nov 21, 2024
fdaf6b3
Merge branch 'master' into secret_branch
sydweisberg Nov 21, 2024
7d53896
Merge pull request #48 from sydweisberg/secret_branch
sydweisberg Nov 21, 2024
97432bd
Added stripe payment button and balance to users
sydweisberg Nov 24, 2024
77c5a15
Adds funds to account when user makes a purchase
sydweisberg Nov 24, 2024
c5cd99e
Prevented a user from renting a bike if they have insufficient funds
sydweisberg Nov 25, 2024
9d426da
Subtracted cost of rental from user's balance
sydweisberg Nov 25, 2024
2e5ad2a
Moved defaulting to 0 hours to a migration.
emruckle Nov 25, 2024
b93bd3e
Merge branch 'stripe_api' into controller_cleanup
emruckle Nov 25, 2024
d6ca373
Made one helper function and added some comments.
emruckle Nov 25, 2024
e90cd01
Display balance with 2 decimal places.
emruckle Nov 25, 2024
990c366
Commented rental controller.
emruckle Nov 25, 2024
54dd66e
Added pricing to home page.
emruckle Nov 25, 2024
fc69879
Added pop up when user clicks delete profile. Also added a hover colo…
emruckle Nov 25, 2024
fb8b0c2
Merge pull request #51 from sydweisberg/stripe_api
sydweisberg Nov 25, 2024
e9fdca8
Merge pull request #52 from sydweisberg/controller_cleanup
sydweisberg Nov 25, 2024
e20c655
Merge pull request #53 from sydweisberg/display_rental_price
sydweisberg Nov 25, 2024
6567cc3
Merge pull request #54 from sydweisberg/delete_user_popup
sydweisberg Nov 25, 2024
2cd3fd3
Fixed 8 character minimum password validation
sydweisberg Nov 25, 2024
2e52457
Merge pull request #55 from sydweisberg/password_validation
sydweisberg Nov 25, 2024
b45d23e
Fixed it!!!!
emruckle Nov 28, 2024
b2397c1
Merge pull request #57 from sydweisberg/confirming_emma_fix
sydweisberg Nov 28, 2024
cb9ccb5
Method update.attribute() skips validations, only updating a single a…
emruckle Nov 28, 2024
44414fa
Payment successful flash alert now shows up when user reloads card.
emruckle Nov 28, 2024
4df6ff4
User does not need to refresh for edit profile or sign up flash.
emruckle Nov 28, 2024
4348b92
Sign in flash alert shows up without refreshing.
emruckle Nov 28, 2024
810d536
Fixed it, so turns out you cannot use render for the sign in page.
emruckle Nov 28, 2024
e953c02
Merge pull request #58 from sydweisberg/confirming_emma_fix
sydweisberg Nov 28, 2024
5c03dd0
Flash alerts styled.
mollyd13 Nov 29, 2024
22193d8
style notices too.
mollyd13 Nov 29, 2024
f55ea4f
Merge pull request #59 from sydweisberg/style_flash_alerts
sydweisberg Nov 30, 2024
e7fa8ad
Bikes in each station are sorted by charge percent.
SWorster Nov 30, 2024
5b854a0
Added user ride history.
emruckle Nov 30, 2024
01fbeea
Added ride history table.
emruckle Nov 30, 2024
85e465f
Added over_time to table.
emruckle Nov 30, 2024
37a5f4c
Added return to profile page button.
emruckle Nov 30, 2024
4f90459
Moved buttons.
emruckle Nov 30, 2024
32e292f
Centered my pricing table.
emruckle Nov 30, 2024
c4cb697
Removed need to click to see the stations, and repositioned list.
mollyd13 Nov 30, 2024
6a8da63
Added scroll functionality and border.
mollyd13 Nov 30, 2024
4dedbaf
Use Google Maps instead of MapBox.
mollyd13 Dec 1, 2024
21b7292
Change map size
mollyd13 Dec 1, 2024
9aa1795
Merge pull request #60 from sydweisberg/bike_form
sydweisberg Dec 1, 2024
2548709
Merge pull request #61 from sydweisberg/user_ride_history
sydweisberg Dec 1, 2024
14c7d8e
Merge pull request #62 from sydweisberg/find_a_station_styling
sydweisberg Dec 1, 2024
2c6cb49
Merge branch 'master' into new_map
sydweisberg Dec 1, 2024
256f519
Merge pull request #64 from sydweisberg/new_map
sydweisberg Dec 1, 2024
04bbec7
Payment updates when bike is rented now.
emruckle Dec 2, 2024
a38ec21
Some buttons are fixed.
emruckle Dec 2, 2024
8d735b3
Fixed bug about returning a bike.
emruckle Dec 2, 2024
c8f9023
All but two buttons are working.
emruckle Dec 3, 2024
b54fda8
Delete profile button is all clickable.
emruckle Dec 3, 2024
cbc8594
Add funds button works.
emruckle Dec 3, 2024
9c6b62a
Fixed the header.
emruckle Dec 3, 2024
14f63bd
Hardcoded header height so it doesnt overlap when page is shrunk.
emruckle Dec 3, 2024
877b876
Make scaling dynamic for map and station list.
mollyd13 Dec 3, 2024
4177137
Merge pull request #65 from sydweisberg/payment_not_updating_fix
sydweisberg Dec 3, 2024
45614bc
Merge pull request #66 from sydweisberg/emma_tries_buttons
sydweisberg Dec 3, 2024
4c4b197
Merge pull request #67 from sydweisberg/new_map
sydweisberg Dec 3, 2024
7188cda
Put a bit more spacing between the buttons, map, and dropdown in the …
SWorster Dec 3, 2024
6e875af
Fixed flash alert bug.
mollyd13 Dec 3, 2024
acf436c
Tables now fully clickable, with uniform spacing.
SWorster Dec 3, 2024
3e9cac5
Maybe fixed element error.
emruckle Dec 3, 2024
07a1b51
Table headers now highlight on hover.
SWorster Dec 3, 2024
1365b32
Styled home table.
SWorster Dec 3, 2024
7cece7b
Merge pull request #68 from sydweisberg/rental-spacing-fix
sydweisberg Dec 3, 2024
e129405
Merge pull request #69 from sydweisberg/flash_alert_fix
sydweisberg Dec 3, 2024
f5cf7c1
Merge pull request #70 from sydweisberg/table-styling
sydweisberg Dec 3, 2024
6a86aa8
Fixed rental history.
emruckle Dec 3, 2024
9e7a41e
Merge pull request #71 from sydweisberg/flash_alert_fix
sydweisberg Dec 3, 2024
04c30ab
Top ten user filtering added.
emruckle Dec 4, 2024
811bbb8
Hours is correct now.
emruckle Dec 4, 2024
384d303
Home table centered, table highlighting reduced (only on links/sorting).
SWorster Dec 4, 2024
aefde4f
Fixed top ten users.
emruckle Dec 4, 2024
57a8cc1
Top ten user badge added.
emruckle Dec 4, 2024
44c1196
Merge pull request #72 from sydweisberg/table-styling-again
sydweisberg Dec 5, 2024
01892fb
Merge pull request #73 from sydweisberg/top_riders
sydweisberg Dec 5, 2024
b5fc989
Make tables round
mollyd13 Dec 5, 2024
c7053b8
Add some more borders.
mollyd13 Dec 5, 2024
2584315
A little header update.
mollyd13 Dec 5, 2024
2ca6864
Merge pull request #74 from sydweisberg/table-styling-again
sydweisberg Dec 5, 2024
27ecaaa
Make Stations Map Centered.
mollyneu Dec 5, 2024
d496054
Hover over info for badge.
emruckle Dec 5, 2024
0a9b8d7
Update index.html.erb
mollyneu Dec 6, 2024
8eff818
Fixed floatail invalid data type for user balance
sydweisberg Dec 6, 2024
f41b8b9
Merge pull request #76 from sydweisberg/fix_migration
sydweisberg Dec 6, 2024
903a6d9
Merge pull request #75 from sydweisberg/widen_map
sydweisberg Dec 6, 2024
7f0a581
Fixed user ride history url path
sydweisberg Dec 6, 2024
5d5f000
Merge pull request #77 from sydweisberg/history_route
sydweisberg Dec 6, 2024
708ed33
Added sentence to active rentals page.
emruckle Dec 6, 2024
4850fda
Updated biker info to set user hours to 0
sydweisberg Dec 6, 2024
59aa5f9
Updated show page
sydweisberg Dec 6, 2024
922a1ab
Merge pull request #79 from sydweisberg/user_hours_fix
sydweisberg Dec 6, 2024
98e08a5
Fixed showing user balance if nil
sydweisberg Dec 6, 2024
c1652f9
Merge pull request #81 from sydweisberg/fix_showing_balance
sydweisberg Dec 6, 2024
712172f
Profile page styling.
mollyneu Dec 6, 2024
e793706
Added Viktor to header.
mollyneu Dec 6, 2024
d3e0886
Rounded map and removed superfluous borders.
mollyd13 Dec 6, 2024
4b37c16
Changed buttons to be white.
mollyneu Dec 6, 2024
e3f8fd3
SNAIL HAVE BEEN ADDED.
emruckle Dec 6, 2024
51f0c56
Fixed columns.
mollyneu Dec 6, 2024
35ee062
Snail on box.
mollyneu Dec 6, 2024
2648b59
Adding customer testimonials.
emruckle Dec 6, 2024
fe5a652
Added sentence w instructions to bike rental page.
emruckle Dec 6, 2024
0cb53cd
Rental page defaults to map page now, not list page.
emruckle Dec 6, 2024
335351c
Merge branch 'about_developers' into thank_you_page_style
emruckle Dec 6, 2024
54d9541
Merge branch 'add_sentence_active_rentals' into thank_you_page_style
emruckle Dec 6, 2024
94f145f
Flipped Vector, added speech bubble
mollyneu Dec 6, 2024
9afa11d
Styled thank you page.
emruckle Dec 6, 2024
ec833ff
Styling!
mollyneu Dec 6, 2024
d5bfd3d
Finalized header.
mollyd13 Dec 6, 2024
93a45f9
Work on table
mollyneu Dec 6, 2024
8de65eb
Merge remote-tracking branch 'origin/mollys_css' into home_page_styling
emruckle Dec 6, 2024
18b819a
Merge remote-tracking branch 'origin/mollys_css' into home_page_styling
emruckle Dec 6, 2024
ef1bfa6
get rid of unnecessary borders.
mollyd13 Dec 6, 2024
0f91e6a
Merge remote-tracking branch 'origin/mollys_css' into home_page_styling
emruckle Dec 6, 2024
1b8e6be
Beginning phases of home page.
emruckle Dec 6, 2024
24cf1b2
Fixed sorting.
emruckle Dec 6, 2024
d26fc14
Fixed speech box.
mollyneu Dec 6, 2024
9431758
Added background image.
emruckle Dec 6, 2024
efcc6da
New breaks
mollyneu Dec 6, 2024
91b57ad
Adjusted position of background image.
emruckle Dec 6, 2024
56cd728
Remved vector snail from bottom of home page.
emruckle Dec 6, 2024
8d2239a
Valet bike now says vector.
emruckle Dec 6, 2024
6b03941
Cropped whitespace our of viktor steps.
emruckle Dec 6, 2024
0bc5523
Font changed.
emruckle Dec 6, 2024
6d39900
Merge branch 'master' into emma_tries_something
emruckle Dec 6, 2024
cf4c278
Merge branch 'home_page_styling' into emma_tries_something
emruckle Dec 6, 2024
92af853
Add Footer.
mollyd13 Dec 6, 2024
909c930
Merge remote-tracking branch 'origin/footer' into emma_tries_something
emruckle Dec 6, 2024
d55ba0e
Merge branch 'top_riders' into emma_tries_something
emruckle Dec 6, 2024
9a24f49
Add hover functionality to badge.
emruckle Dec 6, 2024
12e85e5
Fixed ride history table.
emruckle Dec 6, 2024
760c679
Changed webpage title to VectorBike.
emruckle Dec 6, 2024
a3d33a3
Sustainable*.
emruckle Dec 7, 2024
849f15e
Fixed spacing on about page.
emruckle Dec 7, 2024
20f360e
Changed home page photo.
emruckle Dec 7, 2024
7efca02
Rounded row 1 corners of ride history table.
emruckle Dec 7, 2024
700d1c5
Bandaid for footer being located incorrectly on two pages.
emruckle Dec 7, 2024
fe6bacc
Made it so when you hover over snail icon to go home he doesn't chang…
emruckle Dec 7, 2024
fa5dc24
Enhance home page css.
mollyd13 Dec 7, 2024
de827dd
Center align text.
mollyd13 Dec 7, 2024
f92e550
Stop footer from covering button.
mollyd13 Dec 7, 2024
2796f55
Put some respect on Viktor's name.
mollyd13 Dec 7, 2024
516cb0c
Added Vector favicon
sydweisberg Dec 7, 2024
a2ed885
Merge pull request #86 from sydweisberg/favicon
sydweisberg Dec 7, 2024
d08d0a8
Updated README
sydweisberg Dec 7, 2024
97914de
Merge pull request #87 from sydweisberg/update_readme
sydweisberg Dec 7, 2024
0d60bf4
Stations dropdown only displays stations with available bikes. Remove…
SWorster Dec 7, 2024
833f0a9
Spelled Syd's name wrong sorryyyy.
emruckle Dec 7, 2024
3eba39d
Fixed thank you spelling.
emruckle Dec 7, 2024
eb38db9
Dropdown height now auto-sized (min 50%, max 75%). Also fixed width o…
SWorster Dec 7, 2024
1f69491
Added slogan to homepage welcome. Thoughts?
emruckle Dec 7, 2024
20fd504
Updated Readme with information from MVP PR, formatted with Markdown.
SWorster Dec 7, 2024
aa20aac
Merge pull request #89 from sydweisberg/dropdown-available-only
sydweisberg Dec 7, 2024
922b186
Merge pull request #90 from sydweisberg/dropdown-autosize
sydweisberg Dec 7, 2024
ebd85cc
Merge branch 'master' into emma_tries_something
sydweisberg Dec 7, 2024
0f45f84
Merge pull request #91 from sydweisberg/emma_tries_something
sydweisberg Dec 7, 2024
c4a0d14
Vector bike*.
emruckle Dec 7, 2024
421fb0b
Merge pull request #92 from sydweisberg/readme-update
sydweisberg Dec 7, 2024
b77fa52
Merge branch 'emma_tries_something' of https://github.com/sydweisberg…
emruckle Dec 7, 2024
eaae59c
Merge pull request #93 from sydweisberg/emma_tries_something
sydweisberg Dec 7, 2024
d78526e
Fixed jpeg->jpg. Go snails!
emruckle Dec 7, 2024
275ad42
Merge pull request #94 from sydweisberg/emma_tries_something
emruckle Dec 7, 2024
5682df8
Removed every instance of jpeg, replaced with jpg.
emruckle Dec 7, 2024
bc9716d
Merge pull request #95 from sydweisberg/emma_tries_something
emruckle Dec 7, 2024
59b7873
Deleted unused history page. Fixed truncate.
emruckle Dec 7, 2024
85c9edc
Merge pull request #96 from sydweisberg/front_end_deployment_fixes
emruckle Dec 7, 2024
93db103
Changed map width to 100%.
SWorster Dec 7, 2024
31f532b
Should fix Nil error in rental.
emruckle Dec 7, 2024
4f8b77e
Merge pull request #98 from sydweisberg/front_end_deployment_fixes
emruckle Dec 7, 2024
6d8c28c
Spelling.
SWorster Dec 7, 2024
8e364fe
Allowed stripe to run in production and development
sydweisberg Dec 7, 2024
78d1e92
Merge pull request #100 from sydweisberg/strip_prod_dev
sydweisberg Dec 7, 2024
57aed30
Merge pull request #97 from sydweisberg/dropdown-fix-again
sydweisberg Dec 7, 2024
7392b8d
Merge pull request #99 from sydweisberg/minor-spacing-fix
sydweisberg Dec 7, 2024
01caac5
Think I got the rest of the Vector Bikes.
emruckle Dec 7, 2024
28e18be
Merge pull request #101 from sydweisberg/make_vectorbike_one_word
emruckle Dec 7, 2024
25ca2bb
About page paragraph spacing.
SWorster Dec 7, 2024
a72bbdb
HTML formatting.
SWorster Dec 7, 2024
09c7e37
Formatted all CSS and erb files so that indents are standardized.
SWorster Dec 7, 2024
c759659
Removed summary of changes from readme.
emruckle Dec 7, 2024
c335625
Merge pull request #104 from sydweisberg/readme_cleanup
emruckle Dec 7, 2024
9915cd0
Merge pull request #102 from sydweisberg/about-page-spacing
sydweisberg Dec 7, 2024
2a3f10c
Merge branch 'master' into i-love-standardized-code-formatting
sydweisberg Dec 7, 2024
94b052d
Merge pull request #103 from sydweisberg/i-love-standardized-code-for…
sydweisberg Dec 7, 2024
0316f5c
Dropdown min height now 25%
SWorster Dec 7, 2024
ae4acc3
Fixed profile page spacing and remove dropdown margin.
emruckle Dec 7, 2024
f5797b4
Merge pull request #105 from sydweisberg/dropdown-min-height
sydweisberg Dec 7, 2024
909223a
bonk.
SWorster Dec 7, 2024
8057ccd
Merge pull request #106 from sydweisberg/stripe-testing
SWorster Dec 7, 2024
5d01f83
Map and dropdown spacing.
mollyd13 Dec 7, 2024
955dded
Fix upper case.
mollyd13 Dec 7, 2024
cb5370c
Big rent a bike button.
mollyd13 Dec 7, 2024
2a5ca5b
Delete unused images.
mollyd13 Dec 7, 2024
294905b
Make logo bigger.
mollyd13 Dec 7, 2024
e4320c3
Text now larger.
SWorster Dec 7, 2024
94e7b58
Dropdown width is now static, height min now equal to one empty row.
SWorster Dec 7, 2024
69b3f0e
Dropdown now sorted.
SWorster Dec 7, 2024
aadeaf8
Toggle map/list now has rounded interior corners
SWorster Dec 8, 2024
624bbcb
Added informative text to help user.
SWorster Dec 8, 2024
0ff44fb
Signup button on sign in page.
SWorster Dec 8, 2024
dd8e1c6
Merge pull request #107 from sydweisberg/larger-text
sydweisberg Dec 9, 2024
16742e5
Merge branch 'master' into dropdown-fixed-width
sydweisberg Dec 9, 2024
8235b59
Merge pull request #108 from sydweisberg/dropdown-fixed-width
sydweisberg Dec 9, 2024
0e34ce0
Merge pull request #109 from sydweisberg/toggle-border
sydweisberg Dec 9, 2024
05d27f7
Merge branch 'master' into more-informative-text
sydweisberg Dec 9, 2024
cd5e32a
Merge pull request #110 from sydweisberg/more-informative-text
sydweisberg Dec 9, 2024
ed40d5f
Merge pull request #111 from sydweisberg/signin-signup-button
sydweisberg Dec 9, 2024
c3add9e
Merge branch 'master' into fix_spacing
sydweisberg Dec 9, 2024
030da7a
Merge pull request #112 from sydweisberg/fix_spacing
sydweisberg Dec 9, 2024
292c342
Reverted change to showing a user's balance in profile
sydweisberg Dec 9, 2024
21e33f7
Merge pull request #113 from sydweisberg/fix_deployment_issues
sydweisberg Dec 9, 2024
56a1c62
Fixed speech bubble overflowing.
emruckle Dec 9, 2024
b8b9a24
Update README.md
SWorster Dec 9, 2024
2b75530
Merge pull request #114 from sydweisberg/fix_text_box
sydweisberg Dec 9, 2024
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
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ gem "redis", "~> 4.0"
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
Expand Down Expand Up @@ -76,6 +76,7 @@ end

# Developer Added Gems
gem 'dotenv-rails'
gem 'stripe'

# Suggested Potentially Useful Gems
# gem 'devise'
Expand Down
12 changes: 11 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
bcrypt (3.1.20)
bindex (0.8.1)
bootsnap (1.13.0)
msgpack (~> 1.2)
Expand Down Expand Up @@ -132,9 +133,11 @@ GEM
digest
net-protocol
timeout
nio4r (2.5.8)
nio4r (2.7.4)
nokogiri (1.13.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
public_suffix (5.0.0)
Expand Down Expand Up @@ -191,9 +194,12 @@ GEM
sprockets (>= 3.0.0)
stimulus-rails (1.1.0)
railties (>= 6.0.0)
stripe (13.2.0)
strscan (3.0.4)
tailwindcss-rails (2.0.12-arm64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.0.12-x86_64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.0.12-x86_64-linux)
railties (>= 6.0.0)
thor (1.2.1)
Expand Down Expand Up @@ -223,9 +229,12 @@ GEM

PLATFORMS
arm64-darwin-20
arm64-darwin-23
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
bcrypt (~> 3.1.7)
bootsnap
capybara
debug
Expand All @@ -239,6 +248,7 @@ DEPENDENCIES
selenium-webdriver
sprockets-rails
stimulus-rails
stripe
tailwindcss-rails
turbo-rails
tzinfo-data
Expand Down
262 changes: 105 additions & 157 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,157 +1,105 @@
# ValetBike

Smith College CSC223: Software Engineering\
Starter App for ValetBike project

## Environment Configuration

As you configure your environment you should **keep a log** where you **write down all the steps you take** including **each command you type**. You will inevitably run into errors setting up your development environment and maintaining a meticulous log will allow others to help you troubleshoot. Ignore this recommendation at your own peril, but don't say you haven't been warned :]

Installing Ruby on Rails is not a trivial process. It is the essential first step to developing ValetBike, and it will take you far longer than all the other steps to complete. Be sure to set aside ample time to work through the setup.

### 0. Remember that versions matter
ValetBike runs on Ruby 3.1.2 and Rails 7.0.3.1. It is essential that you configure your environment to use these precise versions of the language and framework.

### 1. Install Ruby on Rails with MySQL

On Mac it is strongly recommended that you use asdf to install Ruby. On Windows you should set up your environment through the Windows Subsystem for Linux (WSL). The guides below explain how to do so in detail:

- [Mac Ruby on Rails Developer Environment Setup](https://github.com/deadroxy/valetbike/blob/master/notes/mac-setup.md)
- [Windows Ruby on Rails Developer Environment Setup](https://github.com/deadroxy/valetbike/blob/master/notes/windows-setup.md)

Be sure to complete all the installation procedures in the relevant guide before continuing on to the next step.

### 2. Fork & clone the ValetBike repo

- Click fork in the upper right hand corner of the ValetBike GitHub page
- This creates a copy of the repository on your personal GitHub account
- To access this code on your development machine, create a local copy of your fork with:\
`git clone https://github.com/<your_username>/valetbike.git`
- Note: you should run that command when you are in the folder where you want to store the repo\
(e.g. `/Users/<your_username>/Development`)

### 3. Prepare the application

- Enter the directory you just created: `cd valetbike`
- Add `.tool-versions` to app directory to ensure the right ruby is always used: `asdf local ruby 3.1.2`
- Install required gems with: `bundle install`

### 4. Configure the database environment variables

- Add a file called `.env` to the valetbike root directory
- Ensure that it includes the credentials you setup when installing MySQL:

```shell
MYSQL_USERNAME=root
MYSQL_PASSWORD=YOURPASSWORD
MYSQL_SOCKET=/tmp/mysql.sock # For Mac
MYSQL_SOCKET=/var/run/mysqld/mysqld.sock # For Windows
```

### 5. Prepare the database in MySQL

- Use rails to create both the development and test databases with:\
`rake db:create`
- Or use mysql to just create the development databse with:\
`mysql -u root -p`\
`CREATE DATABASE valetbike_development;`\
`exit`
- Then run the database migrations with:\
`rake db:migrate`

### 6. Confirm that the app runs

* Launch the web server using `rackup` or `rails s` (short for `rails server`) or `bin/dev`
* If using `rackup` open http://localhost:9292 (or http://127.0.0.1:9292) in a browser
* If using `rails s` or `bin/dev` open http://localhost:3000 (or http://127.0.0.1:3000) in a browser
* You should see ValetBike welcome page


## Assignment #1: Hello Stack, Welcome to ValetBike!

### Brief Background
You and several other junior engineers have just started at ValetBike, a community tech co-op based in Nipmuc Notch, and you are excited to finally be getting paid to contribute to a meaningful app. During your hiring interview, you said you were comfortable doing full stack programming, but stressed you hadn't worked in Ruby on Rails before. The lead developer thought you were right for the position and promised you a guided tour of the codebase on your first day. However, after your onboarding, you learn they've just gone on leave indefinitely. It also turns out the lead developer was the *only* developer at ValetBike, and now the rest of the team is counting on you and the other new programmers to complete the prototype before the scheduled launch day.

As a fearless software engineer you agree to onboard yourself and attempt to continue the build. You didn't get much information about the architecture or design of the product during your interview. All you remember is that the lead developer had been working with the [ValleyBike](https://valleybike.org) team to iterate on their system which launched in 2018 and that they were using GitHub to collaborate on their codebase.

### Assignment Goal
Your primary objective is to get your development environment configured so that the existing app will run on your machine. To exceed expectations, you must add at least one feature to the current code. To distinguish yourself, you should add two or more features. See submission guidelines below for complete details.

### How to Begin
* Create a GitHub account if you don't have one
* Go to [https://github.com/deadroxy/valetbike](https://github.com/deadroxy/valetbike)
* Follow the README instructions to configure your environment

### Teamwork Guidelines
You may work in teams of up to five people to get your environments set up and to modify the code. But you must each submit your own unique environment screenshots via Moodle. If you choose to fork the repo to add features, you can collaborate on the code, but you must each create and submit a record of a unique pull request.

### Ruby on Rails Guides
You will probably be unfamiliar with the main components of the ValetBike stack like the language (Ruby), the framework (Rails), and the database (MySQL). Luckily the lead developer left links to their favorite books and tutorials for you below. Consult them regularly as you get your bearings in the new environment.

* [Getting Started with Rails](https://guides.rubyonrails.org/getting_started.html)
* [I Love Ruby](https://i-love-ruby.gitlab.io/)
* [The Bastards Book of Ruby](http://ruby.bastardsbook.com/)
* [Why's (Poignant) Guide to Ruby](https://poignant.guide/)

### Exploration Tips
* Review the files the lead developer left in the `notes/` folder
* Pay special attention to the environment setup and [app creation](https://github.com/deadroxy/valetbike/blob/master/notes/app-creation.md) guides
* Use GitHub to dive into previous commits to see what they built so far
* Use `rails console` to experiment with creating & associating records (objects) from the command line
- `s = Station.new(name: "Neu Station", address: "123 Novel Lane", identifier: "45")`
- `s.save`
- `b = Bike.new(identifier: "1234")`
- `b.current_station = s`
- `b.save`
- `s = Station.new(name: "Ye Olde Statione", address: "101 Historic Way", identifier: "99")`
- `s.save`
- `b = Bike.new(identifier: "5678")`
- `b.save`
- `s`
- `Station.last`
- `Station.first`
- `s = Station.first`
- `s`
- `s.id`
- `s.identifier`
- `s.docked_bikes`
- `s.docked_bikes.count`
- `Station.last.docked_bikes.count`
- `Bike.first.current_station`
- `Bike.last.current_station`
- `Bike.find_by(identifier: "1234").update(current_station: Station.last)`
- `Station.last.docked_bikes`
- `Station.first.docked_bikes`

### Submission Guidelines to Meet Expectations
1. Get ValetBike running on your development machine
2. Modify the welcome message
3. Take a screenshot showing your change works (include browser, console, date/time)
4. Name the screenshot "youremail-a1-ss.png" or *.jpg (for me it would be "jbrewer-a1-ss.png")
5. Create a text file called "youremail-a1-team.txt" (for me it would be "jbrewer-a1-team.txt")
6. List the names of everyone you worked with on this assignment, including your own (for me it would be "Johanna Brewer")
7. Submit your screenshot and team list via Moodle

### Submission Guidelines to Exceed Expectations or Distinguish yourself
1. Complete all of the Meets Expectations tasks
2. Implement one (Exceeds) or more (Distinguished) of the features below
- Show number of docked bikes at each station
- Create rake task to import station & bike data from csv files
- Allow user to view list of bikes
- Allow user to switch between station and bike list views
- Allow user to reverse sort order of stations or bikes in list view
3. Commit and push your changes to your fork on GitHub
4. Create a pull request from your modified fork to the main ValetBike repo
5. Create a file called "youremail-a1-pr.txt" (for me it would be "jbrewer-a1-pr.txt")
6. Include a complete link to your pull request as the first line of this file (e.g. "https://github.com/deadroxy/valetbike/pull/1234")
7. Submit your pull request file along with your screenshot and team list via Moodle

## License
Copyright 2021-2022, Johanna Brewer

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses.

# VectorBike

VectorBike is now live! Visit the site on [Heroku](https://vectorbike-ecfe326f48ab.herokuapp.com/).

## Developed By
* Molly Neu
* Molly Daniel
* Skye Weaver Worster '25J
* Emma Ruckle
* Sydney Weisberg

## Development environment setup
VectorBike requires Ruby 3.1.2 and Rails 7.0.3.1. This guide uses MySQL for database functionality. Set up and start a MySQL database on a socket connection with a username and password.

Create a `.env` file in the repository directory, add it to your `.gitignore`, and include the following:
```
MYSQL_USERNAME=<your_username>
MYSQL_PASSWORD=<your_password>
MYSQL_SOCKET=<path_to_socket>.sock
```
For access to the Stripe API, please reach out to Sydney Weisberg for the secret key. Store the key in your `.env` file as `STRIPE_SECRET_KEY`.

Execute the following commands from your repository directory:
```rb
bundle install
rails db:reset #reconfigures the database
rails db:migrate #ensures schema is updated
rake initial_import #loads CSV data, generates pseudo-random data
rails s #launches the web server
```
Navigate to `http://localhost:3000` in a browser, and enjoy!

On each subsequent deployment, only `rails s` is required to launch the page. If changes to the schema, CSVs, or gems are made, perform all commands from `bundle install` onwards before launching.

## VectorBike MVP functionality description

### Account Management
- Users can create an account, sign in, and log out.
- On the `Profile` page, users can view and edit their information or delete their account.
- Users can add funds to their account via Stripe.
- On the `Profile` page, the user’s ride history is displayed.

### Site Navigation
- Accessible via a top navigation bar.
- Homepage includes an overview of VectorBike and a `Rent a Bike!` button linking to the rental page. `Rent` also links to the rental page.
- `About` page provides detailed information about VectorBike and an about the developers section.
- `Profile` page displays user-specific details.
- Site features a footer with contact information.

### Rental Process
- Users can access the rental page via `Rent a Bike!` on the homepage or `Rent` in the navigation bar.
- Stations are displayed in list or map view:
- Map View: Shows station locations with clickable icons for details and directions. Searchable dropdown allows station selection. The dropdown only shows stations with at least one available bike.
- List View: Stations sortable by name, address, or available bikes.
- Clicking a station opens a rental form to select a bike (charged > 50%) and rental duration.

### Rental Form
- Options include `Return to Stations` to cancel or `Rent Now!` to complete the rental.
- Invalid rentals (e.g., no bike selected) do not go through, and the user is shown an informative flash alert.
- Non-logged-in users are redirected to the login page before proceeding.
- If a rental is valid, and the user has enough funds, the rental goes through.

### Rental Management
- After a successful rental, users see a countdown timer and options to return the bike or view active rentals.
- Users can have up to 5 active rentals.
- The `View Bike Rentals` button lists active rentals, with links to each rental’s countdown page.

### Returning Bikes
- Users select a return station from a dropdown in a pop-up.
- Clicking `Return` processes the return, while `Close` cancels the action.
- After returning a bike, users see a success screen.

### Ride History and Metrics
- The `Profile` page lists total biking hours, and the number of rides. Ride history is also displayed.
- The top ten users with the most riding time have a badge displayed next to their name on the profile page.

### Rental Limits
- Users can have up to five active rentals.
- With at least one active rental, users are routed to the `View Bike Rentals` page when they click `Rent` or `Rent a Bike!`.
- Users with fewer than five rentals can rent additional bikes; users at the limit see a message indicating they have reached the maximum number of rentals.
- Once all rentals are returned, users are routed to the stations list when they click `Rent` or `Rent a Bike!`.

### Recommended walkthrough
- Navigate to the sign up page, and sign up for an account.
- Add funds to your account via the `Add Funds` button. We recommended putting at least $10.00 into your account. Use the card number `4242 4242 4242 4242` in the Stripe test API, provide a reasonable expiration date for the card, and fill all other fields with random data.
- Navigate to the rent page.
- Use the toggle at the top of the page to view the stations list and the embedded map/search function.
- Return to list view.
- Sort the list of stations by either name, address or number of available bikes by clicking on the corresponding part of the header.
- Select a station with at least one bike by clicking on its row (the number of available bikes is shown at the right end of each station’s row).
- In the rental form, select a bike and a duration.
- Press `Rent Now!`.
- Navigate away from the success page.
- Return to the rent page, observe it is the current rentals page rather than the station list.
- Click `Rent Another Bike` and repeat the rental process.
- Click `View Active Rentals` and observe that you now have two active rentals.
- Click on one of your rentals.
- Click the `Return Your Bike` button to start a bike return.
- Select the station you would like to return the bike to (we suggest Florence Bank station, the first station in the list when it refreshes).
- Click on `Rent` in the nav bar. Repeat the return steps to return your second rental.
- Click on a station you returned a bike to and confirm that it is once again listed in available bikes.
- Navigate to `Profile`.
- Observe that you now have two past rides.
- Click the `Delete Profile` button
- Confirm the deletion of your profile in the pop up.
Binary file added app/assets/images/bike_return.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/emma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/flipped_viktor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/mollyd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/mollyn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/rating.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/skye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/syd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/top_ten_badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/valley_bike.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/vector_on_a_ride.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/viktor_snail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/viktor_snail_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/viktor_steps.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading