user_space 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.txt +2 -0
- data/README.rdoc +6 -3
- data/lib/user_space/user_space.rb +2 -0
- data/lib/user_space/version.rb +1 -1
- data/test/user_space.rb +22 -8
- data/user_space.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 075f899538258ccb2ded46959080f9cf742ef108
|
4
|
+
data.tar.gz: 58a8355ec025fdfb17ecb0056fc009f42dfc9280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54fcd9fc4ac63c979d2a13cbdffbc6b503cce180a036ff8b3e07050883e95c5d2c55fe07e67ae76eccfd2466e3c73ecf28529897b831c6610aab88e9c5ff2373
|
7
|
+
data.tar.gz: eb76f11215c7233334766f48999f0a561ad573a482a94e7f563e441c43df3450f056befb307355122dd3f634bdb774970ad335958835eba4e303d2a566e15dce
|
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
= user_space
|
2
2
|
|
3
|
+
github :: https://www.github.com/carlosjhr64/user_space
|
4
|
+
rubygems :: https://rubygems.org/gems/user_space
|
5
|
+
|
3
6
|
== DESCRIPTION:
|
4
7
|
|
5
8
|
Automates certain XDG features.
|
@@ -25,13 +28,13 @@ Automates certain XDG features.
|
|
25
28
|
USERSPACE.config = APP::CONFIG
|
26
29
|
end
|
27
30
|
|
28
|
-
== FEATURES
|
31
|
+
== FEATURES:
|
29
32
|
|
30
|
-
*
|
33
|
+
* used in mplay[https://www.rubygems.org/gems/mplay]
|
31
34
|
|
32
35
|
== INSTALL:
|
33
36
|
|
34
|
-
|
37
|
+
sudo gem install user_space
|
35
38
|
|
36
39
|
== LICENSE:
|
37
40
|
|
data/lib/user_space/version.rb
CHANGED
data/test/user_space.rb
CHANGED
@@ -18,7 +18,7 @@ class TestUserSpace < Test::Unit::TestCase
|
|
18
18
|
include USER_SPACE
|
19
19
|
|
20
20
|
def test_user_space_version
|
21
|
-
assert_equal('0.
|
21
|
+
assert_equal('0.1.0', VERSION)
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_user_space_constants
|
@@ -64,22 +64,25 @@ class TestUserSpace < Test::Unit::TestCase
|
|
64
64
|
assert_equal(JSON, options[:parser])
|
65
65
|
assert_nil(options[:ext])
|
66
66
|
|
67
|
-
|
68
|
-
assert File.exist?
|
69
|
-
assert File.exist?
|
67
|
+
cachedir, configdir, datadir = userspace.cachedir, userspace.configdir, userspace.datadir
|
68
|
+
assert File.exist? cachedir
|
69
|
+
assert File.exist? configdir
|
70
|
+
assert File.exist? datadir
|
70
71
|
|
71
72
|
version = File.read('data/VERSION').strip
|
72
73
|
assert_equal version, userspace.version
|
73
74
|
|
74
|
-
|
75
|
+
config_file_name = userspace.config_file_name
|
76
|
+
refute File.exist? config_file_name
|
75
77
|
config1 = {'a'=>"A", 'b'=>"B"}
|
76
78
|
userspace.config = config1
|
77
|
-
assert File.exist?
|
78
|
-
config2 = JSON.parse File.read
|
79
|
+
assert File.exist? config_file_name
|
80
|
+
config2 = JSON.parse File.read config_file_name
|
79
81
|
assert_equal config1, config2
|
80
82
|
|
81
83
|
# Overwrite version file...
|
82
|
-
|
84
|
+
version_file_name = userspace.version_file_name
|
85
|
+
File.open(version_file_name, 'w'){|fh|fh.puts 'A.B.C'}
|
83
86
|
# Now we get the version given to the file:
|
84
87
|
assert_equal 'A.B.C', userspace.version
|
85
88
|
# Which is different from the initial version
|
@@ -89,5 +92,16 @@ class TestUserSpace < Test::Unit::TestCase
|
|
89
92
|
assert_nothing_raised(Exception){userspace.install}
|
90
93
|
# Now we have our initial version back
|
91
94
|
assert_equal version, userspace.version
|
95
|
+
|
96
|
+
[config_file_name, version_file_name].each do |fn|
|
97
|
+
stat = File.stat(fn)
|
98
|
+
assert_equal stat.mode.to_s(8), '100600'
|
99
|
+
end
|
100
|
+
|
101
|
+
[cachedir, configdir, datadir].each do |dn|
|
102
|
+
stat = File.stat(dn)
|
103
|
+
assert_equal stat.mode.to_s(8), '40700'
|
104
|
+
end
|
105
|
+
|
92
106
|
end
|
93
107
|
end
|
data/user_space.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'user_space'
|
4
|
-
s.version = '0.
|
4
|
+
s.version = '0.1.0'
|
5
5
|
|
6
6
|
s.homepage = 'https://github.com/carlosjhr64/user_space'
|
7
7
|
|
8
8
|
s.author = 'CarlosJHR64'
|
9
9
|
s.email = 'carlosjhr64@gmail.com'
|
10
10
|
|
11
|
-
s.date = '2013-12-
|
11
|
+
s.date = '2013-12-30'
|
12
12
|
s.licenses = ['MIT']
|
13
13
|
|
14
14
|
s.description = <<DESCRIPTION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_space
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CarlosJHR64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xdg
|