Main branch: , deployed version: Heroku link
Dev branch: , deployed version: Heroku link
A web application for organizing and arranging networks, relationships and human connections, written in Ruby on Rails. Created in the Software Engineering II course at the HPI in Potsdam.
vagrant up
(based on the Vagrantfile
).vagrant ssh
.cd hpi-swt2
.rails s -b 0.0.0.0
(-b
/ --binding=IP
allows connections from outside the VM).http://localhost:3000
in your browser to view the page.ruby --version
Ensure Ruby v2.7.2 using rbenv or RVMsqlite3 --version
Ensure SQLite3 database installationnode --version; yarn -v
Ensure Node.js and Yarn installationbundle -v
Ensure Bundler installation (with gem install bundler
)bundle config set without 'production' && bundle install
Install gem dependencies from Gemfile
yarn install --check-files
Install JS dependencies from package.json
rails db:migrate
Setup the database, run migrationsrails db:seed
Initialize database with default values (e.g. global chat)rake devise:create_demo_user
Create a demo user (note email & password)rails s
Start the Rails development server (default: localhost:3000) and log in using the demo credentialsbundle exec rspec
Run the tests (using the RSpec test framework)bundle exec rails db:migrate RAILS_ENV=development && bundle exec rails db:migrate RAILS_ENV=test
Migrate both test and development databasesbundle exec rails assets:clobber && bundle exec rails assets:precompile
Redo asset generationbundle exec rspec
Run the full test suite
-f doc
More detailed test output-e 'search keyword in test name'
Specify what tests to run dynamically--exclude-pattern "spec/features/**/*.rb"
Exclude feature tests (which are typically fairly slow)bundle exec rspec spec/<rest_of_file_path>.rb
Specify a folder or test file to runbundle exec rspec --profile
Examine run time of testsrake factory_bot:lint
Create each factory and catch any exceptions raised during the creation process (defined in lib/tasks/factory_bot.rake
)bundle exec rubocop
Use the static code analyzer RuboCop to find possible issues (based on the community Ruby style guide).
--auto-correct
to fix what can be fixed automatically..rubocop.yml
save_and_open_page
within a test to inspect the state of a webpage in a browserrails c --sandbox
Test out some code in the Rails console without changing any datarails dbconsole
Starts the CLI of the database you're usingbundle exec rails routes
Show all the routes (and their names) of the applicationbundle exec rails about
Show stats on current Rails installation, including version numbersrails g migration DoSomething
Create migration _db/migrate/*DoSomething.rbrails generate
takes a --pretend
/ -p
option that shows what will be generated without changing anythingRubyMine, an IntelliJ-IDE designed for ruby projects supports generating an uml class diagram from the database scheme. An Instruction can be found here: https://www.jetbrains.com/help/ruby/creating-diagrams.html#creating-explain-query-plan.
Currently, a file named class-diagram.png
in the projects root folder is linked in this README. So by overwriting this file, or adding a new one to the README, the current model dependencies can be updated.