user_space 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 964e9a54183227b621f7fa093cc644b25eb59055
4
- data.tar.gz: 81ad79c904d9bdfba3c3c604223bba5da8ab323b
3
+ metadata.gz: 075f899538258ccb2ded46959080f9cf742ef108
4
+ data.tar.gz: 58a8355ec025fdfb17ecb0056fc009f42dfc9280
5
5
  SHA512:
6
- metadata.gz: 0af919b9206d6a386dc68ce5a3a180e7afaa3991dde99a2fca2c545ee868488eb8f232c614cb4a364690d6cc9fc53615b4e3e51141828f2bda0c0eb24f301c8b
7
- data.tar.gz: 28d1d0a93e1368808cb3c03c5bc486e02356bde12d83a70a683d089289d7765e78975343daf6643c5546434deb97a3b1d68d366033b688c2b4a9d50d29c76822
6
+ metadata.gz: 54fcd9fc4ac63c979d2a13cbdffbc6b503cce180a036ff8b3e07050883e95c5d2c55fe07e67ae76eccfd2466e3c73ecf28529897b831c6610aab88e9c5ff2373
7
+ data.tar.gz: eb76f11215c7233334766f48999f0a561ad573a482a94e7f563e441c43df3450f056befb307355122dd3f634bdb774970ad335958835eba4e303d2a566e15dce
@@ -1 +1,3 @@
1
1
  === 0.0.0 / 2013-12-21 09:33:10 -0800
2
+ === 0.0.0 / 2013-12-22 15:18:15 -0800
3
+ 2421f13574dd2ad78d6cc591e52b4261 pkg/user_space-0.0.0.gem
@@ -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/PROBLEMS:
31
+ == FEATURES:
29
32
 
30
- * Still in alpha, have not publish to ruby gems yet.
33
+ * used in mplay[https://www.rubygems.org/gems/mplay]
31
34
 
32
35
  == INSTALL:
33
36
 
34
- Not yet available.
37
+ sudo gem install user_space
35
38
 
36
39
  == LICENSE:
37
40
 
@@ -52,6 +52,8 @@ module USER_SPACE
52
52
  Dir.mkdir(userdir, 0700)
53
53
  end
54
54
  FileUtils.cp_r(Dir.glob("#{basedir}/*"), userdir) if File.directory? basedir
55
+ FileUtils.chmod_R 'og-rwx', userdir
56
+ FileUtils.chmod_R 'u+rwX', userdir
55
57
  end
56
58
  end
57
59
 
@@ -1,3 +1,3 @@
1
1
  module USER_SPACE
2
- VERSION = '0.0.0'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -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.0.0', VERSION)
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
- assert File.exist? userspace.cachedir
68
- assert File.exist? userspace.configdir
69
- assert File.exist? userspace.datadir
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
- refute File.exist? userspace.config_file_name
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? userspace.config_file_name
78
- config2 = JSON.parse File.read userspace.config_file_name
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
- File.open(userspace.version_file_name, 'w'){|fh|fh.puts 'A.B.C'}
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
@@ -1,14 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'user_space'
4
- s.version = '0.0.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-22'
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.0.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-22 00:00:00.000000000 Z
11
+ date: 2013-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xdg