rspec-core 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +13 -0
- data/lib/rspec/core/configuration.rb +21 -2
- data/lib/rspec/core/rake_task.rb +19 -5
- data/lib/rspec/core/version.rb +1 -1
- data/lib/rspec/core/world.rb +2 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35ac596a199f064ae9b3002b53abd89c610828a0
|
4
|
+
data.tar.gz: 79d6993acfd0a779f412dbaeb76fbd69a76c3fe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8c9201434ac482cc45b97a9e9d879e4877879339c1cc13bf77fd14ec7c385e9c3ccb6c7ea3c8042d220f71fab8140102d57f3561e512037be7a038e382c034d
|
7
|
+
data.tar.gz: 3325b9ab89c7aa273354e0db5c55ab17e2d1c1b92870cf2d3e6d90f7c81428ff68d024c515cf54c26440c43f43dd603a1e23c82d5f4428b773183610b55ad008
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 3.1.5 / 2014-09-29
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.1.4...v3.1.5)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Fix issue with the rake task incorrectly escaping strings on Windows.
|
7
|
+
(Jon Rowe #1718)
|
8
|
+
* Support absolute path patterns. While this wasn't officially supported
|
9
|
+
previously, setting `rake_task.pattern` to an absolute path pattern in
|
10
|
+
RSpec 3.0 and before worked since it delegated to `FileList` internally
|
11
|
+
(but now just forwards the pattern on to the `rspec` command).
|
12
|
+
(Myron Marston, #1726)
|
13
|
+
|
1
14
|
### 3.1.4 / 2014-09-18
|
2
15
|
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.1.3...v3.1.4)
|
3
16
|
|
@@ -1336,9 +1336,28 @@ module RSpec
|
|
1336
1336
|
end
|
1337
1337
|
|
1338
1338
|
def get_matching_files(path, pattern)
|
1339
|
+
Dir[file_glob_from(path, pattern)].map { |file| File.expand_path(file) }
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
def file_glob_from(path, pattern)
|
1339
1343
|
stripped = "{#{pattern.gsub(/\s*,\s*/, ',')}}"
|
1340
|
-
|
1341
|
-
|
1344
|
+
return stripped if pattern =~ /^(\.\/)?#{Regexp.escape path}/ || absolute_pattern?(pattern)
|
1345
|
+
File.join(path, stripped)
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
if RSpec::Support::OS.windows?
|
1349
|
+
def absolute_pattern?(pattern)
|
1350
|
+
pattern =~ /\A[A-Z]:\\/ || windows_absolute_network_path?(pattern)
|
1351
|
+
end
|
1352
|
+
|
1353
|
+
def windows_absolute_network_path?(pattern)
|
1354
|
+
return false unless ::File::ALT_SEPARATOR
|
1355
|
+
pattern.start_with?(::File::ALT_SEPARATOR + ::File::ALT_SEPARATOR)
|
1356
|
+
end
|
1357
|
+
else
|
1358
|
+
def absolute_pattern?(pattern)
|
1359
|
+
pattern.start_with?(File::Separator)
|
1360
|
+
end
|
1342
1361
|
end
|
1343
1362
|
|
1344
1363
|
def extract_location(path)
|
data/lib/rspec/core/rake_task.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/tasklib'
|
3
|
-
require '
|
3
|
+
require 'rbconfig'
|
4
4
|
|
5
5
|
module RSpec
|
6
6
|
module Core
|
@@ -115,7 +115,7 @@ module RSpec
|
|
115
115
|
if ENV['SPEC']
|
116
116
|
FileList[ ENV['SPEC']].sort
|
117
117
|
elsif String === pattern && !File.exist?(pattern)
|
118
|
-
"--pattern #{pattern
|
118
|
+
"--pattern #{escape pattern}"
|
119
119
|
else
|
120
120
|
# Before RSpec 3.1, we used `FileList` to get the list of matched files, and
|
121
121
|
# then pass that along to the `rspec` command. Starting with 3.1, we prefer to
|
@@ -135,12 +135,26 @@ module RSpec
|
|
135
135
|
# a `pattern` option that will not work with `--pattern`.
|
136
136
|
#
|
137
137
|
# TODO: consider deprecating support for this and removing it in RSpec 4.
|
138
|
-
FileList[pattern].sort.map
|
138
|
+
FileList[pattern].sort.map { |file| escape file }
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Manaully comparing because in 3.2 we have RSpec::Support::OS.windows?
|
143
|
+
# but in 3.1 we don't and requiring rspec/world would be weighty here.
|
144
|
+
if RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/
|
145
|
+
def escape(shell_command)
|
146
|
+
"'#{shell_command.gsub("'", "\'")}'"
|
147
|
+
end
|
148
|
+
else
|
149
|
+
require 'shellwords'
|
150
|
+
|
151
|
+
def escape(shell_command)
|
152
|
+
shell_command.shellescape
|
139
153
|
end
|
140
154
|
end
|
141
155
|
|
142
156
|
def file_exclusion_specification
|
143
|
-
" --exclude-pattern #{exclude_pattern
|
157
|
+
" --exclude-pattern #{escape exclude_pattern}" if exclude_pattern
|
144
158
|
end
|
145
159
|
|
146
160
|
def spec_command
|
@@ -165,7 +179,7 @@ module RSpec
|
|
165
179
|
/#{File::SEPARATOR}rspec-(core|support)[^#{File::SEPARATOR}]*#{File::SEPARATOR}lib/
|
166
180
|
)
|
167
181
|
|
168
|
-
"-I#{core_and_support.map
|
182
|
+
"-I#{core_and_support.map { |file| escape file }.join(File::PATH_SEPARATOR)}"
|
169
183
|
end
|
170
184
|
end
|
171
185
|
end
|
data/lib/rspec/core/version.rb
CHANGED
data/lib/rspec/core/world.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
35
35
|
muA=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2014-09-
|
37
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: rspec-support
|
@@ -266,6 +266,6 @@ rubyforge_project: rspec
|
|
266
266
|
rubygems_version: 2.2.2
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
|
-
summary: rspec-core-3.1.
|
269
|
+
summary: rspec-core-3.1.5
|
270
270
|
test_files: []
|
271
271
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|