birt-core 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50901c67b2049adcbed2c955c1d756cccb1b1867
4
- data.tar.gz: bc6cda56190cbb2494236835826fbdff6d6ca1ac
3
+ metadata.gz: 2887c763abd64e6571cedad3123c5d28936b726d
4
+ data.tar.gz: 7991f9d072c54f5c1325a122903797d88cc78fe1
5
5
  SHA512:
6
- metadata.gz: 6118e7d94219701603ca967e3ceda6d757fb6599bbb2af0812a98e08d20cab698abc22695c2234349bc9661d337a16d84be1a80ad9c5649226b36211608c495a
7
- data.tar.gz: 5f5317d5ca3e3d5bb8ce6801742862b5cd849e43bd58b08c430f963770f6096b79154714c86965be504728bd99f402e4731a180dde148e599d3529be221a254c
6
+ metadata.gz: eb563fa7c8ddb15f0455652330d12f852ebbea187c8b97df0b46e64d72d6aa65a21c9da19ab61405289d1e5bc424dd10c804edd452f2d69045b747e4de60a678
7
+ data.tar.gz: db96799edcb5d94e9ff134f585ee2d5877fa707479df94b4353571dc6beeca18d213323936553e21874d17053b8000ad113a3b558cc28464242c151faabb23a5
@@ -6,7 +6,7 @@ require 'birt/core/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "birt-core"
8
8
  spec.version = Birt::Core::VERSION
9
- spec.authors = ["Stream"]
9
+ spec.authors = ["Saxer"]
10
10
  spec.email = ["15201280641@qq.com"]
11
11
 
12
12
  spec.summary = %q{birt-core}
@@ -8,9 +8,8 @@ class Birt::Core::RptDesign
8
8
 
9
9
  def initialize(rpt_design_path)
10
10
  self.rpt_design_path = rpt_design_path
11
- self.data_sources = Hash.new
12
- self.data_sets = Hash.new
13
- self.reports = Hash.new
11
+ @data_sources, @data_sets = {}, {}
12
+ @reports = {tables: {}}
14
13
  end
15
14
 
16
15
  #解析文件
@@ -19,20 +18,20 @@ class Birt::Core::RptDesign
19
18
 
20
19
  #数据源
21
20
  _root.each_element(xpath = '/report/data-sources/oda-data-source') do |item|
22
- p self.data_sources[item.attribute(:name).value] = Birt::Core::DataSource.new(item)
21
+ p @data_sources[item.attribute(:name).value] = Birt::Core::DataSource.new(item)
23
22
  end
24
23
 
25
24
  #数据集
26
25
  _root.each_element(xpath='/report/data-sets/oda-data-set') do |item|
27
- self.data_sets[item.attribute(:name).value] = Birt::Core::DataSet.new(item) do |data_set|
28
- data_set.data_source = self.data_sources[item.get_elements("property[@name='dataSource']")[0].text]
26
+ @data_sets[item.attribute(:name).value] = Birt::Core::DataSet.new(item) do |data_set|
27
+ data_set.data_source = @data_sources[item.get_elements("property[@name='dataSource']")[0].text]
29
28
  end
30
29
  end
31
30
 
32
31
  #报表
33
32
  _root.each_element(xpath='/report/body/table') do |item|
34
- self.reports["#{item.attribute(:id).value}_table"] = Birt::Core::TableReport.new(item) do |report|
35
- report.data_set = self.data_sets[item.get_elements("property[@name='dataSet']")[0].text]
33
+ @reports[:tables]["#{item.attribute(:id).value}"] = Birt::Core::TableReport.new(item) do |report|
34
+ report.data_set = @data_sets[item.get_elements("property[@name='dataSet']")[0].text]
36
35
  end
37
36
  end
38
37
  end
@@ -1,5 +1,5 @@
1
1
  module Birt
2
2
  module Core
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birt-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
- - Stream
7
+ - Saxer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.4.3
126
+ rubygems_version: 2.4.6
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: birt-core