- Administrator privileges
- Bundler
- Git
- JDBC Oracle driver
- Java 8 SDK
- JRuby 9.1.14.0
- Node.js >=8.9.4
- PostgreSQL
- Rubygems 2.5.1
- RVM - Ruby version managers
- xvfb - xvfb headless browser, included for Macs with XQuartz
For detailed installation process, please refer to the step 1-15 from the CalCentral repo here
- To toggle the fake data injection function, please change the fake flag in
edodbsection of theconfig/settings.ymlfile totrue, e.g.:
edodb:
fake: trueNote: to disable the database stubbing feature, simply revert the fake flag to false
- To insert new fake responses, open
config/initializer/populate_sisedo_h2.rband edit the insert clauses immediately afterCREATE TABLE SISEDO.STUBBED_RESPONSE, e.g:
DROP TABLE IF EXISTS SISEDO.STUBBED_RESPONSES;
CREATE TABLE SISEDO.STUBBED_RESPONSES (
QID NUMBER,
RESPONSE VARCHAR(4000)
);
INSERT INTO SISEDO.STUBBED_RESPONSES(QID, RESPONSE) VALUES (1, '{"UC_SRCH_CRIT": "Marshall Cremin","STUDENT_ID": "55474201384","CAMPUS_ID": "409668667284169326577928265309","OPRID": "477698031245345903800693789297","LAST_NAME": "Cremin","FIRST_NAME": "Marshall","MIDDLE_NAME": "Kub","UC_PRF_FIRST_NM": "Marshall","UC_PRF_MIDDLE_NM": "Kub","EMAIL_ADDR": "marshallcremin@berkeley.edu","ACAD_PROG": "Doctorate"}');
INSERT INTO SISEDO.STUBBED_RESPONSES(QID, RESPONSE) VALUES ([your query_id], [your fake response])Note: One example is given with query_id of 1, the length limit of the fake response is 4000 character.
- Start the server in interactive mode
rails cThis should bring you to JRuby interactive console
- To retrieve the inserted fake response, type in
EdoOracle::Queries.search_students([your_query_id])Note that the stubbed response completely bypass the original function structure and argument required for the provided method.