capybara 2.15.0 → 2.15.1
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 +4 -4
- data/History.md +11 -1
- data/lib/capybara/rack_test/form.rb +2 -1
- data/lib/capybara/spec/fixtures/no_extension +1 -0
- data/lib/capybara/spec/session/attach_file_spec.rb +7 -0
- data/lib/capybara/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eff01a08419c2e76c521c460193065f256f6fe4
|
4
|
+
data.tar.gz: 588eeea7fc4088e2e470bd4d573056be00782248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1281d86fc6e0ff8533bc4e9d0232adf51b9ce7c33a48a9eba5842e2b24271dbf909efab1c80e9b14ca7ca6861bc1f489d0cb094cce0f8d822f3a387f60c6672f
|
7
|
+
data.tar.gz: d713cafa706d2ddbd23dc05524128fff444a2040d602d8352b23acd0e718c8bb2a844ca36a72d2decc7aa1016aaa8cd75d579754457d5260add9aa797d536c6a
|
data/History.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
+
# Version 2.15.1
|
2
|
+
|
3
|
+
Release date: 2017-08-04
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
* `attach_file` with no extension/MIME type when using the `:rack_test` driver [Thomas Walpole]
|
8
|
+
|
1
9
|
# Version 2.15.0
|
2
10
|
|
3
|
-
Release
|
11
|
+
Release date: 2017-08-04
|
4
12
|
|
5
13
|
### Added
|
6
14
|
|
@@ -12,9 +20,11 @@ Release data: unreleased
|
|
12
20
|
than waiting for one to pass/fail before checking the second. Will make `#or` more performant and confirm
|
13
21
|
both conditions are true "simultaneously" for `and`. [Thomas Walpole]
|
14
22
|
If you still want the
|
23
|
+
* Default filter values are now included in error descriptions [Thomas Walpole]
|
15
24
|
* Add `Session#refresh` [Thomas Walpole]
|
16
25
|
* Loosened restrictions on where `Session#within_window` can be called from [Thomas Walpole]
|
17
26
|
* Switched from `mime-types` dependency to `mini_mime` [Jason Frey]
|
27
|
+
|
18
28
|
# Version 2.14.4
|
19
29
|
|
20
30
|
Release date: 2017-06-27
|
@@ -42,7 +42,8 @@ class Capybara::RackTest::Form < Capybara::RackTest::Node
|
|
42
42
|
if (value = field['value']).to_s.empty?
|
43
43
|
NilUploadedFile.new
|
44
44
|
else
|
45
|
-
|
45
|
+
mime_info = MiniMime.lookup_by_filename(value)
|
46
|
+
Rack::Test::UploadedFile.new(value, (mime_info && mime_info.content_type).to_s)
|
46
47
|
end
|
47
48
|
merge_param!(params, field['name'].to_s, file)
|
48
49
|
else
|
@@ -0,0 +1 @@
|
|
1
|
+
ThisFileHAsNoExtension
|
@@ -4,6 +4,7 @@ Capybara::SpecHelper.spec "#attach_file" do
|
|
4
4
|
@test_file_path = File.expand_path('../fixtures/test_file.txt', File.dirname(__FILE__))
|
5
5
|
@another_test_file_path = File.expand_path('../fixtures/another_test_file.txt', File.dirname(__FILE__))
|
6
6
|
@test_jpg_file_path = File.expand_path('../fixtures/capybara.jpg', File.dirname(__FILE__))
|
7
|
+
@no_extension_file_path = File.expand_path('../fixtures/no_extension', File.dirname(__FILE__))
|
7
8
|
@session.visit('/form')
|
8
9
|
end
|
9
10
|
|
@@ -57,6 +58,12 @@ Capybara::SpecHelper.spec "#attach_file" do
|
|
57
58
|
expect(@session).to have_content('image/jpeg')
|
58
59
|
end
|
59
60
|
|
61
|
+
it "should not break when uploading a file without extension" do
|
62
|
+
@session.attach_file "Single Document", @no_extension_file_path
|
63
|
+
@session.click_button 'Upload Single'
|
64
|
+
expect(@session).to have_content(File.read(@no_extension_file_path))
|
65
|
+
end
|
66
|
+
|
60
67
|
it "should not break when using HTML5 multiple file input" do
|
61
68
|
@session.attach_file "Multiple Documents", @test_file_path
|
62
69
|
@session.click_button('Upload Multiple')
|
data/lib/capybara/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Walpole
|
@@ -346,6 +346,7 @@ files:
|
|
346
346
|
- lib/capybara/session/matchers.rb
|
347
347
|
- lib/capybara/spec/fixtures/another_test_file.txt
|
348
348
|
- lib/capybara/spec/fixtures/capybara.jpg
|
349
|
+
- lib/capybara/spec/fixtures/no_extension
|
349
350
|
- lib/capybara/spec/fixtures/test_file.txt
|
350
351
|
- lib/capybara/spec/public/jquery-ui.js
|
351
352
|
- lib/capybara/spec/public/jquery.js
|