sys-admin 1.4.1-mswin32 → 1.4.2-mswin32

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 CHANGED
@@ -1,3 +1,11 @@
1
+ == 1.4.2 - 26-Jun-2007
2
+ * Fixed a bug in the Admin.get_login method where it would return junk
3
+ if the underlying getlogin() function failed (Unix). Thanks go to Gonzalo
4
+ Garramuno for the spot. This bug also resulted in some refactoring of the
5
+ underlying C code.
6
+ * Removed the install.rb file. The logic in that file has been moved directly
7
+ into the Rakefile.
8
+
1
9
  == 1.4.1 - 21-Mar-2007
2
10
  * Bug fix for OS X. Thanks go to an anonymous user for the spot.
3
11
  * Added a Rakefile. Building, testing and installing should now use the
data/MANIFEST CHANGED
@@ -1,19 +1,14 @@
1
- * install.rb
2
1
  * sys-admin.gemspec
3
2
  * CHANGES
4
3
  * MANIFEST
5
4
  * Rakefile
6
5
  * README
7
-
8
6
  * examples/groups.rb
9
7
  * examples/users.rb
10
-
11
8
  * ext/admin.c
12
9
  * ext/admin.h
13
10
  * ext/extconf.rb
14
-
15
- * lib/sys/win32.rb
16
-
11
+ * lib/sys/admin.rb
17
12
  * test/tc_admin.rb
18
13
  * test/tc_unix.rb
19
- * test/tc_windows.rb
14
+ * test/tc_windows.rb
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'rake'
2
2
  require 'rake/clean'
3
3
  require 'rake/testtask'
4
+ require 'rbconfig'
5
+ include Config
4
6
 
5
7
  desc "Clean the build files for the sys-admin source for UNIX systems"
6
8
  task :clean do
@@ -27,12 +29,14 @@ task :build => [:clean] do
27
29
  end
28
30
 
29
31
  if RUBY_PLATFORM.match('mswin')
30
- desc "Install the sys-admin package"
32
+ desc "Install the sys-admin package for MS Windows"
31
33
  task :install do
32
- sh 'ruby install.rb'
34
+ install_dir = File.join(CONFIG['sitelibdir'], 'sys')
35
+ Dir.mkdir(install_dir) unless File.exists?(install_dir)
36
+ FileUtils.cp('lib/sys/admin.rb', install_dir, :verbose => true)
33
37
  end
34
38
  else
35
- desc "Install the sys-admin package"
39
+ desc "Install the sys-admin package for Unix platforms"
36
40
  task :install => [:build] do
37
41
  Dir.chdir('ext') do
38
42
  sh 'make install'
data/lib/sys/admin.rb CHANGED
@@ -284,7 +284,7 @@ module Sys
284
284
  end
285
285
 
286
286
  class Admin
287
- VERSION = '1.4.1'
287
+ VERSION = '1.4.2'
288
288
 
289
289
  SidTypeUser = 1
290
290
  SidTypeGroup = 2
data/sys-admin.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
4
  gem.name = 'sys-admin'
5
- gem.version = '1.4.1'
5
+ gem.version = '1.4.2'
6
6
  gem.author = 'Daniel J. Berger'
7
7
  gem.email = 'djberg96@gmail.com'
8
8
  gem.homepage = 'http://www.rubyforge.org/projects/sysutils'
@@ -16,23 +16,25 @@ spec = Gem::Specification.new do |gem|
16
16
 
17
17
  files = Dir["doc/*"] + Dir["examples/*"]
18
18
  files += Dir["test/*"] + Dir["[A-Z]*"]
19
+
20
+ if RUBY_PLATFORM.match('mswin')
21
+ files += Dir["lib/sys/admin.rb"]
22
+ gem.required_ruby_version = '>= 1.8.2'
23
+ gem.platform = Gem::Platform::WIN32
24
+ else
25
+ files += Dir["ext/*"]
26
+ gem.required_ruby_version = '>= 1.8.0'
27
+ gem.extensions = ['ext/extconf.rb']
28
+ gem.extra_rdoc_files << 'ext/admin.c'
29
+ gem.require_path = 'lib'
30
+ end
31
+
19
32
  files.delete_if{ |item| item.include?('CVS') }
33
+
20
34
  gem.files = files
21
35
  end
22
36
 
23
37
  if $PROGRAM_NAME == __FILE__
24
- if RUBY_PLATFORM.match('mswin')
25
- spec.required_ruby_version = '>= 1.8.2'
26
- spec.files += Dir["lib/sys/admin.rb"]
27
- spec.platform = Gem::Platform::WIN32
28
- else
29
- spec.required_ruby_version = '>= 1.8.0'
30
- spec.extensions = ['ext/extconf.rb']
31
- spec.files += Dir["ext/*"]
32
- spec.extra_rdoc_files << 'ext/admin.c'
33
- spec.require_path = 'lib'
34
- end
35
-
36
38
  Gem.manage_gems
37
39
  Gem::Builder.new(spec).build
38
40
  end
data/test/tc_unix.rb CHANGED
@@ -17,7 +17,7 @@ class TC_Sys_Admin_Unix < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  def test_version
20
- assert_equal("1.4.1", Admin::VERSION)
20
+ assert_equal("1.4.2", Admin::VERSION)
21
21
  end
22
22
 
23
23
  def test_get_login
data/test/tc_windows.rb CHANGED
@@ -24,7 +24,7 @@ class TC_Sys_Admin_Win32 < Test::Unit::TestCase
24
24
  end
25
25
 
26
26
  def test_version
27
- assert_equal("1.4.1", Admin::VERSION)
27
+ assert_equal("1.4.2", Admin::VERSION)
28
28
  end
29
29
 
30
30
  def test_01_add_local_user
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: sys-admin
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.4.1
7
- date: 2007-03-22 00:00:00 -06:00
6
+ version: 1.4.2
7
+ date: 2007-06-26 00:00:00 -06:00
8
8
  summary: A unified, cross platform replacement for the "etc" package.
9
9
  require_paths:
10
10
  - lib
@@ -37,7 +37,6 @@ files:
37
37
  - CHANGES
38
38
  - examples
39
39
  - ext
40
- - install.rb
41
40
  - lib
42
41
  - MANIFEST
43
42
  - Rakefile
data/install.rb DELETED
@@ -1,22 +0,0 @@
1
- ##############################################
2
- # install.rb
3
- #
4
- # Install script for Win32 systems only.
5
- ##############################################
6
- unless File::ALT_SEPARATOR
7
- STDERR.puts "Unix systems should use the extconf.rb file for installation."
8
- STDERR.puts "Exiting. The sys-admin package was NOT installed."
9
- exit
10
- end
11
-
12
- require "rbconfig"
13
- require "ftools"
14
- include Config
15
-
16
- sitedir = CONFIG['sitelibdir']
17
-
18
- unless File.exist?("#{sitedir}/sys")
19
- Dir.mkdir("#{sitedir}/sys")
20
- end
21
-
22
- File.copy("lib/sys/win32.rb", "#{sitedir}/sys/admin.rb", true)