pg_objects 0.5.6 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -7
- data/.travis.yml +4 -3
- data/Gemfile.lock +59 -48
- data/README.md +1 -1
- data/lib/pg_objects/logger.rb +2 -2
- data/lib/pg_objects/manager.rb +1 -1
- data/lib/pg_objects/parser.rb +1 -1
- data/lib/pg_objects/version.rb +1 -1
- data/pg_objects.gemspec +2 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a197f34cda82ae96bec65d995a31318415dfa7cef33151c504bb2a96c26891
|
4
|
+
data.tar.gz: f7ca8ffc563afcf354a09f25fbb2a54829894241fb8b659b2b8827fd2e840fe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64191bb1a96723bbb5597e9c17c8bcbbf1fe2308f4dce4ecc3c2701a10b4457aec0262cd80f9dee7a1218258c85e294cd47f9e957dfd2000964b7e9e18d0c8f
|
7
|
+
data.tar.gz: 0dfdede09c0e89f760e3011e6284bc86257c7f0615a8cc318b949ea98065ef1941263181e24d3824955619e54933dd7c2274bb9a99266e103b59a0aa20d8e741
|
data/.rubocop.yml
CHANGED
@@ -17,6 +17,8 @@ AllCops:
|
|
17
17
|
# -S/--display-style-guide option.
|
18
18
|
DisplayStyleGuide: false
|
19
19
|
|
20
|
+
NewCops: enable
|
21
|
+
|
20
22
|
# Gems in consecutive lines should be alphabetically sorted
|
21
23
|
Bundler/OrderedGems:
|
22
24
|
TreatCommentsAsGroupSeparators: true
|
@@ -137,13 +139,6 @@ Lint/ShadowingOuterLocalVariable:
|
|
137
139
|
Lint/StructNewOverride:
|
138
140
|
Enabled: true
|
139
141
|
|
140
|
-
|
141
|
-
# Rails #######################################################################
|
142
|
-
|
143
|
-
# Enables Rails cops.
|
144
|
-
Rails:
|
145
|
-
Enabled: false
|
146
|
-
|
147
142
|
# RSpec #######################################################################
|
148
143
|
|
149
144
|
# Checks for long example.
|
@@ -179,6 +174,9 @@ RSpec/ImplicitSubject:
|
|
179
174
|
RSpec/LeadingSubject:
|
180
175
|
Enabled: false
|
181
176
|
|
177
|
+
RSpec/MultipleMemoizedHelpers:
|
178
|
+
Enabled: false
|
179
|
+
|
182
180
|
# Checks for explicitly referenced test subjects.
|
183
181
|
RSpec/NamedSubject:
|
184
182
|
Enabled: false
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pg_objects (0.5.
|
4
|
+
pg_objects (0.5.10)
|
5
5
|
activerecord (>= 6.0.3.5, < 7)
|
6
6
|
pg_query (~> 1)
|
7
7
|
railties (>= 4, < 7)
|
@@ -10,48 +10,50 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionpack (6.1.
|
14
|
-
actionview (= 6.1.
|
15
|
-
activesupport (= 6.1.
|
13
|
+
actionpack (6.1.4.1)
|
14
|
+
actionview (= 6.1.4.1)
|
15
|
+
activesupport (= 6.1.4.1)
|
16
16
|
rack (~> 2.0, >= 2.0.9)
|
17
17
|
rack-test (>= 0.6.3)
|
18
18
|
rails-dom-testing (~> 2.0)
|
19
19
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
20
|
-
actionview (6.1.
|
21
|
-
activesupport (= 6.1.
|
20
|
+
actionview (6.1.4.1)
|
21
|
+
activesupport (= 6.1.4.1)
|
22
22
|
builder (~> 3.1)
|
23
23
|
erubi (~> 1.4)
|
24
24
|
rails-dom-testing (~> 2.0)
|
25
25
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
26
|
-
activemodel (6.1.
|
27
|
-
activesupport (= 6.1.
|
28
|
-
activerecord (6.1.
|
29
|
-
activemodel (= 6.1.
|
30
|
-
activesupport (= 6.1.
|
31
|
-
activesupport (6.1.
|
26
|
+
activemodel (6.1.4.1)
|
27
|
+
activesupport (= 6.1.4.1)
|
28
|
+
activerecord (6.1.4.1)
|
29
|
+
activemodel (= 6.1.4.1)
|
30
|
+
activesupport (= 6.1.4.1)
|
31
|
+
activesupport (6.1.4.1)
|
32
32
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
33
33
|
i18n (>= 1.6, < 2)
|
34
34
|
minitest (>= 5.1)
|
35
35
|
tzinfo (~> 2.0)
|
36
36
|
zeitwerk (~> 2.3)
|
37
|
-
ast (2.4.
|
37
|
+
ast (2.4.2)
|
38
38
|
builder (3.2.4)
|
39
39
|
byebug (11.1.3)
|
40
|
-
concurrent-ruby (1.1.
|
40
|
+
concurrent-ruby (1.1.9)
|
41
41
|
crass (1.0.6)
|
42
42
|
diff-lcs (1.4.4)
|
43
43
|
erubi (1.10.0)
|
44
44
|
i18n (1.8.10)
|
45
45
|
concurrent-ruby (~> 1.0)
|
46
|
-
loofah (2.
|
46
|
+
loofah (2.12.0)
|
47
47
|
crass (~> 1.0.2)
|
48
48
|
nokogiri (>= 1.5.9)
|
49
49
|
method_source (1.0.0)
|
50
|
+
mini_portile2 (2.6.1)
|
50
51
|
minitest (5.14.4)
|
51
|
-
nokogiri (1.
|
52
|
+
nokogiri (1.12.3)
|
53
|
+
mini_portile2 (~> 2.6.1)
|
52
54
|
racc (~> 1.4)
|
53
|
-
parallel (1.
|
54
|
-
parser (
|
55
|
+
parallel (1.20.1)
|
56
|
+
parser (3.0.2.0)
|
55
57
|
ast (~> 2.4.1)
|
56
58
|
pg_query (1.3.0)
|
57
59
|
racc (1.5.2)
|
@@ -61,51 +63,58 @@ GEM
|
|
61
63
|
rails-dom-testing (2.0.3)
|
62
64
|
activesupport (>= 4.2.0)
|
63
65
|
nokogiri (>= 1.6)
|
64
|
-
rails-html-sanitizer (1.
|
66
|
+
rails-html-sanitizer (1.4.2)
|
65
67
|
loofah (~> 2.3)
|
66
|
-
railties (6.1.
|
67
|
-
actionpack (= 6.1.
|
68
|
-
activesupport (= 6.1.
|
68
|
+
railties (6.1.4.1)
|
69
|
+
actionpack (= 6.1.4.1)
|
70
|
+
activesupport (= 6.1.4.1)
|
69
71
|
method_source
|
70
|
-
rake (>= 0.
|
72
|
+
rake (>= 0.13)
|
71
73
|
thor (~> 1.0)
|
72
74
|
rainbow (3.0.0)
|
73
|
-
rake (13.0.
|
75
|
+
rake (13.0.6)
|
74
76
|
rake-hooks (1.2.3)
|
75
77
|
rake
|
76
|
-
regexp_parser (1.
|
77
|
-
rexml (3.2.
|
78
|
-
rspec (3.
|
79
|
-
rspec-core (~> 3.
|
80
|
-
rspec-expectations (~> 3.
|
81
|
-
rspec-mocks (~> 3.
|
82
|
-
rspec-core (3.
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-expectations (3.
|
78
|
+
regexp_parser (2.1.1)
|
79
|
+
rexml (3.2.5)
|
80
|
+
rspec (3.10.0)
|
81
|
+
rspec-core (~> 3.10.0)
|
82
|
+
rspec-expectations (~> 3.10.0)
|
83
|
+
rspec-mocks (~> 3.10.0)
|
84
|
+
rspec-core (3.10.1)
|
85
|
+
rspec-support (~> 3.10.0)
|
86
|
+
rspec-expectations (3.10.1)
|
85
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
86
|
-
rspec-support (~> 3.
|
87
|
-
rspec-mocks (3.
|
88
|
+
rspec-support (~> 3.10.0)
|
89
|
+
rspec-mocks (3.10.2)
|
88
90
|
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
-
rspec-support (~> 3.
|
90
|
-
rspec-support (3.
|
91
|
-
rubocop (
|
91
|
+
rspec-support (~> 3.10.0)
|
92
|
+
rspec-support (3.10.2)
|
93
|
+
rubocop (1.20.0)
|
92
94
|
parallel (~> 1.10)
|
93
|
-
parser (>=
|
95
|
+
parser (>= 3.0.0.0)
|
94
96
|
rainbow (>= 2.2.2, < 4.0)
|
95
|
-
regexp_parser (>= 1.
|
97
|
+
regexp_parser (>= 1.8, < 3.0)
|
96
98
|
rexml
|
97
|
-
rubocop-ast (>=
|
99
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
98
100
|
ruby-progressbar (~> 1.7)
|
99
|
-
unicode-display_width (>= 1.4.0, <
|
100
|
-
rubocop-ast (
|
101
|
-
parser (>=
|
102
|
-
rubocop-
|
103
|
-
|
104
|
-
|
101
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
102
|
+
rubocop-ast (1.11.0)
|
103
|
+
parser (>= 3.0.1.1)
|
104
|
+
rubocop-rails (2.11.3)
|
105
|
+
activesupport (>= 4.2.0)
|
106
|
+
rack (>= 1.1)
|
107
|
+
rubocop (>= 1.7.0, < 2.0)
|
108
|
+
rubocop-rake (0.6.0)
|
109
|
+
rubocop (~> 1.0)
|
110
|
+
rubocop-rspec (2.4.0)
|
111
|
+
rubocop (~> 1.0)
|
112
|
+
rubocop-ast (>= 1.1.0)
|
113
|
+
ruby-progressbar (1.11.0)
|
105
114
|
thor (1.1.0)
|
106
115
|
tzinfo (2.0.4)
|
107
116
|
concurrent-ruby (~> 1.0)
|
108
|
-
unicode-display_width (
|
117
|
+
unicode-display_width (2.0.0)
|
109
118
|
zeitwerk (2.4.2)
|
110
119
|
|
111
120
|
PLATFORMS
|
@@ -118,6 +127,8 @@ DEPENDENCIES
|
|
118
127
|
rake
|
119
128
|
rspec
|
120
129
|
rubocop
|
130
|
+
rubocop-rails
|
131
|
+
rubocop-rake
|
121
132
|
rubocop-rspec
|
122
133
|
|
123
134
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ Or install it yourself as:
|
|
28
28
|
|
29
29
|
Put DB objects as CREATE (or CREATE OR UPDATE) queries in files to directory structure (default: *db/objects*).
|
30
30
|
|
31
|
-
You can control order of creating by using directive depends_on in SQL comment:
|
31
|
+
You can control order of creating by using directive *depends_on* in SQL comment:
|
32
32
|
|
33
33
|
```sql
|
34
34
|
--!depends_on my_another_func
|
data/lib/pg_objects/logger.rb
CHANGED
@@ -2,11 +2,11 @@ module PgObjects
|
|
2
2
|
##
|
3
3
|
# Console output
|
4
4
|
#
|
5
|
-
# Pass +true+ to constructor to suppress output
|
5
|
+
# Pass +silent: true+ to constructor to suppress output
|
6
6
|
class Logger
|
7
7
|
attr_reader :silent
|
8
8
|
|
9
|
-
def initialize(silent
|
9
|
+
def initialize(silent: false)
|
10
10
|
@silent = silent
|
11
11
|
end
|
12
12
|
|
data/lib/pg_objects/manager.rb
CHANGED
data/lib/pg_objects/parser.rb
CHANGED
@@ -38,7 +38,7 @@ module PgObjects
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def fetch_dependencies(text)
|
41
|
-
text.split("\n").select { |ln| ln =~ /^(--|#)!/ }.map { |ln| ln.split
|
41
|
+
text.split("\n").select { |ln| ln =~ /^(--|#)!/ }.map { |ln| ln.split[1] if ln =~ /!depends_on/ }.compact
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
data/lib/pg_objects/version.rb
CHANGED
data/pg_objects.gemspec
CHANGED
@@ -53,5 +53,7 @@ Gem::Specification.new do |spec|
|
|
53
53
|
spec.add_development_dependency 'rake'
|
54
54
|
spec.add_development_dependency 'rspec'
|
55
55
|
spec.add_development_dependency 'rubocop'
|
56
|
+
spec.add_development_dependency 'rubocop-rails'
|
57
|
+
spec.add_development_dependency 'rubocop-rake'
|
56
58
|
spec.add_development_dependency 'rubocop-rspec'
|
57
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Kiselyov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -134,6 +134,34 @@ dependencies:
|
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: rubocop-rails
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-rake
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
137
165
|
- !ruby/object:Gem::Dependency
|
138
166
|
name: rubocop-rspec
|
139
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
235
|
- !ruby/object:Gem::Version
|
208
236
|
version: '0'
|
209
237
|
requirements: []
|
210
|
-
rubygems_version: 3.
|
238
|
+
rubygems_version: 3.1.4
|
211
239
|
signing_key:
|
212
240
|
specification_version: 4
|
213
241
|
summary: Simple manager for PostgreSQL objects like triggers and functions
|