report_ui 0.0.1.alpha
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.
- data/.bundle/config +2 -0
- data/.config/cucumber.yml +8 -0
- data/.gitignore +6 -0
- data/.gitkeep +0 -0
- data/Gemfile +28 -0
- data/Gemfile.lock +159 -0
- data/MIT-LICENSE +20 -0
- data/README +13 -0
- data/Rakefile +78 -0
- data/VERSION +1 -0
- data/features/reports.feature +45 -0
- data/features/step_definitions/bernie_steps.rb +5 -0
- data/features/step_definitions/mislav_steps.rb +13 -0
- data/features/step_definitions/web_steps.rb +226 -0
- data/features/support/blueprints.rb +13 -0
- data/features/support/env.rb +39 -0
- data/features/support/models.rb +7 -0
- data/features/support/paths.rb +41 -0
- data/fixture_rails_root/.gitignore +4 -0
- data/fixture_rails_root/Gemfile +25 -0
- data/fixture_rails_root/Gemfile.lock +177 -0
- data/fixture_rails_root/README +256 -0
- data/fixture_rails_root/Rakefile +7 -0
- data/fixture_rails_root/app/controllers/application_controller.rb +3 -0
- data/fixture_rails_root/app/helpers/application_helper.rb +2 -0
- data/fixture_rails_root/app/views/layouts/application.html.erb +14 -0
- data/fixture_rails_root/config.ru +4 -0
- data/fixture_rails_root/config/application.rb +16 -0
- data/fixture_rails_root/config/boot.rb +13 -0
- data/fixture_rails_root/config/database.yml +28 -0
- data/fixture_rails_root/config/environment.rb +5 -0
- data/fixture_rails_root/config/environments/development.rb +11 -0
- data/fixture_rails_root/config/environments/production.rb +9 -0
- data/fixture_rails_root/config/environments/test.rb +10 -0
- data/fixture_rails_root/config/initializers/backtrace_silencers.rb +7 -0
- data/fixture_rails_root/config/initializers/inflections.rb +10 -0
- data/fixture_rails_root/config/initializers/mime_types.rb +5 -0
- data/fixture_rails_root/config/initializers/report_ui.rb +1 -0
- data/fixture_rails_root/config/initializers/secret_token.rb +7 -0
- data/fixture_rails_root/config/initializers/session_store.rb +2 -0
- data/fixture_rails_root/config/locales/en.yml +5 -0
- data/fixture_rails_root/config/routes.rb +3 -0
- data/fixture_rails_root/db/schema.rb +30 -0
- data/fixture_rails_root/db/seeds.rb +7 -0
- data/fixture_rails_root/doc/README_FOR_APP +2 -0
- data/fixture_rails_root/lib/tasks/.gitkeep +0 -0
- data/fixture_rails_root/public/404.html +26 -0
- data/fixture_rails_root/public/422.html +26 -0
- data/fixture_rails_root/public/500.html +26 -0
- data/fixture_rails_root/public/favicon.ico +0 -0
- data/fixture_rails_root/public/images/rails.png +0 -0
- data/fixture_rails_root/public/index.html +239 -0
- data/fixture_rails_root/public/javascripts/application.js +2 -0
- data/fixture_rails_root/public/javascripts/controls.js +965 -0
- data/fixture_rails_root/public/javascripts/dragdrop.js +974 -0
- data/fixture_rails_root/public/javascripts/effects.js +1123 -0
- data/fixture_rails_root/public/javascripts/prototype.js +6001 -0
- data/fixture_rails_root/public/javascripts/rails.js +175 -0
- data/fixture_rails_root/public/robots.txt +5 -0
- data/fixture_rails_root/public/stylesheets/.gitkeep +0 -0
- data/fixture_rails_root/script/rails +6 -0
- data/fixture_rails_root/test/performance/browsing_test.rb +9 -0
- data/fixture_rails_root/test/test_helper.rb +13 -0
- data/generators/USAGE +8 -0
- data/generators/reporter_generator.rb +3 -0
- data/init.rb +3 -0
- data/install.rb +2 -0
- data/lib/app/controllers/reports_controller.rb +32 -0
- data/lib/app/models/report.rb +36 -0
- data/lib/app/views/layouts/reports.html.haml +11 -0
- data/lib/app/views/reports/_columns_editor.html.haml +14 -0
- data/lib/app/views/reports/_details.html.haml +5 -0
- data/lib/app/views/reports/_form.html.haml +2 -0
- data/lib/app/views/reports/_report_details_edit.html.haml +11 -0
- data/lib/app/views/reports/_reports_table.html.haml +10 -0
- data/lib/app/views/reports/edit.html.haml +2 -0
- data/lib/app/views/reports/index.html.haml +19 -0
- data/lib/app/views/reports/new.html.haml +38 -0
- data/lib/app/views/reports/show.html.haml +13 -0
- data/lib/app/views/reports/show.js.erb +1 -0
- data/lib/config/.routes.rb.swn +0 -0
- data/lib/config/routes.rb +7 -0
- data/lib/report_ui.rb +9 -0
- data/lib/report_ui/engine.rb +13 -0
- data/lib/report_ui/orm/active_record.rb +24 -0
- data/lib/report_ui/routing.rb +13 -0
- data/lib/report_ui/schema.rb +17 -0
- data/lib/tasks/report_ui_tasks.rake +4 -0
- data/public/javascripts/.gitkeep +0 -0
- data/public/javascripts/application.js +63 -0
- data/public/javascripts/jquery-ui.min.js +778 -0
- data/public/javascripts/jquery.js +154 -0
- data/public/javascripts/jrails.min.js +1 -0
- data/public/javascripts/report_ui/application.js +63 -0
- data/public/javascripts/report_ui/jquery-ui.min.js +778 -0
- data/public/javascripts/report_ui/jquery.js +154 -0
- data/public/javascripts/report_ui/jrails.min.js +1 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/public/stylesheets/formtastic.css +214 -0
- data/public/stylesheets/formtastic_changes.css +8 -0
- data/public/stylesheets/ie.css +89 -0
- data/public/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/jquery-ui.css +572 -0
- data/public/stylesheets/print.css +73 -0
- data/public/stylesheets/reporter/formtastic.css +214 -0
- data/public/stylesheets/reporter/formtastic_changes.css +8 -0
- data/public/stylesheets/reporter/ie.css +89 -0
- data/public/stylesheets/reporter/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/reporter/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/reporter/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/reporter/jquery-ui.css +572 -0
- data/public/stylesheets/reporter/print.css +73 -0
- data/public/stylesheets/reporter/screen.css +1271 -0
- data/public/stylesheets/screen.css +1271 -0
- data/report_ui.gemspec +267 -0
- data/spec/controllers/reports_controller_spec.rb +4 -0
- data/spec/lib/models_spec.rb +7 -0
- data/spec/models/report_spec.rb +50 -0
- data/spec/routing/routing_spec.rb +21 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/support/blueprints.rb +13 -0
- data/spec/support/models.rb +7 -0
- data/spec/views/reports/index.html.haml_spec.rb +21 -0
- data/spec/views/reports/new.html.haml_spec.rb +1 -0
- data/spec/views/reports/show.html.haml_spec.rb +10 -0
- data/tasks/reporter.rake +34 -0
- data/uninstall.rb +1 -0
- metadata +551 -0
data/report_ui.gemspec
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = %q{report_ui}
|
|
8
|
+
s.version = "0.0.1.alpha"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["Bernardo Telles"]
|
|
12
|
+
s.date = %q{2010-11-17}
|
|
13
|
+
s.description = %q{Reporting engine for rails}
|
|
14
|
+
s.email = %q{btelles@gmail.com}
|
|
15
|
+
s.extra_rdoc_files = [
|
|
16
|
+
"README"
|
|
17
|
+
]
|
|
18
|
+
s.files = [
|
|
19
|
+
".bundle/config",
|
|
20
|
+
".config/cucumber.yml",
|
|
21
|
+
".gitignore",
|
|
22
|
+
".gitkeep",
|
|
23
|
+
"Gemfile",
|
|
24
|
+
"Gemfile.lock",
|
|
25
|
+
"MIT-LICENSE",
|
|
26
|
+
"README",
|
|
27
|
+
"Rakefile",
|
|
28
|
+
"VERSION",
|
|
29
|
+
"features/reports.feature",
|
|
30
|
+
"features/step_definitions/bernie_steps.rb",
|
|
31
|
+
"features/step_definitions/mislav_steps.rb",
|
|
32
|
+
"features/step_definitions/web_steps.rb",
|
|
33
|
+
"features/support/blueprints.rb",
|
|
34
|
+
"features/support/env.rb",
|
|
35
|
+
"features/support/models.rb",
|
|
36
|
+
"features/support/paths.rb",
|
|
37
|
+
"fixture_rails_root/.gitignore",
|
|
38
|
+
"fixture_rails_root/Gemfile",
|
|
39
|
+
"fixture_rails_root/Gemfile.lock",
|
|
40
|
+
"fixture_rails_root/README",
|
|
41
|
+
"fixture_rails_root/Rakefile",
|
|
42
|
+
"fixture_rails_root/app/controllers/application_controller.rb",
|
|
43
|
+
"fixture_rails_root/app/helpers/application_helper.rb",
|
|
44
|
+
"fixture_rails_root/app/views/layouts/application.html.erb",
|
|
45
|
+
"fixture_rails_root/config.ru",
|
|
46
|
+
"fixture_rails_root/config/application.rb",
|
|
47
|
+
"fixture_rails_root/config/boot.rb",
|
|
48
|
+
"fixture_rails_root/config/database.yml",
|
|
49
|
+
"fixture_rails_root/config/environment.rb",
|
|
50
|
+
"fixture_rails_root/config/environments/development.rb",
|
|
51
|
+
"fixture_rails_root/config/environments/production.rb",
|
|
52
|
+
"fixture_rails_root/config/environments/test.rb",
|
|
53
|
+
"fixture_rails_root/config/initializers/backtrace_silencers.rb",
|
|
54
|
+
"fixture_rails_root/config/initializers/inflections.rb",
|
|
55
|
+
"fixture_rails_root/config/initializers/mime_types.rb",
|
|
56
|
+
"fixture_rails_root/config/initializers/report_ui.rb",
|
|
57
|
+
"fixture_rails_root/config/initializers/secret_token.rb",
|
|
58
|
+
"fixture_rails_root/config/initializers/session_store.rb",
|
|
59
|
+
"fixture_rails_root/config/locales/en.yml",
|
|
60
|
+
"fixture_rails_root/config/routes.rb",
|
|
61
|
+
"fixture_rails_root/db/schema.rb",
|
|
62
|
+
"fixture_rails_root/db/seeds.rb",
|
|
63
|
+
"fixture_rails_root/doc/README_FOR_APP",
|
|
64
|
+
"fixture_rails_root/lib/tasks/.gitkeep",
|
|
65
|
+
"fixture_rails_root/public/404.html",
|
|
66
|
+
"fixture_rails_root/public/422.html",
|
|
67
|
+
"fixture_rails_root/public/500.html",
|
|
68
|
+
"fixture_rails_root/public/favicon.ico",
|
|
69
|
+
"fixture_rails_root/public/images/rails.png",
|
|
70
|
+
"fixture_rails_root/public/index.html",
|
|
71
|
+
"fixture_rails_root/public/javascripts/application.js",
|
|
72
|
+
"fixture_rails_root/public/javascripts/controls.js",
|
|
73
|
+
"fixture_rails_root/public/javascripts/dragdrop.js",
|
|
74
|
+
"fixture_rails_root/public/javascripts/effects.js",
|
|
75
|
+
"fixture_rails_root/public/javascripts/prototype.js",
|
|
76
|
+
"fixture_rails_root/public/javascripts/rails.js",
|
|
77
|
+
"fixture_rails_root/public/robots.txt",
|
|
78
|
+
"fixture_rails_root/public/stylesheets/.gitkeep",
|
|
79
|
+
"fixture_rails_root/script/rails",
|
|
80
|
+
"fixture_rails_root/test/performance/browsing_test.rb",
|
|
81
|
+
"fixture_rails_root/test/test_helper.rb",
|
|
82
|
+
"generators/USAGE",
|
|
83
|
+
"generators/reporter_generator.rb",
|
|
84
|
+
"init.rb",
|
|
85
|
+
"install.rb",
|
|
86
|
+
"lib/app/controllers/reports_controller.rb",
|
|
87
|
+
"lib/app/models/report.rb",
|
|
88
|
+
"lib/app/views/layouts/reports.html.haml",
|
|
89
|
+
"lib/app/views/reports/_columns_editor.html.haml",
|
|
90
|
+
"lib/app/views/reports/_details.html.haml",
|
|
91
|
+
"lib/app/views/reports/_form.html.haml",
|
|
92
|
+
"lib/app/views/reports/_report_details_edit.html.haml",
|
|
93
|
+
"lib/app/views/reports/_reports_table.html.haml",
|
|
94
|
+
"lib/app/views/reports/edit.html.haml",
|
|
95
|
+
"lib/app/views/reports/index.html.haml",
|
|
96
|
+
"lib/app/views/reports/new.html.haml",
|
|
97
|
+
"lib/app/views/reports/show.html.haml",
|
|
98
|
+
"lib/app/views/reports/show.js.erb",
|
|
99
|
+
"lib/config/.routes.rb.swn",
|
|
100
|
+
"lib/config/routes.rb",
|
|
101
|
+
"lib/report_ui.rb",
|
|
102
|
+
"lib/report_ui/engine.rb",
|
|
103
|
+
"lib/report_ui/orm/active_record.rb",
|
|
104
|
+
"lib/report_ui/routing.rb",
|
|
105
|
+
"lib/report_ui/schema.rb",
|
|
106
|
+
"lib/tasks/report_ui_tasks.rake",
|
|
107
|
+
"public/javascripts/.gitkeep",
|
|
108
|
+
"public/javascripts/application.js",
|
|
109
|
+
"public/javascripts/jquery-ui.min.js",
|
|
110
|
+
"public/javascripts/jquery.js",
|
|
111
|
+
"public/javascripts/jrails.min.js",
|
|
112
|
+
"public/javascripts/report_ui/application.js",
|
|
113
|
+
"public/javascripts/report_ui/jquery-ui.min.js",
|
|
114
|
+
"public/javascripts/report_ui/jquery.js",
|
|
115
|
+
"public/javascripts/report_ui/jrails.min.js",
|
|
116
|
+
"public/stylesheets/.gitkeep",
|
|
117
|
+
"public/stylesheets/formtastic.css",
|
|
118
|
+
"public/stylesheets/formtastic_changes.css",
|
|
119
|
+
"public/stylesheets/ie.css",
|
|
120
|
+
"public/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png",
|
|
121
|
+
"public/stylesheets/images/ui-bg_flat_55_fbec88_40x100.png",
|
|
122
|
+
"public/stylesheets/images/ui-bg_glass_75_d0e5f5_1x400.png",
|
|
123
|
+
"public/stylesheets/images/ui-bg_glass_85_dfeffc_1x400.png",
|
|
124
|
+
"public/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png",
|
|
125
|
+
"public/stylesheets/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png",
|
|
126
|
+
"public/stylesheets/images/ui-bg_inset-hard_100_f5f8f9_1x100.png",
|
|
127
|
+
"public/stylesheets/images/ui-bg_inset-hard_100_fcfdfd_1x100.png",
|
|
128
|
+
"public/stylesheets/images/ui-icons_217bc0_256x240.png",
|
|
129
|
+
"public/stylesheets/images/ui-icons_2e83ff_256x240.png",
|
|
130
|
+
"public/stylesheets/images/ui-icons_469bdd_256x240.png",
|
|
131
|
+
"public/stylesheets/images/ui-icons_6da8d5_256x240.png",
|
|
132
|
+
"public/stylesheets/images/ui-icons_cd0a0a_256x240.png",
|
|
133
|
+
"public/stylesheets/images/ui-icons_d8e7f3_256x240.png",
|
|
134
|
+
"public/stylesheets/images/ui-icons_f9bd01_256x240.png",
|
|
135
|
+
"public/stylesheets/jquery-ui.css",
|
|
136
|
+
"public/stylesheets/print.css",
|
|
137
|
+
"public/stylesheets/reporter/formtastic.css",
|
|
138
|
+
"public/stylesheets/reporter/formtastic_changes.css",
|
|
139
|
+
"public/stylesheets/reporter/ie.css",
|
|
140
|
+
"public/stylesheets/reporter/images/ui-bg_flat_0_aaaaaa_40x100.png",
|
|
141
|
+
"public/stylesheets/reporter/images/ui-bg_flat_55_fbec88_40x100.png",
|
|
142
|
+
"public/stylesheets/reporter/images/ui-bg_glass_75_d0e5f5_1x400.png",
|
|
143
|
+
"public/stylesheets/reporter/images/ui-bg_glass_85_dfeffc_1x400.png",
|
|
144
|
+
"public/stylesheets/reporter/images/ui-bg_glass_95_fef1ec_1x400.png",
|
|
145
|
+
"public/stylesheets/reporter/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png",
|
|
146
|
+
"public/stylesheets/reporter/images/ui-bg_inset-hard_100_f5f8f9_1x100.png",
|
|
147
|
+
"public/stylesheets/reporter/images/ui-bg_inset-hard_100_fcfdfd_1x100.png",
|
|
148
|
+
"public/stylesheets/reporter/images/ui-icons_217bc0_256x240.png",
|
|
149
|
+
"public/stylesheets/reporter/images/ui-icons_2e83ff_256x240.png",
|
|
150
|
+
"public/stylesheets/reporter/images/ui-icons_469bdd_256x240.png",
|
|
151
|
+
"public/stylesheets/reporter/images/ui-icons_6da8d5_256x240.png",
|
|
152
|
+
"public/stylesheets/reporter/images/ui-icons_cd0a0a_256x240.png",
|
|
153
|
+
"public/stylesheets/reporter/images/ui-icons_d8e7f3_256x240.png",
|
|
154
|
+
"public/stylesheets/reporter/images/ui-icons_f9bd01_256x240.png",
|
|
155
|
+
"public/stylesheets/reporter/jquery-ui.css",
|
|
156
|
+
"public/stylesheets/reporter/print.css",
|
|
157
|
+
"public/stylesheets/reporter/screen.css",
|
|
158
|
+
"public/stylesheets/screen.css",
|
|
159
|
+
"report_ui.gemspec",
|
|
160
|
+
"spec/controllers/reports_controller_spec.rb",
|
|
161
|
+
"spec/lib/models_spec.rb",
|
|
162
|
+
"spec/models/report_spec.rb",
|
|
163
|
+
"spec/routing/routing_spec.rb",
|
|
164
|
+
"spec/spec_helper.rb",
|
|
165
|
+
"spec/support/blueprints.rb",
|
|
166
|
+
"spec/support/models.rb",
|
|
167
|
+
"spec/views/reports/index.html.haml_spec.rb",
|
|
168
|
+
"spec/views/reports/new.html.haml_spec.rb",
|
|
169
|
+
"spec/views/reports/show.html.haml_spec.rb",
|
|
170
|
+
"tasks/reporter.rake",
|
|
171
|
+
"uninstall.rb"
|
|
172
|
+
]
|
|
173
|
+
s.homepage = %q{http://github.com/btelles/report_ui}
|
|
174
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
|
175
|
+
s.require_paths = ["lib"]
|
|
176
|
+
s.rubygems_version = %q{1.3.7}
|
|
177
|
+
s.summary = %q{Reporting engine for Rails}
|
|
178
|
+
s.test_files = [
|
|
179
|
+
"spec/routing/routing_spec.rb",
|
|
180
|
+
"spec/models/report_spec.rb",
|
|
181
|
+
"spec/lib/models_spec.rb",
|
|
182
|
+
"spec/controllers/reports_controller_spec.rb",
|
|
183
|
+
"spec/support/blueprints.rb",
|
|
184
|
+
"spec/support/models.rb",
|
|
185
|
+
"spec/views/reports/show.html.haml_spec.rb",
|
|
186
|
+
"spec/views/reports/new.html.haml_spec.rb",
|
|
187
|
+
"spec/views/reports/index.html.haml_spec.rb",
|
|
188
|
+
"spec/spec_helper.rb"
|
|
189
|
+
]
|
|
190
|
+
|
|
191
|
+
if s.respond_to? :specification_version then
|
|
192
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
193
|
+
s.specification_version = 3
|
|
194
|
+
|
|
195
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
196
|
+
s.add_runtime_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
197
|
+
s.add_runtime_dependency(%q<orm_adapter>, [">= 0"])
|
|
198
|
+
s.add_runtime_dependency(%q<actionpack>, ["~> 3.0.0"])
|
|
199
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
|
|
200
|
+
s.add_runtime_dependency(%q<jeweler>, ["~> 1.4.0"])
|
|
201
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
|
202
|
+
s.add_runtime_dependency(%q<compass>, [">= 0"])
|
|
203
|
+
s.add_runtime_dependency(%q<formtastic>, [">= 0"])
|
|
204
|
+
s.add_runtime_dependency(%q<meta_search>, [">= 0"])
|
|
205
|
+
s.add_runtime_dependency(%q<decent_exposure>, ["~> 1.0.0.rc1"])
|
|
206
|
+
s.add_development_dependency(%q<rspec>, ["= 2.0.1"])
|
|
207
|
+
s.add_development_dependency(%q<rspec-expectations>, [">= 0"])
|
|
208
|
+
s.add_development_dependency(%q<rspec-mocks>, [">= 0"])
|
|
209
|
+
s.add_development_dependency(%q<rspec-rails>, [">= 0"])
|
|
210
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
|
211
|
+
s.add_development_dependency(%q<cucumber-rails>, [">= 0"])
|
|
212
|
+
s.add_development_dependency(%q<nokogiri>, [">= 0"])
|
|
213
|
+
s.add_development_dependency(%q<webrat>, [">= 0"])
|
|
214
|
+
s.add_development_dependency(%q<capybara>, [">= 0"])
|
|
215
|
+
s.add_development_dependency(%q<capybara-envjs>, [">= 0"])
|
|
216
|
+
s.add_development_dependency(%q<ruby-debug>, [">= 0"])
|
|
217
|
+
s.add_development_dependency(%q<machinist>, [">= 0"])
|
|
218
|
+
else
|
|
219
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
220
|
+
s.add_dependency(%q<orm_adapter>, [">= 0"])
|
|
221
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
|
222
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
|
223
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
|
224
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
|
225
|
+
s.add_dependency(%q<compass>, [">= 0"])
|
|
226
|
+
s.add_dependency(%q<formtastic>, [">= 0"])
|
|
227
|
+
s.add_dependency(%q<meta_search>, [">= 0"])
|
|
228
|
+
s.add_dependency(%q<decent_exposure>, ["~> 1.0.0.rc1"])
|
|
229
|
+
s.add_dependency(%q<rspec>, ["= 2.0.1"])
|
|
230
|
+
s.add_dependency(%q<rspec-expectations>, [">= 0"])
|
|
231
|
+
s.add_dependency(%q<rspec-mocks>, [">= 0"])
|
|
232
|
+
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
|
233
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
|
234
|
+
s.add_dependency(%q<cucumber-rails>, [">= 0"])
|
|
235
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
|
236
|
+
s.add_dependency(%q<webrat>, [">= 0"])
|
|
237
|
+
s.add_dependency(%q<capybara>, [">= 0"])
|
|
238
|
+
s.add_dependency(%q<capybara-envjs>, [">= 0"])
|
|
239
|
+
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
|
240
|
+
s.add_dependency(%q<machinist>, [">= 0"])
|
|
241
|
+
end
|
|
242
|
+
else
|
|
243
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
244
|
+
s.add_dependency(%q<orm_adapter>, [">= 0"])
|
|
245
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
|
246
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
|
247
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
|
248
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
|
249
|
+
s.add_dependency(%q<compass>, [">= 0"])
|
|
250
|
+
s.add_dependency(%q<formtastic>, [">= 0"])
|
|
251
|
+
s.add_dependency(%q<meta_search>, [">= 0"])
|
|
252
|
+
s.add_dependency(%q<decent_exposure>, ["~> 1.0.0.rc1"])
|
|
253
|
+
s.add_dependency(%q<rspec>, ["= 2.0.1"])
|
|
254
|
+
s.add_dependency(%q<rspec-expectations>, [">= 0"])
|
|
255
|
+
s.add_dependency(%q<rspec-mocks>, [">= 0"])
|
|
256
|
+
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
|
257
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
|
258
|
+
s.add_dependency(%q<cucumber-rails>, [">= 0"])
|
|
259
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
|
260
|
+
s.add_dependency(%q<webrat>, [">= 0"])
|
|
261
|
+
s.add_dependency(%q<capybara>, [">= 0"])
|
|
262
|
+
s.add_dependency(%q<capybara-envjs>, [">= 0"])
|
|
263
|
+
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
|
264
|
+
s.add_dependency(%q<machinist>, [">= 0"])
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe Report do
|
|
4
|
+
describe "requires at least one column" do
|
|
5
|
+
subject = Report.new
|
|
6
|
+
subject.used_columns = nil
|
|
7
|
+
subject.save.should == false
|
|
8
|
+
subject.errors[:used_columns][0].should =~ /blank/
|
|
9
|
+
end
|
|
10
|
+
describe "query" do
|
|
11
|
+
it 'returns an arel query' do
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe "#available_columns" do
|
|
16
|
+
it "returns all columns and whether they are used or not" do
|
|
17
|
+
::ReportUi.reportable_models = [Person]
|
|
18
|
+
subject.used_columns = ['Person#last_name', "Person#first_name"]
|
|
19
|
+
subject.available_columns.should == {Person => {:last_name => true,
|
|
20
|
+
:first_name => true,
|
|
21
|
+
:id => false,
|
|
22
|
+
:date_of_birth => false,
|
|
23
|
+
:amount => false}}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe "#humanized_column_names" do
|
|
28
|
+
it 'returns pretty names of the intended columns' do
|
|
29
|
+
subject.used_columns = ["Person#name", "SomeClass#date_at"]
|
|
30
|
+
subject.humanized_column_names.should == ['Name', 'Date at']
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe "#column_names" do
|
|
35
|
+
it 'returns just the names of the intended columns' do
|
|
36
|
+
subject.used_columns = ["Person#name", "SomeClass#date_at"]
|
|
37
|
+
subject.column_names.should == ['name', 'date_at']
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe "#data" do
|
|
42
|
+
it "returns an executed query" do
|
|
43
|
+
Person.create(:last_name => 'smith')
|
|
44
|
+
Person.create(:last_name => 'roberts')
|
|
45
|
+
subject.code = "Person.select('last_name').where('last_name = \"smith\"')"
|
|
46
|
+
subject.data.map(&:last_name).should include 'smith'
|
|
47
|
+
subject.data.map(&:last_name).should_not include 'roberts'
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe "named route report_with_last_name_smith_path" do
|
|
4
|
+
it "maps /reports" do
|
|
5
|
+
url_for(:host => 'a.com', :controller => 'reports', :action => 'index').should == 'http://a.com/reports'
|
|
6
|
+
end
|
|
7
|
+
describe "GET" do
|
|
8
|
+
it "has routes for new" do
|
|
9
|
+
url_for(:host => 'a.com', :controller => 'reports', :action => 'new').should == 'http://a.com/reports/new'
|
|
10
|
+
end
|
|
11
|
+
it "has routes for show" do
|
|
12
|
+
url_for(:host => 'a.com', :controller => 'reports', :action => 'show', :id => 1).should == 'http://a.com/reports/1'
|
|
13
|
+
end
|
|
14
|
+
it "has routes for edit" do
|
|
15
|
+
url_for(:host => 'a.com', :controller => 'reports', :action => 'edit', :id => 1).should == 'http://a.com/reports/1/edit'
|
|
16
|
+
end
|
|
17
|
+
it 'has routes for columns' do
|
|
18
|
+
url_for(:host => 'a.com', :controller => 'reports', :action => 'columns', :report_id => 1).should == 'http://a.com/reports/1/columns'
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
ENV["RAILS_ENV"] ||= 'test'
|
|
2
|
+
|
|
3
|
+
require File.expand_path(File.dirname(__FILE__) + "/../fixture_rails_root/config/environment")
|
|
4
|
+
|
|
5
|
+
def load_schema
|
|
6
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/../fixture_rails_root/config/database.yml'))
|
|
7
|
+
db_adapter = 'sqlite3'
|
|
8
|
+
ActiveRecord::Base.establish_connection(config[db_adapter])
|
|
9
|
+
load(File.dirname(__FILE__) + '/../fixture_rails_root/db/schema.rb')
|
|
10
|
+
require File.dirname(__FILE__) + '/../init'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
load_schema
|
|
14
|
+
require 'rspec/rails'
|
|
15
|
+
require 'support/models'
|
|
16
|
+
require 'support/blueprints'
|
|
17
|
+
require 'webrat'
|
|
18
|
+
require 'webrat/core/matchers'
|
|
19
|
+
|
|
20
|
+
$: << File.expand_path(File.dirname(__FILE__) + '/../lib/')
|
|
21
|
+
require 'report_ui'
|
|
22
|
+
RSpec.configure do |config|
|
|
23
|
+
config.mock_with :rspec
|
|
24
|
+
config.use_transactional_fixtures = true
|
|
25
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'machinist/active_record'
|
|
2
|
+
|
|
3
|
+
Report.blueprint do
|
|
4
|
+
name { "Report With Last Name Smith" }
|
|
5
|
+
code { "Person.where(:last_name => 'smith')" }
|
|
6
|
+
used_columns { ['Person#last_name'] }
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
Person.blueprint do
|
|
10
|
+
first_name { "Smith" }
|
|
11
|
+
last_name { "Bob" }
|
|
12
|
+
date_of_birth { 10.years.ago }
|
|
13
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
|
2
|
+
|
|
3
|
+
def mock_report(stubs = {})
|
|
4
|
+
mock_model(Report, {:id => 1,
|
|
5
|
+
:name => 'some report',
|
|
6
|
+
:description => 'aoeu'}.merge(stubs))
|
|
7
|
+
end
|
|
8
|
+
describe "reports#index" do
|
|
9
|
+
it "Shows a list of given reports" do
|
|
10
|
+
view.should_receive(:reports).at_least(1).times.and_return([mock_report])
|
|
11
|
+
view.stub(:custom_reports => [])
|
|
12
|
+
render :template => 'reports/index'
|
|
13
|
+
rendered.should have_selector("td:contains('some report')")
|
|
14
|
+
end
|
|
15
|
+
it "if no reports are present, it tells the user so" do
|
|
16
|
+
view.should_receive(:reports).at_least(1).times.and_return([])
|
|
17
|
+
view.stub(:custom_reports => [])
|
|
18
|
+
render :template => 'reports/index'
|
|
19
|
+
rendered.should contain("no canned")
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe "reports/show.html.haml" do
|
|
4
|
+
it 'lists all columns as table headers' do
|
|
5
|
+
view.should_receive(:report).at_least(1).and_return(Report.new(:used_columns => ['Person#last_name'],
|
|
6
|
+
:code => "Person.all"))
|
|
7
|
+
render :template => 'reports/show.html.haml'
|
|
8
|
+
rendered.should have_selector('th:contains("Last name")')
|
|
9
|
+
end
|
|
10
|
+
end
|
data/tasks/reporter.rake
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
namespace :reporter do
|
|
2
|
+
to_copy = ["jquery.js", "jquery-ui.min.js", "reporter.js"]
|
|
3
|
+
|
|
4
|
+
# install
|
|
5
|
+
desc 'Copies required scripts files to the public/javascripts directory.'
|
|
6
|
+
task :install do
|
|
7
|
+
|
|
8
|
+
# inform the user of whats happening
|
|
9
|
+
puts "Copying #{to_copy.to_sentence} to public/javascripts/..."
|
|
10
|
+
|
|
11
|
+
success = true
|
|
12
|
+
|
|
13
|
+
to_copy.each do |script|
|
|
14
|
+
# copy from
|
|
15
|
+
destination = File.join(RAILS_ROOT, "/public/javascripts/", script)
|
|
16
|
+
|
|
17
|
+
# copy to
|
|
18
|
+
source = File.join(RAILS_ROOT + "/vendor/plugins/reporter/javascripts/", script)
|
|
19
|
+
|
|
20
|
+
# copy
|
|
21
|
+
success = false unless FileUtils.cp_r(source, destination)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
puts "Required scripts copied successfully!"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# uninstall
|
|
28
|
+
desc 'Removes required scripts from the public/javascripts directory.'
|
|
29
|
+
task :uninstall do
|
|
30
|
+
FileUtils.rm_r to_copy.collect { |script| RAILS_ROOT + "/public/javascripts/" + script }
|
|
31
|
+
|
|
32
|
+
puts "#{to_copy.to_sentence} removed successfully."
|
|
33
|
+
end
|
|
34
|
+
end
|