pccasto / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

Compliance with the freedesktop.org Base Directory Specification #192

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Reference:

http://standards.freedesktop.org/basedir-spec/latest/
http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

Basically, this specification is about the separation of user files. If I
understand correctly, it says:

1. User data from app foo should go into ~/.local/share/foo 
2. Config files should go into ~/.config/foo
3. Non-essential data (like thumbnails, I suppose) go into ~/.cache/foo

In the case of Rubyripper I suppose this would mean something like:

1. freedb.yaml should be saved into ~/.local/share/rubyripper
2. settings should be stored into ~ /.config/rubyripper

Not many apps implement the specification now, but more and more are
converting.  If it is not too much work, maybe it would be better to get
this right sooner than later. :-)

Thank you for Rubyripper! It is a smart implementation, really friendly and
a pleasure to use!

Greetings,
Demetris

Original issue reported on code.google.com by kikizas@gmail.com on 10 May 2008 at 9:53

GoogleCodeExporter commented 8 years ago
I suppose a standard is there to follow it, right? Thanks for notifying this. I 
don't see any 
harm in moving the files to a different location. Perhaps some code to auto 
move the files 
will come in handy.

Original comment by rubyripp...@gmail.com on 16 Jun 2008 at 5:44

GoogleCodeExporter commented 8 years ago
I would also like this move.

However, freedb.yaml is a cache as I see it. So ~/.cache/rubyripper/freedb.yaml 
or
maybe there is even some standard do save cddb data we should use so every app 
can
use it.
(Not that I need it personally, I only use freedb to rip, after that I only 
listen to
the files anyways)

Fixing bugs is more important though and when we move files we should move all 
of
them at the same time to keep user confusion low.

Original comment by goo...@JonnyJD.net on 17 Nov 2009 at 8:49

GoogleCodeExporter commented 8 years ago
Now most bugs are fixed, I am planning to fix this one. While at it, I will 
create a 
new class for saving and loading settings. This functionality is in fact now 
duplicated for the gtk2 gui and the cli.

Original comment by boukewou...@gmail.com on 26 Apr 2010 at 9:36

GoogleCodeExporter commented 8 years ago
Fixed with commit:
http://github.com/rubyripperdev/rubyripper/commit/0628cd7f53be694c56a5ac0081cd59
8cca06
978f

Some testing would be nice, since I changed quite some lines along the way. The 
old 
directories are deleted automatically.

Original comment by boukewou...@gmail.com on 27 Apr 2010 at 9:50

GoogleCodeExporter commented 8 years ago
The commit
http://github.com/rubyripperdev/rubyripper/commit/0628cd7f53be694c56a5ac0081cd59
8cca06 is
not freedesktop compilant. Configuration data should be stored in
$XDG_CONFIG_HOME/rubyripper. $XDG_CONFIG_HOME defaults to $HOME/.config, but 
may have
a different value. Same issue with $XDG_CACHE_HOME, which defaults to 
$HOME/.cache

newConfig = (ENV['XDG_CONFIG_HOME'] ? ENV['XDG_CONFIG_HOME'] : 
File.join(ENV['HOME'],
'.config'))
newCache = (ENV['XDG_CACHE_HOME'] ? ENV['XDG_CACHE_HOME'] : 
File.join(ENV['HOME'],
'.cache'))

(I do not know, if this is valid ruby code...)

Original comment by fabiusl...@yahoo.de on 29 Apr 2010 at 3:40

GoogleCodeExporter commented 8 years ago

Original comment by boukewou...@gmail.com on 30 Apr 2010 at 7:42

GoogleCodeExporter commented 8 years ago
The commit http://github.com/rubyripperdev/rubyripper/commit/0628cd7f53 did not 
clean 
up the old settings as my $HOME/.rubyripper is actually a symlink. Not sure 
that such 
automatic code is a great idea. I posted it as a separated ticket (#415) but 
it's 
directly related to this commit, specifically this line:

Dir.delete(oldDir) if File.directory?(oldDir) 

Original comment by chris.pe...@gmail.com on 1 May 2010 at 1:45

GoogleCodeExporter commented 8 years ago
This time fix it the correct way:
http://github.com/rubyripperdev/rubyripper/commit/a093b2e61696c629de66ddbc5d7927
042afc
3841

Assumption: if the environment keys are set, they are supposed to be something 
usefull.

Original comment by boukewou...@gmail.com on 6 May 2010 at 8:13