unobtainium 0.5.0 → 0.5.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/.rspec +2 -0
- data/.rubocop.yml +3 -0
- data/Gemfile.lock +5 -5
- data/README.md +8 -0
- data/lib/unobtainium/driver.rb +2 -1
- data/lib/unobtainium/version.rb +1 -1
- data/spec/port_scanner_spec.rb +8 -4
- data/spec/runtime_spec.rb +4 -2
- data/unobtainium.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62dde544dbbf73a7c92b1c34bade67318bfa8852
|
4
|
+
data.tar.gz: 2ffcd21462aef14d31031e0d26fcb562f61690af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d68f7c5d72f352338c5fd914585b9bba184bd8a38ae76e4fdc0e87a9d03e91e15a2e1706ae8fdfd3b9eba70ebb9510c9b52c475788142f63dfc2e43d82b88f
|
7
|
+
data.tar.gz: eeec64dacd68be00b4a402e705aff209af4313d0ecac8a7824b4ceee479e1bd5edf7368c7c4ff4fa2b863d5a31a0ae1293d83e5916c60b64470222ef89327921
|
data/.rspec
ADDED
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unobtainium (0.5.
|
4
|
+
unobtainium (0.5.1)
|
5
5
|
sys-proctable (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -60,8 +60,8 @@ GEM
|
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
61
|
rspec-support (~> 3.4.0)
|
62
62
|
rspec-support (3.4.1)
|
63
|
-
rubocop (0.
|
64
|
-
parser (>= 2.3.0
|
63
|
+
rubocop (0.40.0)
|
64
|
+
parser (>= 2.3.1.0, < 3.0)
|
65
65
|
powerpack (~> 0.1)
|
66
66
|
rainbow (>= 1.99.1, < 3.0)
|
67
67
|
ruby-progressbar (~> 1.7)
|
@@ -94,11 +94,11 @@ DEPENDENCIES
|
|
94
94
|
phantomjs
|
95
95
|
rake (~> 11.1)
|
96
96
|
rspec (~> 3.4)
|
97
|
-
rubocop (~> 0.
|
97
|
+
rubocop (~> 0.40)
|
98
98
|
selenium-webdriver
|
99
99
|
simplecov (~> 0.11)
|
100
100
|
unobtainium!
|
101
101
|
yard (~> 0.8)
|
102
102
|
|
103
103
|
BUNDLED WITH
|
104
|
-
1.12.
|
104
|
+
1.12.3
|
data/README.md
CHANGED
@@ -94,6 +94,14 @@ details.
|
|
94
94
|
- [unobtainium-kramdown](https://github.com/jfinkhaeuser/unobtainium-kramdown) is
|
95
95
|
an open-uri-based driver for dealing with Markdown structured text.
|
96
96
|
|
97
|
+
# Driver Modules
|
98
|
+
|
99
|
+
- [unobtainium-multifind](https://github.com/jfinkhaeuser/unobtainium-multifind)
|
100
|
+
is a module providing a `#multifind` function for searching for multiple elements
|
101
|
+
at the same time.
|
102
|
+
- [unobtainium-multiwait](https://github.com/jfinkhaeuser/unobtainium-multiwait)
|
103
|
+
based on `multifind`, simplifies waiting for an element to appear.
|
104
|
+
|
97
105
|
# Credits
|
98
106
|
This gem is inspired by [LapisLazuli](https://github.com/spriteCloud/lapis-lazuli),
|
99
107
|
but vastly less complex, and aims to stay so.
|
data/lib/unobtainium/driver.rb
CHANGED
@@ -233,7 +233,8 @@ module Unobtainium
|
|
233
233
|
# Sanitize options
|
234
234
|
@label, @options, driver_klass = ::Unobtainium::Driver.resolve_options(
|
235
235
|
label,
|
236
|
-
opts
|
236
|
+
opts
|
237
|
+
)
|
237
238
|
|
238
239
|
# Perform precondition checks of the driver class
|
239
240
|
driver_klass.ensure_preconditions(@label, @options)
|
data/lib/unobtainium/version.rb
CHANGED
data/spec/port_scanner_spec.rb
CHANGED
@@ -16,25 +16,29 @@ describe ::Unobtainium::Support::PortScanner do
|
|
16
16
|
describe "port_open?" do
|
17
17
|
it "detects an open port correctly" do
|
18
18
|
allow_any_instance_of(Socket).to receive(:connect_nonblock).and_raise(
|
19
|
-
Errno::EISCONN
|
19
|
+
Errno::EISCONN
|
20
|
+
)
|
20
21
|
expect(tester.port_open?('localhost', 1234)).to be_truthy
|
21
22
|
end
|
22
23
|
|
23
24
|
it "detects a closed port correctly" do
|
24
25
|
allow_any_instance_of(Socket).to receive(:connect_nonblock).and_raise(
|
25
|
-
Errno::ECONNREFUSED
|
26
|
+
Errno::ECONNREFUSED
|
27
|
+
)
|
26
28
|
expect(tester.port_open?('localhost', 1234)).to be_falsy
|
27
29
|
end
|
28
30
|
|
29
31
|
it "handles a single domain parameter" do
|
30
32
|
allow_any_instance_of(Socket).to receive(:connect_nonblock).and_raise(
|
31
|
-
Errno::ECONNREFUSED
|
33
|
+
Errno::ECONNREFUSED
|
34
|
+
)
|
32
35
|
expect(tester.port_open?('localhost', 1234, :INET)).to be_falsy
|
33
36
|
end
|
34
37
|
|
35
38
|
it "handles many domain parameters" do
|
36
39
|
allow_any_instance_of(Socket).to receive(:connect_nonblock).and_raise(
|
37
|
-
Errno::ECONNREFUSED
|
40
|
+
Errno::ECONNREFUSED
|
41
|
+
)
|
38
42
|
expect(tester.port_open?('localhost', 1234, [:INET, :INET6])).to be_falsy
|
39
43
|
end
|
40
44
|
|
data/spec/runtime_spec.rb
CHANGED
@@ -45,7 +45,8 @@ describe ::Unobtainium::Runtime do
|
|
45
45
|
it "deals well with default values" do
|
46
46
|
expect(::Unobtainium::Runtime.instance["bar"]).to be_nil
|
47
47
|
expect { ::Unobtainium::Runtime.instance.fetch("bar") }.to raise_error(
|
48
|
-
KeyError
|
48
|
+
KeyError
|
49
|
+
)
|
49
50
|
expect(::Unobtainium::Runtime.instance.fetch("bar", 123)).to eql 123
|
50
51
|
end
|
51
52
|
|
@@ -76,7 +77,8 @@ describe ::Unobtainium::Runtime do
|
|
76
77
|
it "ignores nil objects created from a block" do
|
77
78
|
::Unobtainium::Runtime.instance.store_with("_nope_") { nil }
|
78
79
|
expect { ::Unobtainium::Runtime.instance.fetch("_nope_") }.to raise_error(
|
79
|
-
KeyError
|
80
|
+
KeyError
|
81
|
+
)
|
80
82
|
end
|
81
83
|
|
82
84
|
it "stores objects with :store_if" do
|
data/unobtainium.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
43
43
|
"'phantomjs'"
|
44
44
|
|
45
45
|
spec.add_development_dependency "bundler", "~> 1.12"
|
46
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
46
|
+
spec.add_development_dependency "rubocop", "~> 0.40"
|
47
47
|
spec.add_development_dependency "rake", "~> 11.1"
|
48
48
|
spec.add_development_dependency "rspec", "~> 3.4"
|
49
49
|
spec.add_development_dependency "simplecov", "~> 0.11"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unobtainium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Finkhaeuser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.40'
|
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
|
-
version: '0.
|
40
|
+
version: '0.40'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +176,7 @@ extra_rdoc_files: []
|
|
176
176
|
files:
|
177
177
|
- ".codeclimate.yml"
|
178
178
|
- ".gitignore"
|
179
|
+
- ".rspec"
|
179
180
|
- ".rubocop.yml"
|
180
181
|
- ".travis.yml"
|
181
182
|
- Gemfile
|