ptools 1.1.2 → 1.1.3

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.
Files changed (4) hide show
  1. data/CHANGES +6 -0
  2. data/lib/ptools.rb +15 -3
  3. data/test/tc_constants.rb +8 -6
  4. metadata +2 -2
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ == 1.1.3 - 29-Apr-2007
2
+ * I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
3
+ * The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
4
+ never meant for public use.
5
+ * The tc_constants.rb file was modified to only run certain tests on Windows.
6
+
1
7
  == 1.1.2 - 28-Apr-2007
2
8
  * Fixed a require line that could cause problems on MS Windows.
3
9
  * Added a Rakefile which includes tasks for installation and testing.
@@ -1,10 +1,22 @@
1
1
  require 'win32/file' if RUBY_PLATFORM.match('mswin')
2
2
 
3
3
  class File
4
- PTOOLS_VERSION = '1.1.2'
5
- IS_WINDOWS = RUBY_PLATFORM.match('mswin') ? true : false
4
+ PTOOLS_VERSION = '1.1.3'
6
5
 
7
- WIN32EXTS = ENV['PATHEXT'].split(';').map{ |e| e.downcase } rescue %w/.exe .com .bat/
6
+ # :stopdoc:
7
+
8
+ if RUBY_PLATFORM.match('mswin')
9
+ IS_WINDOWS = true
10
+ begin
11
+ WIN32EXTS = ENV['PATHEXT'].split(';').map{ |e| e.downcase }
12
+ rescue
13
+ WIN32EXTS = %w/.exe .com .bat/
14
+ end
15
+ else
16
+ IS_WINDOWS = false
17
+ end
18
+
19
+ # :startdoc:
8
20
 
9
21
  # Returns the null device (aka bitbucket) on your platform. On most
10
22
  # Unix-like systems this is '/dev/null', on Windows it's 'NUL', etc.
@@ -9,14 +9,16 @@ require 'ptools'
9
9
 
10
10
  class TC_Constants < Test::Unit::TestCase
11
11
  def test_version
12
- assert_equal("1.1.2", File::PTOOLS_VERSION)
12
+ assert_equal('1.1.3', File::PTOOLS_VERSION)
13
13
  end
14
14
 
15
- def test_windows
16
- assert_not_nil(File::IS_WINDOWS)
17
- end
15
+ if RUBY_PLATFORM.match('mswin')
16
+ def test_windows
17
+ assert_not_nil(File::IS_WINDOWS)
18
+ end
18
19
 
19
- def test_win32exts
20
- assert_not_nil(File::WIN32EXTS)
20
+ def test_win32exts
21
+ assert_not_nil(File::WIN32EXTS)
22
+ end
21
23
  end
22
24
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ptools
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.2
7
- date: 2007-04-28 00:00:00 -06:00
6
+ version: 1.1.3
7
+ date: 2007-04-29 00:00:00 -06:00
8
8
  summary: Extra methods for the File class
9
9
  require_paths:
10
10
  - lib