Skip to content

Will M - Chitter#223

Open
wjmarshall wants to merge 7 commits into
makersacademy:mainfrom
wjmarshall:main
Open

Will M - Chitter#223
wjmarshall wants to merge 7 commits into
makersacademy:mainfrom
wjmarshall:main

Conversation

@wjmarshall
Copy link
Copy Markdown

Your name

William Marshall

User stories

Please list which user stories you've implemented (delete the ones that don't apply).

  • User story 1: "I want to see all the messages (peeps) in a browser"
  • User story 2: "I want to post a message (peep) to chitter"
  • User story 3: "I want to see the date the message was posted"
  • User story 4: "I want to see a list of peeps in reverse chronological order"
  • User story 5: "I want to filter on a specific keyword"

README checklist

Does your README contains instructions for

  • how to install,
  • how to run,
  • and how to test your code?

Here is a pill that can help you write a great README!

Comment thread app.rb
require "./lib/peep"

class Chitter < Sinatra::Base
get '/test' do
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can probably delete this test route

Comment thread app.rb
'Test page'
end

get "/" do
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice restful routes

Comment thread lib/peep.rb
end
end

def self.sort_by_date
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you kept working on this and wanted to add a new feature to sort by something other than date, could you refactor this method to be more flexible?

Comment thread spec/peep_spec.rb

describe Peep do

describe "::create" do
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this should be .create not ::create

@EdwardAndress
Copy link
Copy Markdown

This is a nice solution and it clearly demonstrates the learning objectives around writing to and reading from a db. The next step would be to add filtering – if you had more time, would you know how to get started?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants