yasuri 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yasuri/version.rb +1 -1
- data/lib/yasuri/yasuri_text_node.rb +4 -1
- data/spec/yasuri_text_node_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f70e0281f160fbabc3bff893ce607fb400d4b352
|
4
|
+
data.tar.gz: 768589a35a856f392eadf6d3eaa1410cf8d97fb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 795dec45d612eb40f55aee0fce492979cade151d7f553e0f8e9a77e7ab39f55f3db015c20b6f13f447d991861c8b9c3bf9f25111a1af918ca055002f67491a76
|
7
|
+
data.tar.gz: 74452e32d9c91ceac9cc4d43963d3f0b68692474239770a55c14c52e6d9f266e28d768c1368211140dc8925acc9e41ce97bf91790fb19cc56366505f1db74894
|
data/lib/yasuri/version.rb
CHANGED
@@ -46,6 +46,12 @@ describe 'Yasuri' do
|
|
46
46
|
expect(actual).to eq "Hello"
|
47
47
|
end
|
48
48
|
|
49
|
+
it "return first captured if matched given capture pattern" do
|
50
|
+
node = Yasuri.text_title '/html/body/p[1]', /H(.+)i/
|
51
|
+
actual = node.inject(@agent, @index_page)
|
52
|
+
expect(actual).to eq "ello,Yasur"
|
53
|
+
end
|
54
|
+
|
49
55
|
it "can be truncated with regexp" do
|
50
56
|
node = Yasuri.text_title '/html/body/p[1]', /[^,]+$/
|
51
57
|
actual = node.inject(@agent, @index_page)
|