Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more examples of configuring file system shortcuts using Ruby #158

Open
ericfranz opened this issue May 7, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@ericfranz
Copy link
Contributor

commented May 7, 2019

Also, link to example configs like https://github.com/CHPC-UofU/OnDemand-info

For example https://discourse.osc.edu/t/other-directories-in-files-explorer-app/335/4

In this example you have project space directories that follow a naming convention that includes the primary or supplemental group in the directory name, and you are okay with adding these shortcuts at app launch time if they exist. i.e.

/uufs/chpc.utah.edu/common/home/anderegg-group1
/uufs/chpc.utah.edu/common/home/anderegg-group2
/uufs/chpc.utah.edu/common/home/armentrout-group1
/uufs/chpc.utah.edu/common/home/avey-group3
/uufs/chpc.utah.edu/common/home/balagurunathan-group1
/uufs/chpc.utah.edu/common/home/bmi-group1
  • groups are anderegg and armentrout and bmi etc.

The solution is to add to the initializer something like this:

OodFilesApp.candidate_favorite_paths.tap do |paths|
  OodSupport::User.new.groups.each do |group|
    paths.concat Pathname.glob("/uufs/chpc.utah.edu/common/home/#{group.name}-group*")
  end
end

Since glob will only return paths to directories that actually exist, this is a good approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.