pg_objects 0.5.6 → 0.5.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 207ffe16455e3c56bebf907e272a25000440ce7b4531d3972c45eac6752f1c2d
4
- data.tar.gz: 9847d39a8efa3ca6ad2b695924baba0d2e8aabf8bb793e9c58abf3de20e8ca39
3
+ metadata.gz: 51a197f34cda82ae96bec65d995a31318415dfa7cef33151c504bb2a96c26891
4
+ data.tar.gz: f7ca8ffc563afcf354a09f25fbb2a54829894241fb8b659b2b8827fd2e840fe6
5
5
  SHA512:
6
- metadata.gz: cfd06e439204148770703b46ceb944b7a8bf63c047d627a019ed2069b8a1d28f42afb3ead811f55660119d19c047f81144efa237b5bd61636e2a060cdefd3c5a
7
- data.tar.gz: c7cf2381ed8b2dc2008411af36f08cbf249c002584b1b5231667126932749997ae8d611be3d523e5bc1c94d606f48ba23b4c9d170e3470c51890372eba06bef6
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
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.8
4
- - 2.6.6
5
- - 2.7.1
3
+ - 2.5.9
4
+ - 2.6.7
5
+ - 2.7.3
6
+ - 3.0.1
6
7
  before_install: gem install bundler -v 1.16.2
7
8
  script:
8
9
  - bundle exec rspec spec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pg_objects (0.5.6)
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.3.1)
14
- actionview (= 6.1.3.1)
15
- activesupport (= 6.1.3.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.3.1)
21
- activesupport (= 6.1.3.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.3.1)
27
- activesupport (= 6.1.3.1)
28
- activerecord (6.1.3.1)
29
- activemodel (= 6.1.3.1)
30
- activesupport (= 6.1.3.1)
31
- activesupport (6.1.3.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.1)
37
+ ast (2.4.2)
38
38
  builder (3.2.4)
39
39
  byebug (11.1.3)
40
- concurrent-ruby (1.1.8)
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.9.0)
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.11.2-x86_64-darwin)
52
+ nokogiri (1.12.3)
53
+ mini_portile2 (~> 2.6.1)
52
54
  racc (~> 1.4)
53
- parallel (1.19.2)
54
- parser (2.7.1.4)
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.3.0)
66
+ rails-html-sanitizer (1.4.2)
65
67
  loofah (~> 2.3)
66
- railties (6.1.3.1)
67
- actionpack (= 6.1.3.1)
68
- activesupport (= 6.1.3.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.8.7)
72
+ rake (>= 0.13)
71
73
  thor (~> 1.0)
72
74
  rainbow (3.0.0)
73
- rake (13.0.1)
75
+ rake (13.0.6)
74
76
  rake-hooks (1.2.3)
75
77
  rake
76
- regexp_parser (1.7.1)
77
- rexml (3.2.4)
78
- rspec (3.9.0)
79
- rspec-core (~> 3.9.0)
80
- rspec-expectations (~> 3.9.0)
81
- rspec-mocks (~> 3.9.0)
82
- rspec-core (3.9.2)
83
- rspec-support (~> 3.9.3)
84
- rspec-expectations (3.9.2)
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.9.0)
87
- rspec-mocks (3.9.1)
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.9.0)
90
- rspec-support (3.9.3)
91
- rubocop (0.88.0)
91
+ rspec-support (~> 3.10.0)
92
+ rspec-support (3.10.2)
93
+ rubocop (1.20.0)
92
94
  parallel (~> 1.10)
93
- parser (>= 2.7.1.1)
95
+ parser (>= 3.0.0.0)
94
96
  rainbow (>= 2.2.2, < 4.0)
95
- regexp_parser (>= 1.7)
97
+ regexp_parser (>= 1.8, < 3.0)
96
98
  rexml
97
- rubocop-ast (>= 0.1.0, < 1.0)
99
+ rubocop-ast (>= 1.9.1, < 2.0)
98
100
  ruby-progressbar (~> 1.7)
99
- unicode-display_width (>= 1.4.0, < 2.0)
100
- rubocop-ast (0.1.0)
101
- parser (>= 2.7.0.1)
102
- rubocop-rspec (1.42.0)
103
- rubocop (>= 0.87.0)
104
- ruby-progressbar (1.10.1)
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 (1.7.0)
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
@@ -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 = false)
9
+ def initialize(silent: false)
10
10
  @silent = silent
11
11
  end
12
12
 
@@ -17,7 +17,7 @@ module PgObjects
17
17
 
18
18
  @objects = []
19
19
  @config = PgObjects.config
20
- @log = Logger.new(config.silent)
20
+ @log = Logger.new(silent: config.silent)
21
21
  end
22
22
 
23
23
  ##
@@ -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(' ')[1] if ln =~ /!depends_on/ }.compact
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
@@ -1,3 +1,3 @@
1
1
  module PgObjects
2
- VERSION = '0.5.6'.freeze
2
+ VERSION = '0.5.10'.freeze
3
3
  end
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.6
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-04-01 00:00:00.000000000 Z
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.0.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