ets-berkeley-edu/eggshell — pull request #17 by raydavis (2012-11-01 18:36:50+00:00)
Title: Add Oracle data, merged API model, & test with stubs

I ran the campus_data_spec.rb test from the IDE. It doesn't run by default from "rake test" and we probably don't want it to, since it requires a working Oracle connection. Chris is thinking about how to handle the third-party integration tests.

There were two things I didn't get to that I'd hoped to:

1. Getting the Oracle configuration out of environment variables & into rails_config. Because CampusData doesn't use the default Rails database, it needs this line:

establish_connection "campusdb"

But I think this could be replaced by a more verbose call to ActiveRecord such as:

establish_connection "DATABASE_TYPE://USERNAME:PASSWORD@HOST/ETC"

And you can see how that might get filled in outside the usual database.yml file.

2. Leveraging the ActiveModel::Serialization in User to power a simple JSON-only Rails controller as in my "folderol" project.