active_reporter 0.6.1 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -9
- data/lib/active_reporter/aggregator/array.rb +1 -1
- data/lib/active_reporter/aggregator/count.rb +2 -2
- data/lib/active_reporter/aggregator/count_if.rb +2 -2
- data/lib/active_reporter/aggregator/ratio.rb +1 -1
- data/lib/active_reporter/aggregator.rb +9 -9
- data/lib/active_reporter/calculator.rb +2 -2
- data/lib/active_reporter/dimension/base.rb +3 -3
- data/lib/active_reporter/dimension/bin/set.rb +3 -3
- data/lib/active_reporter/dimension/bin/table.rb +1 -1
- data/lib/active_reporter/dimension/bin.rb +23 -15
- data/lib/active_reporter/dimension/category.rb +1 -1
- data/lib/active_reporter/dimension/enum.rb +1 -1
- data/lib/active_reporter/dimension/number.rb +3 -3
- data/lib/active_reporter/dimension/time.rb +4 -4
- data/lib/active_reporter/dimension.rb +8 -8
- data/lib/active_reporter/evaluator.rb +2 -2
- data/lib/active_reporter/inflector.rb +1 -1
- data/lib/active_reporter/report/aggregation.rb +12 -12
- data/lib/active_reporter/report/definition.rb +6 -6
- data/lib/active_reporter/report/validation.rb +26 -15
- data/lib/active_reporter/report.rb +3 -3
- data/lib/active_reporter/serializer/base.rb +6 -6
- data/lib/active_reporter/serializer/csv.rb +2 -2
- data/lib/active_reporter/serializer/form_field.rb +5 -5
- data/lib/active_reporter/serializer/highcharts.rb +6 -6
- data/lib/active_reporter/serializer.rb +7 -7
- data/lib/active_reporter/tracker/base.rb +1 -1
- data/lib/active_reporter/tracker.rb +3 -3
- data/lib/active_reporter/version.rb +1 -1
- data/lib/active_reporter.rb +7 -3
- data/spec/acceptance/data_spec.rb +49 -49
- data/spec/active_reporter/aggregator_spec.rb +37 -37
- data/spec/active_reporter/dimension/base_spec.rb +29 -29
- data/spec/active_reporter/dimension/bin/set_spec.rb +29 -29
- data/spec/active_reporter/dimension/bin/table_spec.rb +7 -7
- data/spec/active_reporter/dimension/bin_spec.rb +12 -12
- data/spec/active_reporter/dimension/category_spec.rb +22 -22
- data/spec/active_reporter/dimension/enum_spec.rb +12 -12
- data/spec/active_reporter/dimension/number_spec.rb +11 -11
- data/spec/active_reporter/dimension/time_spec.rb +20 -20
- data/spec/active_reporter/report_spec.rb +162 -162
- data/spec/active_reporter/serializer/hash_table_spec.rb +13 -13
- data/spec/active_reporter/serializer/highcharts_spec.rb +30 -30
- data/spec/active_reporter/serializer/table_spec.rb +22 -22
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/models/post_report.rb +1 -1
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/app/views/site/report.html.erb +5 -5
- data/spec/dummy/bin/bundle +2 -2
- data/spec/dummy/bin/rails +3 -3
- data/spec/dummy/bin/rake +2 -2
- data/spec/dummy/bin/setup +2 -2
- data/spec/dummy/config/application.rb +4 -4
- data/spec/dummy/config/boot.rb +3 -3
- data/spec/dummy/config/database.yml +3 -3
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/production.rb +4 -4
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/config/initializers/inflections.rb +4 -4
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/locales/en.yml +2 -2
- data/spec/dummy/config/routes.rb +9 -9
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/log/test.log +54769 -77257
- data/spec/spec_helper.rb +13 -13
- metadata +64 -44
data/spec/spec_helper.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# Configure Rails Environment
|
2
2
|
ENV["RAILS_ENV"] ||= "test"
|
3
3
|
|
4
|
-
require
|
4
|
+
require "simplecov"
|
5
5
|
SimpleCov.start do
|
6
|
-
add_filter
|
6
|
+
add_filter "/spec/"
|
7
7
|
|
8
|
-
add_group
|
8
|
+
add_group "Report", ["lib/active_reporter.rb", "lib/active_reporter/report", "lib/active_reporter/invalid_params_error.rb", "lib/active_reporter/version.rb"]
|
9
9
|
|
10
|
-
add_group
|
11
|
-
add_group
|
12
|
-
add_group
|
10
|
+
add_group "Aggregators", "lib/active_reporter/aggregator"
|
11
|
+
add_group "Calculators", "lib/active_reporter/calculator"
|
12
|
+
add_group "Trackers", "lib/active_reporter/tracker"
|
13
13
|
|
14
|
-
add_group
|
14
|
+
add_group "Dimensions", "lib/active_reporter/dimension"
|
15
15
|
|
16
|
-
add_group
|
16
|
+
add_group "Serializers", "lib/active_reporter/serializer"
|
17
17
|
|
18
|
-
add_group
|
18
|
+
add_group "Tasks", "lib/active_reporter/tasks"
|
19
19
|
|
20
20
|
add_group "Long files" do |src_file| src_file.lines.count > 100 end
|
21
21
|
add_group "Short files" do |src_file| src_file.lines.count < 5 end
|
@@ -25,10 +25,10 @@ require File.expand_path("../../spec/dummy/config/environment.rb", __FILE__)
|
|
25
25
|
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db/migrate", __FILE__)]
|
26
26
|
require "rails/test_help"
|
27
27
|
|
28
|
-
require
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
28
|
+
require "rspec/rails"
|
29
|
+
require "factory_bot_rails"
|
30
|
+
require "pry"
|
31
|
+
require "byebug"
|
32
32
|
|
33
33
|
# Load support files
|
34
34
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chaunce
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: deeply_enumerable
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,132 +50,152 @@ dependencies:
|
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '2.0'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rails
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '6.0'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '7'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '6.0'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '7'
|
53
73
|
- !ruby/object:Gem::Dependency
|
54
74
|
name: pg
|
55
75
|
requirement: !ruby/object:Gem::Requirement
|
56
76
|
requirements:
|
57
|
-
- - "
|
77
|
+
- - ">="
|
58
78
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
79
|
+
version: '0'
|
60
80
|
type: :development
|
61
81
|
prerelease: false
|
62
82
|
version_requirements: !ruby/object:Gem::Requirement
|
63
83
|
requirements:
|
64
|
-
- - "
|
84
|
+
- - ">="
|
65
85
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
86
|
+
version: '0'
|
67
87
|
- !ruby/object:Gem::Dependency
|
68
88
|
name: sqlite3
|
69
89
|
requirement: !ruby/object:Gem::Requirement
|
70
90
|
requirements:
|
71
|
-
- - "
|
91
|
+
- - ">="
|
72
92
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
93
|
+
version: '0'
|
74
94
|
type: :development
|
75
95
|
prerelease: false
|
76
96
|
version_requirements: !ruby/object:Gem::Requirement
|
77
97
|
requirements:
|
78
|
-
- - "
|
98
|
+
- - ">="
|
79
99
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
100
|
+
version: '0'
|
81
101
|
- !ruby/object:Gem::Dependency
|
82
102
|
name: mysql2
|
83
103
|
requirement: !ruby/object:Gem::Requirement
|
84
104
|
requirements:
|
85
|
-
- - "
|
105
|
+
- - ">="
|
86
106
|
- !ruby/object:Gem::Version
|
87
|
-
version: '0
|
107
|
+
version: '0'
|
88
108
|
type: :development
|
89
109
|
prerelease: false
|
90
110
|
version_requirements: !ruby/object:Gem::Requirement
|
91
111
|
requirements:
|
92
|
-
- - "
|
112
|
+
- - ">="
|
93
113
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0
|
114
|
+
version: '0'
|
95
115
|
- !ruby/object:Gem::Dependency
|
96
116
|
name: rspec-rails
|
97
117
|
requirement: !ruby/object:Gem::Requirement
|
98
118
|
requirements:
|
99
|
-
- - "
|
119
|
+
- - ">="
|
100
120
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
121
|
+
version: '0'
|
102
122
|
type: :development
|
103
123
|
prerelease: false
|
104
124
|
version_requirements: !ruby/object:Gem::Requirement
|
105
125
|
requirements:
|
106
|
-
- - "
|
126
|
+
- - ">="
|
107
127
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
128
|
+
version: '0'
|
109
129
|
- !ruby/object:Gem::Dependency
|
110
130
|
name: factory_bot_rails
|
111
131
|
requirement: !ruby/object:Gem::Requirement
|
112
132
|
requirements:
|
113
|
-
- - "
|
133
|
+
- - ">="
|
114
134
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
135
|
+
version: '0'
|
116
136
|
type: :development
|
117
137
|
prerelease: false
|
118
138
|
version_requirements: !ruby/object:Gem::Requirement
|
119
139
|
requirements:
|
120
|
-
- - "
|
140
|
+
- - ">="
|
121
141
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
142
|
+
version: '0'
|
123
143
|
- !ruby/object:Gem::Dependency
|
124
144
|
name: database_cleaner
|
125
145
|
requirement: !ruby/object:Gem::Requirement
|
126
146
|
requirements:
|
127
|
-
- - "
|
147
|
+
- - ">="
|
128
148
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
149
|
+
version: '0'
|
130
150
|
type: :development
|
131
151
|
prerelease: false
|
132
152
|
version_requirements: !ruby/object:Gem::Requirement
|
133
153
|
requirements:
|
134
|
-
- - "
|
154
|
+
- - ">="
|
135
155
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
156
|
+
version: '0'
|
137
157
|
- !ruby/object:Gem::Dependency
|
138
158
|
name: pry
|
139
159
|
requirement: !ruby/object:Gem::Requirement
|
140
160
|
requirements:
|
141
|
-
- - "
|
161
|
+
- - ">="
|
142
162
|
- !ruby/object:Gem::Version
|
143
|
-
version: '0
|
163
|
+
version: '0'
|
144
164
|
type: :development
|
145
165
|
prerelease: false
|
146
166
|
version_requirements: !ruby/object:Gem::Requirement
|
147
167
|
requirements:
|
148
|
-
- - "
|
168
|
+
- - ">="
|
149
169
|
- !ruby/object:Gem::Version
|
150
|
-
version: '0
|
170
|
+
version: '0'
|
151
171
|
- !ruby/object:Gem::Dependency
|
152
172
|
name: faker
|
153
173
|
requirement: !ruby/object:Gem::Requirement
|
154
174
|
requirements:
|
155
|
-
- - "
|
175
|
+
- - ">="
|
156
176
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
177
|
+
version: '0'
|
158
178
|
type: :development
|
159
179
|
prerelease: false
|
160
180
|
version_requirements: !ruby/object:Gem::Requirement
|
161
181
|
requirements:
|
162
|
-
- - "
|
182
|
+
- - ">="
|
163
183
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
184
|
+
version: '0'
|
165
185
|
- !ruby/object:Gem::Dependency
|
166
186
|
name: simplecov
|
167
187
|
requirement: !ruby/object:Gem::Requirement
|
168
188
|
requirements:
|
169
|
-
- - "
|
189
|
+
- - ">="
|
170
190
|
- !ruby/object:Gem::Version
|
171
|
-
version: '0
|
191
|
+
version: '0'
|
172
192
|
type: :development
|
173
193
|
prerelease: false
|
174
194
|
version_requirements: !ruby/object:Gem::Requirement
|
175
195
|
requirements:
|
176
|
-
- - "
|
196
|
+
- - ">="
|
177
197
|
- !ruby/object:Gem::Version
|
178
|
-
version: '0
|
198
|
+
version: '0'
|
179
199
|
- !ruby/object:Gem::Dependency
|
180
200
|
name: byebug
|
181
201
|
requirement: !ruby/object:Gem::Requirement
|
@@ -315,7 +335,7 @@ homepage: http://github.com/chaunce/active_reporter
|
|
315
335
|
licenses:
|
316
336
|
- MIT
|
317
337
|
metadata: {}
|
318
|
-
post_install_message:
|
338
|
+
post_install_message:
|
319
339
|
rdoc_options: []
|
320
340
|
require_paths:
|
321
341
|
- lib
|
@@ -330,8 +350,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
350
|
- !ruby/object:Gem::Version
|
331
351
|
version: '0'
|
332
352
|
requirements: []
|
333
|
-
rubygems_version: 3.1.
|
334
|
-
signing_key:
|
353
|
+
rubygems_version: 3.1.6
|
354
|
+
signing_key:
|
335
355
|
specification_version: 4
|
336
356
|
summary: Rails data aggregation framework
|
337
357
|
test_files:
|