In order to get you started with Rails, we've set up a boilerplate application using the following setup:
- Rails 5.2
- Cucumber - acceptance testing framework
- RSpec - testing framework that we will be using for unit testing
- ShouldaMatchers - to simplify our testing in RSpec
-
Copy the url an clone the repository to you
localhost
-
Open the
config/application.rb
and chage the application name fromBoilerplate
to whatever you want to call your application (i.e.SlowFoodOnline
)
module SlowFoodOnline
class Application < Rails::Application
# ... code removed for readability.
end
-
Open the
config/database.yml
and change the database name fromboilerplate_test
,boilerplate_development
, etc, to for exampleslow_food_test
,slow_food_development
andslowfood_production
. Also, if you see ausername
set toboilerplate
change that toslow_food
as well (Again, if you use a different name for your app, make sure you follow the naming standard outlined in the examples above). -
In your terminal, inside the project folder, run the following command to remove the Git original repository:
$ rm -rf .git
- And initiate a new repository (that will give you a clean state and history)
$ git init
- Now, head over to GitHub and create a new repository on your account. Copy the repo url, and add it as your
origin
remote.
$ git remote add origin <your repo url>
-
Run
bundle install
andrails db:create db:migrate
in your terminal (in the project folder) -
Commit and push to your remote.
This should give you a clean repo history.