pg_objects 0.5.4 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a2ea1636543961949db0d427907ad3d0f362be5d91ca3c6181d011a928e4415
4
- data.tar.gz: bcd2eadde5e226ba522f64ea397c03d5649201f44a678ae4b4b0fccc0e506b45
3
+ metadata.gz: '049bce8661041f9b23d32930886d79dc93e2bd8a123c265b96e8a20ca148fee4'
4
+ data.tar.gz: da7d45ee58e1241ae0a04485d98c43eec07cdb5f0b5de219b438d4e38d9c192a
5
5
  SHA512:
6
- metadata.gz: 9b0e28ddc241df881e24f275997e8569e354daf20ff92bf89b310423c84109d7ada4a6e2fa2a6f4bf2d9db376e006d6d12c03e1c72cb58451ae1a5d89734413c
7
- data.tar.gz: 88ec24b594bf63ef82751351b1e566f81d00300f43c277dd08d443cda5608fdf942e336575913fa847a963e06bbb0be2c437aecb28a97a86d9949f49e3c6ffca
6
+ metadata.gz: 18d0ed9debf1a42325412081ad13dcdec15bb86dd6cb245b1ea93fcb90f042a4d3e83973e6df6440c6be5df345025faa872b8d709b1f2c87cde91df61b3f6534
7
+ data.tar.gz: 007e19371fed9114310166093e3af455c45c284a0b222c8e822aef29a521979acba0d921e031f7040c8d2d5b257c2e5c8bd265c8e828edbc061040481a97cae1
data/.rubocop.yml CHANGED
@@ -17,11 +17,17 @@ 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
23
25
 
24
26
  # Layout ######################################################################
27
+
28
+ Layout/EmptyLinesAroundAttributeAccessor:
29
+ Enabled: true
30
+
25
31
  # Limit lines to 80 characters.
26
32
  Layout/LineLength:
27
33
  Max: 140
@@ -49,6 +55,9 @@ Layout/MultilineOperationIndentation:
49
55
  Enabled: true
50
56
  EnforcedStyle: indented
51
57
 
58
+ Layout/SpaceAroundMethodCallOperator:
59
+ Enabled: true
60
+
52
61
  # Checks for padding/surrounding spaces inside string interpolation.
53
62
  Layout/SpaceInsideStringInterpolation:
54
63
  EnforcedStyle: no_space
@@ -63,53 +72,6 @@ Naming/VariableName:
63
72
  EnforcedStyle: snake_case
64
73
  Enabled: true
65
74
 
66
- # Style #######################################################################
67
- # Use alias_method instead of alias.
68
- Style/Alias:
69
- EnforcedStyle: prefer_alias_method
70
- Enabled: true
71
-
72
- Style/AsciiComments:
73
- Enabled: false
74
- StyleGuide: http://relaxed.ruby.style/#styleasciicomments
75
-
76
- # Checks if there is a magic comment to enforce string literals
77
- Style/FrozenStringLiteralComment:
78
- Enabled: false
79
-
80
- Style/HashEachMethods:
81
- Enabled: true
82
-
83
- Style/HashTransformKeys:
84
- Enabled: true
85
-
86
- Style/HashTransformValues:
87
- Enabled: true
88
-
89
- Style/RegexpLiteral:
90
- EnforcedStyle: mixed
91
- Enabled: false
92
-
93
- # Checks for proper usage of fail and raise.
94
- Style/SignalException:
95
- EnforcedStyle: only_raise
96
- Enabled: true
97
-
98
- # Check for the usage of parentheses around stabby lambda arguments.
99
- Style/StabbyLambdaParentheses:
100
- EnforcedStyle: require_parentheses
101
- Enabled: true
102
-
103
- # Checks if configured preferred methods are used over non-preferred.
104
- Style/StringMethods:
105
- PreferredMethods:
106
- intern: to_sym
107
- Enabled: true
108
-
109
- # Checks for %q/%Q when single quotes or double quotes would do.
110
- Style/RedundantPercentQ:
111
- Enabled: false
112
-
113
75
  # Metrics #####################################################################
114
76
 
115
77
  # A calculated magnitude based on number of assignments,
@@ -157,16 +119,25 @@ Metrics/ModuleLength:
157
119
 
158
120
  # Lint ########################################################################
159
121
 
122
+ Lint/DeprecatedOpenSSLConstant:
123
+ Enabled: true
124
+
125
+ Lint/DuplicateElsifCondition:
126
+ Enabled: true
127
+
128
+ Lint/MixedRegexpCaptureTypes:
129
+ Enabled: true
130
+
131
+ Lint/RaiseException:
132
+ Enabled: true
133
+
160
134
  # This cop looks for use of the same name as outer local variables
161
135
  # for block arguments or block local variables.
162
136
  Lint/ShadowingOuterLocalVariable:
163
137
  Enabled: false
164
138
 
165
- # Rails #######################################################################
166
-
167
- # Enables Rails cops.
168
- Rails:
169
- Enabled: false
139
+ Lint/StructNewOverride:
140
+ Enabled: true
170
141
 
171
142
  # RSpec #######################################################################
172
143
 
@@ -203,6 +174,9 @@ RSpec/ImplicitSubject:
203
174
  RSpec/LeadingSubject:
204
175
  Enabled: false
205
176
 
177
+ RSpec/MultipleMemoizedHelpers:
178
+ Enabled: false
179
+
206
180
  # Checks for explicitly referenced test subjects.
207
181
  RSpec/NamedSubject:
208
182
  Enabled: false
@@ -212,5 +186,92 @@ RSpec/NotToNot:
212
186
  EnforcedStyle: not_to
213
187
  Enabled: true
214
188
 
189
+ # Style #######################################################################
190
+
191
+ Style/AccessorGrouping:
192
+ Enabled: true
193
+
194
+ # Use alias_method instead of alias.
195
+ Style/Alias:
196
+ EnforcedStyle: prefer_alias_method
197
+ Enabled: true
198
+
199
+ Style/ArrayCoercion:
200
+ Enabled: true
201
+
202
+ Style/AsciiComments:
203
+ Enabled: false
204
+ StyleGuide: http://relaxed.ruby.style/#styleasciicomments
205
+
206
+ Style/BisectedAttrAccessor:
207
+ Enabled: true
208
+
209
+ Style/CaseLikeIf:
210
+ Enabled: true
211
+
212
+ Style/ExponentialNotation:
213
+ Enabled: true
214
+
215
+ # Checks if there is a magic comment to enforce string literals
216
+ Style/FrozenStringLiteralComment:
217
+ Enabled: false
218
+
219
+ Style/HashAsLastArrayItem:
220
+ Enabled: true
221
+
222
+ Style/HashEachMethods:
223
+ Enabled: true
224
+
225
+ Style/HashLikeCase:
226
+ Enabled: true
227
+
228
+ Style/HashTransformKeys:
229
+ Enabled: true
230
+
231
+ Style/HashTransformValues:
232
+ Enabled: true
233
+
215
234
  Style/IfUnlessModifier:
216
235
  Enabled: false
236
+
237
+ Style/RedundantAssignment:
238
+ Enabled: true
239
+
240
+ Style/RedundantFetchBlock:
241
+ Enabled: true
242
+
243
+ Style/RedundantFileExtensionInRequire:
244
+ Enabled: true
245
+
246
+ Style/RedundantRegexpCharacterClass:
247
+ Enabled: true
248
+
249
+ Style/RedundantRegexpEscape:
250
+ Enabled: true
251
+
252
+ Style/RegexpLiteral:
253
+ EnforcedStyle: mixed
254
+ Enabled: false
255
+
256
+ # Checks for proper usage of fail and raise.
257
+ Style/SignalException:
258
+ EnforcedStyle: only_raise
259
+ Enabled: true
260
+
261
+ # Check for the usage of parentheses around stabby lambda arguments.
262
+ Style/StabbyLambdaParentheses:
263
+ EnforcedStyle: require_parentheses
264
+ Enabled: true
265
+
266
+ # Checks if configured preferred methods are used over non-preferred.
267
+ Style/StringMethods:
268
+ PreferredMethods:
269
+ intern: to_sym
270
+ Enabled: true
271
+
272
+ # Checks for %q/%Q when single quotes or double quotes would do.
273
+ Style/RedundantPercentQ:
274
+ Enabled: false
275
+
276
+ Style/SlicingWithRange:
277
+ Enabled: true
data/.travis.yml CHANGED
@@ -1,9 +1,9 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - 2.5.7
5
- - 2.6.5
6
- - 2.7.0
3
+ - 2.5.9
4
+ - 2.6.7
5
+ - 2.7.3
6
+ - 3.0.1
7
7
  before_install: gem install bundler -v 1.16.2
8
8
  script:
9
9
  - bundle exec rspec spec
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pg_objects (0.5.4)
5
- activerecord (>= 4, < 7)
4
+ pg_objects (0.5.9)
5
+ activerecord (>= 6.0.3.5, < 7)
6
6
  pg_query (~> 1)
7
7
  railties (>= 4, < 7)
8
8
  rake-hooks (~> 1)
@@ -10,53 +10,54 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (6.0.2.2)
14
- actionview (= 6.0.2.2)
15
- activesupport (= 6.0.2.2)
16
- rack (~> 2.0, >= 2.0.8)
13
+ actionpack (6.1.3.2)
14
+ actionview (= 6.1.3.2)
15
+ activesupport (= 6.1.3.2)
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.0.2.2)
21
- activesupport (= 6.0.2.2)
20
+ actionview (6.1.3.2)
21
+ activesupport (= 6.1.3.2)
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.0.2.2)
27
- activesupport (= 6.0.2.2)
28
- activerecord (6.0.2.2)
29
- activemodel (= 6.0.2.2)
30
- activesupport (= 6.0.2.2)
31
- activesupport (6.0.2.2)
26
+ activemodel (6.1.3.2)
27
+ activesupport (= 6.1.3.2)
28
+ activerecord (6.1.3.2)
29
+ activemodel (= 6.1.3.2)
30
+ activesupport (= 6.1.3.2)
31
+ activesupport (6.1.3.2)
32
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
33
- i18n (>= 0.7, < 2)
34
- minitest (~> 5.1)
35
- tzinfo (~> 1.1)
36
- zeitwerk (~> 2.2)
37
- ast (2.4.0)
33
+ i18n (>= 1.6, < 2)
34
+ minitest (>= 5.1)
35
+ tzinfo (~> 2.0)
36
+ zeitwerk (~> 2.3)
37
+ ast (2.4.2)
38
38
  builder (3.2.4)
39
- byebug (11.1.1)
40
- concurrent-ruby (1.1.6)
39
+ byebug (11.1.3)
40
+ concurrent-ruby (1.1.8)
41
41
  crass (1.0.6)
42
- diff-lcs (1.3)
43
- erubi (1.9.0)
44
- i18n (1.8.2)
42
+ diff-lcs (1.4.4)
43
+ erubi (1.10.0)
44
+ i18n (1.8.10)
45
45
  concurrent-ruby (~> 1.0)
46
- jaro_winkler (1.5.4)
47
- loofah (2.4.0)
46
+ loofah (2.9.1)
48
47
  crass (~> 1.0.2)
49
48
  nokogiri (>= 1.5.9)
50
49
  method_source (1.0.0)
51
- mini_portile2 (2.4.0)
52
- minitest (5.14.0)
53
- nokogiri (1.10.9)
54
- mini_portile2 (~> 2.4.0)
55
- parallel (1.19.1)
56
- parser (2.7.0.4)
57
- ast (~> 2.4.0)
58
- pg_query (1.2.0)
59
- rack (2.2.2)
50
+ mini_portile2 (2.5.1)
51
+ minitest (5.14.4)
52
+ nokogiri (1.11.5)
53
+ mini_portile2 (~> 2.5.0)
54
+ racc (~> 1.4)
55
+ parallel (1.20.1)
56
+ parser (3.0.1.1)
57
+ ast (~> 2.4.1)
58
+ pg_query (1.3.0)
59
+ racc (1.5.2)
60
+ rack (2.2.3)
60
61
  rack-test (1.1.0)
61
62
  rack (>= 1.0, < 3)
62
63
  rails-dom-testing (2.0.3)
@@ -64,47 +65,57 @@ GEM
64
65
  nokogiri (>= 1.6)
65
66
  rails-html-sanitizer (1.3.0)
66
67
  loofah (~> 2.3)
67
- railties (6.0.2.2)
68
- actionpack (= 6.0.2.2)
69
- activesupport (= 6.0.2.2)
68
+ railties (6.1.3.2)
69
+ actionpack (= 6.1.3.2)
70
+ activesupport (= 6.1.3.2)
70
71
  method_source
71
72
  rake (>= 0.8.7)
72
- thor (>= 0.20.3, < 2.0)
73
+ thor (~> 1.0)
73
74
  rainbow (3.0.0)
74
- rake (13.0.1)
75
+ rake (13.0.3)
75
76
  rake-hooks (1.2.3)
76
77
  rake
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.1)
83
- rspec-support (~> 3.9.1)
84
- rspec-expectations (3.9.1)
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.2)
91
- rubocop (0.80.1)
92
- jaro_winkler (~> 1.5.1)
91
+ rspec-support (~> 3.10.0)
92
+ rspec-support (3.10.2)
93
+ rubocop (1.15.0)
93
94
  parallel (~> 1.10)
94
- parser (>= 2.7.0.1)
95
+ parser (>= 3.0.0.0)
95
96
  rainbow (>= 2.2.2, < 4.0)
97
+ regexp_parser (>= 1.8, < 3.0)
96
98
  rexml
99
+ rubocop-ast (>= 1.5.0, < 2.0)
97
100
  ruby-progressbar (~> 1.7)
98
- unicode-display_width (>= 1.4.0, < 1.7)
99
- rubocop-rspec (1.38.1)
100
- rubocop (>= 0.68.1)
101
- ruby-progressbar (1.10.1)
102
- thor (1.0.1)
103
- thread_safe (0.3.6)
104
- tzinfo (1.2.6)
105
- thread_safe (~> 0.1)
106
- unicode-display_width (1.6.1)
107
- zeitwerk (2.3.0)
101
+ unicode-display_width (>= 1.4.0, < 3.0)
102
+ rubocop-ast (1.5.0)
103
+ parser (>= 3.0.1.1)
104
+ rubocop-rails (2.10.1)
105
+ activesupport (>= 4.2.0)
106
+ rack (>= 1.1)
107
+ rubocop (>= 1.7.0, < 2.0)
108
+ rubocop-rake (0.5.1)
109
+ rubocop
110
+ rubocop-rspec (2.3.0)
111
+ rubocop (~> 1.0)
112
+ rubocop-ast (>= 1.1.0)
113
+ ruby-progressbar (1.11.0)
114
+ thor (1.1.0)
115
+ tzinfo (2.0.4)
116
+ concurrent-ruby (~> 1.0)
117
+ unicode-display_width (2.0.0)
118
+ zeitwerk (2.4.2)
108
119
 
109
120
  PLATFORMS
110
121
  ruby
@@ -116,6 +127,8 @@ DEPENDENCIES
116
127
  rake
117
128
  rspec
118
129
  rubocop
130
+ rubocop-rails
131
+ rubocop-rake
119
132
  rubocop-rspec
120
133
 
121
134
  BUNDLED WITH
@@ -2,11 +2,11 @@ module PgObjects
2
2
  ##
3
3
  # Console output
4
4
  #
5
- # Passs +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.4'.freeze
2
+ VERSION = '0.5.9'.freeze
3
3
  end
data/pg_objects.gemspec CHANGED
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
45
45
  spec.require_paths = ['lib']
46
46
 
47
- spec.add_dependency 'activerecord', '>= 4', '< 7'
47
+ spec.add_dependency 'activerecord', '>= 6.0.3.5', '< 7'
48
48
  spec.add_dependency 'pg_query', '~> 1'
49
49
  spec.add_dependency 'railties', '>= 4', '< 7'
50
50
  spec.add_dependency 'rake-hooks', '~> 1'
@@ -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
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Kiselyov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2021-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
19
+ version: 6.0.3.5
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '7'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '4'
29
+ version: 6.0.3.5
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '7'
@@ -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