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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bc825b976695bb0604e0a1a33b0a248bd069962
4
- data.tar.gz: 512566d9d7a40efbfa5cd0ad1cd2f8a918db22c0
3
+ metadata.gz: c0b0b0faa7813575c53a128c555d15e5627490ee
4
+ data.tar.gz: d4ec44cbcc21a9d52a4f5654f7a00be8626bacf9
5
5
  SHA512:
6
- metadata.gz: 790aea945b48127b79d872f31a0c2b9a17f7f209909a27a2275f70788136a3e5e68c5788c33f00ca65b077f9909e953eb34cb8c16c5188a68fed46005bdc4fdf
7
- data.tar.gz: f37c4061ba11ed1dce8472dc311c876e161c531e7d7f50097c676790b587fe96778e326a461795fc72e9c79eaf9a5e2fbd5c8036227d1505f63d6cd5561026aa
6
+ metadata.gz: 25fad4b595a74c181b57d45b4953fd2e2ff55b97fa2346d20d8ece564e0af2ac142b802e0ddb525852b19fb4e0c5865d242c5899d18402ca92c3e706525666d2
7
+ data.tar.gz: 7f1b610feb3045f67ff3ef1c17440456d7c709ab249aa5977b682e8aee79039d68c47702101bbcd939379a7a10144988f738ac5fc6343cb4a5bf7dab046d4e51
@@ -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
- value.call(page, meta)
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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module Kabuto
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kabuto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rene Klacan