pg_aggregates 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Appraisals +16 -0
- data/gemfiles/rails_6.1.gemfile +22 -0
- data/gemfiles/rails_6.1.gemfile.lock +176 -0
- data/gemfiles/rails_7.0.gemfile +22 -0
- data/gemfiles/rails_7.0.gemfile.lock +191 -0
- data/gemfiles/rails_7.1.gemfile +22 -0
- data/gemfiles/rails_7.1.gemfile.lock +222 -0
- data/lib/generators/pg/aggregate/aggregate_generator.rb +11 -9
- data/lib/pg_aggregates/aggregate_definition.rb +2 -0
- data/lib/pg_aggregates/command_recorder.rb +2 -0
- data/lib/pg_aggregates/file_version.rb +2 -0
- data/lib/pg_aggregates/railtie.rb +2 -0
- data/lib/pg_aggregates/schema_dumper.rb +13 -7
- data/lib/pg_aggregates/schema_statements.rb +6 -4
- data/lib/pg_aggregates/version.rb +1 -1
- data/lib/pg_aggregates.rb +1 -1
- metadata +17 -79
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06275937982acc8e3dd0948ce60f2df0b5562a5b2eed7f4664a4cdf7b93c1b07'
|
4
|
+
data.tar.gz: 949c40f5df0902184a5a59803535a6c0298668c458391b19e7f22126e05b90bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a16c309216950f5357a906c823628f63a94d25c6b1434953fd9cfe05e07197c741c934d4650024481138966cf38a9f4c91926ac59c57eac536fe601e782a3ebb
|
7
|
+
data.tar.gz: 46c768fe57e3ec3cf2fe5904231100b1f17ed0f3304aee35109c46f4a92d050b9143f4bb47c02c535d607036707d7b8368f3a99c4497a8a55b40fdbf4eb3eea9
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.5
|
data/Appraisals
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise "rails-6.1" do
|
4
|
+
gem "activerecord", "~> 6.1.0"
|
5
|
+
gem "railties", "~> 6.1.0"
|
6
|
+
end
|
7
|
+
|
8
|
+
appraise "rails-7.0" do
|
9
|
+
gem "activerecord", "~> 7.0.0"
|
10
|
+
gem "railties", "~> 7.0.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "rails-7.1" do
|
14
|
+
gem "activerecord", "~> 7.1.0"
|
15
|
+
gem "railties", "~> 7.1.0"
|
16
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "ammeter"
|
6
|
+
gem "appraisal"
|
7
|
+
gem "base64"
|
8
|
+
gem "bigdecimal"
|
9
|
+
gem "database_cleaner"
|
10
|
+
gem "drb"
|
11
|
+
gem "gem-release"
|
12
|
+
gem "logger"
|
13
|
+
gem "mutex_m"
|
14
|
+
gem "rake"
|
15
|
+
gem "rspec"
|
16
|
+
gem "rubocop-mhenrixon"
|
17
|
+
gem "rubocop-rake"
|
18
|
+
gem "rubocop-rspec"
|
19
|
+
gem "activerecord", "~> 6.1.0"
|
20
|
+
gem "railties", "~> 6.1.0"
|
21
|
+
|
22
|
+
gemspec path: "../"
|
@@ -0,0 +1,176 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.1)
|
5
|
+
activerecord (>= 6.1)
|
6
|
+
pg (>= 1.1)
|
7
|
+
railties (>= 6.1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (6.1.7.10)
|
13
|
+
actionview (= 6.1.7.10)
|
14
|
+
activesupport (= 6.1.7.10)
|
15
|
+
rack (~> 2.0, >= 2.0.9)
|
16
|
+
rack-test (>= 0.6.3)
|
17
|
+
rails-dom-testing (~> 2.0)
|
18
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
+
actionview (6.1.7.10)
|
20
|
+
activesupport (= 6.1.7.10)
|
21
|
+
builder (~> 3.1)
|
22
|
+
erubi (~> 1.4)
|
23
|
+
rails-dom-testing (~> 2.0)
|
24
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
+
activemodel (6.1.7.10)
|
26
|
+
activesupport (= 6.1.7.10)
|
27
|
+
activerecord (6.1.7.10)
|
28
|
+
activemodel (= 6.1.7.10)
|
29
|
+
activesupport (= 6.1.7.10)
|
30
|
+
activesupport (6.1.7.10)
|
31
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
32
|
+
i18n (>= 1.6, < 2)
|
33
|
+
minitest (>= 5.1)
|
34
|
+
tzinfo (~> 2.0)
|
35
|
+
zeitwerk (~> 2.3)
|
36
|
+
ammeter (1.1.7)
|
37
|
+
activesupport (>= 3.0)
|
38
|
+
railties (>= 3.0)
|
39
|
+
rspec-rails (>= 2.2)
|
40
|
+
appraisal (2.5.0)
|
41
|
+
bundler
|
42
|
+
rake
|
43
|
+
thor (>= 0.14.0)
|
44
|
+
ast (2.4.2)
|
45
|
+
base64 (0.2.0)
|
46
|
+
bigdecimal (3.1.8)
|
47
|
+
builder (3.3.0)
|
48
|
+
concurrent-ruby (1.3.4)
|
49
|
+
crass (1.0.6)
|
50
|
+
database_cleaner (2.1.0)
|
51
|
+
database_cleaner-active_record (>= 2, < 3)
|
52
|
+
database_cleaner-active_record (2.2.0)
|
53
|
+
activerecord (>= 5.a)
|
54
|
+
database_cleaner-core (~> 2.0.0)
|
55
|
+
database_cleaner-core (2.0.1)
|
56
|
+
diff-lcs (1.5.1)
|
57
|
+
drb (2.2.1)
|
58
|
+
erubi (1.13.0)
|
59
|
+
gem-release (2.2.2)
|
60
|
+
i18n (1.14.6)
|
61
|
+
concurrent-ruby (~> 1.0)
|
62
|
+
json (2.7.6)
|
63
|
+
language_server-protocol (3.17.0.3)
|
64
|
+
logger (1.6.1)
|
65
|
+
loofah (2.23.1)
|
66
|
+
crass (~> 1.0.2)
|
67
|
+
nokogiri (>= 1.12.0)
|
68
|
+
method_source (1.1.0)
|
69
|
+
minitest (5.25.1)
|
70
|
+
mutex_m (0.2.0)
|
71
|
+
nokogiri (1.16.7-arm64-darwin)
|
72
|
+
racc (~> 1.4)
|
73
|
+
parallel (1.26.3)
|
74
|
+
parser (3.3.5.1)
|
75
|
+
ast (~> 2.4.1)
|
76
|
+
racc
|
77
|
+
pg (1.5.9)
|
78
|
+
racc (1.8.1)
|
79
|
+
rack (2.2.10)
|
80
|
+
rack-test (2.1.0)
|
81
|
+
rack (>= 1.3)
|
82
|
+
rails-dom-testing (2.2.0)
|
83
|
+
activesupport (>= 5.0.0)
|
84
|
+
minitest
|
85
|
+
nokogiri (>= 1.6)
|
86
|
+
rails-html-sanitizer (1.6.0)
|
87
|
+
loofah (~> 2.21)
|
88
|
+
nokogiri (~> 1.14)
|
89
|
+
railties (6.1.7.10)
|
90
|
+
actionpack (= 6.1.7.10)
|
91
|
+
activesupport (= 6.1.7.10)
|
92
|
+
method_source
|
93
|
+
rake (>= 12.2)
|
94
|
+
thor (~> 1.0)
|
95
|
+
rainbow (3.1.1)
|
96
|
+
rake (13.2.1)
|
97
|
+
regexp_parser (2.9.2)
|
98
|
+
rspec (3.13.0)
|
99
|
+
rspec-core (~> 3.13.0)
|
100
|
+
rspec-expectations (~> 3.13.0)
|
101
|
+
rspec-mocks (~> 3.13.0)
|
102
|
+
rspec-core (3.13.2)
|
103
|
+
rspec-support (~> 3.13.0)
|
104
|
+
rspec-expectations (3.13.3)
|
105
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
106
|
+
rspec-support (~> 3.13.0)
|
107
|
+
rspec-mocks (3.13.2)
|
108
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
109
|
+
rspec-support (~> 3.13.0)
|
110
|
+
rspec-rails (6.1.5)
|
111
|
+
actionpack (>= 6.1)
|
112
|
+
activesupport (>= 6.1)
|
113
|
+
railties (>= 6.1)
|
114
|
+
rspec-core (~> 3.13)
|
115
|
+
rspec-expectations (~> 3.13)
|
116
|
+
rspec-mocks (~> 3.13)
|
117
|
+
rspec-support (~> 3.13)
|
118
|
+
rspec-support (3.13.1)
|
119
|
+
rubocop (1.68.0)
|
120
|
+
json (~> 2.3)
|
121
|
+
language_server-protocol (>= 3.17.0)
|
122
|
+
parallel (~> 1.10)
|
123
|
+
parser (>= 3.3.0.2)
|
124
|
+
rainbow (>= 2.2.2, < 4.0)
|
125
|
+
regexp_parser (>= 2.4, < 3.0)
|
126
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
127
|
+
ruby-progressbar (~> 1.7)
|
128
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
129
|
+
rubocop-ast (1.34.0)
|
130
|
+
parser (>= 3.3.1.0)
|
131
|
+
rubocop-mhenrixon (3.0.0)
|
132
|
+
rubocop
|
133
|
+
rubocop-performance
|
134
|
+
rubocop-rake
|
135
|
+
rubocop-rspec
|
136
|
+
rubocop-thread_safety
|
137
|
+
rubocop-performance (1.22.1)
|
138
|
+
rubocop (>= 1.48.1, < 2.0)
|
139
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
140
|
+
rubocop-rake (0.6.0)
|
141
|
+
rubocop (~> 1.0)
|
142
|
+
rubocop-rspec (3.2.0)
|
143
|
+
rubocop (~> 1.61)
|
144
|
+
rubocop-thread_safety (0.5.1)
|
145
|
+
rubocop (>= 0.90.0)
|
146
|
+
ruby-progressbar (1.13.0)
|
147
|
+
thor (1.3.2)
|
148
|
+
tzinfo (2.0.6)
|
149
|
+
concurrent-ruby (~> 1.0)
|
150
|
+
unicode-display_width (2.6.0)
|
151
|
+
zeitwerk (2.6.18)
|
152
|
+
|
153
|
+
PLATFORMS
|
154
|
+
arm64-darwin
|
155
|
+
|
156
|
+
DEPENDENCIES
|
157
|
+
activerecord (~> 6.1.0)
|
158
|
+
ammeter
|
159
|
+
appraisal
|
160
|
+
base64
|
161
|
+
bigdecimal
|
162
|
+
database_cleaner
|
163
|
+
drb
|
164
|
+
gem-release
|
165
|
+
logger
|
166
|
+
mutex_m
|
167
|
+
pg_aggregates!
|
168
|
+
railties (~> 6.1.0)
|
169
|
+
rake
|
170
|
+
rspec
|
171
|
+
rubocop-mhenrixon
|
172
|
+
rubocop-rake
|
173
|
+
rubocop-rspec
|
174
|
+
|
175
|
+
BUNDLED WITH
|
176
|
+
2.5.20
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "ammeter"
|
6
|
+
gem "appraisal"
|
7
|
+
gem "base64"
|
8
|
+
gem "bigdecimal"
|
9
|
+
gem "database_cleaner"
|
10
|
+
gem "drb"
|
11
|
+
gem "gem-release"
|
12
|
+
gem "logger"
|
13
|
+
gem "mutex_m"
|
14
|
+
gem "rake"
|
15
|
+
gem "rspec"
|
16
|
+
gem "rubocop-mhenrixon"
|
17
|
+
gem "rubocop-rake"
|
18
|
+
gem "rubocop-rspec"
|
19
|
+
gem "activerecord", "~> 7.0.0"
|
20
|
+
gem "railties", "~> 7.0.0"
|
21
|
+
|
22
|
+
gemspec path: "../"
|
@@ -0,0 +1,191 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.1)
|
5
|
+
activerecord (>= 6.1)
|
6
|
+
pg (>= 1.1)
|
7
|
+
railties (>= 6.1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (7.0.8.6)
|
13
|
+
actionview (= 7.0.8.6)
|
14
|
+
activesupport (= 7.0.8.6)
|
15
|
+
rack (~> 2.0, >= 2.2.4)
|
16
|
+
rack-test (>= 0.6.3)
|
17
|
+
rails-dom-testing (~> 2.0)
|
18
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
+
actionview (7.0.8.6)
|
20
|
+
activesupport (= 7.0.8.6)
|
21
|
+
builder (~> 3.1)
|
22
|
+
erubi (~> 1.4)
|
23
|
+
rails-dom-testing (~> 2.0)
|
24
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
+
activemodel (7.0.8.6)
|
26
|
+
activesupport (= 7.0.8.6)
|
27
|
+
activerecord (7.0.8.6)
|
28
|
+
activemodel (= 7.0.8.6)
|
29
|
+
activesupport (= 7.0.8.6)
|
30
|
+
activesupport (7.0.8.6)
|
31
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
32
|
+
i18n (>= 1.6, < 2)
|
33
|
+
minitest (>= 5.1)
|
34
|
+
tzinfo (~> 2.0)
|
35
|
+
ammeter (1.1.7)
|
36
|
+
activesupport (>= 3.0)
|
37
|
+
railties (>= 3.0)
|
38
|
+
rspec-rails (>= 2.2)
|
39
|
+
appraisal (2.5.0)
|
40
|
+
bundler
|
41
|
+
rake
|
42
|
+
thor (>= 0.14.0)
|
43
|
+
ast (2.4.2)
|
44
|
+
base64 (0.2.0)
|
45
|
+
bigdecimal (3.1.8)
|
46
|
+
builder (3.3.0)
|
47
|
+
concurrent-ruby (1.3.4)
|
48
|
+
crass (1.0.6)
|
49
|
+
database_cleaner (2.1.0)
|
50
|
+
database_cleaner-active_record (>= 2, < 3)
|
51
|
+
database_cleaner-active_record (2.2.0)
|
52
|
+
activerecord (>= 5.a)
|
53
|
+
database_cleaner-core (~> 2.0.0)
|
54
|
+
database_cleaner-core (2.0.1)
|
55
|
+
diff-lcs (1.5.1)
|
56
|
+
drb (2.2.1)
|
57
|
+
erubi (1.13.0)
|
58
|
+
gem-release (2.2.2)
|
59
|
+
i18n (1.14.6)
|
60
|
+
concurrent-ruby (~> 1.0)
|
61
|
+
json (2.7.6)
|
62
|
+
language_server-protocol (3.17.0.3)
|
63
|
+
logger (1.6.1)
|
64
|
+
loofah (2.23.1)
|
65
|
+
crass (~> 1.0.2)
|
66
|
+
nokogiri (>= 1.12.0)
|
67
|
+
method_source (1.1.0)
|
68
|
+
minitest (5.25.1)
|
69
|
+
mutex_m (0.2.0)
|
70
|
+
nokogiri (1.16.7-aarch64-linux)
|
71
|
+
racc (~> 1.4)
|
72
|
+
nokogiri (1.16.7-arm-linux)
|
73
|
+
racc (~> 1.4)
|
74
|
+
nokogiri (1.16.7-arm64-darwin)
|
75
|
+
racc (~> 1.4)
|
76
|
+
nokogiri (1.16.7-x86-linux)
|
77
|
+
racc (~> 1.4)
|
78
|
+
nokogiri (1.16.7-x86_64-darwin)
|
79
|
+
racc (~> 1.4)
|
80
|
+
nokogiri (1.16.7-x86_64-linux)
|
81
|
+
racc (~> 1.4)
|
82
|
+
parallel (1.26.3)
|
83
|
+
parser (3.3.5.1)
|
84
|
+
ast (~> 2.4.1)
|
85
|
+
racc
|
86
|
+
pg (1.5.9)
|
87
|
+
racc (1.8.1)
|
88
|
+
rack (2.2.10)
|
89
|
+
rack-test (2.1.0)
|
90
|
+
rack (>= 1.3)
|
91
|
+
rails-dom-testing (2.2.0)
|
92
|
+
activesupport (>= 5.0.0)
|
93
|
+
minitest
|
94
|
+
nokogiri (>= 1.6)
|
95
|
+
rails-html-sanitizer (1.6.0)
|
96
|
+
loofah (~> 2.21)
|
97
|
+
nokogiri (~> 1.14)
|
98
|
+
railties (7.0.8.6)
|
99
|
+
actionpack (= 7.0.8.6)
|
100
|
+
activesupport (= 7.0.8.6)
|
101
|
+
method_source
|
102
|
+
rake (>= 12.2)
|
103
|
+
thor (~> 1.0)
|
104
|
+
zeitwerk (~> 2.5)
|
105
|
+
rainbow (3.1.1)
|
106
|
+
rake (13.2.1)
|
107
|
+
regexp_parser (2.9.2)
|
108
|
+
rspec (3.13.0)
|
109
|
+
rspec-core (~> 3.13.0)
|
110
|
+
rspec-expectations (~> 3.13.0)
|
111
|
+
rspec-mocks (~> 3.13.0)
|
112
|
+
rspec-core (3.13.2)
|
113
|
+
rspec-support (~> 3.13.0)
|
114
|
+
rspec-expectations (3.13.3)
|
115
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
116
|
+
rspec-support (~> 3.13.0)
|
117
|
+
rspec-mocks (3.13.2)
|
118
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
119
|
+
rspec-support (~> 3.13.0)
|
120
|
+
rspec-rails (7.0.1)
|
121
|
+
actionpack (>= 7.0)
|
122
|
+
activesupport (>= 7.0)
|
123
|
+
railties (>= 7.0)
|
124
|
+
rspec-core (~> 3.13)
|
125
|
+
rspec-expectations (~> 3.13)
|
126
|
+
rspec-mocks (~> 3.13)
|
127
|
+
rspec-support (~> 3.13)
|
128
|
+
rspec-support (3.13.1)
|
129
|
+
rubocop (1.68.0)
|
130
|
+
json (~> 2.3)
|
131
|
+
language_server-protocol (>= 3.17.0)
|
132
|
+
parallel (~> 1.10)
|
133
|
+
parser (>= 3.3.0.2)
|
134
|
+
rainbow (>= 2.2.2, < 4.0)
|
135
|
+
regexp_parser (>= 2.4, < 3.0)
|
136
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
137
|
+
ruby-progressbar (~> 1.7)
|
138
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
139
|
+
rubocop-ast (1.34.0)
|
140
|
+
parser (>= 3.3.1.0)
|
141
|
+
rubocop-mhenrixon (3.0.0)
|
142
|
+
rubocop
|
143
|
+
rubocop-performance
|
144
|
+
rubocop-rake
|
145
|
+
rubocop-rspec
|
146
|
+
rubocop-thread_safety
|
147
|
+
rubocop-performance (1.22.1)
|
148
|
+
rubocop (>= 1.48.1, < 2.0)
|
149
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
150
|
+
rubocop-rake (0.6.0)
|
151
|
+
rubocop (~> 1.0)
|
152
|
+
rubocop-rspec (3.2.0)
|
153
|
+
rubocop (~> 1.61)
|
154
|
+
rubocop-thread_safety (0.5.1)
|
155
|
+
rubocop (>= 0.90.0)
|
156
|
+
ruby-progressbar (1.13.0)
|
157
|
+
thor (1.3.2)
|
158
|
+
tzinfo (2.0.6)
|
159
|
+
concurrent-ruby (~> 1.0)
|
160
|
+
unicode-display_width (2.6.0)
|
161
|
+
zeitwerk (2.6.18)
|
162
|
+
|
163
|
+
PLATFORMS
|
164
|
+
aarch64-linux
|
165
|
+
arm-linux
|
166
|
+
arm64-darwin
|
167
|
+
x86-linux
|
168
|
+
x86_64-darwin
|
169
|
+
x86_64-linux
|
170
|
+
|
171
|
+
DEPENDENCIES
|
172
|
+
activerecord (~> 7.0.0)
|
173
|
+
ammeter
|
174
|
+
appraisal
|
175
|
+
base64
|
176
|
+
bigdecimal
|
177
|
+
database_cleaner
|
178
|
+
drb
|
179
|
+
gem-release
|
180
|
+
logger
|
181
|
+
mutex_m
|
182
|
+
pg_aggregates!
|
183
|
+
railties (~> 7.0.0)
|
184
|
+
rake
|
185
|
+
rspec
|
186
|
+
rubocop-mhenrixon
|
187
|
+
rubocop-rake
|
188
|
+
rubocop-rspec
|
189
|
+
|
190
|
+
BUNDLED WITH
|
191
|
+
2.5.20
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "ammeter"
|
6
|
+
gem "appraisal"
|
7
|
+
gem "base64"
|
8
|
+
gem "bigdecimal"
|
9
|
+
gem "database_cleaner"
|
10
|
+
gem "drb"
|
11
|
+
gem "gem-release"
|
12
|
+
gem "logger"
|
13
|
+
gem "mutex_m"
|
14
|
+
gem "rake"
|
15
|
+
gem "rspec"
|
16
|
+
gem "rubocop-mhenrixon"
|
17
|
+
gem "rubocop-rake"
|
18
|
+
gem "rubocop-rspec"
|
19
|
+
gem "activerecord", "~> 7.1.0"
|
20
|
+
gem "railties", "~> 7.1.0"
|
21
|
+
|
22
|
+
gemspec path: "../"
|
@@ -0,0 +1,222 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.1)
|
5
|
+
activerecord (>= 6.1)
|
6
|
+
pg (>= 1.1)
|
7
|
+
railties (>= 6.1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (7.1.5)
|
13
|
+
actionview (= 7.1.5)
|
14
|
+
activesupport (= 7.1.5)
|
15
|
+
nokogiri (>= 1.8.5)
|
16
|
+
racc
|
17
|
+
rack (>= 2.2.4)
|
18
|
+
rack-session (>= 1.0.1)
|
19
|
+
rack-test (>= 0.6.3)
|
20
|
+
rails-dom-testing (~> 2.2)
|
21
|
+
rails-html-sanitizer (~> 1.6)
|
22
|
+
actionview (7.1.5)
|
23
|
+
activesupport (= 7.1.5)
|
24
|
+
builder (~> 3.1)
|
25
|
+
erubi (~> 1.11)
|
26
|
+
rails-dom-testing (~> 2.2)
|
27
|
+
rails-html-sanitizer (~> 1.6)
|
28
|
+
activemodel (7.1.5)
|
29
|
+
activesupport (= 7.1.5)
|
30
|
+
activerecord (7.1.5)
|
31
|
+
activemodel (= 7.1.5)
|
32
|
+
activesupport (= 7.1.5)
|
33
|
+
timeout (>= 0.4.0)
|
34
|
+
activesupport (7.1.5)
|
35
|
+
base64
|
36
|
+
benchmark (>= 0.3)
|
37
|
+
bigdecimal
|
38
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
39
|
+
connection_pool (>= 2.2.5)
|
40
|
+
drb
|
41
|
+
i18n (>= 1.6, < 2)
|
42
|
+
logger (>= 1.4.2)
|
43
|
+
minitest (>= 5.1)
|
44
|
+
mutex_m
|
45
|
+
securerandom (>= 0.3)
|
46
|
+
tzinfo (~> 2.0)
|
47
|
+
ammeter (1.1.7)
|
48
|
+
activesupport (>= 3.0)
|
49
|
+
railties (>= 3.0)
|
50
|
+
rspec-rails (>= 2.2)
|
51
|
+
appraisal (2.5.0)
|
52
|
+
bundler
|
53
|
+
rake
|
54
|
+
thor (>= 0.14.0)
|
55
|
+
ast (2.4.2)
|
56
|
+
base64 (0.2.0)
|
57
|
+
benchmark (0.3.0)
|
58
|
+
bigdecimal (3.1.8)
|
59
|
+
builder (3.3.0)
|
60
|
+
concurrent-ruby (1.3.4)
|
61
|
+
connection_pool (2.4.1)
|
62
|
+
crass (1.0.6)
|
63
|
+
database_cleaner (2.1.0)
|
64
|
+
database_cleaner-active_record (>= 2, < 3)
|
65
|
+
database_cleaner-active_record (2.2.0)
|
66
|
+
activerecord (>= 5.a)
|
67
|
+
database_cleaner-core (~> 2.0.0)
|
68
|
+
database_cleaner-core (2.0.1)
|
69
|
+
diff-lcs (1.5.1)
|
70
|
+
drb (2.2.1)
|
71
|
+
erubi (1.13.0)
|
72
|
+
gem-release (2.2.2)
|
73
|
+
i18n (1.14.6)
|
74
|
+
concurrent-ruby (~> 1.0)
|
75
|
+
io-console (0.7.2)
|
76
|
+
irb (1.14.1)
|
77
|
+
rdoc (>= 4.0.0)
|
78
|
+
reline (>= 0.4.2)
|
79
|
+
json (2.7.6)
|
80
|
+
language_server-protocol (3.17.0.3)
|
81
|
+
logger (1.6.1)
|
82
|
+
loofah (2.23.1)
|
83
|
+
crass (~> 1.0.2)
|
84
|
+
nokogiri (>= 1.12.0)
|
85
|
+
minitest (5.25.1)
|
86
|
+
mutex_m (0.2.0)
|
87
|
+
nokogiri (1.16.7-aarch64-linux)
|
88
|
+
racc (~> 1.4)
|
89
|
+
nokogiri (1.16.7-arm-linux)
|
90
|
+
racc (~> 1.4)
|
91
|
+
nokogiri (1.16.7-arm64-darwin)
|
92
|
+
racc (~> 1.4)
|
93
|
+
nokogiri (1.16.7-x86-linux)
|
94
|
+
racc (~> 1.4)
|
95
|
+
nokogiri (1.16.7-x86_64-darwin)
|
96
|
+
racc (~> 1.4)
|
97
|
+
nokogiri (1.16.7-x86_64-linux)
|
98
|
+
racc (~> 1.4)
|
99
|
+
parallel (1.26.3)
|
100
|
+
parser (3.3.5.1)
|
101
|
+
ast (~> 2.4.1)
|
102
|
+
racc
|
103
|
+
pg (1.5.9)
|
104
|
+
psych (5.1.2)
|
105
|
+
stringio
|
106
|
+
racc (1.8.1)
|
107
|
+
rack (3.1.8)
|
108
|
+
rack-session (2.0.0)
|
109
|
+
rack (>= 3.0.0)
|
110
|
+
rack-test (2.1.0)
|
111
|
+
rack (>= 1.3)
|
112
|
+
rackup (2.2.0)
|
113
|
+
rack (>= 3)
|
114
|
+
rails-dom-testing (2.2.0)
|
115
|
+
activesupport (>= 5.0.0)
|
116
|
+
minitest
|
117
|
+
nokogiri (>= 1.6)
|
118
|
+
rails-html-sanitizer (1.6.0)
|
119
|
+
loofah (~> 2.21)
|
120
|
+
nokogiri (~> 1.14)
|
121
|
+
railties (7.1.5)
|
122
|
+
actionpack (= 7.1.5)
|
123
|
+
activesupport (= 7.1.5)
|
124
|
+
irb
|
125
|
+
rackup (>= 1.0.0)
|
126
|
+
rake (>= 12.2)
|
127
|
+
thor (~> 1.0, >= 1.2.2)
|
128
|
+
zeitwerk (~> 2.6)
|
129
|
+
rainbow (3.1.1)
|
130
|
+
rake (13.2.1)
|
131
|
+
rdoc (6.7.0)
|
132
|
+
psych (>= 4.0.0)
|
133
|
+
regexp_parser (2.9.2)
|
134
|
+
reline (0.5.10)
|
135
|
+
io-console (~> 0.5)
|
136
|
+
rspec (3.13.0)
|
137
|
+
rspec-core (~> 3.13.0)
|
138
|
+
rspec-expectations (~> 3.13.0)
|
139
|
+
rspec-mocks (~> 3.13.0)
|
140
|
+
rspec-core (3.13.2)
|
141
|
+
rspec-support (~> 3.13.0)
|
142
|
+
rspec-expectations (3.13.3)
|
143
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
144
|
+
rspec-support (~> 3.13.0)
|
145
|
+
rspec-mocks (3.13.2)
|
146
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
147
|
+
rspec-support (~> 3.13.0)
|
148
|
+
rspec-rails (7.0.1)
|
149
|
+
actionpack (>= 7.0)
|
150
|
+
activesupport (>= 7.0)
|
151
|
+
railties (>= 7.0)
|
152
|
+
rspec-core (~> 3.13)
|
153
|
+
rspec-expectations (~> 3.13)
|
154
|
+
rspec-mocks (~> 3.13)
|
155
|
+
rspec-support (~> 3.13)
|
156
|
+
rspec-support (3.13.1)
|
157
|
+
rubocop (1.68.0)
|
158
|
+
json (~> 2.3)
|
159
|
+
language_server-protocol (>= 3.17.0)
|
160
|
+
parallel (~> 1.10)
|
161
|
+
parser (>= 3.3.0.2)
|
162
|
+
rainbow (>= 2.2.2, < 4.0)
|
163
|
+
regexp_parser (>= 2.4, < 3.0)
|
164
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
165
|
+
ruby-progressbar (~> 1.7)
|
166
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
167
|
+
rubocop-ast (1.34.0)
|
168
|
+
parser (>= 3.3.1.0)
|
169
|
+
rubocop-mhenrixon (3.0.0)
|
170
|
+
rubocop
|
171
|
+
rubocop-performance
|
172
|
+
rubocop-rake
|
173
|
+
rubocop-rspec
|
174
|
+
rubocop-thread_safety
|
175
|
+
rubocop-performance (1.22.1)
|
176
|
+
rubocop (>= 1.48.1, < 2.0)
|
177
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
178
|
+
rubocop-rake (0.6.0)
|
179
|
+
rubocop (~> 1.0)
|
180
|
+
rubocop-rspec (3.2.0)
|
181
|
+
rubocop (~> 1.61)
|
182
|
+
rubocop-thread_safety (0.5.1)
|
183
|
+
rubocop (>= 0.90.0)
|
184
|
+
ruby-progressbar (1.13.0)
|
185
|
+
securerandom (0.3.1)
|
186
|
+
stringio (3.1.1)
|
187
|
+
thor (1.3.2)
|
188
|
+
timeout (0.4.1)
|
189
|
+
tzinfo (2.0.6)
|
190
|
+
concurrent-ruby (~> 1.0)
|
191
|
+
unicode-display_width (2.6.0)
|
192
|
+
zeitwerk (2.6.18)
|
193
|
+
|
194
|
+
PLATFORMS
|
195
|
+
aarch64-linux
|
196
|
+
arm-linux
|
197
|
+
arm64-darwin
|
198
|
+
x86-linux
|
199
|
+
x86_64-darwin
|
200
|
+
x86_64-linux
|
201
|
+
|
202
|
+
DEPENDENCIES
|
203
|
+
activerecord (~> 7.1.0)
|
204
|
+
ammeter
|
205
|
+
appraisal
|
206
|
+
base64
|
207
|
+
bigdecimal
|
208
|
+
database_cleaner
|
209
|
+
drb
|
210
|
+
gem-release
|
211
|
+
logger
|
212
|
+
mutex_m
|
213
|
+
pg_aggregates!
|
214
|
+
railties (~> 7.1.0)
|
215
|
+
rake
|
216
|
+
rspec
|
217
|
+
rubocop-mhenrixon
|
218
|
+
rubocop-rake
|
219
|
+
rubocop-rspec
|
220
|
+
|
221
|
+
BUNDLED WITH
|
222
|
+
2.5.20
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "rails/generators"
|
2
4
|
require "rails/generators/active_record"
|
3
5
|
|
@@ -5,29 +7,29 @@ module Pg
|
|
5
7
|
module Generators
|
6
8
|
class AggregateGenerator < Rails::Generators::NamedBase
|
7
9
|
include Rails::Generators::Migration
|
8
|
-
|
10
|
+
|
9
11
|
source_root File.expand_path("templates", __dir__)
|
10
|
-
|
12
|
+
|
11
13
|
class_option :version,
|
12
|
-
|
13
|
-
|
14
|
-
|
14
|
+
type: :string,
|
15
|
+
default: "1",
|
16
|
+
desc: "Specify a version for the aggregate"
|
15
17
|
|
16
18
|
def create_aggregate_file
|
17
19
|
@version = options[:version]
|
18
20
|
@aggregate_name = file_name
|
19
|
-
|
21
|
+
|
20
22
|
template(
|
21
23
|
"aggregate.sql.erb",
|
22
24
|
"db/aggregates/#{file_name}_v#{@version}.sql"
|
23
25
|
)
|
24
26
|
end
|
25
|
-
|
27
|
+
|
26
28
|
def create_migration_file
|
27
29
|
@version = options[:version]
|
28
30
|
@aggregate_name = file_name
|
29
31
|
@migration_version = migration_version
|
30
|
-
|
32
|
+
|
31
33
|
migration_template(
|
32
34
|
"migration.rb.erb",
|
33
35
|
"db/migrate/create_aggregate_#{file_name}.rb"
|
@@ -45,4 +47,4 @@ module Pg
|
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
48
|
-
end
|
50
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module PgAggregates
|
2
4
|
module SchemaDumper
|
3
5
|
def tables(stream)
|
6
|
+
super
|
7
|
+
|
4
8
|
# First dump aggregates
|
5
9
|
dump_custom_aggregates(stream)
|
6
10
|
stream.puts
|
7
|
-
|
8
|
-
super
|
9
11
|
end
|
10
12
|
|
11
13
|
private
|
@@ -13,13 +15,17 @@ module PgAggregates
|
|
13
15
|
def dump_custom_aggregates(stream)
|
14
16
|
# Group all versions of each aggregate
|
15
17
|
aggregate_versions = {}
|
16
|
-
|
18
|
+
|
17
19
|
Dir.glob(Rails.root.join("db/aggregates/*_v*.sql").to_s).each do |file|
|
18
20
|
file_version = FileVersion.new(file)
|
19
21
|
aggregate_versions[file_version.name] ||= []
|
20
22
|
aggregate_versions[file_version.name] << file_version
|
21
23
|
end
|
22
24
|
|
25
|
+
return if aggregate_versions.empty?
|
26
|
+
|
27
|
+
stream.puts " # These are custom PostgreSQL aggregates that were defined"
|
28
|
+
|
23
29
|
# For each aggregate, use the latest version
|
24
30
|
latest_versions = aggregate_versions.transform_values do |versions|
|
25
31
|
versions.max_by(&:version)
|
@@ -28,11 +34,11 @@ module PgAggregates
|
|
28
34
|
# Sort by name to ensure consistent ordering
|
29
35
|
latest_versions.keys.sort.each do |aggregate_name|
|
30
36
|
file_version = latest_versions[aggregate_name]
|
31
|
-
|
37
|
+
|
32
38
|
# Add a comment showing the version history
|
33
39
|
all_versions = aggregate_versions[aggregate_name].map(&:version).sort
|
34
|
-
version_comment = all_versions.size > 1 ? " -- versions: #{all_versions.join(
|
35
|
-
|
40
|
+
version_comment = all_versions.size > 1 ? " -- versions: #{all_versions.join(", ")}" : ""
|
41
|
+
|
36
42
|
stream.puts <<-AGG
|
37
43
|
create_aggregate "#{aggregate_name}", sql_definition: <<-SQL#{version_comment}
|
38
44
|
#{file_version.sql_definition}
|
@@ -42,4 +48,4 @@ module PgAggregates
|
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|
45
|
-
end
|
51
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module PgAggregates
|
2
4
|
module SchemaStatements
|
3
5
|
def create_aggregate(name, version: nil, sql_definition: nil)
|
@@ -8,20 +10,20 @@ module PgAggregates
|
|
8
10
|
else
|
9
11
|
# Fallback to file-based definition if needed
|
10
12
|
aggregate_definition = PgAggregates::AggregateDefinition.new(name, version: version)
|
11
|
-
|
13
|
+
|
12
14
|
# Check if file exists before trying to read it
|
13
15
|
unless File.exist?(aggregate_definition.path)
|
14
16
|
raise ArgumentError, "Could not find aggregate definition file: #{aggregate_definition.path}"
|
15
17
|
end
|
16
|
-
|
18
|
+
|
17
19
|
execute aggregate_definition.to_sql
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
23
|
def drop_aggregate(name, *arg_types, force: false)
|
22
|
-
arg_types_sql = arg_types.any? ? "(#{arg_types.join(
|
24
|
+
arg_types_sql = arg_types.any? ? "(#{arg_types.join(", ")})" : ""
|
23
25
|
force_clause = force ? " CASCADE" : ""
|
24
26
|
execute "DROP AGGREGATE IF EXISTS #{name}#{arg_types_sql}#{force_clause}"
|
25
27
|
end
|
26
28
|
end
|
27
|
-
end
|
29
|
+
end
|
data/lib/pg_aggregates.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_aggregates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mhenrixon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '6.1'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: railties
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '6.1'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '6.1'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: pg
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,77 +39,21 @@ dependencies:
|
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '1.1'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '13.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '13.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.12'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.12'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: ammeter
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.1'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.1'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: database_cleaner-active_record
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: appraisal
|
42
|
+
name: railties
|
113
43
|
requirement: !ruby/object:Gem::Requirement
|
114
44
|
requirements:
|
115
45
|
- - ">="
|
116
46
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
118
|
-
type: :
|
47
|
+
version: '6.1'
|
48
|
+
type: :runtime
|
119
49
|
prerelease: false
|
120
50
|
version_requirements: !ruby/object:Gem::Requirement
|
121
51
|
requirements:
|
122
52
|
- - ">="
|
123
53
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
125
|
-
description: Manage PostgreSQL aggregate functions in your Rails application with
|
126
|
-
versioned migrations and schema handling.
|
54
|
+
version: '6.1'
|
55
|
+
description: "Manage PostgreSQL aggregate functions in your Rails application with
|
56
|
+
versioned migrations and schema handling. \n\nThis cuts the need for keeping a structure.sql\n"
|
127
57
|
email:
|
128
58
|
- mikael@mhenrixon.com
|
129
59
|
executables: []
|
@@ -131,9 +61,17 @@ extensions: []
|
|
131
61
|
extra_rdoc_files: []
|
132
62
|
files:
|
133
63
|
- ".rspec"
|
64
|
+
- ".ruby-version"
|
65
|
+
- Appraisals
|
134
66
|
- CHANGELOG.md
|
135
67
|
- LICENSE.txt
|
136
68
|
- README.md
|
69
|
+
- gemfiles/rails_6.1.gemfile
|
70
|
+
- gemfiles/rails_6.1.gemfile.lock
|
71
|
+
- gemfiles/rails_7.0.gemfile
|
72
|
+
- gemfiles/rails_7.0.gemfile.lock
|
73
|
+
- gemfiles/rails_7.1.gemfile
|
74
|
+
- gemfiles/rails_7.1.gemfile.lock
|
137
75
|
- lib/generators/pg/aggregate/aggregate_generator.rb
|
138
76
|
- lib/generators/pg/aggregate/templates/aggregate.sql.erb
|
139
77
|
- lib/generators/pg/aggregate/templates/migration.rb.erb
|
@@ -169,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
107
|
- !ruby/object:Gem::Version
|
170
108
|
version: '0'
|
171
109
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.2.33
|
173
111
|
signing_key:
|
174
112
|
specification_version: 4
|
175
113
|
summary: Rails integration for PostgreSQL aggregate functions
|