dataisland 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dataisland.rb +3 -4
  2. metadata +2 -2
data/lib/dataisland.rb CHANGED
@@ -19,7 +19,7 @@ class DataIsland
19
19
  @html_doc = Rexle.new(buffer)
20
20
 
21
21
  #exit
22
- @html_doc.xpath('//script').map(&:delete)
22
+ @html_doc.xpath('//script[@class="dataisland"]').map(&:delete)
23
23
  @html_doc.xpath('//div[@datactl]').map(&:delete)
24
24
 
25
25
  @html_doc.root.element('body').attributes.delete :onload
@@ -29,7 +29,7 @@ class DataIsland
29
29
  path = { url: -> {File.dirname(location)},
30
30
  file: -> {File.expand_path(File.dirname(location))},
31
31
  xml: -> {File.expand_path('.')}}
32
-
32
+
33
33
  @location = path[typex].call
34
34
 
35
35
  @html_doc.xpath("//object[@type='text/xml']").each do |x|
@@ -55,7 +55,6 @@ class DataIsland
55
55
  xpath = "//*[@datasrc='" + '#' + h[:id] + "']"
56
56
 
57
57
  @html_doc.xpath(xpath).each do |island|
58
-
59
58
  render(records, x.attributes, island.element('//*[@datafld]'));
60
59
  end
61
60
  end
@@ -100,7 +99,7 @@ class DataIsland
100
99
  end
101
100
 
102
101
  records = range.is_a?(Range) ? flat_records[range] : flat_records
103
-
102
+
104
103
  if sort_by then
105
104
  if sort_by[/^-/].nil? then
106
105
  recs = records.sort_by {|record| record[sort_by] }
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dataisland
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.6
5
+ version: 0.1.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-10-06 00:00:00 Z
13
+ date: 2012-10-26 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dynarex