pathname2 1.7.1-universal-mingw32 → 1.7.2-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_version.rb CHANGED
@@ -1,13 +1,13 @@
1
- ########################################################################
2
- # test_version.rb
3
- #
4
- # Universal test file that tests for the proper version number.
5
- ########################################################################
6
- require 'pathname2'
7
- require 'test-unit'
8
-
9
- class TC_Pathname_Version < Test::Unit::TestCase
10
- test "version is set to expected value" do
11
- assert_equal('1.7.1', Pathname::VERSION)
12
- end
13
- end
1
+ ########################################################################
2
+ # test_version.rb
3
+ #
4
+ # Universal test file that tests for the proper version number.
5
+ ########################################################################
6
+ require 'pathname2'
7
+ require 'test-unit'
8
+
9
+ class TC_Pathname_Version < Test::Unit::TestCase
10
+ test "version is set to expected value" do
11
+ assert_equal('1.7.2', Pathname::VERSION)
12
+ end
13
+ end
@@ -0,0 +1,52 @@
1
+ ########################################################################
2
+ # test_join.rb
3
+ #
4
+ # Test suite for the Pathname#join method.
5
+ ########################################################################
6
+ require 'test-unit'
7
+ require 'pathname2'
8
+
9
+ class TC_Pathname_Join < Test::Unit::TestCase
10
+ def setup
11
+ @apath = Pathname.new("C:\\foo\\bar")
12
+ @rpath = Pathname.new("foo\\bar\\baz")
13
+ end
14
+
15
+ def assert_pathname_join(final, initial, *rest)
16
+ a = Pathname.new(final)
17
+ b = Pathname.new(initial)
18
+ assert_equal(a, b.join(*rest))
19
+ end
20
+
21
+ test "join method accepts one or more arguments" do
22
+ assert_nothing_raised{ @apath.join("foo") }
23
+ assert_nothing_raised{ @apath.join("foo", "bar") }
24
+ assert_nothing_raised{ @apath.join("foo", "bar", "baz") }
25
+ end
26
+
27
+ test "join method returns expected results when joining relative paths to an absolute path" do
28
+ assert_pathname_join("C:\\foo", "C:\\", "foo")
29
+ assert_pathname_join("C:\\foo\\bar", "C:\\foo", "bar")
30
+ assert_pathname_join("C:\\foo\\bar\\baz", "C:\\foo", "bar", "baz")
31
+ end
32
+
33
+ test "join method returns expected results when joining relative paths to a relative path" do
34
+ assert_pathname_join("foo\\bar", "foo", "bar")
35
+ assert_pathname_join("foo\\bar\\baz", "foo", "bar", "baz")
36
+ end
37
+
38
+ test "join method returns expected results when joining an absolute path to an absolute path" do
39
+ assert_pathname_join("D:\\", "C:\\", "D:\\")
40
+ assert_pathname_join("D:\\foo", "C:\\", "D:\\", "foo")
41
+ assert_pathname_join("D:\\", "C:\\", "foo", "bar", "D:\\")
42
+ end
43
+
44
+ test "join returns an instance of Pathname" do
45
+ assert_kind_of(Pathname, @apath.join("foo"))
46
+ end
47
+
48
+ def teardown
49
+ @apath = nil
50
+ @rpath = nil
51
+ end
52
+ end
metadata CHANGED
@@ -1,77 +1,79 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pathname2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-28 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facade
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: test-unit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ffi
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: ! " The pathname2 library provides an implementation of the Pathname\n
70
- \ class different from the one that ships as part of the Ruby standard\n library.
71
- It is a subclass of String, though several methods have been\n overridden to
72
- better fit a path context. In addition, it supports file\n URL's as paths, provides
73
- additional methods for Windows paths, and\n handles UNC paths on Windows properly.
74
- See the README file for more\n details.\n"
69
+ description: |2
70
+ The pathname2 library provides an implementation of the Pathname
71
+ class different from the one that ships as part of the Ruby standard
72
+ library. It is a subclass of String, though several methods have been
73
+ overridden to better fit a path context. In addition, it supports file
74
+ URL's as paths, provides additional methods for Windows paths, and
75
+ handles UNC paths on Windows properly. See the README file for more
76
+ details.
75
77
  email: djberg96@gmail.com
76
78
  executables: []
77
79
  extensions: []
@@ -80,15 +82,15 @@ extra_rdoc_files:
80
82
  - CHANGES
81
83
  - MANIFEST
82
84
  files:
85
+ - CHANGES
86
+ - MANIFEST
87
+ - README
88
+ - Rakefile
83
89
  - benchmarks/bench_pathname.rb
84
90
  - benchmarks/bench_plus.rb
85
- - CHANGES
86
91
  - examples/example_pathname.rb
87
92
  - lib/pathname2.rb
88
- - MANIFEST
89
93
  - pathname2.gemspec
90
- - Rakefile
91
- - README
92
94
  - test/test_pathname.rb
93
95
  - test/test_version.rb
94
96
  - test/windows/test_append.rb
@@ -106,6 +108,7 @@ files:
106
108
  - test/windows/test_is_relative.rb
107
109
  - test/windows/test_is_root.rb
108
110
  - test/windows/test_is_unc.rb
111
+ - test/windows/test_join.rb
109
112
  - test/windows/test_long_path.rb
110
113
  - test/windows/test_misc.rb
111
114
  - test/windows/test_parent.rb
@@ -128,17 +131,17 @@ require_paths:
128
131
  - lib
129
132
  required_ruby_version: !ruby/object:Gem::Requirement
130
133
  requirements:
131
- - - ! '>='
134
+ - - '>='
132
135
  - !ruby/object:Gem::Version
133
136
  version: '0'
134
137
  required_rubygems_version: !ruby/object:Gem::Requirement
135
138
  requirements:
136
- - - ! '>='
139
+ - - '>='
137
140
  - !ruby/object:Gem::Version
138
141
  version: '0'
139
142
  requirements: []
140
143
  rubyforge_project:
141
- rubygems_version: 2.0.3
144
+ rubygems_version: 2.2.2
142
145
  signing_key:
143
146
  specification_version: 4
144
147
  summary: An alternate implementation of the Pathname class
@@ -158,6 +161,7 @@ test_files:
158
161
  - test/windows/test_is_relative.rb
159
162
  - test/windows/test_is_root.rb
160
163
  - test/windows/test_is_unc.rb
164
+ - test/windows/test_join.rb
161
165
  - test/windows/test_long_path.rb
162
166
  - test/windows/test_misc.rb
163
167
  - test/windows/test_parent.rb