sys-admin 1.4.4-x86-mswin32-60 → 1.5.0-x86-mswin32-60
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.
- data/CHANGES +17 -0
- data/README +25 -47
- data/Rakefile +6 -1
- data/lib/sys/admin.rb +417 -201
- data/sys-admin.gemspec +4 -4
- data/test/{tc_admin.rb → test_sys_admin.rb} +12 -5
- data/test/test_sys_admin_unix.rb +246 -0
- data/test/{tc_windows.rb → test_sys_admin_windows.rb} +117 -111
- metadata +12 -10
- data/test/tc_unix.rb +0 -81
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: x86-mswin32-60
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-03-29 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description: A unified, cross platform replacement for the "etc"
|
16
|
+
description: A unified, cross platform replacement for the "etc" library.
|
17
17
|
email: djberg96@gmail.com
|
18
18
|
executables: []
|
19
19
|
|
@@ -28,9 +28,9 @@ files:
|
|
28
28
|
- doc/sys-admin-windows.txt
|
29
29
|
- examples/groups.rb
|
30
30
|
- examples/users.rb
|
31
|
-
- test/
|
32
|
-
- test/
|
33
|
-
- test/
|
31
|
+
- test/test_sys_admin.rb
|
32
|
+
- test/test_sys_admin_unix.rb
|
33
|
+
- test/test_sys_admin_windows.rb
|
34
34
|
- CHANGES
|
35
35
|
- doc
|
36
36
|
- examples
|
@@ -44,6 +44,8 @@ files:
|
|
44
44
|
- lib/sys/admin.rb
|
45
45
|
has_rdoc: true
|
46
46
|
homepage: http://www.rubyforge.org/projects/sysutils
|
47
|
+
licenses: []
|
48
|
+
|
47
49
|
post_install_message:
|
48
50
|
rdoc_options: []
|
49
51
|
|
@@ -64,9 +66,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
66
|
requirements: []
|
65
67
|
|
66
68
|
rubyforge_project: sysutils
|
67
|
-
rubygems_version: 1.3.1
|
69
|
+
rubygems_version: 1.3.1.2403
|
68
70
|
signing_key:
|
69
|
-
specification_version:
|
70
|
-
summary: A unified, cross platform replacement for the "etc"
|
71
|
+
specification_version: 3
|
72
|
+
summary: A unified, cross platform replacement for the "etc" library.
|
71
73
|
test_files:
|
72
|
-
- test/
|
74
|
+
- test/test_sys_admin.rb
|
data/test/tc_unix.rb
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
###############################################################################
|
2
|
-
# tc_unix.rb
|
3
|
-
#
|
4
|
-
# Test suite for the Unix version of sys-admin. This test should be run
|
5
|
-
# via the 'rake test' task.
|
6
|
-
###############################################################################
|
7
|
-
require 'test/unit'
|
8
|
-
require 'sys/admin'
|
9
|
-
include Sys
|
10
|
-
|
11
|
-
class TC_Sys_Admin_Unix < Test::Unit::TestCase
|
12
|
-
def setup
|
13
|
-
@user = "nobody"
|
14
|
-
@userid = 0
|
15
|
-
@group = "sys"
|
16
|
-
@groupid = 3
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_version
|
20
|
-
assert_equal('1.4.4', Admin::VERSION)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_get_login
|
24
|
-
assert_respond_to(Admin, :get_login)
|
25
|
-
assert_nothing_raised{ Admin.get_login }
|
26
|
-
assert_kind_of(String, Admin.get_login)
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_get_user
|
30
|
-
assert_respond_to(Admin, :get_user)
|
31
|
-
assert_nothing_raised{ Admin.get_user(@user) }
|
32
|
-
assert_nothing_raised{ Admin.get_user(@userid) }
|
33
|
-
assert_kind_of(User, Admin.get_user(@user))
|
34
|
-
assert_kind_of(User, Admin.get_user(@userid))
|
35
|
-
assert_raises(Admin::Error){ Admin.get_user("foofoo") }
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_users
|
39
|
-
assert_respond_to(Admin, :users)
|
40
|
-
assert_nothing_raised{ Admin.users }
|
41
|
-
assert_kind_of(Array, Admin.users)
|
42
|
-
assert_kind_of(User, Admin.users.first)
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_users_block_form
|
46
|
-
array = []
|
47
|
-
assert_nothing_raised{ Admin.users{ |g| array << g } }
|
48
|
-
assert_equal(true, Admin.users.length == array.length)
|
49
|
-
assert_nothing_raised{ Admin.users{ |g| break } }
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_get_group
|
53
|
-
assert_respond_to(Admin, :get_group)
|
54
|
-
assert_nothing_raised{ Admin.get_group(@group) }
|
55
|
-
assert_nothing_raised{ Admin.get_group(@groupid) }
|
56
|
-
assert_kind_of(Group, Admin.get_group(@group))
|
57
|
-
assert_kind_of(Group, Admin.get_group(@groupid))
|
58
|
-
assert_raises(Admin::Error){ Admin.get_group("foofoo") }
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_groups
|
62
|
-
assert_respond_to(Admin, :groups)
|
63
|
-
assert_nothing_raised{ Admin.groups }
|
64
|
-
assert_kind_of(Array, Admin.groups)
|
65
|
-
assert_kind_of(Group, Admin.groups.first)
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_groups_block_form
|
69
|
-
array = []
|
70
|
-
assert_nothing_raised{ Admin.groups{ |g| array << g } }
|
71
|
-
assert_equal(true, Admin.groups.length == array.length)
|
72
|
-
assert_nothing_raised{ Admin.groups{ |g| break } }
|
73
|
-
end
|
74
|
-
|
75
|
-
def teardown
|
76
|
-
@user = nil
|
77
|
-
@userid = nil
|
78
|
-
@group = nil
|
79
|
-
@groupid = nil
|
80
|
-
end
|
81
|
-
end
|