win32-dir 0.4.8 → 0.4.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09b52a947373ea7bb57b6daf0cc831f8e46d864a
4
- data.tar.gz: d93f71ab02fb811c3b9ab5e7f61302479cad9a8e
3
+ metadata.gz: 1456cbfae0e2becc75774dfc3678dc58fca89468
4
+ data.tar.gz: 6bbb444fdc4d9731fd6c0e5cd67e4b7a1f3afc8e
5
5
  SHA512:
6
- metadata.gz: 8db28589b375acc51ed21bd4301163309dda8ebda843f7a1982bfbfefdca06603a14a2f5fad581943e5b1fa5130c52b6b0dd7246322764c37706932ca2185517
7
- data.tar.gz: 79324ed4a740c9e1d23f9dc0c331f972792d47faf5fc37fa74d2649285ee22b88d860ef4ac5113a0186e387aeaaabdb27efb457cad0a055ee4601714cebffb2b
6
+ metadata.gz: 88ae27d1fdb7064e74d7b83268f7713a9dfd8131d44a1b4cd3a957f54c761ebf6f438982e465189e6b01b4c88e14c5beba4e55559bb18a0a70db4c123570f7e6
7
+ data.tar.gz: 565f653c68141e028986476ea0608e9827f067b6c30deb7c659457f692912d9e1084177aeb26da15512c491d5fe62e5fa44d3ceedd96658ee7eedb7e7d8ba43e
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.4.9 - 2-Jul-2014
2
+ * Fixed the INVALID_FILE_ATTRIBUTES constant. It's only a 32-bit value.
3
+ Thanks go to Ethan Brown for the patch.
4
+ * Use relative_require instead of manually doing things.
5
+ * Removed rubyforge_project from gemspec.
6
+ * Added a string_check to the Dir.junction? method.
7
+
1
8
  == 0.4.8 - 27-Apr-2014
2
9
  * More closely mimic Ruby's stringiness checks for overrided methods.
3
10
 
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ namespace 'gem' do
21
21
  desc "Install the win32-dir gem"
22
22
  task :install => [:create] do
23
23
  file = Dir["*.gem"].first
24
- sh "gem install #{file}"
24
+ sh "gem install -l #{file}"
25
25
  end
26
26
  end
27
27
 
@@ -1,6 +1,6 @@
1
- require File.join(File.dirname(File.expand_path(__FILE__)), 'dir', 'constants')
2
- require File.join(File.dirname(File.expand_path(__FILE__)), 'dir', 'functions')
3
- require File.join(File.dirname(File.expand_path(__FILE__)), 'dir', 'structs')
1
+ require_relative 'dir/constants'
2
+ require_relative 'dir/functions'
3
+ require_relative 'dir/structs'
4
4
 
5
5
  class Dir
6
6
  include Dir::Structs
@@ -8,7 +8,7 @@ class Dir
8
8
  extend Dir::Functions
9
9
 
10
10
  # The version of the win32-dir library.
11
- VERSION = '0.4.8'
11
+ VERSION = '0.4.9'
12
12
 
13
13
  # CSIDL constants
14
14
  csidl = Hash[
@@ -290,7 +290,7 @@ class Dir
290
290
  # Dir.read_junction("c:/to") # => "c:/from"
291
291
  #
292
292
  def self.read_junction(junction)
293
- return false unless Dir.junction?("#{junction}")
293
+ return false unless Dir.junction?(junction)
294
294
 
295
295
  junction = string_check(junction).wincode
296
296
 
@@ -376,6 +376,7 @@ class Dir
376
376
  # Returns whether or not +path+ is a junction.
377
377
  #
378
378
  def self.junction?(path)
379
+ string_check(path)
379
380
  bool = true
380
381
 
381
382
  attrib = GetFileAttributesW("#{path}".wincode)
@@ -18,6 +18,9 @@ module Dir::Constants
18
18
  SHGFI_DISPLAYNAME = 0x000000200
19
19
  SHGFI_PIDL = 0x000000008
20
20
 
21
- INVALID_HANDLE_VALUE = FFI::Pointer.new(-1).address
22
- INVALID_FILE_ATTRIBUTES = FFI::Pointer.new(-1).address
21
+ # ((DWORD)-1)
22
+ INVALID_FILE_ATTRIBUTES = 0xFFFFFFFF
23
+
24
+ # ((HANDLE)-1)
25
+ INVALID_HANDLE_VALUE = FFI::Pointer.new(-1).address
23
26
  end
@@ -26,7 +26,7 @@ class TC_Win32_Dir < Test::Unit::TestCase
26
26
  end
27
27
 
28
28
  test "version number is set to expected value" do
29
- assert_equal('0.4.8', Dir::VERSION)
29
+ assert_equal('0.4.9', Dir::VERSION)
30
30
  end
31
31
 
32
32
  test 'glob handles backslashes' do
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-dir'
5
- spec.version = '0.4.8'
5
+ spec.version = '0.4.9'
6
6
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -11,7 +11,6 @@ Gem::Specification.new do |spec|
11
11
  spec.test_file = 'test/test_win32_dir.rb'
12
12
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
13
 
14
- spec.rubyforge_project = 'win32utils'
15
14
  spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
15
  spec.required_ruby_version = '>= 1.9.2'
17
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-dir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-27 00:00:00.000000000 Z
12
+ date: 2014-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubyforge_project: win32utils
100
+ rubyforge_project:
101
101
  rubygems_version: 2.2.2
102
102
  signing_key:
103
103
  specification_version: 4