reports_kits 0.7.5 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/.rubocop.yml +85 -0
  4. data/.travis.yml +21 -0
  5. data/Appraisals +27 -0
  6. data/Gemfile +3 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +35 -0
  9. data/Rakefile +2 -0
  10. data/app/assets/javascripts/reports_kits/application.js +14 -0
  11. data/app/assets/javascripts/reports_kits/lib/_init.js +9 -0
  12. data/app/assets/javascripts/reports_kits/lib/chart.js +73 -0
  13. data/app/assets/javascripts/reports_kits/lib/report.js +135 -0
  14. data/app/assets/javascripts/reports_kits/lib/table.js +87 -0
  15. data/app/assets/javascripts/reports_kits/vendor/chart.js +12269 -0
  16. data/app/assets/javascripts/reports_kits/vendor/daterangepicker.js +1627 -0
  17. data/app/assets/javascripts/reports_kits/vendor/jquery.tablesorter.min.js +4 -0
  18. data/app/assets/javascripts/reports_kits/vendor/moment.js +4040 -0
  19. data/app/assets/javascripts/reports_kits/vendor/select2.full.js +6436 -0
  20. data/app/assets/stylesheets/reports_kits/application.css.scss +3 -0
  21. data/app/assets/stylesheets/reports_kits/reports.css.sass +33 -0
  22. data/app/assets/stylesheets/reports_kits/select2_overrides.css.sass +7 -0
  23. data/app/assets/stylesheets/reports_kits/vendor/daterangepicker.css +269 -0
  24. data/app/assets/stylesheets/reports_kits/vendor/select2-bootstrap.css +721 -0
  25. data/app/assets/stylesheets/reports_kits/vendor/select2.css +484 -0
  26. data/config/initializers/mime_types.rb +1 -0
  27. data/config/routes.rb +10 -0
  28. data/docs/images/demo.gif +0 -0
  29. data/docs/images/users_by_created_at.png +0 -0
  30. data/gemfiles/mysql.gemfile +7 -0
  31. data/gemfiles/mysql.gemfile.lock +167 -0
  32. data/gemfiles/postgresql.gemfile +7 -0
  33. data/gemfiles/postgresql.gemfile.lock +165 -0
  34. data/gemfiles/postgresql_rails_5.1.4.gemfile +8 -0
  35. data/gemfiles/postgresql_rails_5.1.4.gemfile.lock +168 -0
  36. data/gemfiles/rails_4_mysql.gemfile +8 -0
  37. data/gemfiles/rails_4_mysql.gemfile.lock +165 -0
  38. data/gemfiles/rails_4_postgresql.gemfile +8 -0
  39. data/gemfiles/rails_4_postgresql.gemfile.lock +163 -0
  40. data/gemfiles/rails_5.1.4_postgresql.gemfile +8 -0
  41. data/gemfiles/rails_5.1.4_postgresql.gemfile.lock +169 -0
  42. data/gemfiles/rails_5_mysql.gemfile +8 -0
  43. data/gemfiles/rails_5_mysql.gemfile.lock +171 -0
  44. data/gemfiles/rails_5_postgresql.gemfile +8 -0
  45. data/gemfiles/rails_5_postgresql.gemfile.lock +169 -0
  46. data/lib/reports_kits/base_controller.rb +17 -0
  47. data/lib/reports_kits/cache.rb +37 -0
  48. data/lib/reports_kits/configuration.rb +50 -0
  49. data/lib/reports_kits/engine.rb +21 -0
  50. data/lib/reports_kits/entity.rb +3 -0
  51. data/lib/reports_kits/filters_controller.rb +11 -0
  52. data/lib/reports_kits/form_builder.rb +66 -0
  53. data/lib/reports_kits/helper.rb +24 -0
  54. data/lib/reports_kits/model.rb +16 -0
  55. data/lib/reports_kits/model_configuration.rb +28 -0
  56. data/lib/reports_kits/normalized_params.rb +16 -0
  57. data/lib/reports_kits/order.rb +33 -0
  58. data/lib/reports_kits/relative_time.rb +42 -0
  59. data/lib/reports_kits/report_builder.rb +88 -0
  60. data/lib/reports_kits/reports/abstract_series.rb +9 -0
  61. data/lib/reports_kits/reports/adapters/mysql.rb +26 -0
  62. data/lib/reports_kits/reports/adapters/postgresql.rb +26 -0
  63. data/lib/reports_kits/reports/composite_series.rb +48 -0
  64. data/lib/reports_kits/reports/contextual_filter.rb +19 -0
  65. data/lib/reports_kits/reports/data/add_table_aggregations.rb +105 -0
  66. data/lib/reports_kits/reports/data/aggregate_composite.rb +97 -0
  67. data/lib/reports_kits/reports/data/aggregate_one_dimension.rb +39 -0
  68. data/lib/reports_kits/reports/data/aggregate_two_dimensions.rb +39 -0
  69. data/lib/reports_kits/reports/data/chart_data_for_data_method.rb +62 -0
  70. data/lib/reports_kits/reports/data/chart_options.rb +155 -0
  71. data/lib/reports_kits/reports/data/format_one_dimension.rb +140 -0
  72. data/lib/reports_kits/reports/data/format_table.rb +63 -0
  73. data/lib/reports_kits/reports/data/format_two_dimensions.rb +143 -0
  74. data/lib/reports_kits/reports/data/generate.rb +156 -0
  75. data/lib/reports_kits/reports/data/generate_for_properties.rb +97 -0
  76. data/lib/reports_kits/reports/data/normalize_properties.rb +62 -0
  77. data/lib/reports_kits/reports/data/populate_one_dimension.rb +54 -0
  78. data/lib/reports_kits/reports/data/populate_two_dimensions.rb +104 -0
  79. data/lib/reports_kits/reports/data/utils.rb +178 -0
  80. data/lib/reports_kits/reports/dimension.rb +27 -0
  81. data/lib/reports_kits/reports/dimension_with_series.rb +144 -0
  82. data/lib/reports_kits/reports/filter.rb +29 -0
  83. data/lib/reports_kits/reports/filter_types/base.rb +48 -0
  84. data/lib/reports_kits/reports/filter_types/boolean.rb +47 -0
  85. data/lib/reports_kits/reports/filter_types/datetime.rb +51 -0
  86. data/lib/reports_kits/reports/filter_types/number.rb +30 -0
  87. data/lib/reports_kits/reports/filter_types/records.rb +26 -0
  88. data/lib/reports_kits/reports/filter_types/string.rb +38 -0
  89. data/lib/reports_kits/reports/filter_with_series.rb +97 -0
  90. data/lib/reports_kits/reports/generate_autocomplete_method_results.rb +29 -0
  91. data/lib/reports_kits/reports/generate_autocomplete_results.rb +57 -0
  92. data/lib/reports_kits/reports/inferrable_configuration.rb +116 -0
  93. data/lib/reports_kits/reports/model_settings.rb +30 -0
  94. data/lib/reports_kits/reports/properties.rb +10 -0
  95. data/lib/reports_kits/reports/properties_to_filter.rb +40 -0
  96. data/lib/reports_kits/reports/series.rb +121 -0
  97. data/lib/reports_kits/reports_controller.rb +65 -0
  98. data/lib/reports_kits/utils.rb +11 -0
  99. data/lib/reports_kits/value.rb +3 -0
  100. data/lib/reports_kits/version.rb +3 -0
  101. data/lib/reports_kits.rb +79 -0
  102. data/reports_kits.gemspec +26 -0
  103. data/spec/factories/issue_factory.rb +4 -0
  104. data/spec/factories/issues_label_factory.rb +4 -0
  105. data/spec/factories/label_factory.rb +4 -0
  106. data/spec/factories/pro_repo_factory.rb +5 -0
  107. data/spec/factories/repo_factory.rb +5 -0
  108. data/spec/factories/tag_factory.rb +4 -0
  109. data/spec/fixtures/generate_inputs.yml +254 -0
  110. data/spec/fixtures/generate_outputs.yml +1216 -0
  111. data/spec/reports_kit/form_builder_spec.rb +26 -0
  112. data/spec/reports_kit/relative_time_spec.rb +29 -0
  113. data/spec/reports_kit/reports/data/generate/contextual_filters_spec.rb +60 -0
  114. data/spec/reports_kit/reports/data/generate_spec.rb +1371 -0
  115. data/spec/reports_kit/reports/data/normalize_properties_spec.rb +196 -0
  116. data/spec/reports_kit/reports/dimension_with_series_spec.rb +67 -0
  117. data/spec/reports_kit/reports/filter_with_series_spec.rb +39 -0
  118. data/spec/reports_kit/reports/generate_autocomplete_results_spec.rb +69 -0
  119. data/spec/spec_helper.rb +77 -0
  120. data/spec/support/config.rb +41 -0
  121. data/spec/support/example_data_methods.rb +25 -0
  122. data/spec/support/factory_girl.rb +5 -0
  123. data/spec/support/helpers.rb +25 -0
  124. data/spec/support/models/issue.rb +14 -0
  125. data/spec/support/models/issues_label.rb +4 -0
  126. data/spec/support/models/label.rb +5 -0
  127. data/spec/support/models/pro/repo.rb +5 -0
  128. data/spec/support/models/pro/special_issue.rb +4 -0
  129. data/spec/support/models/repo.rb +13 -0
  130. data/spec/support/models/tag.rb +4 -0
  131. data/spec/support/schema.rb +39 -0
  132. metadata +134 -4
@@ -0,0 +1,254 @@
1
+ - series:
2
+ measure: issue
3
+ dimensions:
4
+ - repo
5
+ - series:
6
+ measure: issue
7
+ dimensions:
8
+ - repo
9
+ chart:
10
+ options:
11
+ foo: bar
12
+ - series:
13
+ measure: issue
14
+ dimensions:
15
+ - repo
16
+ chart:
17
+ foo: bar
18
+ - series:
19
+ measure: issue
20
+ dimensions:
21
+ - repo
22
+ chart:
23
+ type: pie
24
+ - series:
25
+ measure: issue
26
+ dimensions:
27
+ - key: repo
28
+ - series:
29
+ measure: issue
30
+ dimensions:
31
+ - key: opened_at
32
+ - series:
33
+ measure: issue
34
+ dimensions:
35
+ - key: opened_at
36
+ - key: repo
37
+ - series:
38
+ measure: issue
39
+ filters:
40
+ - key: locked
41
+ - key: title
42
+ - key: opened_at
43
+ dimensions:
44
+ - key: repo
45
+ - series:
46
+ - measure: issue
47
+ dimensions:
48
+ - repo
49
+ - measure: label
50
+ dimensions:
51
+ - repo
52
+ - series:
53
+ - measure: issue
54
+ dimensions:
55
+ - repo
56
+ - measure: label
57
+ dimensions:
58
+ - repo
59
+ - measure: tag
60
+ dimensions:
61
+ - repo
62
+ - series:
63
+ - measure:
64
+ key: issue
65
+ name: Repo Issues
66
+ dimensions:
67
+ - repo
68
+ - measure: label
69
+ dimensions:
70
+ - repo
71
+ - series:
72
+ - measure:
73
+ key: issue
74
+ name: Repo Issues
75
+ dimensions:
76
+ - key: repo
77
+ label:
78
+ - measure: label
79
+ dimensions:
80
+ - repo
81
+ format: table
82
+ - series:
83
+ - measure:
84
+ key: issue
85
+ name: Repo Issues
86
+ dimensions:
87
+ - key: repo
88
+ label:
89
+ - measure: label
90
+ dimensions:
91
+ - repo
92
+ format: table
93
+ report_options:
94
+ aggregations:
95
+ - from: columns
96
+ operator: sum
97
+ label: Total
98
+ - series:
99
+ - measure:
100
+ key: issue
101
+ name: Repo Issues
102
+ dimensions:
103
+ - key: repo
104
+ label:
105
+ - measure: label
106
+ dimensions:
107
+ - repo
108
+ format: table
109
+ report_options:
110
+ aggregations:
111
+ - from: rows
112
+ operator: sum
113
+ label: Total
114
+ - series:
115
+ - measure:
116
+ key: issue
117
+ name: Repo Issues
118
+ dimensions:
119
+ - key: repo
120
+ label:
121
+ - measure: label
122
+ dimensions:
123
+ - repo
124
+ format: table
125
+ report_options:
126
+ aggregations:
127
+ - from: columns
128
+ operator: sum
129
+ label: Total
130
+ - from: rows
131
+ operator: sum
132
+ label: Total
133
+ - series:
134
+ - measure:
135
+ key: issue
136
+ name: Repo Issues
137
+ dimensions:
138
+ - key: repo
139
+ label:
140
+ - measure: label
141
+ dimensions:
142
+ - repo
143
+ format: table
144
+ report_options:
145
+ head_rows_count: 2
146
+ - series:
147
+ - measure:
148
+ key: issue
149
+ name: Repo Issues
150
+ dimensions:
151
+ - key: repo
152
+ label:
153
+ - measure: label
154
+ dimensions:
155
+ - repo
156
+ format: table
157
+ report_options:
158
+ foot_rows_count: 3
159
+ - series:
160
+ measure: label
161
+ dimensions:
162
+ - repo
163
+ order: dimension1.label
164
+ - series:
165
+ measure: label
166
+ dimensions:
167
+ - repo
168
+ order: dimension1.label desc
169
+ - series:
170
+ measure: label
171
+ dimensions:
172
+ - repo
173
+ order: count
174
+ - series:
175
+ measure: label
176
+ dimensions:
177
+ - repo
178
+ order: count desc
179
+ - series:
180
+ measure: issue
181
+ dimensions:
182
+ - opened_at
183
+ order: dimension1
184
+ - series:
185
+ measure: issue
186
+ dimensions:
187
+ - opened_at
188
+ order: dimension1 desc
189
+ - series:
190
+ measure: label
191
+ dimensions:
192
+ - repo
193
+ order: 0
194
+ - series:
195
+ measure: label
196
+ dimensions:
197
+ - repo
198
+ order: 0 desc
199
+ - series:
200
+ measure: label
201
+ dimensions:
202
+ - repo
203
+ order: 1
204
+ - series:
205
+ measure: label
206
+ dimensions:
207
+ - repo
208
+ order: 1 desc
209
+ - series:
210
+ measure: issue
211
+ dimensions:
212
+ - key: opened_at
213
+ - key: repo
214
+ order: dimension1
215
+ - series:
216
+ measure: issue
217
+ dimensions:
218
+ - key: opened_at
219
+ - key: repo
220
+ order: dimension1 desc
221
+ - series:
222
+ measure: label
223
+ dimensions:
224
+ - key: repo
225
+ - key: created_at
226
+ order: dimension1.label
227
+ - series:
228
+ measure: label
229
+ dimensions:
230
+ - key: repo
231
+ - key: created_at
232
+ order: dimension1.label desc
233
+ - series:
234
+ measure: issue
235
+ dimensions:
236
+ - key: opened_at
237
+ - key: repo
238
+ order: count
239
+ - series:
240
+ measure: issue
241
+ dimensions:
242
+ - key: opened_at
243
+ - key: repo
244
+ order: count desc
245
+ - data_method: ExampleDataMethods.issues_by_opened_at
246
+ - data_method: ExampleDataMethods.issues_by_opened_at_and_repo
247
+ - data_method: ExampleDataMethods.issues_by_opened_at_with_filters
248
+ - data_method: ExampleDataMethods.issues_by_opened_at_with_filters
249
+ ui_filters:
250
+ state: open
251
+ - data_method: ExampleDataMethods.issues_by_opened_at_with_filters
252
+ ui_filters:
253
+ state: open
254
+ format: table