kabuto 0.3.0 → 0.4.0
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/kabuto/recipe_item.rb +2 -1
- data/lib/kabuto/version.rb +1 -1
- 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: c0b0b0faa7813575c53a128c555d15e5627490ee
|
|
4
|
+
data.tar.gz: d4ec44cbcc21a9d52a4f5654f7a00be8626bacf9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25fad4b595a74c181b57d45b4953fd2e2ff55b97fa2346d20d8ece564e0af2ac142b802e0ddb525852b19fb4e0c5865d242c5899d18402ca92c3e706525666d2
|
|
7
|
+
data.tar.gz: 7f1b610feb3045f67ff3ef1c17440456d7c709ab249aa5977b682e8aee79039d68c47702101bbcd939379a7a10144988f738ac5fc6343cb4a5bf7dab046d4e51
|
data/lib/kabuto/recipe_item.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Kabuto
|
|
|
32
32
|
when :xpath
|
|
33
33
|
page.xpath(value).text.gsub(/\u00a0/, ' ').strip
|
|
34
34
|
when :lambda, :proc
|
|
35
|
-
|
|
35
|
+
Module.new.instance_exec([page, meta], &value)
|
|
36
36
|
when :const
|
|
37
37
|
value
|
|
38
38
|
end
|
|
@@ -45,6 +45,7 @@ module Kabuto
|
|
|
45
45
|
when nil then v
|
|
46
46
|
when :int then v[/\d+/].to_i
|
|
47
47
|
when :float then v.gsub(',', '.')[/\d+(\.\d+)?/].to_f
|
|
48
|
+
when :date then Date.parse(v).iso8601
|
|
48
49
|
else raise "Unknown conversion type '#{@convert_to}'"
|
|
49
50
|
end
|
|
50
51
|
end
|
data/lib/kabuto/version.rb
CHANGED