lolita-report 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/.document +5 -0
  2. data/Gemfile +18 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.rdoc +19 -0
  5. data/Rakefile +45 -0
  6. data/VERSION +1 -0
  7. data/app/controllers/lolita/reports_controller.rb +18 -0
  8. data/app/views/components/lolita/configuration/report/_display.html.erb +1 -0
  9. data/app/views/lolita/reports/show.html.erb +9 -0
  10. data/author +1 -0
  11. data/doc/ActiveSupport.html +167 -0
  12. data/doc/ActiveSupport/TestCase.html +168 -0
  13. data/doc/Comment.html +184 -0
  14. data/doc/Gemfile.html +157 -0
  15. data/doc/LICENSE.html +111 -0
  16. data/doc/Lolita.html +184 -0
  17. data/doc/Lolita/Configuration.html +178 -0
  18. data/doc/Lolita/Configuration/Report.html +837 -0
  19. data/doc/Lolita/Configuration/Reports.html +413 -0
  20. data/doc/LolitaReport.html +194 -0
  21. data/doc/LolitaReport/Configuration.html +250 -0
  22. data/doc/Post.html +183 -0
  23. data/doc/Rakefile.html +124 -0
  24. data/doc/author.html +111 -0
  25. data/doc/created.rid +15 -0
  26. data/doc/images/brick.png +0 -0
  27. data/doc/images/brick_link.png +0 -0
  28. data/doc/images/bug.png +0 -0
  29. data/doc/images/bullet_black.png +0 -0
  30. data/doc/images/bullet_toggle_minus.png +0 -0
  31. data/doc/images/bullet_toggle_plus.png +0 -0
  32. data/doc/images/date.png +0 -0
  33. data/doc/images/find.png +0 -0
  34. data/doc/images/loadingAnimation.gif +0 -0
  35. data/doc/images/macFFBgHack.png +0 -0
  36. data/doc/images/package.png +0 -0
  37. data/doc/images/page_green.png +0 -0
  38. data/doc/images/page_white_text.png +0 -0
  39. data/doc/images/page_white_width.png +0 -0
  40. data/doc/images/plugin.png +0 -0
  41. data/doc/images/ruby.png +0 -0
  42. data/doc/images/tag_green.png +0 -0
  43. data/doc/images/wrench.png +0 -0
  44. data/doc/images/wrench_orange.png +0 -0
  45. data/doc/images/zoom.png +0 -0
  46. data/doc/index.html +126 -0
  47. data/doc/js/darkfish.js +116 -0
  48. data/doc/js/jquery.js +32 -0
  49. data/doc/js/quicksearch.js +114 -0
  50. data/doc/js/thickbox-compressed.js +10 -0
  51. data/doc/lib/lolita-report/configuration/base_rb.html +61 -0
  52. data/doc/lib/lolita-report/configuration/report_rb.html +57 -0
  53. data/doc/lib/lolita-report/configuration/reports_rb.html +55 -0
  54. data/doc/lib/lolita-report/version_rb.html +52 -0
  55. data/doc/lib/lolita-report_rb.html +58 -0
  56. data/doc/rdoc.css +706 -0
  57. data/doc/spec/configuration/report_spec_rb.html +56 -0
  58. data/doc/spec/configuration/reports_spec_rb.html +56 -0
  59. data/doc/spec/factories/factories_rb.html +52 -0
  60. data/doc/spec/orm/mongoid_rb.html +56 -0
  61. data/doc/spec/spec_helper_rb.html +58 -0
  62. data/lib/lolita-report.rb +33 -0
  63. data/lib/lolita-report/configuration/base.rb +22 -0
  64. data/lib/lolita-report/configuration/report.rb +147 -0
  65. data/lib/lolita-report/configuration/reports.rb +42 -0
  66. data/lib/lolita-report/module.rb +1 -0
  67. data/lib/lolita-report/rails.rb +6 -0
  68. data/lib/lolita-report/routes.rb +15 -0
  69. data/lolita-report.gemspec +150 -0
  70. data/spec/configuration/report_spec.rb +87 -0
  71. data/spec/configuration/reports_spec.rb +40 -0
  72. data/spec/factories/factories.rb +7 -0
  73. data/spec/orm/mongoid.rb +27 -0
  74. data/spec/spec_helper.rb +38 -0
  75. metadata +259 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem "abstract"
4
+ gem "ruport"
5
+ gem "lolita", "~> 3.1.0"
6
+ gem "spreadsheet"
7
+
8
+ group :test, :development do
9
+ gem "factory_girl_rails"#prieks rails 3
10
+ gem 'cover_me', '>= 1.0.0.rc6'
11
+ gem "mongoid", '~>2.0.0.beta'
12
+ gem "bson_ext", ">=1.0.9"
13
+ gem 'ruby-debug19'
14
+
15
+ gem "bundler", "~> 1.0.0"
16
+ gem "jeweler", "~> 1.5.2"
17
+
18
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 ITHouse (Latvia)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = lolita-report
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to lolita-report
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 Arturs Meisters. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,45 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "lolita-report"
16
+ gem.homepage = "http://github.com/ithouse/lolita-report"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{Report plugin for Lolita 3}
19
+ gem.description = %Q{Enable configuration and generate HTML view for Lolita resources, and also has ability to export to different formats.}
20
+ gem.email = "support@ithouse.lv"
21
+ gem.authors = ["ITHouse (Latvia)","Arturs Meisters", "Artjoms Tjangins"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+
37
+ require 'rake/rdoctask'
38
+ Rake::RDocTask.new do |rdoc|
39
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
40
+
41
+ rdoc.rdoc_dir = 'rdoc'
42
+ rdoc.title = "lolita-report #{version}"
43
+ rdoc.rdoc_files.include('README*')
44
+ rdoc.rdoc_files.include('lib/**/*.rb')
45
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,18 @@
1
+ class Lolita::ReportsController < ApplicationController
2
+ include Lolita::Controllers::InternalHelpers
3
+ layout "lolita/application"
4
+ def show
5
+ report = self.resource_class.lolita.reports.by_name(params[:name])
6
+ report.generate_table_for_report
7
+ respond_to do |format|
8
+ format.html{
9
+ @builder=report.build
10
+ render
11
+ }
12
+ format.xls do |format|
13
+ xls=report.to_xls(:raw)
14
+ send_data xls, :type => :xls, :filename => report.file_name(:xls)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1 @@
1
+ <%=raw report.table.to_html%>
@@ -0,0 +1,9 @@
1
+ <div class="report">
2
+ <%= render_component *@builder %>
3
+
4
+ <br/>
5
+ <% Lolita::Configuration::Report.formats.each do |format| %>
6
+ <%= link_to format.to_s.upcase, send(lolita_resource_name(:action=>:reports,:plural=>true),:format=>format) %>
7
+ &nbsp;
8
+ <% end %>
9
+ </div>
data/author ADDED
@@ -0,0 +1 @@
1
+ This software is developed by IT House (Latvia)
@@ -0,0 +1,167 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: ActiveSupport</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="module">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ </ul>
42
+ </div>
43
+ </div>
44
+
45
+
46
+ </div>
47
+
48
+ <div id="class-metadata">
49
+
50
+ <!-- Parent Class -->
51
+
52
+
53
+ <!-- Namespace Contents -->
54
+
55
+ <div id="namespace-list-section" class="section">
56
+ <h3 class="section-header">Namespace</h3>
57
+ <ul class="link-list">
58
+
59
+ <li><span class="type">CLASS</span> <a href="ActiveSupport/TestCase.html">ActiveSupport::TestCase</a></li>
60
+
61
+ </ul>
62
+ </div>
63
+
64
+
65
+ <!-- Method Quickref -->
66
+
67
+
68
+ <!-- Included Modules -->
69
+
70
+ </div>
71
+
72
+ <div id="project-metadata">
73
+
74
+
75
+ <div id="fileindex-section" class="section project-section">
76
+ <h3 class="section-header">Files</h3>
77
+ <ul>
78
+
79
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
80
+
81
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
82
+
83
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
84
+
85
+ <li class="file"><a href="./author.html">author</a></li>
86
+
87
+ </ul>
88
+ </div>
89
+
90
+
91
+ <div id="classindex-section" class="section project-section">
92
+ <h3 class="section-header">Class Index
93
+ <span class="search-toggle"><img src="./images/find.png"
94
+ height="16" width="16" alt="[+]"
95
+ title="show/hide quicksearch" /></span></h3>
96
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
97
+ <fieldset>
98
+ <legend>Quicksearch</legend>
99
+ <input type="text" name="quicksearch" value=""
100
+ class="quicksearch-field" />
101
+ </fieldset>
102
+ </form>
103
+
104
+ <ul class="link-list">
105
+
106
+ <li><a href="./Lolita.html">Lolita</a></li>
107
+
108
+ <li><a href="./Lolita/Configuration.html">Lolita::Configuration</a></li>
109
+
110
+ <li><a href="./Lolita/Configuration/Report.html">Lolita::Configuration::Report</a></li>
111
+
112
+ <li><a href="./Lolita/Configuration/Reports.html">Lolita::Configuration::Reports</a></li>
113
+
114
+ <li><a href="./ActiveSupport.html">ActiveSupport</a></li>
115
+
116
+ <li><a href="./ActiveSupport/TestCase.html">ActiveSupport::TestCase</a></li>
117
+
118
+ <li><a href="./LolitaReport.html">LolitaReport</a></li>
119
+
120
+ <li><a href="./LolitaReport/Configuration.html">LolitaReport::Configuration</a></li>
121
+
122
+ <li><a href="./Comment.html">Comment</a></li>
123
+
124
+ <li><a href="./Post.html">Post</a></li>
125
+
126
+ </ul>
127
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
128
+ </div>
129
+
130
+
131
+ </div>
132
+ </div>
133
+
134
+ <div id="documentation">
135
+ <h1 class="module">ActiveSupport</h1>
136
+
137
+ <div id="description">
138
+
139
+ </div>
140
+
141
+ <!-- Constants -->
142
+
143
+
144
+ <!-- Attributes -->
145
+
146
+
147
+ <!-- Methods -->
148
+
149
+
150
+ </div>
151
+
152
+
153
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
154
+
155
+ <p>Disabled; run with --debug to generate this.</p>
156
+
157
+ </div>
158
+
159
+ <div id="validator-badges">
160
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
161
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
162
+ Rdoc Generator</a> 1.1.6</small>.</p>
163
+ </div>
164
+
165
+ </body>
166
+ </html>
167
+
@@ -0,0 +1,168 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: ActiveSupport::TestCase</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../spec/orm/mongoid_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="spec/orm/mongoid.rb">spec/orm/mongoid.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">Object</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+
69
+ <!-- Included Modules -->
70
+
71
+ </div>
72
+
73
+ <div id="project-metadata">
74
+
75
+
76
+ <div id="fileindex-section" class="section project-section">
77
+ <h3 class="section-header">Files</h3>
78
+ <ul>
79
+
80
+ <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
81
+
82
+ <li class="file"><a href="../LICENSE.html">LICENSE</a></li>
83
+
84
+ <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
85
+
86
+ <li class="file"><a href="../author.html">author</a></li>
87
+
88
+ </ul>
89
+ </div>
90
+
91
+
92
+ <div id="classindex-section" class="section project-section">
93
+ <h3 class="section-header">Class Index
94
+ <span class="search-toggle"><img src="../images/find.png"
95
+ height="16" width="16" alt="[+]"
96
+ title="show/hide quicksearch" /></span></h3>
97
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
98
+ <fieldset>
99
+ <legend>Quicksearch</legend>
100
+ <input type="text" name="quicksearch" value=""
101
+ class="quicksearch-field" />
102
+ </fieldset>
103
+ </form>
104
+
105
+ <ul class="link-list">
106
+
107
+ <li><a href="../Lolita.html">Lolita</a></li>
108
+
109
+ <li><a href="../Lolita/Configuration.html">Lolita::Configuration</a></li>
110
+
111
+ <li><a href="../Lolita/Configuration/Report.html">Lolita::Configuration::Report</a></li>
112
+
113
+ <li><a href="../Lolita/Configuration/Reports.html">Lolita::Configuration::Reports</a></li>
114
+
115
+ <li><a href="../ActiveSupport.html">ActiveSupport</a></li>
116
+
117
+ <li><a href="../ActiveSupport/TestCase.html">ActiveSupport::TestCase</a></li>
118
+
119
+ <li><a href="../LolitaReport.html">LolitaReport</a></li>
120
+
121
+ <li><a href="../LolitaReport/Configuration.html">LolitaReport::Configuration</a></li>
122
+
123
+ <li><a href="../Comment.html">Comment</a></li>
124
+
125
+ <li><a href="../Post.html">Post</a></li>
126
+
127
+ </ul>
128
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
129
+ </div>
130
+
131
+
132
+ </div>
133
+ </div>
134
+
135
+ <div id="documentation">
136
+ <h1 class="class">ActiveSupport::TestCase</h1>
137
+
138
+ <div id="description">
139
+
140
+ </div>
141
+
142
+ <!-- Constants -->
143
+
144
+
145
+ <!-- Attributes -->
146
+
147
+
148
+ <!-- Methods -->
149
+
150
+
151
+ </div>
152
+
153
+
154
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
155
+
156
+ <p>Disabled; run with --debug to generate this.</p>
157
+
158
+ </div>
159
+
160
+ <div id="validator-badges">
161
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
162
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
163
+ Rdoc Generator</a> 1.1.6</small>.</p>
164
+ </div>
165
+
166
+ </body>
167
+ </html>
168
+