-
Notifications
You must be signed in to change notification settings - Fork 0
Home
David Cliff edited this page Oct 2, 2013
·
28 revisions
Welcome to the drs-sufia-app wiki!
- Using Modernizr with Rails
- jQuery XML Editor
- Hydra Access Controls -
hydra-access-controls/lib/hydra/datastream
- Lesson: indexing hydra rights metadata into solr
- Custom Validations. We'll need these for all of our data streams, probably.
- Validation without ActiveRecord. Important for us.
- Creating a noid -
@batch_noid = Sufia::Noid.noidify(Sufia::IdService.mint)
- Use this to write a basic pre-push hook that will only allow you to push your changes if you've got a fully passing test suite: http://lostechies.com/jasonmeridth/2009/09/10/git-local-pre-commit-hook/ Note that you'll need Git 1.8.2 or later to use this. You may also want to change the last line from 'rake' to 'rake smoke_test', as this will run a considerably snappier custom subset of tests over the items most likely to change. If you fiddle with jobs remember to actually test those changes.
- Relevant to Departments.
Loading development environment (Rails 3.2.13)
irb(main):001:0> a = NuCollection.new(pid: 'neu:1', identifier: 'neu:1', title: 'Root Collection')
=> #<NuCollection pid:"neu:1", nu_title:["Root Collection"], nu_description:[""], nu_identifier:["neu:1"], depositor:nil>
irb(main):002:0> a.rightsMetadata.permissions({group: 'public'}, 'read')
=> "read"
irb(main):003:0> a.rightsMetadata.permissions({person: "dev_email_account_here"}, 'edit')
=> "edit"
irb(main):004:0> a.save!
=> true
repositorydev.neu.edu has now been setup so that it contains a remote git location, just like how we use GitHub. This is beneficial for two reasons.
- No more worrying when GitHub goes down.
- It has been setup so that when you push to the server (to which I will refer to colloquially as repdev) it then updates repositorydev.neu.edu. Currently, all it does is cd into the working copy and do a git pull. Any changes that require a restart of the rails server will need to be done manually.
To utilize this, some changes need to made to your local git config.
To add repdev by itself:
git remote add repdev ssh://[email protected]/home/drs/drs.git
To make a new remote called 'all' so as to only run through tests once (saving time) and to keep GitHub and RepDev in sync, add this to .git/config
[remote "all"]
url = [email protected]:nu-lts/drs.git
url = ssh://[email protected]/home/drs/drs.git
An example push after these changes
git push all develop
N.B. You may notice that the url for the repdev git connection is done with ssh. This means you will be prompted to put in the drs users password. There are two ways to make this less painful.
- Use keepassx with hotkey patch for OSX - http://www.keepassx.org/forum/viewtopic.php?t=1920
- Update ssh with [email protected] to allow for the use of paired keys (I'm looking into that - David)