webdrivers 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e797daab91623814fcd8a1d5ab92edccf0be063
4
- data.tar.gz: d0f7101c1f88765150d2fdba2dd47974f2adb298
3
+ metadata.gz: 98ee403ab70bdf319556340985c8b55679f32f8b
4
+ data.tar.gz: 20b7c301923679af4b44303c0773e002e1ae78ef
5
5
  SHA512:
6
- metadata.gz: 221dfa39597516e7f7dd876f52095dc87af490f72f82cb417776ccd86918609656d408eebf9dd2768523a5cad2f24d378b71bad534e09909c31501ab96e44c01
7
- data.tar.gz: 2f2c9732436f84bdc4a1a2a21fd6d693d5722eb50af22aeffb18f68fd34c9365b0bf3abae0585f3beb758f4ce603a66ca74a59877c66ade2f274c01e95885239
6
+ metadata.gz: 4847b46b7053268160fc437d2c484c082de30f8b3201d783e0b30038d3816b0ca2a18b2a20dca09ec2ca21012ae46c09d7377de8c759418479fca1ce24db6bda
7
+ data.tar.gz: cd06df2ec1222f1315219d284dd712209fcc5c329720222a8822460af8035ca8bb4e519d418fe1da0923d0fc62e922c2b9d53ca1aaebe6181eb8c6cdc4eaa23c
@@ -1,3 +1,7 @@
1
+ ### 3.3.2 (2018-05-04)
2
+
3
+ * Fix bug with IEDriver versioning (Thanks Aleksei Gusev)
4
+
1
5
  ### 3.3.1 (2018-05-04)
2
6
 
3
7
  * Fix bug with MSWebdriver to fetch the correct driver instead of latest (Thanks kapoorlakshya)
@@ -1,4 +1,5 @@
1
1
  require 'nokogiri'
2
+ require 'rubygems/version'
2
3
 
3
4
  module Webdrivers
4
5
  class IEdriver < Common
@@ -12,10 +13,15 @@ module Webdrivers
12
13
  normalize string.match(/IEDriverServer.exe (\d\.\d+\.\d*\.\d*)/)[1]
13
14
  end
14
15
 
16
+ def latest
17
+ downloads.keys.sort.last
18
+ end
19
+
20
+
15
21
  private
16
22
 
17
23
  def normalize(string)
18
- string.to_f
24
+ Gem::Version.new(string)
19
25
  end
20
26
 
21
27
  def file_name
@@ -35,7 +41,7 @@ module Webdrivers
35
41
  items = doc.css("Key").collect(&:text)
36
42
  items.select! { |item| item.include?('IEDriverServer_Win32') }
37
43
  ds = items.each_with_object({}) do |item, hash|
38
- key = normalize item[/^[^\/]+/]
44
+ key = normalize item[/([^_]+)\.zip/, 1]
39
45
  hash[key] = "#{base_url}#{item}"
40
46
  end
41
47
  Webdrivers.logger.debug "Versions now located on downloads site: #{ds.keys}"
@@ -5,8 +5,7 @@ describe Webdrivers::IEdriver do
5
5
  let(:iedriver) { Webdrivers::IEdriver }
6
6
 
7
7
  it 'finds latest version' do
8
- expect(iedriver.latest).to be > 3.4
9
- expect(iedriver.latest).to be < 4
8
+ expect(iedriver.latest.segments).to eq [3, 12, 0]
10
9
  end
11
10
 
12
11
  it 'downloads iedriver' do
@@ -19,7 +19,7 @@ describe Webdrivers::MSWebdriver do
19
19
  before { allow(mswebdriver).to receive(:site_available?).and_return(false) }
20
20
 
21
21
  it 'raises exception downloading' do
22
- expect { mswebdriver.download }.to raise_error(StandardError, "Can not reach site")
22
+ expect { mswebdriver.download }.to raise_error(RuntimeError, "Failed to check Microsoft Edge version.")
23
23
  end
24
24
  end
25
25
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "webdrivers"
6
- s.version = "3.3.1"
6
+ s.version = "3.3.2"
7
7
  s.authors = ["Titus Fortner"]
8
8
  s.email = ["titusfortner@gmail.com"]
9
9
  s.homepage = "https://github.com/titusfortner/webdrivers"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-04 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.6.11
133
+ rubygems_version: 2.5.2.3
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Easy download and use of browser drivers.