pg_objects 0.5.9 → 0.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +54 -55
- data/README.md +1 -1
- data/lib/pg_objects/parser.rb +8 -6
- data/lib/pg_objects/version.rb +1 -1
- data/pg_objects.gemspec +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cbcc1912798a11200339ee778c553eec549400db8d61b33b3b40fd32dcbd2cc
|
|
4
|
+
data.tar.gz: 581ad580549d647b2891f05b3c5d4a4b73867a0bbfcadd17037e28e99acba27c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c102a5fc0e7a1f96c38c26375877b5a22acea430a232dcd1d678371f691a24217d3d2b529a41ee4a082a680f31694d098d6b3947dad12f8cfd08b2b010ac8a44
|
|
7
|
+
data.tar.gz: 31c09b9e711d56dc290765b40d609c4f7037acb1b1c432d0c3315c48fd829b4e7c78c7780e94ab42c620b3842740cf1a14663f55bdc53c9d35d9d0a4b7de8eb4
|
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.11)
|
|
5
5
|
activerecord (>= 6.0.3.5, < 7)
|
|
6
6
|
pg_query (~> 1)
|
|
7
7
|
railties (>= 4, < 7)
|
|
@@ -10,25 +10,25 @@ 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.5)
|
|
14
|
+
actionview (= 6.1.5)
|
|
15
|
+
activesupport (= 6.1.5)
|
|
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.5)
|
|
21
|
+
activesupport (= 6.1.5)
|
|
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.5)
|
|
27
|
+
activesupport (= 6.1.5)
|
|
28
|
+
activerecord (6.1.5)
|
|
29
|
+
activemodel (= 6.1.5)
|
|
30
|
+
activesupport (= 6.1.5)
|
|
31
|
+
activesupport (6.1.5)
|
|
32
32
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
33
33
|
i18n (>= 1.6, < 2)
|
|
34
34
|
minitest (>= 5.1)
|
|
@@ -37,85 +37,84 @@ GEM
|
|
|
37
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.10)
|
|
41
41
|
crass (1.0.6)
|
|
42
|
-
diff-lcs (1.
|
|
42
|
+
diff-lcs (1.5.0)
|
|
43
43
|
erubi (1.10.0)
|
|
44
|
-
i18n (1.
|
|
44
|
+
i18n (1.10.0)
|
|
45
45
|
concurrent-ruby (~> 1.0)
|
|
46
|
-
loofah (2.
|
|
46
|
+
loofah (2.15.0)
|
|
47
47
|
crass (~> 1.0.2)
|
|
48
48
|
nokogiri (>= 1.5.9)
|
|
49
49
|
method_source (1.0.0)
|
|
50
|
-
mini_portile2 (2.
|
|
51
|
-
minitest (5.
|
|
52
|
-
nokogiri (1.
|
|
53
|
-
mini_portile2 (~> 2.
|
|
50
|
+
mini_portile2 (2.8.0)
|
|
51
|
+
minitest (5.15.0)
|
|
52
|
+
nokogiri (1.13.3)
|
|
53
|
+
mini_portile2 (~> 2.8.0)
|
|
54
54
|
racc (~> 1.4)
|
|
55
|
-
parallel (1.
|
|
56
|
-
parser (3.
|
|
55
|
+
parallel (1.22.0)
|
|
56
|
+
parser (3.1.1.0)
|
|
57
57
|
ast (~> 2.4.1)
|
|
58
58
|
pg_query (1.3.0)
|
|
59
|
-
racc (1.
|
|
59
|
+
racc (1.6.0)
|
|
60
60
|
rack (2.2.3)
|
|
61
61
|
rack-test (1.1.0)
|
|
62
62
|
rack (>= 1.0, < 3)
|
|
63
63
|
rails-dom-testing (2.0.3)
|
|
64
64
|
activesupport (>= 4.2.0)
|
|
65
65
|
nokogiri (>= 1.6)
|
|
66
|
-
rails-html-sanitizer (1.
|
|
66
|
+
rails-html-sanitizer (1.4.2)
|
|
67
67
|
loofah (~> 2.3)
|
|
68
|
-
railties (6.1.
|
|
69
|
-
actionpack (= 6.1.
|
|
70
|
-
activesupport (= 6.1.
|
|
68
|
+
railties (6.1.5)
|
|
69
|
+
actionpack (= 6.1.5)
|
|
70
|
+
activesupport (= 6.1.5)
|
|
71
71
|
method_source
|
|
72
|
-
rake (>=
|
|
72
|
+
rake (>= 12.2)
|
|
73
73
|
thor (~> 1.0)
|
|
74
|
-
rainbow (3.
|
|
75
|
-
rake (13.0.
|
|
74
|
+
rainbow (3.1.1)
|
|
75
|
+
rake (13.0.6)
|
|
76
76
|
rake-hooks (1.2.3)
|
|
77
77
|
rake
|
|
78
|
-
regexp_parser (2.
|
|
78
|
+
regexp_parser (2.2.1)
|
|
79
79
|
rexml (3.2.5)
|
|
80
|
-
rspec (3.
|
|
81
|
-
rspec-core (~> 3.
|
|
82
|
-
rspec-expectations (~> 3.
|
|
83
|
-
rspec-mocks (~> 3.
|
|
84
|
-
rspec-core (3.
|
|
85
|
-
rspec-support (~> 3.
|
|
86
|
-
rspec-expectations (3.
|
|
80
|
+
rspec (3.11.0)
|
|
81
|
+
rspec-core (~> 3.11.0)
|
|
82
|
+
rspec-expectations (~> 3.11.0)
|
|
83
|
+
rspec-mocks (~> 3.11.0)
|
|
84
|
+
rspec-core (3.11.0)
|
|
85
|
+
rspec-support (~> 3.11.0)
|
|
86
|
+
rspec-expectations (3.11.0)
|
|
87
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
88
|
-
rspec-support (~> 3.
|
|
89
|
-
rspec-mocks (3.
|
|
88
|
+
rspec-support (~> 3.11.0)
|
|
89
|
+
rspec-mocks (3.11.0)
|
|
90
90
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
91
|
-
rspec-support (~> 3.
|
|
92
|
-
rspec-support (3.
|
|
93
|
-
rubocop (1.
|
|
91
|
+
rspec-support (~> 3.11.0)
|
|
92
|
+
rspec-support (3.11.0)
|
|
93
|
+
rubocop (1.26.1)
|
|
94
94
|
parallel (~> 1.10)
|
|
95
|
-
parser (>= 3.
|
|
95
|
+
parser (>= 3.1.0.0)
|
|
96
96
|
rainbow (>= 2.2.2, < 4.0)
|
|
97
97
|
regexp_parser (>= 1.8, < 3.0)
|
|
98
98
|
rexml
|
|
99
|
-
rubocop-ast (>= 1.
|
|
99
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
|
100
100
|
ruby-progressbar (~> 1.7)
|
|
101
101
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
102
|
-
rubocop-ast (1.
|
|
103
|
-
parser (>= 3.
|
|
104
|
-
rubocop-rails (2.
|
|
102
|
+
rubocop-ast (1.16.0)
|
|
103
|
+
parser (>= 3.1.1.0)
|
|
104
|
+
rubocop-rails (2.14.2)
|
|
105
105
|
activesupport (>= 4.2.0)
|
|
106
106
|
rack (>= 1.1)
|
|
107
107
|
rubocop (>= 1.7.0, < 2.0)
|
|
108
|
-
rubocop-rake (0.
|
|
109
|
-
rubocop
|
|
110
|
-
rubocop-rspec (2.3.0)
|
|
108
|
+
rubocop-rake (0.6.0)
|
|
111
109
|
rubocop (~> 1.0)
|
|
112
|
-
|
|
110
|
+
rubocop-rspec (2.9.0)
|
|
111
|
+
rubocop (~> 1.19)
|
|
113
112
|
ruby-progressbar (1.11.0)
|
|
114
|
-
thor (1.1
|
|
113
|
+
thor (1.2.1)
|
|
115
114
|
tzinfo (2.0.4)
|
|
116
115
|
concurrent-ruby (~> 1.0)
|
|
117
|
-
unicode-display_width (2.
|
|
118
|
-
zeitwerk (2.4
|
|
116
|
+
unicode-display_width (2.1.0)
|
|
117
|
+
zeitwerk (2.5.4)
|
|
119
118
|
|
|
120
119
|
PLATFORMS
|
|
121
120
|
ruby
|
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/parser.rb
CHANGED
|
@@ -9,17 +9,19 @@ module PgObjects
|
|
|
9
9
|
# name_of_dependency: short or full name of object as well as object_name
|
|
10
10
|
#
|
|
11
11
|
class Parser
|
|
12
|
+
# rubocop: disable Style/WordArray
|
|
12
13
|
ROUTES = [
|
|
13
14
|
['DefineStmt', 'defnames', 0, 'String', 'str'],
|
|
14
15
|
['CreateFunctionStmt', 'funcname', 0, 'String', 'str'],
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
['CreateTrigStmt', 'trigname'],
|
|
17
|
+
['CreateEventTrigStmt', 'trigname'],
|
|
18
|
+
['CompositeTypeStmt', 'typevar', 'RangeVar', 'relname'],
|
|
19
|
+
['ViewStmt', 'view', 'RangeVar', 'relname'],
|
|
19
20
|
['CreateConversionStmt', 'conversion_name', 0, 'String', 'str'],
|
|
20
|
-
|
|
21
|
+
['CreateTableAsStmt', 'into', 'IntoClause', 'rel', 'RangeVar', 'relname'],
|
|
21
22
|
['CreateOpClassStmt', 'opclassname', 0, 'String', 'str']
|
|
22
23
|
].freeze
|
|
24
|
+
# rubocop: enable Style/WordArray
|
|
23
25
|
|
|
24
26
|
class << self
|
|
25
27
|
def fetch_directives(text)
|
|
@@ -38,7 +40,7 @@ module PgObjects
|
|
|
38
40
|
private
|
|
39
41
|
|
|
40
42
|
def fetch_dependencies(text)
|
|
41
|
-
text.split("\n").
|
|
43
|
+
text.split("\n").grep(/^(--|#)!/).map { |ln| ln.split[1] if ln =~ /!depends_on/ }.compact
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
end
|
data/lib/pg_objects/version.rb
CHANGED
data/pg_objects.gemspec
CHANGED
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
'bug_tracker_uri' => 'https://github.com/marinazzio/pg_objects/issues',
|
|
18
18
|
'documentation_uri' => 'https://github.com/marinazzio/pg_objects/blob/master/README.md',
|
|
19
19
|
'homepage_uri' => 'https://github.com/marinazzio/pg_objects',
|
|
20
|
+
'rubygems_mfa_required' => 'true',
|
|
20
21
|
'source_code_uri' => 'https://github.com/marinazzio/pg_objects'
|
|
21
22
|
}
|
|
22
23
|
|
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.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Kiselyov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -214,6 +214,7 @@ metadata:
|
|
|
214
214
|
bug_tracker_uri: https://github.com/marinazzio/pg_objects/issues
|
|
215
215
|
documentation_uri: https://github.com/marinazzio/pg_objects/blob/master/README.md
|
|
216
216
|
homepage_uri: https://github.com/marinazzio/pg_objects
|
|
217
|
+
rubygems_mfa_required: 'true'
|
|
217
218
|
source_code_uri: https://github.com/marinazzio/pg_objects
|
|
218
219
|
allowed_push_host: https://rubygems.org
|
|
219
220
|
post_install_message: |2+
|
|
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
235
236
|
- !ruby/object:Gem::Version
|
|
236
237
|
version: '0'
|
|
237
238
|
requirements: []
|
|
238
|
-
rubygems_version: 3.
|
|
239
|
+
rubygems_version: 3.1.6
|
|
239
240
|
signing_key:
|
|
240
241
|
specification_version: 4
|
|
241
242
|
summary: Simple manager for PostgreSQL objects like triggers and functions
|