-
Notifications
You must be signed in to change notification settings - Fork 1
Quick Reference
Glen Horton edited this page Oct 30, 2015
·
39 revisions
###Scholar@UC
#####Run entire test suite on Curate Gem
cd curate_fork
bundle exec rake jetty:start
-
bundle exec rake spec
or if the test app doesn't exist yetbundle exec rake clean generate spec
bundle exec rake spec
#####Run some tests on Curate Gem
cd curate_fork
bundle exec rake jetty:start
BUNDLE_GEMFILE=./spec/internal/Gemfile bundle exec rspec path/to/spec.rb:LINE
#####Run entire test suite on Scholar application
cd scholar_uc
bundle exec rake jetty:start
bundle exec rake spec
#####Run some tests on Scholar application
cd scholar_uc
bundle exec rake jetty:start
rspec path/to/spec.rb:LINE
###Ruby on Rails
#####Rails Console
- Find a user:
User.find_by_email('user@exmaple.com')
- Find a user by a column:
User.where(email: 'user@example.com')
- Display certain fields:
User.select('first_name,last_name,email').all
- Display results in yaml format:
y User.all
- Mass update a column for multiple users:
User.update_all(department: 'IT')
###Miscellaneous
#####Sync a copy of your local development files to Larry
rsync -avz -e ssh --delete /path/to/files username@larry.libraries.uc.edu:~/path/to/files