pg_objects 0.5.2 → 0.5.7

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: c3f8886f608c9e9e365490eb896b5b85e1919004fd9319dcc2f6a6edad8c214e
4
- data.tar.gz: eeb8a2f05f85b0268c2e8a78f32d77a86343d099bd79d9e94de5285029a21023
3
+ metadata.gz: 8fa8812d6afca180c1d31c4b968097655975ac6e09ce558dd161e1729ef76363
4
+ data.tar.gz: 2c99244628c59a1550aa4bd1c4c33ded80a943452993f3e8f4fc4b6bbecf40c5
5
5
  SHA512:
6
- metadata.gz: 3525b1e908e887fd2293724af2bf549ec0be438391573c9a93f5537d1d0b067423f4507c56c29b4eeb804c22bb97571bb4002e8c3270912a5eb6a940b0175968
7
- data.tar.gz: f2bca38b7f8b1b1a618ce4210e3815dd97986ff04ce7f05ef336a44acedd4b872ff7873b54bce33f7aca545882c299307248bd65993272fdcebff2e56392e4b8
6
+ metadata.gz: 8b075184b7b644f8574d8dc4c6a459860dd6f90f1db4e49232095b776f65b6ba71a76a04b168efdf30455c85e86927122f92077dc4b8b0f7ba5d76aa9e6c1405
7
+ data.tar.gz: f4c58b5fe56c2c5f1c165022f9939a614d1e66b3e2c458fd037f534abd4ab12fdd5cb62f6277f2f390168966782868c5b651be11bfc7e96e7f82ed441f883b67
data/.rubocop.yml CHANGED
@@ -17,11 +17,21 @@ 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
+
31
+ # Limit lines to 80 characters.
32
+ Layout/LineLength:
33
+ Max: 140
34
+
25
35
  # Checks that the closing brace in an array literal is either on the same line
26
36
  # as the last array element, or a new line.
27
37
  Layout/MultilineArrayBraceLayout:
@@ -45,13 +55,16 @@ Layout/MultilineOperationIndentation:
45
55
  Enabled: true
46
56
  EnforcedStyle: indented
47
57
 
58
+ Layout/SpaceAroundMethodCallOperator:
59
+ Enabled: true
60
+
48
61
  # Checks for padding/surrounding spaces inside string interpolation.
49
62
  Layout/SpaceInsideStringInterpolation:
50
63
  EnforcedStyle: no_space
51
64
  Enabled: true
52
65
 
53
66
  # Naming ######################################################################
54
- Naming/UncommunicativeMethodParamName:
67
+ Naming/MethodParameterName:
55
68
  MinNameLength: 2
56
69
 
57
70
  # Use the configured style when naming variables.
@@ -59,44 +72,6 @@ Naming/VariableName:
59
72
  EnforcedStyle: snake_case
60
73
  Enabled: true
61
74
 
62
- # Style #######################################################################
63
- # Use alias_method instead of alias.
64
- Style/Alias:
65
- EnforcedStyle: prefer_alias_method
66
- Enabled: true
67
-
68
- Style/AsciiComments:
69
- Enabled: false
70
- StyleGuide: http://relaxed.ruby.style/#styleasciicomments
71
-
72
- # Checks if there is a magic comment to enforce string literals
73
- Style/FrozenStringLiteralComment:
74
- Enabled: false
75
-
76
- Style/RegexpLiteral:
77
- EnforcedStyle: mixed
78
- Enabled: false
79
-
80
- # Checks for proper usage of fail and raise.
81
- Style/SignalException:
82
- EnforcedStyle: only_raise
83
- Enabled: true
84
-
85
- # Check for the usage of parentheses around stabby lambda arguments.
86
- Style/StabbyLambdaParentheses:
87
- EnforcedStyle: require_parentheses
88
- Enabled: true
89
-
90
- # Checks if configured preferred methods are used over non-preferred.
91
- Style/StringMethods:
92
- PreferredMethods:
93
- intern: to_sym
94
- Enabled: true
95
-
96
- # Checks for %q/%Q when single quotes or double quotes would do.
97
- Style/UnneededPercentQ:
98
- Enabled: false
99
-
100
75
  # Metrics #####################################################################
101
76
 
102
77
  # A calculated magnitude based on number of assignments,
@@ -124,10 +99,6 @@ Metrics/ClassLength:
124
99
  # Enabled: true
125
100
  # Max: 11
126
101
 
127
- # Limit lines to 80 characters.
128
- Metrics/LineLength:
129
- Max: 140
130
-
131
102
  # Avoid methods longer than 10 lines of code.
132
103
  # Metrics/MethodLength:
133
104
  # Max: 50
@@ -148,16 +119,25 @@ Metrics/ModuleLength:
148
119
 
149
120
  # Lint ########################################################################
150
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
+
151
134
  # This cop looks for use of the same name as outer local variables
152
135
  # for block arguments or block local variables.
153
136
  Lint/ShadowingOuterLocalVariable:
154
137
  Enabled: false
155
138
 
156
- # Rails #######################################################################
157
-
158
- # Enables Rails cops.
159
- Rails:
160
- Enabled: false
139
+ Lint/StructNewOverride:
140
+ Enabled: true
161
141
 
162
142
  # RSpec #######################################################################
163
143
 
@@ -194,6 +174,9 @@ RSpec/ImplicitSubject:
194
174
  RSpec/LeadingSubject:
195
175
  Enabled: false
196
176
 
177
+ RSpec/MultipleMemoizedHelpers:
178
+ Enabled: false
179
+
197
180
  # Checks for explicitly referenced test subjects.
198
181
  RSpec/NamedSubject:
199
182
  Enabled: false
@@ -203,5 +186,92 @@ RSpec/NotToNot:
203
186
  EnforcedStyle: not_to
204
187
  Enabled: true
205
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
+
206
234
  Style/IfUnlessModifier:
207
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,8 +1,9 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - 2.5.7
5
- - 2.6.5
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,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pg_objects (0.5.2)
5
- activerecord (>= 4, < 7)
4
+ pg_objects (0.5.7)
5
+ activerecord (>= 6.0.3.5, < 7)
6
6
  pg_query (~> 1)
7
7
  railties (>= 4, < 7)
8
8
  rake-hooks (~> 1)
@@ -10,54 +10,52 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (6.0.1)
14
- actionview (= 6.0.1)
15
- activesupport (= 6.0.1)
16
- rack (~> 2.0)
13
+ actionpack (6.1.3.1)
14
+ actionview (= 6.1.3.1)
15
+ activesupport (= 6.1.3.1)
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.1)
21
- activesupport (= 6.0.1)
20
+ actionview (6.1.3.1)
21
+ activesupport (= 6.1.3.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.0.1)
27
- activesupport (= 6.0.1)
28
- activerecord (6.0.1)
29
- activemodel (= 6.0.1)
30
- activesupport (= 6.0.1)
31
- activesupport (6.0.1)
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)
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)
38
- builder (3.2.3)
39
- byebug (11.0.1)
40
- concurrent-ruby (1.1.5)
41
- crass (1.0.5)
42
- diff-lcs (1.3)
43
- erubi (1.9.0)
44
- i18n (1.7.0)
33
+ i18n (>= 1.6, < 2)
34
+ minitest (>= 5.1)
35
+ tzinfo (~> 2.0)
36
+ zeitwerk (~> 2.3)
37
+ ast (2.4.2)
38
+ builder (3.2.4)
39
+ byebug (11.1.3)
40
+ concurrent-ruby (1.1.8)
41
+ crass (1.0.6)
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.2)
47
- loofah (2.3.1)
46
+ loofah (2.9.1)
48
47
  crass (~> 1.0.2)
49
48
  nokogiri (>= 1.5.9)
50
- method_source (0.9.2)
51
- mini_portile2 (2.4.0)
52
- minitest (5.13.0)
53
- nokogiri (1.10.5)
54
- mini_portile2 (~> 2.4.0)
55
- parallel (1.14.0)
56
- parser (2.6.2.0)
57
- ast (~> 2.4.0)
58
- pg_query (1.2.0)
59
- psych (3.1.0)
60
- rack (2.0.7)
49
+ method_source (1.0.0)
50
+ minitest (5.14.4)
51
+ nokogiri (1.11.3-x86_64-darwin)
52
+ racc (~> 1.4)
53
+ parallel (1.20.1)
54
+ parser (3.0.1.0)
55
+ ast (~> 2.4.1)
56
+ pg_query (1.3.0)
57
+ racc (1.5.2)
58
+ rack (2.2.3)
61
59
  rack-test (1.1.0)
62
60
  rack (>= 1.0, < 3)
63
61
  rails-dom-testing (2.0.3)
@@ -65,46 +63,57 @@ GEM
65
63
  nokogiri (>= 1.6)
66
64
  rails-html-sanitizer (1.3.0)
67
65
  loofah (~> 2.3)
68
- railties (6.0.1)
69
- actionpack (= 6.0.1)
70
- activesupport (= 6.0.1)
66
+ railties (6.1.3.1)
67
+ actionpack (= 6.1.3.1)
68
+ activesupport (= 6.1.3.1)
71
69
  method_source
72
70
  rake (>= 0.8.7)
73
- thor (>= 0.20.3, < 2.0)
71
+ thor (~> 1.0)
74
72
  rainbow (3.0.0)
75
- rake (12.3.2)
73
+ rake (13.0.3)
76
74
  rake-hooks (1.2.3)
77
75
  rake
78
- rspec (3.8.0)
79
- rspec-core (~> 3.8.0)
80
- rspec-expectations (~> 3.8.0)
81
- rspec-mocks (~> 3.8.0)
82
- rspec-core (3.8.0)
83
- rspec-support (~> 3.8.0)
84
- rspec-expectations (3.8.2)
76
+ regexp_parser (2.1.1)
77
+ rexml (3.2.5)
78
+ rspec (3.10.0)
79
+ rspec-core (~> 3.10.0)
80
+ rspec-expectations (~> 3.10.0)
81
+ rspec-mocks (~> 3.10.0)
82
+ rspec-core (3.10.1)
83
+ rspec-support (~> 3.10.0)
84
+ rspec-expectations (3.10.1)
85
85
  diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.8.0)
87
- rspec-mocks (3.8.0)
86
+ rspec-support (~> 3.10.0)
87
+ rspec-mocks (3.10.2)
88
88
  diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.8.0)
90
- rspec-support (3.8.0)
91
- rubocop (0.66.0)
92
- jaro_winkler (~> 1.5.1)
89
+ rspec-support (~> 3.10.0)
90
+ rspec-support (3.10.2)
91
+ rubocop (1.12.1)
93
92
  parallel (~> 1.10)
94
- parser (>= 2.5, != 2.5.1.1)
95
- psych (>= 3.1.0)
93
+ parser (>= 3.0.0.0)
96
94
  rainbow (>= 2.2.2, < 4.0)
95
+ regexp_parser (>= 1.8, < 3.0)
96
+ rexml
97
+ rubocop-ast (>= 1.2.0, < 2.0)
97
98
  ruby-progressbar (~> 1.7)
98
- unicode-display_width (>= 1.4.0, < 1.6)
99
- rubocop-rspec (1.32.0)
100
- rubocop (>= 0.60.0)
101
- ruby-progressbar (1.10.0)
102
- thor (0.20.3)
103
- thread_safe (0.3.6)
104
- tzinfo (1.2.5)
105
- thread_safe (~> 0.1)
106
- unicode-display_width (1.5.0)
107
- zeitwerk (2.2.1)
99
+ unicode-display_width (>= 1.4.0, < 3.0)
100
+ rubocop-ast (1.4.1)
101
+ parser (>= 2.7.1.5)
102
+ rubocop-rails (2.9.1)
103
+ activesupport (>= 4.2.0)
104
+ rack (>= 1.1)
105
+ rubocop (>= 0.90.0, < 2.0)
106
+ rubocop-rake (0.5.1)
107
+ rubocop
108
+ rubocop-rspec (2.2.0)
109
+ rubocop (~> 1.0)
110
+ rubocop-ast (>= 1.1.0)
111
+ ruby-progressbar (1.11.0)
112
+ thor (1.1.0)
113
+ tzinfo (2.0.4)
114
+ concurrent-ruby (~> 1.0)
115
+ unicode-display_width (2.0.0)
116
+ zeitwerk (2.4.2)
108
117
 
109
118
  PLATFORMS
110
119
  ruby
@@ -116,6 +125,8 @@ DEPENDENCIES
116
125
  rake
117
126
  rspec
118
127
  rubocop
128
+ rubocop-rails
129
+ rubocop-rake
119
130
  rubocop-rspec
120
131
 
121
132
  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.2'.freeze
2
+ VERSION = '0.5.7'.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.2
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Kiselyov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2021-04-19 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
@@ -207,8 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
235
  - !ruby/object:Gem::Version
208
236
  version: '0'
209
237
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.7.6
238
+ rubygems_version: 3.0.3
212
239
  signing_key:
213
240
  specification_version: 4
214
241
  summary: Simple manager for PostgreSQL objects like triggers and functions