xdg 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +1 -1
- data/HISTORY +70 -0
- data/MANIFEST +27 -17
- data/README +11 -15
- data/lib/xdg.rb +16 -17
- data/meta/package +1 -0
- data/meta/version +1 -0
- data/test/fakeroot/home/.cache/foo.cache +1 -0
- data/test/fakeroot/home/.config/foo.config +1 -0
- data/test/fakeroot/home/.local/share/foo.dat +1 -0
- data/test/test_xdg.rb +3 -3
- metadata +24 -30
- data/CHANGES +0 -55
- data/RELEASE +0 -12
- data/VERSION +0 -1
data/COPYING
CHANGED
data/HISTORY
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
= RELEASE HISTORY
|
2
|
+
|
3
|
+
== 0.5.2 / 2009-05-30
|
4
|
+
|
5
|
+
This release requires rbconfig.rb and uses system entries in place of
|
6
|
+
hardcoded FHS locations.
|
7
|
+
|
8
|
+
Changes:
|
9
|
+
|
10
|
+
* 1 Enhancement
|
11
|
+
|
12
|
+
* replaced hardcoded system directories with rbconfig entries.
|
13
|
+
|
14
|
+
|
15
|
+
== 0.5.1 / 2008-11-17
|
16
|
+
|
17
|
+
Changes:
|
18
|
+
|
19
|
+
* 4 Enhancements
|
20
|
+
|
21
|
+
* data work directory is '.local', not '.share'
|
22
|
+
* data_work is deprecated
|
23
|
+
* updated website
|
24
|
+
|
25
|
+
|
26
|
+
== 0.5.0 / 2008-10-28
|
27
|
+
|
28
|
+
Changes:
|
29
|
+
|
30
|
+
* 1 Enhancement
|
31
|
+
|
32
|
+
* changed _glob to _select
|
33
|
+
|
34
|
+
|
35
|
+
== 0.4.0 / 2008-10-26
|
36
|
+
|
37
|
+
Changes:
|
38
|
+
|
39
|
+
* 9 Enhancements
|
40
|
+
|
41
|
+
* removed xdg_ prefixes and replaced _file methods with _find and _glob methods
|
42
|
+
* prepare for v0.4 release
|
43
|
+
* remove some old commented-out code
|
44
|
+
* fixed data_find and data_glob
|
45
|
+
* Update RELEASE file
|
46
|
+
* updated documentation for 0.4 release
|
47
|
+
* added MANIFEST to .gitignore
|
48
|
+
* correction or RELEASE
|
49
|
+
* Fixed plural in RELEASE file
|
50
|
+
|
51
|
+
|
52
|
+
== 0.3.0 / 2008-10-11
|
53
|
+
|
54
|
+
Changes:
|
55
|
+
|
56
|
+
* 5 Enhancements
|
57
|
+
|
58
|
+
* removed xdg_ prefix from module methods
|
59
|
+
* moved web/index.html to doc directory
|
60
|
+
* updated reap serives
|
61
|
+
* prepare for next release
|
62
|
+
* fixed issue of xdg_ prefix still being used internally
|
63
|
+
|
64
|
+
|
65
|
+
== 0.1.0 / 2008-09-27
|
66
|
+
|
67
|
+
Changes:
|
68
|
+
|
69
|
+
* Started project
|
70
|
+
|
data/MANIFEST
CHANGED
@@ -1,25 +1,35 @@
|
|
1
|
-
|
1
|
+
#!mast bin lib meta test [A-Z]*
|
2
|
+
lib
|
3
|
+
lib/xdg.rb
|
4
|
+
meta
|
5
|
+
meta/abstract
|
6
|
+
meta/authors
|
7
|
+
meta/contact
|
8
|
+
meta/homepage
|
9
|
+
meta/package
|
10
|
+
meta/summary
|
11
|
+
meta/title
|
12
|
+
meta/version
|
2
13
|
test
|
3
14
|
test/fakeroot
|
15
|
+
test/fakeroot/.cache
|
16
|
+
test/fakeroot/.config
|
17
|
+
test/fakeroot/.share
|
18
|
+
test/fakeroot/etc
|
19
|
+
test/fakeroot/etc/xdg
|
20
|
+
test/fakeroot/etc/xdg/bar.config
|
4
21
|
test/fakeroot/home
|
22
|
+
test/fakeroot/home/.cache
|
23
|
+
test/fakeroot/home/.cache/foo.cache
|
24
|
+
test/fakeroot/home/.config
|
25
|
+
test/fakeroot/home/.config/foo.config
|
26
|
+
test/fakeroot/home/.local
|
27
|
+
test/fakeroot/home/.local/share
|
28
|
+
test/fakeroot/home/.local/share/foo.dat
|
5
29
|
test/fakeroot/usr
|
6
30
|
test/fakeroot/usr/share
|
7
31
|
test/fakeroot/usr/share/bar.dat
|
8
|
-
test/fakeroot/etc
|
9
|
-
test/fakeroot/etc/xdg
|
10
|
-
test/fakeroot/etc/xdg/bar.config
|
11
32
|
test/test_xdg.rb
|
12
|
-
CHANGES
|
13
|
-
RELEASE
|
14
33
|
README
|
15
|
-
|
16
|
-
|
17
|
-
meta/summary
|
18
|
-
meta/abstract
|
19
|
-
meta/title
|
20
|
-
meta/authors
|
21
|
-
meta/contact
|
22
|
-
lib
|
23
|
-
lib/xdg.rb
|
24
|
-
VERSION
|
25
|
-
COPYING
|
34
|
+
HISTORY
|
35
|
+
COPYING
|
data/README
CHANGED
@@ -1,25 +1,22 @@
|
|
1
|
-
= XDG Base Directory
|
1
|
+
= XDG Base Directory Standard for Ruby
|
2
2
|
|
3
3
|
http://xdg.rubyforge.org
|
4
4
|
|
5
5
|
== Introduction
|
6
6
|
|
7
|
-
XDG provides an easy to use module for utilizing
|
8
|
-
|
7
|
+
XDG provides an easy to use module for utilizing the XDG Base
|
8
|
+
Directory Standard[1].
|
9
9
|
|
10
10
|
If your program utilizes user or system-wide support files
|
11
11
|
(eg. configuration files), you owe it to yourself to checkout
|
12
12
|
the XDG standard.
|
13
13
|
|
14
|
-
In this release, _glob methods were renamed to _select and now
|
15
|
-
can take a selection block in addition to, or as opposed to,
|
16
|
-
the glob pattern argument.
|
17
|
-
|
18
14
|
What's next? The API should be stable now. I do not forsee
|
19
15
|
and reasons for it to change. In the future, I may add some
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
additional ruby-esque features, perhaps for other parts of
|
17
|
+
the XDG utilities, but that should be purely in addition to
|
18
|
+
what is already here. If all this holds true for a while a
|
19
|
+
1.0 release will be forth-coming.
|
23
20
|
|
24
21
|
[1]http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
|
25
22
|
|
@@ -46,7 +43,6 @@ XDG is a module with a small set of easy to use methods:
|
|
46
43
|
XDG.cache_select(pattern){ |path| ... }
|
47
44
|
|
48
45
|
XDG.config_work
|
49
|
-
XDG.data_work
|
50
46
|
XDG.cache_work
|
51
47
|
|
52
48
|
If you know XDG these are pretty much self-explanitory.
|
@@ -56,13 +52,13 @@ But see the RDocs for specifics.
|
|
56
52
|
|
57
53
|
Using RubyGems:
|
58
54
|
|
59
|
-
$ gem install xdg
|
55
|
+
$ sudo gem install xdg
|
60
56
|
|
61
57
|
Installing the tarball requires Ruby Setup
|
62
58
|
(see http://setup.rubyforge.org).
|
63
59
|
|
64
|
-
$ tar -xvzf xdg-0.5.
|
65
|
-
$ cd xdg-0.5.
|
60
|
+
$ tar -xvzf xdg-0.5.2
|
61
|
+
$ cd xdg-0.5.2
|
66
62
|
$ sudo setup.rb all
|
67
63
|
|
68
64
|
== Development
|
@@ -72,5 +68,5 @@ Visit http://rubyforge.org/projects/xdg
|
|
72
68
|
== Copyright
|
73
69
|
|
74
70
|
Copyright (c) 2008 Tiger Ops / 7rans
|
75
|
-
Distributed under the terms of the
|
71
|
+
Distributed under the terms of the LGPL v3 license.
|
76
72
|
|
data/lib/xdg.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rbconfig'
|
2
|
+
|
1
3
|
# = XDG Base Directory Standard
|
2
4
|
#
|
3
5
|
# This provides a conveient library for conforming to the
|
@@ -9,20 +11,20 @@
|
|
9
11
|
# above specification.
|
10
12
|
#
|
11
13
|
# The data directories are for "read-only" files. In other words once
|
12
|
-
# something is put there, it should only be read, never written to
|
13
|
-
# by a program. (Generally speaking only users or
|
14
|
-
# be adding, changing or removing files from the data locations.
|
14
|
+
# something is put there, it should only be read, and never written to
|
15
|
+
# by a program. (Generally speaking only users or package mangers should
|
16
|
+
# be adding, changing or removing files from the data locations.)
|
15
17
|
#
|
16
|
-
# The config locations are where you
|
17
|
-
# and effect
|
18
|
-
# in the FHS, but alterable by end users and
|
18
|
+
# The config locations are where you store files that may change,
|
19
|
+
# and effect your applications depending on their content. This is like
|
20
|
+
# etc/ in the FHS, but alterable by end users and end user programs,
|
19
21
|
# not just root and sudo admin scripts.
|
20
22
|
#
|
21
|
-
# The cache
|
22
|
-
# and everyihtng still
|
23
|
-
# files.
|
23
|
+
# The cache locations stores files that could just as well be deleted
|
24
|
+
# and everyihtng would still work fine. This is for variable and
|
25
|
+
# temporary files. much like var/ in FHS.
|
24
26
|
#
|
25
|
-
#
|
27
|
+
# The module returns all paths as String.
|
26
28
|
#
|
27
29
|
module XDG
|
28
30
|
|
@@ -44,7 +46,7 @@ module XDG
|
|
44
46
|
def config_dirs
|
45
47
|
dirs = ENV['XDG_CONFIG_DIRS'].to_s.split(/[:;]/)
|
46
48
|
if dirs.empty?
|
47
|
-
dirs =
|
49
|
+
dirs = File.join(Config::CONFIG['sysconfdir'], 'xdg') #%w{/etc/xdg}
|
48
50
|
end
|
49
51
|
dirs.collect{ |d| File.expand_path(d) }
|
50
52
|
end
|
@@ -60,7 +62,7 @@ module XDG
|
|
60
62
|
def data_dirs
|
61
63
|
dirs = ENV['XDG_DATA_DIRS'].split(/[:;]/)
|
62
64
|
if dirs.empty?
|
63
|
-
dirs =
|
65
|
+
dirs = [ Config::CONFIG['localdatadir'], Config::CONFIG['datadir'] ] #%w{/usr/local/share/ /usr/share/}
|
64
66
|
end
|
65
67
|
dirs.collect{ |d| File.expand_path(d) }
|
66
68
|
end
|
@@ -231,8 +233,5 @@ module XDG
|
|
231
233
|
|
232
234
|
end # module XDG
|
233
235
|
|
234
|
-
#
|
235
|
-
#
|
236
|
-
# :Copyright: (c)2008 Tiger Ops
|
237
|
-
# :License: GPLv3
|
238
|
-
|
236
|
+
# Copyright (c)2008 Tiger Ops / Trans
|
237
|
+
# Distributed under the terms of the GPL v3.
|
data/meta/package
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
xdg
|
data/meta/version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.5.2
|
@@ -0,0 +1 @@
|
|
1
|
+
FOO.CACHE
|
@@ -0,0 +1 @@
|
|
1
|
+
FOO.CONFIG
|
@@ -0,0 +1 @@
|
|
1
|
+
FOO.DAT
|
data/test/test_xdg.rb
CHANGED
@@ -85,9 +85,9 @@ class TestXDG < Test::Unit::TestCase
|
|
85
85
|
assert_equal(File.join(Dir.pwd,'.config'), XDG.config_work)
|
86
86
|
end
|
87
87
|
|
88
|
-
def test_data_work
|
89
|
-
|
90
|
-
end
|
88
|
+
#def test_data_work
|
89
|
+
# assert_equal(File.join(Dir.pwd,'.share'), XDG.data_work)
|
90
|
+
#end
|
91
91
|
|
92
92
|
def test_cache_work
|
93
93
|
assert_equal(File.join(Dir.pwd,'.cache'), XDG.cache_work)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xdg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tigerops-community@rubyforge.org
|
@@ -10,12 +10,12 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2009-09-22 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
17
|
-
description:
|
18
|
-
email:
|
17
|
+
description: XDG provides an easy to use module for utilizing the XDG Base Directory Standard[1]. If your program utilizes user or system-wide support files
|
18
|
+
email: tigerops-community@rubyforge.org
|
19
19
|
executables: []
|
20
20
|
|
21
21
|
extensions: []
|
@@ -23,38 +23,32 @@ extensions: []
|
|
23
23
|
extra_rdoc_files:
|
24
24
|
- README
|
25
25
|
- MANIFEST
|
26
|
-
-
|
27
|
-
- RELEASE
|
28
|
-
- VERSION
|
26
|
+
- HISTORY
|
29
27
|
- COPYING
|
30
28
|
files:
|
31
|
-
- lib
|
32
|
-
- meta
|
33
|
-
- test
|
34
|
-
- MANIFEST
|
35
|
-
- CHANGES
|
36
|
-
- RELEASE
|
37
|
-
- README
|
38
|
-
- VERSION
|
39
|
-
- COPYING
|
40
29
|
- lib/xdg.rb
|
41
|
-
- meta/homepage
|
42
|
-
- meta/summary
|
43
30
|
- meta/abstract
|
44
|
-
- meta/title
|
45
31
|
- meta/authors
|
46
32
|
- meta/contact
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
- test/fakeroot/usr/share
|
53
|
-
- test/fakeroot/usr/share/bar.dat
|
54
|
-
- test/fakeroot/etc/xdg
|
33
|
+
- meta/homepage
|
34
|
+
- meta/package
|
35
|
+
- meta/summary
|
36
|
+
- meta/title
|
37
|
+
- meta/version
|
55
38
|
- test/fakeroot/etc/xdg/bar.config
|
39
|
+
- test/fakeroot/home/.cache/foo.cache
|
40
|
+
- test/fakeroot/home/.config/foo.config
|
41
|
+
- test/fakeroot/home/.local/share/foo.dat
|
42
|
+
- test/fakeroot/usr/share/bar.dat
|
43
|
+
- test/test_xdg.rb
|
44
|
+
- README
|
45
|
+
- HISTORY
|
46
|
+
- COPYING
|
47
|
+
- MANIFEST
|
56
48
|
has_rdoc: true
|
57
49
|
homepage: http://xdg.rubyforge.org
|
50
|
+
licenses: []
|
51
|
+
|
58
52
|
post_install_message:
|
59
53
|
rdoc_options:
|
60
54
|
- --inline-source
|
@@ -79,9 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
73
|
requirements: []
|
80
74
|
|
81
75
|
rubyforge_project: xdg
|
82
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.3.5
|
83
77
|
signing_key:
|
84
|
-
specification_version:
|
85
|
-
summary: XDG provides
|
78
|
+
specification_version: 3
|
79
|
+
summary: XDG provides an interface for using XDG directory standard.
|
86
80
|
test_files:
|
87
81
|
- test/test_xdg.rb
|
data/CHANGES
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
== 0.5.1 / 2008-11-17
|
2
|
-
|
3
|
-
* 4 Other Enhancements
|
4
|
-
|
5
|
-
* data work directory is '.local', not '.share' (#bc7e35a5686ff70da0f2127daf23d4e7e36438f0)
|
6
|
-
* data_work is deprecated (#356bd562de2d093f99f60f0c9a2a2f87917ea4d3)
|
7
|
-
* updated website (#ed7d71269186a566440bcb4f688ac8335b557f02)
|
8
|
-
|
9
|
-
|
10
|
-
== 0.5.0 / 2008-10-28
|
11
|
-
|
12
|
-
* 1 Other Enhancements
|
13
|
-
|
14
|
-
* changed _glob to _select (#8d1d430a8c404b3d87da675da08257290560333c)
|
15
|
-
|
16
|
-
|
17
|
-
== 0.4.0 / 2008-10-26
|
18
|
-
|
19
|
-
* 9 Other Enhancements
|
20
|
-
|
21
|
-
* removed xdg_ prefixes and replaced _file methods with _find and _glob methods (#d414dfa6fef6ec382c76689116b4483cbbcafd72)
|
22
|
-
* prepare for v0.4 release (#c634ffd603b0859027dd4bfd9c1c57b87d634d9c)
|
23
|
-
* remove some old commented-out code (#f62bac03f2ffe31e8a95d841be234311f7cfbff0)
|
24
|
-
* fixed data_find and data_glob (#8107b5b5b8893d040c6bd60ae9a0d65d6885ae84)
|
25
|
-
* Update RELEASE file. (#722f7600f403c39792c3df91ad789c5d3ae13473)
|
26
|
-
* updated documentation for 0.4 release (#c535b36186a6a3d2b1ea5766a07e541ec90a75d1)
|
27
|
-
* added MANIFEST to .gitignore (#723be0082d9a1e9a0f579aa094267027e1708730)
|
28
|
-
* correction or RELEASE (#0f3bd5f80c241704b338037b1bb66b0fbd8e597b)
|
29
|
-
* Fixed plural in RELEASE file. (#ccdf281610d5339aa1bff32be34c8369f204e463)
|
30
|
-
|
31
|
-
|
32
|
-
== 0.3.0 / 2008-10-11
|
33
|
-
|
34
|
-
* 5 Other Enhancements
|
35
|
-
|
36
|
-
* removed xdg_ prefix from module methods (#240e88d385ee1b7e063e8cd87e22ce8fb085afd8)
|
37
|
-
* moved web/index.html to doc directory (#e61b13e66eefb16566ea5f1ce3723dbfda8369dc)
|
38
|
-
* updated reap serives (#5cfaf1f6ad47ecc518047053902ef4e092c69891)
|
39
|
-
* prepare for next release (#7566509dd82d9cfe3bf28e32bdb68304429ebe93)
|
40
|
-
* fixed issue of xdg_ prefix still being used internally (#ad95493af4413e864cfa2ef2f982c7f48f371473)
|
41
|
-
|
42
|
-
|
43
|
-
== 0.1.0 / 2008-09-27
|
44
|
-
|
45
|
-
* 1 Major Enhancements
|
46
|
-
|
47
|
-
* Started project. (#10ca99f20bd90399220a68939f4a04677ff22402)
|
48
|
-
|
49
|
-
* 4 Other Enhancements
|
50
|
-
|
51
|
-
* added gitignore (#8d1385c2bcc0acbdb5ed5e014c977213caf7d4a6)
|
52
|
-
* Folio namespace is not used. (#577aca3700f5cc179a343068863a0a964133159e)
|
53
|
-
* added website (#067510f4af2c7deb3c3ac27832e0980b17af1695)
|
54
|
-
* VERSION file has been added. (#c76940fd4e79270d247a881a2a0e58a2f2fa9bdf)
|
55
|
-
|
data/RELEASE
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
xdg 0.5.1 beta (2008-11-17)
|