juno-report 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ page:
2
+ fields:
3
+ title1: [260, {size: 24, align: center, value: "Test Report"}]
4
+ subtitle1: [260, {size: 20, posY: 20, align: center, value: "Generated by Juno Report"}]
5
+ body:
6
+ settings: {posY: 40, height: 30, groups: [group_field1, group_field2]}
7
+ fields:
8
+ test_field1: [10]
9
+ test_field2: [220]
10
+ test_field3: [420, {column: "Named Test Field 3"}]
11
+ footer:
12
+ label_total: [10, {value: "Total"}]
13
+ totalizer1: [220, {behavior: count}]
14
+ test_field3: [420, {behavior: sum}]
15
+ group_field1:
16
+ settings: {posY: 30, height: 10}
17
+ fields:
18
+ group_field1: [10, size: 25]
19
+ footer:
20
+ group_field1: [10, {label: "Total "}]
21
+ totalizer1: [220, {behavior: count}]
22
+ test_field3: [420, {behavior: sum}]
23
+ group_field2:
24
+ settings: {posY: 30, height: 25}
25
+ fields:
26
+ group_field2: [10, size: 17]
27
+ footer:
28
+ group_field2: [10, {label: "Total "}]
29
+ totalizer1: [220, {behavior: count}]
30
+ test_field3: [420, {behavior: sum}]
@@ -0,0 +1,9 @@
1
+ [
2
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 50},
3
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 7},
4
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 10},
5
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 5},
6
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 2},
7
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 4},
8
+ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 24}
9
+ ]
@@ -0,0 +1,10 @@
1
+ body:
2
+ settings: {posY: 40, height: 25}
3
+ fields:
4
+ test_field1: [10]
5
+ test_field2: [220]
6
+ test_field3: [430, {column: "Named Test Field 3"}]
7
+ footer:
8
+ label_total: [10, {value: "Total"}]
9
+ totalizer: [220, {behavior: count}]
10
+ test_field3: [430, {behavior: sum}]
@@ -0,0 +1,13 @@
1
+ require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
2
+
3
+ describe "Generating a report" do
4
+ it "YAML file should exist" do
5
+ data = require 'data/data1.rb'
6
+ lambda {JunoReport::generate data, report: File.expand_path('spec/data/rule1')}.should_not raise_error Errno::ENOENT
7
+ end
8
+
9
+ it "Invalid YAML file should crash" do
10
+ data = require 'data/data1.rb'
11
+ lambda {JunoReport::generate data, report: 'fake-rule'}.should raise_error Errno::ENOENT
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
2
+
3
+ describe "Generating a report" do
4
+ it "YAML file should exist" do
5
+ data = require 'data/data1.rb'
6
+ lambda {JunoReport::generate data, report: File.expand_path('spec/data/rule1')}.should_not raise_error Errno::ENOENT
7
+ end
8
+
9
+ it "Invalid YAML file should crash" do
10
+ data = require 'data/data1.rb'
11
+ lambda {JunoReport::generate data, report: 'fake-rule'}.should raise_error Errno::ENOENT
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ require 'bundler'
2
+ Bundler.setup
3
+
4
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
5
+ require 'juno-report'
6
+ require 'rspec/autorun'
7
+
8
+ RSpec.configure do |config|
9
+ config.color_enabled = true
10
+ config.formatter = 'documentation'
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juno-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edson Júnior
@@ -60,6 +60,16 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - ".idea/.name"
64
+ - ".idea/.rakeTasks"
65
+ - ".idea/encodings.xml"
66
+ - ".idea/juno-report.iml"
67
+ - ".idea/misc.xml"
68
+ - ".idea/modules.xml"
69
+ - ".idea/scopes/scope_settings.xml"
70
+ - ".idea/vcs.xml"
71
+ - ".idea/workspace.xml"
72
+ - ".rspec"
63
73
  - Gemfile
64
74
  - Gemfile.lock
65
75
  - LICENSE.txt
@@ -71,6 +81,15 @@ files:
71
81
  - lib/juno-report/pdf/behaviors.rb
72
82
  - lib/juno-report/report_object.rb
73
83
  - lib/juno-report/version.rb
84
+ - report.pdf
85
+ - samples/example.rb
86
+ - samples/report.pdf
87
+ - samples/report.yml
88
+ - spec/data/data1.rb
89
+ - spec/data/rule1.yml
90
+ - spec/default_spec.rb
91
+ - spec/rules_spec.rb
92
+ - spec/spec_helper.rb
74
93
  homepage: http://github.com/ebfjunior/juno-report
75
94
  licenses: []
76
95
  metadata: {}
@@ -94,4 +113,9 @@ rubygems_version: 2.4.8
94
113
  signing_key:
95
114
  specification_version: 4
96
115
  summary: Juno Reports generates reports with the minimum configuration and effort
97
- test_files: []
116
+ test_files:
117
+ - spec/data/data1.rb
118
+ - spec/data/rule1.yml
119
+ - spec/default_spec.rb
120
+ - spec/rules_spec.rb
121
+ - spec/spec_helper.rb