pageify 0.3.1 → 0.3.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 +4 -4
- data/lib/pageify/page_object.rb +5 -1
- data/spec/sample_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0afe78427287d4e566a9f2f95d762a857886d125
|
4
|
+
data.tar.gz: a814cbde53f08beb62446c1110520f5b5baffddb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cfa96740acfaec3c574be8ac5000f49d1bd690341b03971438685f46153f8320bd5d28898a5f5a1812560958be4ea0f2e6921b9515bf5b249a8075de90027f9
|
7
|
+
data.tar.gz: c5ccb14bdfbd8c31c8465a53f7de5f9aace6150c9d45e2fd89c09556c34f17f318411cccb8f89bb0a34d90ea51934637617e28bb965e00eb988e9740f506f72c
|
data/lib/pageify/page_object.rb
CHANGED
@@ -5,7 +5,11 @@ class PageObject
|
|
5
5
|
child = PageObject.create(raw_row)
|
6
6
|
child.parent = self
|
7
7
|
define_singleton_method(child.name) do |*arguments|
|
8
|
-
|
8
|
+
unless arguments.eql? []
|
9
|
+
child_selector = (child.selector % arguments).strip_quotes.strip
|
10
|
+
else
|
11
|
+
child_selector = (child.selector % '').strip_quotes.strip
|
12
|
+
end
|
9
13
|
if child_selector.start_with? "&"
|
10
14
|
$selector += child_selector.gsub(/^&/, "")
|
11
15
|
else
|
data/spec/sample_spec.rb
CHANGED
@@ -25,6 +25,10 @@ describe Pageify do
|
|
25
25
|
@page.root.complex.arg(1).p.should == ".root .complex .arg:nth-of-type(1)"
|
26
26
|
end
|
27
27
|
|
28
|
+
it "should ignore arguments if not present" do
|
29
|
+
@page.root.complex.arg.p.should == ".root .complex .arg:nth-of-type()"
|
30
|
+
end
|
31
|
+
|
28
32
|
it "should check pages nested inside arguments" do
|
29
33
|
@page.root.complex.arg(1).arg_nested.p.should == ".root .complex .arg:nth-of-type(1) .arg_nested"
|
30
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deepak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|