unobtainium 0.8.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a03cc8ff5ee6dcf02b0b2b967a32ccc3053b093
4
- data.tar.gz: ea904b1a9f7e20fd051d74fefec4a33b9c9c21ff
3
+ metadata.gz: 32ec07edb9ef9b7a1794e3660a6dbaedec57054f
4
+ data.tar.gz: 36ec4332fb3921acb4e3b723b4fe0f208bc839e6
5
5
  SHA512:
6
- metadata.gz: c4db733242a110f7bdb634cfe883ba3553e6b0022774800daa7b9de8058b4fbbeafcc475911d9c5eef56b9b117689fd9b8124fc27bf405b3ff5c03fdf9c0fe49
7
- data.tar.gz: 18bc60d149c2a2856085c511fc3cf477bc6a061a125e1a96058de4bdd581cff347a8897393653a9b4a10d76ee2271eb75aad289907a343a2699bbc7d344ba125
6
+ metadata.gz: 140e9dbdc8f5f83d4ff607ffd9fe5381652f710e3a9cf6036ef278daa3da8c792c450883b701395680094997983bd880ee5dc5eb5d0403fd2f690da05b311d13
7
+ data.tar.gz: 5f6dcef3056e6110c49a6b3fba2913641f43a1c4a15895c5802edf3af8569e6be0ec0f2a66b01a88694937d450b6650683981f456f39d400447ac77e914fdf8e
data/.gitignore CHANGED
@@ -10,10 +10,24 @@
10
10
  /test/version_tmp/
11
11
  /tmp/
12
12
 
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
13
16
  ## Specific to RubyMotion:
14
17
  .dat*
15
18
  .repl_history
16
19
  build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
17
31
 
18
32
  ## Documentation cache and generated files:
19
33
  /.yardoc/
@@ -3,6 +3,9 @@ rvm:
3
3
  - 2.0
4
4
  - 2.1
5
5
  - 2.2
6
+ script:
7
+ - bundle exec rake
8
+ - bundle exec codeclimate-test-reporter
6
9
  addons:
7
10
  code_climate:
8
11
  repo_token: 5dcf014e3a26ded8ffe8ff8bc70f98d49523e4851613123d8359035d44937953
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unobtainium (0.8.0)
5
- collapsium (~> 0.4)
6
- collapsium-config (~> 0.2)
4
+ unobtainium (0.8.1)
5
+ collapsium (~> 0.6)
6
+ collapsium-config (~> 0.4)
7
7
  ptools (~> 1.3)
8
8
  sys-proctable (~> 1.1)
9
9
 
@@ -26,11 +26,10 @@ GEM
26
26
  chromedriver-helper (1.0.0)
27
27
  archive-zip (~> 0.7.0)
28
28
  nokogiri (~> 1.6)
29
- codeclimate-test-reporter (0.6.0)
30
- simplecov (>= 0.7.1, < 1.0.0)
31
- collapsium (0.4.1)
32
- collapsium-config (0.2.1)
33
- collapsium (~> 0.4)
29
+ codeclimate-test-reporter (1.0.1)
30
+ collapsium (0.6.1)
31
+ collapsium-config (0.4.0)
32
+ collapsium (~> 0.6)
34
33
  cucumber (2.4.0)
35
34
  builder (>= 2.1.2)
36
35
  cucumber-core (~> 1.5.0)
@@ -51,22 +50,20 @@ GEM
51
50
  mini_portile2 (2.1.0)
52
51
  multi_json (1.12.1)
53
52
  multi_test (0.1.2)
54
- nokogiri (1.6.8)
53
+ nokogiri (1.6.8.1)
55
54
  mini_portile2 (~> 2.1.0)
56
- pkg-config (~> 1.1.7)
57
- parser (2.3.1.2)
55
+ parser (2.3.1.4)
58
56
  ast (~> 2.2)
59
57
  phantomjs (2.1.1.0)
60
- pkg-config (1.1.7)
61
58
  powerpack (0.1.1)
62
59
  ptools (1.3.3)
63
60
  rainbow (2.1.0)
64
- rake (11.2.2)
61
+ rake (11.3.0)
65
62
  rspec (3.5.0)
66
63
  rspec-core (~> 3.5.0)
67
64
  rspec-expectations (~> 3.5.0)
68
65
  rspec-mocks (~> 3.5.0)
69
- rspec-core (3.5.3)
66
+ rspec-core (3.5.4)
70
67
  rspec-support (~> 3.5.0)
71
68
  rspec-expectations (3.5.0)
72
69
  diff-lcs (>= 1.2.0, < 2.0)
@@ -75,7 +72,7 @@ GEM
75
72
  diff-lcs (>= 1.2.0, < 2.0)
76
73
  rspec-support (~> 3.5.0)
77
74
  rspec-support (3.5.0)
78
- rubocop (0.42.0)
75
+ rubocop (0.45.0)
79
76
  parser (>= 2.3.1.1, < 3.0)
80
77
  powerpack (~> 0.1)
81
78
  rainbow (>= 1.99.1, < 3.0)
@@ -92,7 +89,7 @@ GEM
92
89
  json (>= 1.8, < 3)
93
90
  simplecov-html (~> 0.10.0)
94
91
  simplecov-html (0.10.0)
95
- sys-proctable (1.1.1)
92
+ sys-proctable (1.1.3)
96
93
  tomlrb (1.2.3)
97
94
  unicode-display_width (1.1.1)
98
95
  websocket (1.2.3)
@@ -108,13 +105,13 @@ DEPENDENCIES
108
105
  codeclimate-test-reporter
109
106
  cucumber
110
107
  phantomjs
111
- rake (~> 11.2)
108
+ rake (~> 11.3)
112
109
  rspec (~> 3.5)
113
- rubocop (~> 0.42)
110
+ rubocop (~> 0.45)
114
111
  selenium-webdriver
115
112
  simplecov (~> 0.12)
116
113
  unobtainium!
117
114
  yard (~> 0.9)
118
115
 
119
116
  BUNDLED WITH
120
- 1.12.5
117
+ 1.13.6
@@ -1,110 +1,7 @@
1
1
  # Configuration
2
2
 
3
- The `Config` class, and it's major user, the `World.config` method make using
4
- complex configuration files in your project easier.
5
-
6
- ## Basic Configuration Features
7
-
8
- ### Pathed Access
9
-
10
- `Config` is a `Hash` with pathed access. Take a nested structure such as this
11
- as an example:
12
-
13
- ```yaml
14
- ---
15
- foo:
16
- bar: baz
17
- ```
18
-
19
- Instead of accessing `config['foo']['bar']`, you can instead use a path such
20
- as `config['foo.bar']`. The major benefit is that if *any* of the path components
21
- does not exist, nil is returned (and the behaviour is equivalent to other access
22
- methods such as `:fetch`, etc.)
23
-
24
- Similarly you can use this type of access for writing: `config['baz.quux'] = 42`
25
- will create both the `baz` hash, and it's child the `quux` key.
26
-
27
- ### Configuration Loading
28
-
29
- If you're using `World.config`, configuration is automatically loaded at the
30
- time it's first invoked from the location specified by `World.config_file`, which
31
- defaults to `config/config.yml`.
32
-
33
- This is equivalent to invoking `Config.load_config` with that location manually.
34
-
35
- ### Local Configuration Overrides
36
-
37
- For the example file of `config/config.yml`, if a file with the same path and
38
- name, and the name postfix `-local` exists (i.e. `config/config-local.yml`), that
39
- file will also be loaded. It's keys will be recursively added to the keys from the
40
- main configuration file, overwriting only leaves, not entire hashes.
41
-
42
- Example:
43
-
44
- ```yaml
45
- # config/config.yml
46
- ---
47
- foo:
48
- bar: 42
49
- baz: quux
50
-
51
- # config/config-local.yml
52
- ---
53
- something: else
54
- foo:
55
- baz: override
56
-
57
- # result
58
- ---
59
- something: else
60
- foo:
61
- bar: 42
62
- baz: override
63
- ```
64
-
65
- ### Configuration Extension
66
-
67
- An additional feature of the `Config` class is that you can extend individual
68
- hashes with values from other hashes.
69
-
70
- ```yaml
71
- ---
72
- root:
73
- foo: bar
74
- derived:
75
- baz: quux
76
- extends: root
77
- ```
78
-
79
- This results in:
80
-
81
- ```yaml
82
- ---
83
- root:
84
- foo: bar
85
- derived:
86
- baz: quux
87
- foo: bar
88
- base: root
89
- ```
90
-
91
- **Notes:**
92
-
93
- - This feature means that `extends` and `base` are reserved configuration keys!
94
- - Multiple levels of extension are supported. The `base` keyword will *always
95
- name the root-most element*, not the immediate ancestor.
96
- - Extending from multiple bases is not supported.
97
- - Extending from nonexistent bases is supported; all that happens is that the
98
- `base` key is set.
99
-
100
- ### Environment Variable Override
101
-
102
- Given a configuration path, any environment variable with the same name (change
103
- path to upper case letters and replace `.` with `_`, e.g. `foo.bar` becomes
104
- `FOO_BAR`) overrides the values in the configuration file.
105
-
106
- If the environment variable is parseable as JSON, then that parsed JSON will
107
- **replace** the original configuration path (i.e. it will not be merged).
3
+ The main configuration features are best described by [collapsium-config](https://github.com/jfinkhaeuser/collapsium-config)
4
+ upon which the configuration is based.
108
5
 
109
6
  ## Configuration Values Interpreted by World
110
7
 
@@ -31,6 +31,7 @@ module Unobtainium
31
31
  # requests.
32
32
  class DriverProxy
33
33
  ##
34
+ attr_reader :appium_driver, :selenium_driver
34
35
  # Initialize
35
36
  def initialize(driver, compatibility = true)
36
37
  @appium_driver = driver
@@ -8,5 +8,5 @@
8
8
  #
9
9
  module Unobtainium
10
10
  # The current release version
11
- VERSION = "0.8.0".freeze
11
+ VERSION = "0.8.1".freeze
12
12
  end
@@ -82,7 +82,18 @@ module Unobtainium
82
82
  # The merged/extended options might define a "base"; that's the label
83
83
  # we need to use.
84
84
  if not options.nil? and not options["base"].nil?
85
- label = options["base"]
85
+ bases = options["base"]
86
+
87
+ # Collapsium config returns an Array of bases, but we really only want
88
+ # one. We'll have to do the sensible thing and only use one of the bases
89
+ # which also is a driver for the label. Since there's no better choice,
90
+ # let's default to the first of those.
91
+ bases.each do |base|
92
+ if not base.start_with?(".drivers.")
93
+ next
94
+ end
95
+ label = base.gsub(/^\.drivers\./, '')
96
+ end
86
97
 
87
98
  # Unfortunately, the "base" key may not be recognized by the drivers,
88
99
  # which could lead to errors down the road. Let's remove it; it's reserved
@@ -1,9 +1,3 @@
1
- # Only start CodeClimate from travis
2
- if ENV['CODECLIMATE_REPO_TOKEN']
3
- require 'codeclimate-test-reporter'
4
- CodeClimate::TestReporter.start
5
- end
6
-
7
1
  # Always start SimpleCov
8
2
  require 'simplecov'
9
3
  SimpleCov.start do
@@ -12,7 +12,7 @@ class Tester
12
12
  end # class Tester
13
13
 
14
14
  describe ::Unobtainium::Support::Utility do
15
- it "returns nil for a lable that can't be matched" do
15
+ it "returns nil for a label that can't be matched" do
16
16
  expect(Tester.normalize_label("nomatch")).to be_nil
17
17
  expect(Tester.normalize_label(:nomatch)).to be_nil
18
18
  end
@@ -32,7 +32,7 @@ describe ::Unobtainium::World do
32
32
  end
33
33
 
34
34
  it "extends driver options, but doesn't pass 'base' on" do
35
- expect(@tester.config["drivers.leaf.base"]).to eql "mock"
35
+ expect(@tester.config["drivers.leaf.base"]).to eql %w(.drivers.mock)
36
36
  expect(@tester.driver.passed_options["base"]).to be_nil
37
37
  end
38
38
  end
@@ -13,6 +13,7 @@ require 'unobtainium/version'
13
13
 
14
14
  # rubocop:disable Style/UnneededPercentQ, Style/ExtraSpacing
15
15
  # rubocop:disable Style/SpaceAroundOperators
16
+ # rubocop:disable Metrics/BlockLength
16
17
  Gem::Specification.new do |spec|
17
18
  spec.name = "unobtainium"
18
19
  spec.version = Unobtainium::VERSION
@@ -43,8 +44,8 @@ Gem::Specification.new do |spec|
43
44
  "'phantomjs'"
44
45
 
45
46
  spec.add_development_dependency "bundler", "~> 1.12"
46
- spec.add_development_dependency "rubocop", "~> 0.42"
47
- spec.add_development_dependency "rake", "~> 11.2"
47
+ spec.add_development_dependency "rubocop", "~> 0.45"
48
+ spec.add_development_dependency "rake", "~> 11.3"
48
49
  spec.add_development_dependency "rspec", "~> 3.5"
49
50
  spec.add_development_dependency "simplecov", "~> 0.12"
50
51
  spec.add_development_dependency "yard", "~> 0.9"
@@ -56,8 +57,9 @@ Gem::Specification.new do |spec|
56
57
 
57
58
  spec.add_dependency "sys-proctable", "~> 1.1"
58
59
  spec.add_dependency "ptools", "~> 1.3"
59
- spec.add_dependency "collapsium", "~> 0.4"
60
- spec.add_dependency "collapsium-config", "~> 0.2"
60
+ spec.add_dependency "collapsium", "~> 0.6"
61
+ spec.add_dependency "collapsium-config", "~> 0.4"
61
62
  end
63
+ # rubocop:enable Metrics/BlockLength
62
64
  # rubocop:enable Style/SpaceAroundOperators
63
65
  # rubocop:enable Style/UnneededPercentQ, Style/ExtraSpacing
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.8.0
4
+ version: 0.8.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-09-12 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.42'
33
+ version: '0.45'
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.42'
40
+ version: '0.45'
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
- version: '11.2'
47
+ version: '11.3'
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
- version: '11.2'
54
+ version: '11.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -198,28 +198,28 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '0.4'
201
+ version: '0.6'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0.4'
208
+ version: '0.6'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: collapsium-config
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '0.2'
215
+ version: '0.4'
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '0.2'
222
+ version: '0.4'
223
223
  description: "\n Unobtainium wraps Selenium and Appium in a simple driver abstraction
224
224
  so that\n test code can more easily cover desktop browsers, mobile browsers and
225
225
  mobile\n apps.\n\n Some additional useful functionality for the maintenance