durian 0.1.0.1 → 0.1.0.2
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 +8 -8
- data/durian-0.1.0.1.gem +0 -0
- data/durian-0.1.0.gem +0 -0
- data/lib/durian/page.rb +20 -28
- data/lib/durian/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDYxNzkzMDY5NzllNmE0YjI2MGEwNzUxMmE4MmIwODI3ZDlkNjdiZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDQ1NmM4OWMwZGI1OTJiNzlkNGMyMDhlM2RiMzI0NTNlZjg3OTQ1Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDM3NWJiMTIwZTVkYTYxZTJjYWJkM2JkMWE2NWNiZTFlNTgyYzMxZGFiOTRk
|
10
|
+
YjAwNDQzNjIzZmY1YjQyMDI2ODE2N2U2ZjA2MDY0MjA1MzA0ZDViZWFlZmE0
|
11
|
+
MmQyM2ZiMjM4ODQ1ZmM0MTRiNTFlZjg3NzY3MzM0Njc4OTg1M2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzM1NzRjNDI0YWM1NTQ0MjcwNDc3NjBiMGZkYzFlNWZlMzllODc4OWViMmY3
|
14
|
+
MmRmZWJhN2ExNzgzYjVkYzJiODZiYjUxOWFmNDhkNmNhYjVlZTE2MDNjODRl
|
15
|
+
ZjQ5MTA4MDlhYzdmMTcxOTM2YWI2NWIxM2FmNjk3NWM4ZjQ0OGY=
|
data/durian-0.1.0.1.gem
ADDED
Binary file
|
data/durian-0.1.0.gem
ADDED
Binary file
|
data/lib/durian/page.rb
CHANGED
@@ -1,31 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
| def [](key)
|
17
|
-
| |send(key)
|
18
|
-
| end
|
19
|
-
|
20
|
-
| def for(name)
|
21
|
-
| |class_name = "#{name}_page".gsub(' ', '_').classify
|
22
|
-
| |class_name.constantize rescue raise "Could not find page #{class_name}"
|
23
|
-
| end
|
24
|
-
|
25
|
-
| def located_at(url)
|
26
|
-
self.location = url
|
27
|
-
| end
|
28
|
-
end
|
1
|
+
module Durian
|
2
|
+
class Page
|
3
|
+
# The url(can be relative) of the page
|
4
|
+
attr_accessor :location
|
5
|
+
alias_method :located_at, :location=
|
6
|
+
|
7
|
+
# Allows Page Object class's to inherit from Durian::Page class
|
8
|
+
def inherited(base)
|
9
|
+
base.instance_variable_set :@elements, Hash.new { |hash, key, value| hash[key] = [] }
|
10
|
+
end
|
11
|
+
|
12
|
+
# Call page objects and elements with the page[element].click syntax
|
13
|
+
def [](key)
|
14
|
+
send(key)
|
29
15
|
end
|
16
|
+
|
17
|
+
def for(name)
|
18
|
+
class_name = "#{name}_page".gsub(' ', '_').classify
|
19
|
+
class_name.constantize rescue raise "Could not find page #{class_name}"
|
20
|
+
end
|
21
|
+
end
|
30
22
|
end
|
31
23
|
|
data/lib/durian/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: durian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Kane
|
@@ -84,6 +84,8 @@ files:
|
|
84
84
|
- Rakefile
|
85
85
|
- bin/console
|
86
86
|
- bin/setup
|
87
|
+
- durian-0.1.0.1.gem
|
88
|
+
- durian-0.1.0.gem
|
87
89
|
- durian.gemspec
|
88
90
|
- lib/durian.rb
|
89
91
|
- lib/durian/page.rb
|