rails_sql_prettifier 7.0.5 → 7.0.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: 178b6c12be831f4a33836aea1ce14e8f6490420f687de6cba3545b8363a71bb6
4
- data.tar.gz: fc2c6e85fc32dfa3bcc941acf31c229c401cf35458e285f2ef161ee76b22f79b
3
+ metadata.gz: 43a1a762ce848cd2b1edae6bea7f922a68bb9f5f64088be34deaed83edd79ed7
4
+ data.tar.gz: e3711adfeb03c9da1a3dbeb7a3c18f765080cf28a8afb8658acf5a901759d107
5
5
  SHA512:
6
- metadata.gz: c5be4b4ecc5dcc39e495313cd859b41ee30ef21f2cc99508ec5c339b35ea2886afff4f7e0404d9a1b137fef41df1b7faf82f3d23bbe98c2e6bdb282512340a27
7
- data.tar.gz: 558975a592a45895d2f64d6867a80c04658109dff8d32480f8502ff97a7b46e78fd0d3d598bde331f9385ddc2bd8161a0bef574c3374719c6a2a8cfed4a64bc7
6
+ metadata.gz: dbed4e334719cacefabca892d8bb20132bc3d58d58ebf893c70fd05d0ae20d3d6885f051a7b68fe35dcd2fb26a02da315fd9a68414194cf3fc690d6191ef3b79
7
+ data.tar.gz: a8095cd8f464382126b7a94ce58f75f4e1f79e535a6f8f2a521281fd0205067f0771e92dd6f9656b269e8fc63c487f617bb204d32e91413bda391faa0307c094
@@ -0,0 +1 @@
1
+ buy_me_a_coffee: alekseyl
@@ -4,13 +4,36 @@ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  test:
7
-
8
7
  runs-on: ubuntu-latest
9
8
 
10
9
  strategy:
11
10
  fail-fast: false
12
11
  matrix:
13
- ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
12
+ ruby: ["3.2", "3.3", "3.4"]
13
+
14
+ # Service containers to run with `container-job`
15
+ services:
16
+ # Label used to access the service container
17
+ # more about postgres image can be read here: https://hub.docker.com/_/postgres
18
+ # more about using pg image in CI: https://docs.github.com/en/actions/use-cases-and-examples/using-containerized-services/creating-postgresql-service-containers
19
+ postgres:
20
+ # Docker Hub image
21
+ image: postgres
22
+ # Provide the password for postgres
23
+ env:
24
+ POSTGRES_PASSWORD: postgres
25
+ POSTGRES_DB: niceql-test
26
+ POSTGRES_USER: postgres
27
+ # this options should be kept, otherwise pg container will not be waited
28
+ options: >-
29
+ --health-cmd pg_isready
30
+ --health-interval 10s
31
+ --health-timeout 5s
32
+ --health-retries 5
33
+ --network-alias postgres
34
+ ports:
35
+ # Maps tcp port 5432 on service container to the host
36
+ - 5432:5432
14
37
 
15
38
  steps:
16
39
  - uses: actions/checkout@v3
@@ -20,4 +43,6 @@ jobs:
20
43
  bundler-cache: true # 'bundle install' and cache gems
21
44
  ruby-version: ${{ matrix.ruby }}
22
45
  - name: Run tests
23
- run: service postgresql start && bundle exec rake test
46
+ run: bundle exec rake test
47
+ env:
48
+ POSTGRES_HOST: localhost
@@ -1,6 +1,6 @@
1
1
  name: RuboCop
2
2
 
3
- on: [push, pull_request]
3
+ on: [push]
4
4
 
5
5
  jobs:
6
6
  build:
data/.rubocop.yml ADDED
@@ -0,0 +1,97 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
4
+ AllCops:
5
+ Exclude:
6
+ - "./lib/templates/active_record/model/model.rb"
7
+ - "./lib/modules/flea.rb"
8
+
9
+ Style/SingleLineMethods:
10
+ Description: 'Avoid single-line methods.'
11
+ StyleGuide: '#no-single-line-methods'
12
+ Enabled: false
13
+ VersionAdded: '0.9'
14
+ VersionChanged: '1.8'
15
+ AllowIfMethodIsEmpty: true
16
+
17
+ Style/AsciiComments:
18
+ Description: 'Use only ascii symbols in comments.'
19
+ StyleGuide: '#english-comments'
20
+ Enabled: false
21
+ VersionAdded: '0.9'
22
+ VersionChanged: '1.21'
23
+ AllowedChars:
24
+ - ©
25
+
26
+ Layout/LineLength:
27
+ Description: 'Checks that line length does not exceed the configured limit.'
28
+ StyleGuide: '#max-line-length'
29
+ Enabled: true
30
+ VersionAdded: '0.25'
31
+ VersionChanged: '1.4'
32
+ Max: 120
33
+ # To make it possible to copy or click on URIs in the code, we allow lines
34
+ # containing a URI to be longer than Max.
35
+ AllowHeredoc: true
36
+ AllowURI: true
37
+ URISchemes:
38
+ - http
39
+ - https
40
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
41
+ # directives like '# rubocop: enable ...' when calculating a line's length.
42
+ IgnoreCopDirectives: true
43
+ # The AllowedPatterns option is a list of !ruby/regexp and/or string
44
+ # elements. Strings will be converted to Regexp objects. A line that matches
45
+ # any regular expression listed in this option will be ignored by LineLength.
46
+ AllowedPatterns: []
47
+ IgnoredPatterns: [] # deprecated
48
+ Exclude:
49
+ - "./test/**/**/*"
50
+
51
+ Metrics/ClassLength:
52
+ Description: 'Avoid classes longer than 100 lines of code.'
53
+ Enabled: false
54
+ VersionAdded: '0.25'
55
+ VersionChanged: '0.87'
56
+ CountComments: false # count full line comments?
57
+ Max: 100
58
+ CountAsOne: []
59
+
60
+ Lint/MissingCopEnableDirective:
61
+ Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
62
+ Enabled: true
63
+ VersionAdded: '0.52'
64
+ # Maximum number of consecutive lines the cop can be disabled for.
65
+ # 0 allows only single-line disables
66
+ # 1 would mean the maximum allowed is the following:
67
+ # # rubocop:disable SomeCop
68
+ # a = 1
69
+ # # rubocop:enable SomeCop
70
+ # .inf for any size
71
+ MaximumRangeSize: .inf
72
+
73
+ Style/MethodCallWithArgsParentheses:
74
+ Enabled: true
75
+ IgnoredMethods:
76
+ - require
77
+ - require_relative
78
+ - require_dependency
79
+ - yield
80
+ - raise
81
+ - puts
82
+ Exclude:
83
+ - "/**/Gemfile"
84
+ - "./db/**/*"
85
+
86
+ Layout/EmptyLinesAroundBlockBody:
87
+ # its more documentation than code, so it should be readable and
88
+ # there are huge amount of multiline description, looks nasty without spaces
89
+ Exclude:
90
+ - "./app_doc/**/*"
91
+
92
+ Style/ClassAndModuleChildren:
93
+ Enabled: false
94
+
95
+ Lint/UnderscorePrefixedVariableName:
96
+ Exclude:
97
+ - "./test/**/**/*"
data/Appraisals ADDED
@@ -0,0 +1,11 @@
1
+ appraise "rails-7" do
2
+ gem "rails", "~> 7.1"
3
+ end
4
+
5
+ appraise "rails-7.2" do
6
+ gem "rails", "~> 7.1"
7
+ end
8
+
9
+ appraise "rails-8" do
10
+ gem "rails", ">= 8"
11
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 7.0.6
2
+ * Fixed issue with protected_env for a 7.2 rails
3
+ * github CI is working
4
+ * rubocoped a little
5
+
1
6
  # 7.0.5
2
7
  * Fixed tests
3
8
  * Restructured code properly
data/Dockerfile_3_1 ADDED
@@ -0,0 +1,20 @@
1
+ FROM ruby:3.1-bullseye
2
+
3
+ WORKDIR /app
4
+ RUN apt-get update && apt-get -y install lsb-release
5
+ #
6
+ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
7
+ sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
8
+ apt-get update && apt-get -y install postgresql postgresql-client-14
9
+
10
+ RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \
11
+ service postgresql start && \
12
+ psql -U postgres -c 'CREATE DATABASE "niceql-test"'
13
+
14
+ RUN gem install bundler
15
+
16
+ COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb
17
+ COPY rails_sql_prettifier.gemspec /app/
18
+ COPY Gemfil* /app/
19
+ #
20
+ RUN bundle install
data/Dockerfile_apprsl ADDED
@@ -0,0 +1,22 @@
1
+ FROM ruby:3.2-bullseye
2
+
3
+ WORKDIR /app
4
+ RUN apt-get update && apt-get -y install lsb-release
5
+ #
6
+ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
7
+ sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
8
+ apt-get update && apt-get -y install postgresql postgresql-client-14
9
+
10
+ RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \
11
+ service postgresql start && \
12
+ psql -U postgres -c 'CREATE DATABASE "niceql-test"'
13
+
14
+ RUN gem install bundler
15
+
16
+ COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb
17
+ COPY rails_sql_prettifier.gemspec /app/
18
+ COPY Gemfil* /app/
19
+ COPY Appraisals /app/
20
+ #
21
+ RUN bundle install
22
+ RUN bundle exec appraisal install
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rake/testtask"
3
5
 
@@ -7,4 +9,4 @@ Rake::TestTask.new(:test) do |t|
7
9
  t.test_files = FileList["test/**/*_test.rb"]
8
10
  end
9
11
 
10
- task :default => :test
12
+ task default: :test
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "rails_sql_prettifier"
data/docker-compose.yml CHANGED
@@ -16,3 +16,21 @@ services:
16
16
  command: /bin/bash -c 'service postgresql start && rake test'
17
17
  volumes:
18
18
  - '.:/app'
19
+
20
+ test_3_1:
21
+ build:
22
+ context: .
23
+ dockerfile: Dockerfile_3_1
24
+ image: niceql_3_1
25
+ command: /bin/bash -c 'service postgresql start && rake test'
26
+ volumes:
27
+ - '.:/app'
28
+
29
+ appraisal:
30
+ build:
31
+ context: .
32
+ dockerfile: Dockerfile_apprsl
33
+ image: niceql_appr
34
+ command: /bin/bash -c 'service postgresql start && appraisal rake test'
35
+ volumes:
36
+ - '.:/app'
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 7.1"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,273 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rails_sql_prettifier (7.0.6)
5
+ activerecord (>= 7)
6
+ niceql (~> 0.6)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (7.2.2.1)
12
+ actionpack (= 7.2.2.1)
13
+ activesupport (= 7.2.2.1)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ zeitwerk (~> 2.6)
17
+ actionmailbox (7.2.2.1)
18
+ actionpack (= 7.2.2.1)
19
+ activejob (= 7.2.2.1)
20
+ activerecord (= 7.2.2.1)
21
+ activestorage (= 7.2.2.1)
22
+ activesupport (= 7.2.2.1)
23
+ mail (>= 2.8.0)
24
+ actionmailer (7.2.2.1)
25
+ actionpack (= 7.2.2.1)
26
+ actionview (= 7.2.2.1)
27
+ activejob (= 7.2.2.1)
28
+ activesupport (= 7.2.2.1)
29
+ mail (>= 2.8.0)
30
+ rails-dom-testing (~> 2.2)
31
+ actionpack (7.2.2.1)
32
+ actionview (= 7.2.2.1)
33
+ activesupport (= 7.2.2.1)
34
+ nokogiri (>= 1.8.5)
35
+ racc
36
+ rack (>= 2.2.4, < 3.2)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ useragent (~> 0.16)
42
+ actiontext (7.2.2.1)
43
+ actionpack (= 7.2.2.1)
44
+ activerecord (= 7.2.2.1)
45
+ activestorage (= 7.2.2.1)
46
+ activesupport (= 7.2.2.1)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.2.2.1)
50
+ activesupport (= 7.2.2.1)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.11)
53
+ rails-dom-testing (~> 2.2)
54
+ rails-html-sanitizer (~> 1.6)
55
+ activejob (7.2.2.1)
56
+ activesupport (= 7.2.2.1)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.2.2.1)
59
+ activesupport (= 7.2.2.1)
60
+ activerecord (7.2.2.1)
61
+ activemodel (= 7.2.2.1)
62
+ activesupport (= 7.2.2.1)
63
+ timeout (>= 0.4.0)
64
+ activestorage (7.2.2.1)
65
+ actionpack (= 7.2.2.1)
66
+ activejob (= 7.2.2.1)
67
+ activerecord (= 7.2.2.1)
68
+ activesupport (= 7.2.2.1)
69
+ marcel (~> 1.0)
70
+ activesupport (7.2.2.1)
71
+ base64
72
+ benchmark (>= 0.3)
73
+ bigdecimal
74
+ concurrent-ruby (~> 1.0, >= 1.3.1)
75
+ connection_pool (>= 2.2.5)
76
+ drb
77
+ i18n (>= 1.6, < 2)
78
+ logger (>= 1.4.2)
79
+ minitest (>= 5.1)
80
+ securerandom (>= 0.3)
81
+ tzinfo (~> 2.0, >= 2.0.5)
82
+ appraisal (2.5.0)
83
+ bundler
84
+ rake
85
+ thor (>= 0.14.0)
86
+ ast (2.4.2)
87
+ awesome_print (1.9.2)
88
+ base64 (0.2.0)
89
+ benchmark (0.4.0)
90
+ bigdecimal (3.1.9)
91
+ builder (3.3.0)
92
+ byebug (11.1.3)
93
+ coderay (1.1.3)
94
+ concurrent-ruby (1.3.5)
95
+ connection_pool (2.5.0)
96
+ crass (1.0.6)
97
+ date (3.4.1)
98
+ differ (0.1.2)
99
+ drb (2.2.1)
100
+ erubi (1.13.1)
101
+ globalid (1.2.1)
102
+ activesupport (>= 6.1)
103
+ i18n (1.14.7)
104
+ concurrent-ruby (~> 1.0)
105
+ io-console (0.8.0)
106
+ irb (1.15.1)
107
+ pp (>= 0.6.0)
108
+ rdoc (>= 4.0.0)
109
+ reline (>= 0.4.2)
110
+ json (2.10.1)
111
+ language_server-protocol (3.17.0.4)
112
+ lint_roller (1.1.0)
113
+ logger (1.6.6)
114
+ loofah (2.24.0)
115
+ crass (~> 1.0.2)
116
+ nokogiri (>= 1.12.0)
117
+ mail (2.8.1)
118
+ mini_mime (>= 0.1.1)
119
+ net-imap
120
+ net-pop
121
+ net-smtp
122
+ marcel (1.0.4)
123
+ method_source (1.1.0)
124
+ mini_mime (1.1.5)
125
+ minitest (5.25.4)
126
+ net-imap (0.5.6)
127
+ date
128
+ net-protocol
129
+ net-pop (0.1.2)
130
+ net-protocol
131
+ net-protocol (0.2.2)
132
+ timeout
133
+ net-smtp (0.5.1)
134
+ net-protocol
135
+ niceql (0.6.1)
136
+ nio4r (2.7.4)
137
+ nokogiri (1.18.3-aarch64-linux-gnu)
138
+ racc (~> 1.4)
139
+ nokogiri (1.18.3-aarch64-linux-musl)
140
+ racc (~> 1.4)
141
+ nokogiri (1.18.3-arm-linux-gnu)
142
+ racc (~> 1.4)
143
+ nokogiri (1.18.3-arm-linux-musl)
144
+ racc (~> 1.4)
145
+ nokogiri (1.18.3-arm64-darwin)
146
+ racc (~> 1.4)
147
+ nokogiri (1.18.3-x86_64-darwin)
148
+ racc (~> 1.4)
149
+ nokogiri (1.18.3-x86_64-linux-gnu)
150
+ racc (~> 1.4)
151
+ nokogiri (1.18.3-x86_64-linux-musl)
152
+ racc (~> 1.4)
153
+ parallel (1.26.3)
154
+ parser (3.3.7.1)
155
+ ast (~> 2.4.1)
156
+ racc
157
+ pg (1.5.9)
158
+ pp (0.6.2)
159
+ prettyprint
160
+ prettyprint (0.2.0)
161
+ pry (0.14.2)
162
+ coderay (~> 1.1)
163
+ method_source (~> 1.0)
164
+ pry-byebug (3.10.1)
165
+ byebug (~> 11.0)
166
+ pry (>= 0.13, < 0.15)
167
+ psych (5.2.3)
168
+ date
169
+ stringio
170
+ racc (1.8.1)
171
+ rack (3.1.10)
172
+ rack-session (2.1.0)
173
+ base64 (>= 0.1.0)
174
+ rack (>= 3.0.0)
175
+ rack-test (2.2.0)
176
+ rack (>= 1.3)
177
+ rackup (2.2.1)
178
+ rack (>= 3)
179
+ rails (7.2.2.1)
180
+ actioncable (= 7.2.2.1)
181
+ actionmailbox (= 7.2.2.1)
182
+ actionmailer (= 7.2.2.1)
183
+ actionpack (= 7.2.2.1)
184
+ actiontext (= 7.2.2.1)
185
+ actionview (= 7.2.2.1)
186
+ activejob (= 7.2.2.1)
187
+ activemodel (= 7.2.2.1)
188
+ activerecord (= 7.2.2.1)
189
+ activestorage (= 7.2.2.1)
190
+ activesupport (= 7.2.2.1)
191
+ bundler (>= 1.15.0)
192
+ railties (= 7.2.2.1)
193
+ rails-dom-testing (2.2.0)
194
+ activesupport (>= 5.0.0)
195
+ minitest
196
+ nokogiri (>= 1.6)
197
+ rails-html-sanitizer (1.6.2)
198
+ loofah (~> 2.21)
199
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
200
+ railties (7.2.2.1)
201
+ actionpack (= 7.2.2.1)
202
+ activesupport (= 7.2.2.1)
203
+ irb (~> 1.13)
204
+ rackup (>= 1.0.0)
205
+ rake (>= 12.2)
206
+ thor (~> 1.0, >= 1.2.2)
207
+ zeitwerk (~> 2.6)
208
+ rainbow (3.1.1)
209
+ rake (13.2.1)
210
+ rdoc (6.12.0)
211
+ psych (>= 4.0.0)
212
+ regexp_parser (2.10.0)
213
+ reline (0.6.0)
214
+ io-console (~> 0.5)
215
+ rubocop (1.72.2)
216
+ json (~> 2.3)
217
+ language_server-protocol (~> 3.17.0.2)
218
+ lint_roller (~> 1.1.0)
219
+ parallel (~> 1.10)
220
+ parser (>= 3.3.0.2)
221
+ rainbow (>= 2.2.2, < 4.0)
222
+ regexp_parser (>= 2.9.3, < 3.0)
223
+ rubocop-ast (>= 1.38.0, < 2.0)
224
+ ruby-progressbar (~> 1.7)
225
+ unicode-display_width (>= 2.4.0, < 4.0)
226
+ rubocop-ast (1.38.0)
227
+ parser (>= 3.3.1.0)
228
+ rubocop-shopify (2.15.1)
229
+ rubocop (~> 1.51)
230
+ ruby-progressbar (1.13.0)
231
+ securerandom (0.4.1)
232
+ stringio (3.1.5)
233
+ stubberry (0.3.0)
234
+ thor (1.3.2)
235
+ timeout (0.4.3)
236
+ tzinfo (2.0.6)
237
+ concurrent-ruby (~> 1.0)
238
+ unicode-display_width (3.1.4)
239
+ unicode-emoji (~> 4.0, >= 4.0.4)
240
+ unicode-emoji (4.0.4)
241
+ useragent (0.16.11)
242
+ websocket-driver (0.7.7)
243
+ base64
244
+ websocket-extensions (>= 0.1.0)
245
+ websocket-extensions (0.1.5)
246
+ zeitwerk (2.7.2)
247
+
248
+ PLATFORMS
249
+ aarch64-linux-gnu
250
+ aarch64-linux-musl
251
+ arm-linux-gnu
252
+ arm-linux-musl
253
+ arm64-darwin
254
+ x86_64-darwin
255
+ x86_64-linux-gnu
256
+ x86_64-linux-musl
257
+
258
+ DEPENDENCIES
259
+ appraisal
260
+ awesome_print
261
+ bundler (>= 1)
262
+ differ (~> 0.1)
263
+ minitest (~> 5.0)
264
+ pg (~> 1)
265
+ pry-byebug (~> 3.9)
266
+ rails (~> 7.1)
267
+ rails_sql_prettifier!
268
+ rake (>= 12.3.3)
269
+ rubocop-shopify
270
+ stubberry (~> 0.2)
271
+
272
+ BUNDLED WITH
273
+ 2.6.5
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 7.1"
6
+
7
+ gemspec path: "../"