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

Q Chitter Challenge #2178

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
64ed792
created databases and seed file for RSpec
SomthingInteresting Apr 10, 2023
1d82ed6
created integration test file, database connection and spec helper code
SomthingInteresting Apr 10, 2023
5788555
started first test for peeps and setting up sinatra, left with databa…
SomthingInteresting Apr 10, 2023
ea0ff81
created first test for integration and moved onto PeepRepository
SomthingInteresting Apr 11, 2023
43cb12f
first PeepRepository test passes
SomthingInteresting Apr 11, 2023
4a266fd
got all peeps showing with time plus date on the peeps path
SomthingInteresting Apr 11, 2023
5f7b5b0
added user repo cass to get peeps route. Unfinished.
SomthingInteresting Apr 12, 2023
5f4fd0b
added username to peeps
SomthingInteresting Apr 12, 2023
27c33a9
create method tested for peeps repo class
SomthingInteresting Apr 12, 2023
7d01919
sign up button with styling added to signup erb along with test
SomthingInteresting Apr 12, 2023
69dd847
updated create method with bcrypt
SomthingInteresting Apr 12, 2023
805aed9
tests now working, along with web up sign up, moving onto login page
SomthingInteresting Apr 13, 2023
f95c76f
loggin and loggedin page working, next up is logout
SomthingInteresting Apr 13, 2023
39af8ac
logout working as intended and updated all page styles but need to ma…
SomthingInteresting Apr 13, 2023
e3acb56
major functions for web app now work, updated chitter_diagram which h…
SomthingInteresting Apr 13, 2023
b98804c
started on README
SomthingInteresting Apr 13, 2023
8966eaf
rubocop auto corrections and readme update
SomthingInteresting Apr 13, 2023
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
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ end
group :development, :test do
gem 'rubocop', '1.20'
end

gem "sinatra", "~> 3.0"
gem "sinatra-contrib", "~> 3.0"
gem "webrick", "~> 1.8"
gem "rack-test", "~> 2.1"
28 changes: 27 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ GEM
ast (2.4.2)
diff-lcs (1.4.4)
docile (1.4.0)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
parallel (1.20.1)
parser (3.0.2.0)
ast (~> 2.4.1)
rack (2.2.6.4)
rack-protection (3.0.5)
rack
rack-test (2.1.0)
rack (>= 1.3)
rainbow (3.0.0)
regexp_parser (2.1.1)
rexml (3.2.5)
Expand Down Expand Up @@ -36,6 +44,7 @@ GEM
rubocop-ast (1.11.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -46,21 +55,38 @@ GEM
terminal-table
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
sinatra (3.0.5)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.5)
tilt (~> 2.0)
sinatra-contrib (3.0.5)
multi_json
mustermann (~> 3.0)
rack-protection (= 3.0.5)
sinatra (= 3.0.5)
tilt (~> 2.0)
terminal-table (3.0.1)
unicode-display_width (>= 1.1.1, < 3)
tilt (2.1.0)
unicode-display_width (2.0.0)
webrick (1.8.1)

PLATFORMS
ruby

DEPENDENCIES
rack-test (~> 2.1)
rspec
rubocop (= 1.20)
simplecov
simplecov-console
sinatra (~> 3.0)
sinatra-contrib (~> 3.0)
webrick (~> 1.8)

RUBY VERSION
ruby 3.0.2p107

BUNDLED WITH
2.2.26
2.4.10
27 changes: 27 additions & 0 deletions chitter_app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require 'sinatra'
require "sinatra/reloader"
require_relative 'lib/database_connection'
# require_relative 'lib/users_repository'
require_relative 'lib/peeps_repository'

DatabaseConnection.connect

class ChitterApp < Sinatra::Base
configure :development do
register Sinatra::Reloader
# also_reload 'lib/users_repository'
also_reload 'lib/peeps_repository'
end

get '/peeps' do
users_repo = UserRepository.new
peeps_repo = PeepRepository.new
@peeps = peeps_repo.all
@users = users_repo.all

# Debug statement
# puts "@peeps: #{@peeps.inspect}"

return erb(:peep)
end
end
Binary file added chitter_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading