pg_aggregates 0.1.0 → 0.1.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 +21 -0
- data/gemfiles/rails_6.1.gemfile.lock +174 -0
- data/gemfiles/rails_7.0.gemfile +21 -0
- data/gemfiles/rails_7.0.gemfile.lock +189 -0
- data/gemfiles/rails_7.1.gemfile +21 -0
- data/gemfiles/rails_7.1.gemfile.lock +220 -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 +11 -5
- 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 +16 -78
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dfdc0600d1533080703b0fd15ac61385df0e081cf30aa85a9813fc09680bfd7
|
4
|
+
data.tar.gz: 3c9999602a5635ecfd3d0c141a86b7fd67b6a47b15f2a6da80843940d4fece31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e872d45e8ab297e6a47d6d2a8282b932786208e8cb3f36cc684b2094df195b3d4d4091c46c38a00193722c597ec8f0270466b95002ece1d5b496cb88e528ab72
|
7
|
+
data.tar.gz: c2fcccd281d02a9d422bbeb87e852370e558b45adf97c02ac5fb7dab2203db0dd358739ffe50913e3a824288d916c52fe4f593ef7042721a19d536ef67f8054a
|
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,21 @@
|
|
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 "logger"
|
12
|
+
gem "mutex_m"
|
13
|
+
gem "rake"
|
14
|
+
gem "rspec"
|
15
|
+
gem "rubocop-mhenrixon"
|
16
|
+
gem "rubocop-rake"
|
17
|
+
gem "rubocop-rspec"
|
18
|
+
gem "activerecord", "~> 6.1.0"
|
19
|
+
gem "railties", "~> 6.1.0"
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,174 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.0)
|
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
|
+
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-arm64-darwin)
|
71
|
+
racc (~> 1.4)
|
72
|
+
parallel (1.26.3)
|
73
|
+
parser (3.3.5.1)
|
74
|
+
ast (~> 2.4.1)
|
75
|
+
racc
|
76
|
+
pg (1.5.9)
|
77
|
+
racc (1.8.1)
|
78
|
+
rack (2.2.10)
|
79
|
+
rack-test (2.1.0)
|
80
|
+
rack (>= 1.3)
|
81
|
+
rails-dom-testing (2.2.0)
|
82
|
+
activesupport (>= 5.0.0)
|
83
|
+
minitest
|
84
|
+
nokogiri (>= 1.6)
|
85
|
+
rails-html-sanitizer (1.6.0)
|
86
|
+
loofah (~> 2.21)
|
87
|
+
nokogiri (~> 1.14)
|
88
|
+
railties (6.1.7.10)
|
89
|
+
actionpack (= 6.1.7.10)
|
90
|
+
activesupport (= 6.1.7.10)
|
91
|
+
method_source
|
92
|
+
rake (>= 12.2)
|
93
|
+
thor (~> 1.0)
|
94
|
+
rainbow (3.1.1)
|
95
|
+
rake (13.2.1)
|
96
|
+
regexp_parser (2.9.2)
|
97
|
+
rspec (3.13.0)
|
98
|
+
rspec-core (~> 3.13.0)
|
99
|
+
rspec-expectations (~> 3.13.0)
|
100
|
+
rspec-mocks (~> 3.13.0)
|
101
|
+
rspec-core (3.13.2)
|
102
|
+
rspec-support (~> 3.13.0)
|
103
|
+
rspec-expectations (3.13.3)
|
104
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
105
|
+
rspec-support (~> 3.13.0)
|
106
|
+
rspec-mocks (3.13.2)
|
107
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
108
|
+
rspec-support (~> 3.13.0)
|
109
|
+
rspec-rails (6.1.5)
|
110
|
+
actionpack (>= 6.1)
|
111
|
+
activesupport (>= 6.1)
|
112
|
+
railties (>= 6.1)
|
113
|
+
rspec-core (~> 3.13)
|
114
|
+
rspec-expectations (~> 3.13)
|
115
|
+
rspec-mocks (~> 3.13)
|
116
|
+
rspec-support (~> 3.13)
|
117
|
+
rspec-support (3.13.1)
|
118
|
+
rubocop (1.68.0)
|
119
|
+
json (~> 2.3)
|
120
|
+
language_server-protocol (>= 3.17.0)
|
121
|
+
parallel (~> 1.10)
|
122
|
+
parser (>= 3.3.0.2)
|
123
|
+
rainbow (>= 2.2.2, < 4.0)
|
124
|
+
regexp_parser (>= 2.4, < 3.0)
|
125
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
126
|
+
ruby-progressbar (~> 1.7)
|
127
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
128
|
+
rubocop-ast (1.34.0)
|
129
|
+
parser (>= 3.3.1.0)
|
130
|
+
rubocop-mhenrixon (3.0.0)
|
131
|
+
rubocop
|
132
|
+
rubocop-performance
|
133
|
+
rubocop-rake
|
134
|
+
rubocop-rspec
|
135
|
+
rubocop-thread_safety
|
136
|
+
rubocop-performance (1.22.1)
|
137
|
+
rubocop (>= 1.48.1, < 2.0)
|
138
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
139
|
+
rubocop-rake (0.6.0)
|
140
|
+
rubocop (~> 1.0)
|
141
|
+
rubocop-rspec (3.2.0)
|
142
|
+
rubocop (~> 1.61)
|
143
|
+
rubocop-thread_safety (0.5.1)
|
144
|
+
rubocop (>= 0.90.0)
|
145
|
+
ruby-progressbar (1.13.0)
|
146
|
+
thor (1.3.2)
|
147
|
+
tzinfo (2.0.6)
|
148
|
+
concurrent-ruby (~> 1.0)
|
149
|
+
unicode-display_width (2.6.0)
|
150
|
+
zeitwerk (2.6.18)
|
151
|
+
|
152
|
+
PLATFORMS
|
153
|
+
arm64-darwin
|
154
|
+
|
155
|
+
DEPENDENCIES
|
156
|
+
activerecord (~> 6.1.0)
|
157
|
+
ammeter
|
158
|
+
appraisal
|
159
|
+
base64
|
160
|
+
bigdecimal
|
161
|
+
database_cleaner
|
162
|
+
drb
|
163
|
+
logger
|
164
|
+
mutex_m
|
165
|
+
pg_aggregates!
|
166
|
+
railties (~> 6.1.0)
|
167
|
+
rake
|
168
|
+
rspec
|
169
|
+
rubocop-mhenrixon
|
170
|
+
rubocop-rake
|
171
|
+
rubocop-rspec
|
172
|
+
|
173
|
+
BUNDLED WITH
|
174
|
+
2.5.20
|
@@ -0,0 +1,21 @@
|
|
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 "logger"
|
12
|
+
gem "mutex_m"
|
13
|
+
gem "rake"
|
14
|
+
gem "rspec"
|
15
|
+
gem "rubocop-mhenrixon"
|
16
|
+
gem "rubocop-rake"
|
17
|
+
gem "rubocop-rspec"
|
18
|
+
gem "activerecord", "~> 7.0.0"
|
19
|
+
gem "railties", "~> 7.0.0"
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,189 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.0)
|
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
|
+
i18n (1.14.6)
|
59
|
+
concurrent-ruby (~> 1.0)
|
60
|
+
json (2.7.6)
|
61
|
+
language_server-protocol (3.17.0.3)
|
62
|
+
logger (1.6.1)
|
63
|
+
loofah (2.23.1)
|
64
|
+
crass (~> 1.0.2)
|
65
|
+
nokogiri (>= 1.12.0)
|
66
|
+
method_source (1.1.0)
|
67
|
+
minitest (5.25.1)
|
68
|
+
mutex_m (0.2.0)
|
69
|
+
nokogiri (1.16.7-aarch64-linux)
|
70
|
+
racc (~> 1.4)
|
71
|
+
nokogiri (1.16.7-arm-linux)
|
72
|
+
racc (~> 1.4)
|
73
|
+
nokogiri (1.16.7-arm64-darwin)
|
74
|
+
racc (~> 1.4)
|
75
|
+
nokogiri (1.16.7-x86-linux)
|
76
|
+
racc (~> 1.4)
|
77
|
+
nokogiri (1.16.7-x86_64-darwin)
|
78
|
+
racc (~> 1.4)
|
79
|
+
nokogiri (1.16.7-x86_64-linux)
|
80
|
+
racc (~> 1.4)
|
81
|
+
parallel (1.26.3)
|
82
|
+
parser (3.3.5.1)
|
83
|
+
ast (~> 2.4.1)
|
84
|
+
racc
|
85
|
+
pg (1.5.9)
|
86
|
+
racc (1.8.1)
|
87
|
+
rack (2.2.10)
|
88
|
+
rack-test (2.1.0)
|
89
|
+
rack (>= 1.3)
|
90
|
+
rails-dom-testing (2.2.0)
|
91
|
+
activesupport (>= 5.0.0)
|
92
|
+
minitest
|
93
|
+
nokogiri (>= 1.6)
|
94
|
+
rails-html-sanitizer (1.6.0)
|
95
|
+
loofah (~> 2.21)
|
96
|
+
nokogiri (~> 1.14)
|
97
|
+
railties (7.0.8.6)
|
98
|
+
actionpack (= 7.0.8.6)
|
99
|
+
activesupport (= 7.0.8.6)
|
100
|
+
method_source
|
101
|
+
rake (>= 12.2)
|
102
|
+
thor (~> 1.0)
|
103
|
+
zeitwerk (~> 2.5)
|
104
|
+
rainbow (3.1.1)
|
105
|
+
rake (13.2.1)
|
106
|
+
regexp_parser (2.9.2)
|
107
|
+
rspec (3.13.0)
|
108
|
+
rspec-core (~> 3.13.0)
|
109
|
+
rspec-expectations (~> 3.13.0)
|
110
|
+
rspec-mocks (~> 3.13.0)
|
111
|
+
rspec-core (3.13.2)
|
112
|
+
rspec-support (~> 3.13.0)
|
113
|
+
rspec-expectations (3.13.3)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.13.0)
|
116
|
+
rspec-mocks (3.13.2)
|
117
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
+
rspec-support (~> 3.13.0)
|
119
|
+
rspec-rails (7.0.1)
|
120
|
+
actionpack (>= 7.0)
|
121
|
+
activesupport (>= 7.0)
|
122
|
+
railties (>= 7.0)
|
123
|
+
rspec-core (~> 3.13)
|
124
|
+
rspec-expectations (~> 3.13)
|
125
|
+
rspec-mocks (~> 3.13)
|
126
|
+
rspec-support (~> 3.13)
|
127
|
+
rspec-support (3.13.1)
|
128
|
+
rubocop (1.68.0)
|
129
|
+
json (~> 2.3)
|
130
|
+
language_server-protocol (>= 3.17.0)
|
131
|
+
parallel (~> 1.10)
|
132
|
+
parser (>= 3.3.0.2)
|
133
|
+
rainbow (>= 2.2.2, < 4.0)
|
134
|
+
regexp_parser (>= 2.4, < 3.0)
|
135
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
136
|
+
ruby-progressbar (~> 1.7)
|
137
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
138
|
+
rubocop-ast (1.34.0)
|
139
|
+
parser (>= 3.3.1.0)
|
140
|
+
rubocop-mhenrixon (3.0.0)
|
141
|
+
rubocop
|
142
|
+
rubocop-performance
|
143
|
+
rubocop-rake
|
144
|
+
rubocop-rspec
|
145
|
+
rubocop-thread_safety
|
146
|
+
rubocop-performance (1.22.1)
|
147
|
+
rubocop (>= 1.48.1, < 2.0)
|
148
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
149
|
+
rubocop-rake (0.6.0)
|
150
|
+
rubocop (~> 1.0)
|
151
|
+
rubocop-rspec (3.2.0)
|
152
|
+
rubocop (~> 1.61)
|
153
|
+
rubocop-thread_safety (0.5.1)
|
154
|
+
rubocop (>= 0.90.0)
|
155
|
+
ruby-progressbar (1.13.0)
|
156
|
+
thor (1.3.2)
|
157
|
+
tzinfo (2.0.6)
|
158
|
+
concurrent-ruby (~> 1.0)
|
159
|
+
unicode-display_width (2.6.0)
|
160
|
+
zeitwerk (2.6.18)
|
161
|
+
|
162
|
+
PLATFORMS
|
163
|
+
aarch64-linux
|
164
|
+
arm-linux
|
165
|
+
arm64-darwin
|
166
|
+
x86-linux
|
167
|
+
x86_64-darwin
|
168
|
+
x86_64-linux
|
169
|
+
|
170
|
+
DEPENDENCIES
|
171
|
+
activerecord (~> 7.0.0)
|
172
|
+
ammeter
|
173
|
+
appraisal
|
174
|
+
base64
|
175
|
+
bigdecimal
|
176
|
+
database_cleaner
|
177
|
+
drb
|
178
|
+
logger
|
179
|
+
mutex_m
|
180
|
+
pg_aggregates!
|
181
|
+
railties (~> 7.0.0)
|
182
|
+
rake
|
183
|
+
rspec
|
184
|
+
rubocop-mhenrixon
|
185
|
+
rubocop-rake
|
186
|
+
rubocop-rspec
|
187
|
+
|
188
|
+
BUNDLED WITH
|
189
|
+
2.5.20
|
@@ -0,0 +1,21 @@
|
|
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 "logger"
|
12
|
+
gem "mutex_m"
|
13
|
+
gem "rake"
|
14
|
+
gem "rspec"
|
15
|
+
gem "rubocop-mhenrixon"
|
16
|
+
gem "rubocop-rake"
|
17
|
+
gem "rubocop-rspec"
|
18
|
+
gem "activerecord", "~> 7.1.0"
|
19
|
+
gem "railties", "~> 7.1.0"
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,220 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
pg_aggregates (0.1.0)
|
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
|
+
i18n (1.14.6)
|
73
|
+
concurrent-ruby (~> 1.0)
|
74
|
+
io-console (0.7.2)
|
75
|
+
irb (1.14.1)
|
76
|
+
rdoc (>= 4.0.0)
|
77
|
+
reline (>= 0.4.2)
|
78
|
+
json (2.7.6)
|
79
|
+
language_server-protocol (3.17.0.3)
|
80
|
+
logger (1.6.1)
|
81
|
+
loofah (2.23.1)
|
82
|
+
crass (~> 1.0.2)
|
83
|
+
nokogiri (>= 1.12.0)
|
84
|
+
minitest (5.25.1)
|
85
|
+
mutex_m (0.2.0)
|
86
|
+
nokogiri (1.16.7-aarch64-linux)
|
87
|
+
racc (~> 1.4)
|
88
|
+
nokogiri (1.16.7-arm-linux)
|
89
|
+
racc (~> 1.4)
|
90
|
+
nokogiri (1.16.7-arm64-darwin)
|
91
|
+
racc (~> 1.4)
|
92
|
+
nokogiri (1.16.7-x86-linux)
|
93
|
+
racc (~> 1.4)
|
94
|
+
nokogiri (1.16.7-x86_64-darwin)
|
95
|
+
racc (~> 1.4)
|
96
|
+
nokogiri (1.16.7-x86_64-linux)
|
97
|
+
racc (~> 1.4)
|
98
|
+
parallel (1.26.3)
|
99
|
+
parser (3.3.5.1)
|
100
|
+
ast (~> 2.4.1)
|
101
|
+
racc
|
102
|
+
pg (1.5.9)
|
103
|
+
psych (5.1.2)
|
104
|
+
stringio
|
105
|
+
racc (1.8.1)
|
106
|
+
rack (3.1.8)
|
107
|
+
rack-session (2.0.0)
|
108
|
+
rack (>= 3.0.0)
|
109
|
+
rack-test (2.1.0)
|
110
|
+
rack (>= 1.3)
|
111
|
+
rackup (2.2.0)
|
112
|
+
rack (>= 3)
|
113
|
+
rails-dom-testing (2.2.0)
|
114
|
+
activesupport (>= 5.0.0)
|
115
|
+
minitest
|
116
|
+
nokogiri (>= 1.6)
|
117
|
+
rails-html-sanitizer (1.6.0)
|
118
|
+
loofah (~> 2.21)
|
119
|
+
nokogiri (~> 1.14)
|
120
|
+
railties (7.1.5)
|
121
|
+
actionpack (= 7.1.5)
|
122
|
+
activesupport (= 7.1.5)
|
123
|
+
irb
|
124
|
+
rackup (>= 1.0.0)
|
125
|
+
rake (>= 12.2)
|
126
|
+
thor (~> 1.0, >= 1.2.2)
|
127
|
+
zeitwerk (~> 2.6)
|
128
|
+
rainbow (3.1.1)
|
129
|
+
rake (13.2.1)
|
130
|
+
rdoc (6.7.0)
|
131
|
+
psych (>= 4.0.0)
|
132
|
+
regexp_parser (2.9.2)
|
133
|
+
reline (0.5.10)
|
134
|
+
io-console (~> 0.5)
|
135
|
+
rspec (3.13.0)
|
136
|
+
rspec-core (~> 3.13.0)
|
137
|
+
rspec-expectations (~> 3.13.0)
|
138
|
+
rspec-mocks (~> 3.13.0)
|
139
|
+
rspec-core (3.13.2)
|
140
|
+
rspec-support (~> 3.13.0)
|
141
|
+
rspec-expectations (3.13.3)
|
142
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
143
|
+
rspec-support (~> 3.13.0)
|
144
|
+
rspec-mocks (3.13.2)
|
145
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
146
|
+
rspec-support (~> 3.13.0)
|
147
|
+
rspec-rails (7.0.1)
|
148
|
+
actionpack (>= 7.0)
|
149
|
+
activesupport (>= 7.0)
|
150
|
+
railties (>= 7.0)
|
151
|
+
rspec-core (~> 3.13)
|
152
|
+
rspec-expectations (~> 3.13)
|
153
|
+
rspec-mocks (~> 3.13)
|
154
|
+
rspec-support (~> 3.13)
|
155
|
+
rspec-support (3.13.1)
|
156
|
+
rubocop (1.68.0)
|
157
|
+
json (~> 2.3)
|
158
|
+
language_server-protocol (>= 3.17.0)
|
159
|
+
parallel (~> 1.10)
|
160
|
+
parser (>= 3.3.0.2)
|
161
|
+
rainbow (>= 2.2.2, < 4.0)
|
162
|
+
regexp_parser (>= 2.4, < 3.0)
|
163
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
164
|
+
ruby-progressbar (~> 1.7)
|
165
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
166
|
+
rubocop-ast (1.34.0)
|
167
|
+
parser (>= 3.3.1.0)
|
168
|
+
rubocop-mhenrixon (3.0.0)
|
169
|
+
rubocop
|
170
|
+
rubocop-performance
|
171
|
+
rubocop-rake
|
172
|
+
rubocop-rspec
|
173
|
+
rubocop-thread_safety
|
174
|
+
rubocop-performance (1.22.1)
|
175
|
+
rubocop (>= 1.48.1, < 2.0)
|
176
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
177
|
+
rubocop-rake (0.6.0)
|
178
|
+
rubocop (~> 1.0)
|
179
|
+
rubocop-rspec (3.2.0)
|
180
|
+
rubocop (~> 1.61)
|
181
|
+
rubocop-thread_safety (0.5.1)
|
182
|
+
rubocop (>= 0.90.0)
|
183
|
+
ruby-progressbar (1.13.0)
|
184
|
+
securerandom (0.3.1)
|
185
|
+
stringio (3.1.1)
|
186
|
+
thor (1.3.2)
|
187
|
+
timeout (0.4.1)
|
188
|
+
tzinfo (2.0.6)
|
189
|
+
concurrent-ruby (~> 1.0)
|
190
|
+
unicode-display_width (2.6.0)
|
191
|
+
zeitwerk (2.6.18)
|
192
|
+
|
193
|
+
PLATFORMS
|
194
|
+
aarch64-linux
|
195
|
+
arm-linux
|
196
|
+
arm64-darwin
|
197
|
+
x86-linux
|
198
|
+
x86_64-darwin
|
199
|
+
x86_64-linux
|
200
|
+
|
201
|
+
DEPENDENCIES
|
202
|
+
activerecord (~> 7.1.0)
|
203
|
+
ammeter
|
204
|
+
appraisal
|
205
|
+
base64
|
206
|
+
bigdecimal
|
207
|
+
database_cleaner
|
208
|
+
drb
|
209
|
+
logger
|
210
|
+
mutex_m
|
211
|
+
pg_aggregates!
|
212
|
+
railties (~> 7.1.0)
|
213
|
+
rake
|
214
|
+
rspec
|
215
|
+
rubocop-mhenrixon
|
216
|
+
rubocop-rake
|
217
|
+
rubocop-rspec
|
218
|
+
|
219
|
+
BUNDLED WITH
|
220
|
+
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,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module PgAggregates
|
2
4
|
module SchemaDumper
|
3
5
|
def tables(stream)
|
@@ -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,7 +1,7 @@
|
|
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.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mhenrixon
|
@@ -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
|