Giter VIP home page Giter VIP logo

twetter's Introduction

Twetter

This is the sample version of Twetter, a basic clone of the most popular micro-blogging site, produced for Thinkful's Ruby on Rails course.

Before Beginning

Ensure you have the latest version of Ruby Version Manager (RVM) and ruby 2.0.0-p247 installed.

# If you do not have RVM installed, you can do so as follows
\curl -L https://get.rvm.io | bash -s stable

# If you already have RVM install, make sure it's up to date
rvm get head # rvm update for older versions

# Install the most recent Ruby 2.0.0 package
rvm install ruby-2.0.0

Getting Started

# Clone the repository
git clone [email protected]:Thinkful/twetter.git

cd ./twetter

# Install the required gems
bundle install

# Generate a new config/initializers/secret_token.rb file.
echo "Twetter::Application.config.secret_key_base = '`bundle exec rake secret`'" > config/initializers/secret_token.rb

# Set up the database
bundle exec rake db:create db:migrate db:test:prepare

# Start the server
bundle exec rails s

Once you've performed the above actions, you can view the website at http://localhost:3000. Start by creating a user for yourself and then consider using the rake tasks below to seed additional test data.

Seeds

bundle exec rake seed:users             # Create 20 users
bundle exec rake seed:twets             # Create 5 twets for each user

If you'd like to log in as one of your recently seeded users, use the rails console to set the user's password.

bundle exec rails c
user = User.find_by_username('<@username for the user>')
user.password = 'temp1234'
user.save
user.email
# => [email protected]
exit

Now you can use the email address displayed and password to log in as this user.

Run the Tests

bundle exec rspec

Authors

Dan Matthews

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.