niceql 0.4.0 → 0.6.1

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.
data/niceql.gemspec CHANGED
@@ -1,4 +1,6 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  lib = File.expand_path("../lib", __FILE__)
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require "niceql/version"
@@ -9,8 +11,12 @@ Gem::Specification.new do |spec|
9
11
  spec.authors = ["alekseyl"]
10
12
  spec.email = ["leshchuk@gmail.com"]
11
13
 
12
- spec.summary = %q{This is simple and nice gem for sql prettifying and formatting. Niceql splits, indent and colorize SQL query and PG errors if any }
13
- spec.description = %q{This is simple and nice gem for sql prettifying and formatting. Niceql splits, indent and colorize SQL query and PG errors if any. Seemless activerecord integration }
14
+ spec.summary = "This is a simple and nice gem for SQL prettifying and formatting. "\
15
+ "Niceql splits, indent and colorize SQL query and PG errors if any. "
16
+ spec.description = "This is a simple and nice gem for SQL prettifying and formatting. "\
17
+ "Niceql splits, indent and colorize SQL query and PG errors if any. "\
18
+ "Could be used as a standalone gem without any dependencies. "\
19
+ "Seamless ActiveRecord integration via rails_sql_prettifier gem. "
14
20
  spec.homepage = "https://github.com/alekseyl/niceql"
15
21
  spec.license = "MIT"
16
22
 
@@ -23,22 +29,23 @@ Gem::Specification.new do |spec|
23
29
  "public gem pushes."
24
30
  end
25
31
 
26
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
32
+ spec.files = %x(git ls-files -z).split("\x0").reject do |f|
27
33
  f.match(%r{^(test|spec|features)/})
28
34
  end
29
35
  spec.bindir = "exe"
30
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
37
  spec.require_paths = ["lib"]
32
38
 
33
- spec.required_ruby_version = '>= 2.4'
34
- spec.add_development_dependency "activerecord", ">= 6.1"
39
+ spec.required_ruby_version = ">= 2.5"
35
40
 
36
- spec.add_development_dependency "bundler", ">= 1"
37
- spec.add_development_dependency "rake", ">= 12.3.3"
38
- spec.add_development_dependency "minitest", "~> 5.0"
41
+ spec.add_development_dependency("awesome_print")
42
+ spec.add_development_dependency("bundler", ">= 1")
43
+ spec.add_development_dependency("minitest", "~> 5.0")
44
+ spec.add_development_dependency("rake", ">= 12.3.3")
45
+ spec.add_development_dependency("rubocop-shopify", "~> 2.0")
39
46
 
40
- spec.add_development_dependency "differ"
41
- spec.add_development_dependency "pry-byebug"
42
- spec.add_development_dependency "benchmark-ips"
43
- spec.add_development_dependency 'sqlite3'
47
+ spec.add_development_dependency("benchmark-ips")
48
+ spec.add_development_dependency("differ")
49
+ spec.add_development_dependency("pry-byebug")
50
+ spec.add_development_dependency("sqlite3")
44
51
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niceql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-01 00:00:00.000000000 Z
11
+ date: 2022-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activerecord
14
+ name: awesome_print
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -53,21 +67,21 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: 12.3.3
55
69
  - !ruby/object:Gem::Dependency
56
- name: minitest
70
+ name: rubocop-shopify
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '5.0'
75
+ version: '2.0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '5.0'
82
+ version: '2.0'
69
83
  - !ruby/object:Gem::Dependency
70
- name: differ
84
+ name: benchmark-ips
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
@@ -81,7 +95,7 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: pry-byebug
98
+ name: differ
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - ">="
@@ -95,7 +109,7 @@ dependencies:
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: benchmark-ips
112
+ name: pry-byebug
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ">="
@@ -122,17 +136,21 @@ dependencies:
122
136
  - - ">="
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
125
- description: 'This is simple and nice gem for sql prettifying and formatting. Niceql
126
- splits, indent and colorize SQL query and PG errors if any. Seemless activerecord
127
- integration '
139
+ description: 'This is a simple and nice gem for SQL prettifying and formatting. Niceql
140
+ splits, indent and colorize SQL query and PG errors if any. Could be used as a standalone
141
+ gem without any dependencies. Seamless ActiveRecord integration via rails_sql_prettifier
142
+ gem. '
128
143
  email:
129
144
  - leshchuk@gmail.com
130
145
  executables: []
131
146
  extensions: []
132
147
  extra_rdoc_files: []
133
148
  files:
149
+ - ".github/dependabot.yml"
150
+ - ".github/workflows/ci.yml"
151
+ - ".github/workflows/rubocop.yml"
134
152
  - ".gitignore"
135
- - ".travis.yml"
153
+ - ".rubocop.yml"
136
154
  - CHANGELOG.md
137
155
  - Gemfile
138
156
  - LICENSE.txt
@@ -142,9 +160,6 @@ files:
142
160
  - bin/setup
143
161
  - err_now.png
144
162
  - err_was.png
145
- - lib/benchmark/cat.rb
146
- - lib/benchmark/gsub.rb
147
- - lib/benchmark/txt
148
163
  - lib/generators/niceql/install_generator.rb
149
164
  - lib/generators/templates/niceql_initializer.rb
150
165
  - lib/niceql.rb
@@ -164,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
179
  requirements:
165
180
  - - ">="
166
181
  - !ruby/object:Gem::Version
167
- version: '2.4'
182
+ version: '2.5'
168
183
  required_rubygems_version: !ruby/object:Gem::Requirement
169
184
  requirements:
170
185
  - - ">="
@@ -174,6 +189,6 @@ requirements: []
174
189
  rubygems_version: 3.0.9
175
190
  signing_key:
176
191
  specification_version: 4
177
- summary: This is simple and nice gem for sql prettifying and formatting. Niceql splits,
178
- indent and colorize SQL query and PG errors if any
192
+ summary: This is a simple and nice gem for SQL prettifying and formatting. Niceql
193
+ splits, indent and colorize SQL query and PG errors if any.
179
194
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4
5
- - 2.5
6
- - 2.3
7
- - 2.6
data/lib/benchmark/cat.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'benchmark/ips'
2
-
3
- # 2 + 1 = 3 object
4
- def slow_plus
5
- 'foo' + 'bar'
6
- end
7
-
8
- # 2 + 1 = 3 object
9
- def slow_concat
10
- 'foo'.concat 'bar'
11
- end
12
-
13
- # 2 + 1 = 3 object
14
- def slow_append
15
- 'foo' << 'bar'
16
- end
17
-
18
- # 1 object
19
- def fast
20
- 'foo' 'bar'
21
- end
22
-
23
- def fast_interpolation
24
- "#{'foo'}#{'bar'}"
25
- end
26
-
27
- Benchmark.ips do |x|
28
- x.report('String#+') { slow_plus }
29
- x.report('String#concat') { slow_concat }
30
- x.report('String#append') { slow_append }
31
- x.report('"foo" "bar"') { fast }
32
- x.report('"#{\'foo\'}#{\'bar\'}"') { fast_interpolation }
33
- x.compare!
34
- end
@@ -1,34 +0,0 @@
1
- require 'benchmark/ips'
2
-
3
- # 2 + 1 = 3 object
4
- def slow_plus
5
- 'foo' + 'bar'
6
- end
7
-
8
- # 2 + 1 = 3 object
9
- def slow_concat
10
- 'foo'.concat 'bar'
11
- end
12
-
13
- # 2 + 1 = 3 object
14
- def slow_append
15
- 'foo' << 'bar'
16
- end
17
-
18
- # 1 object
19
- def fast
20
- 'foo' 'bar'
21
- end
22
-
23
- def fast_interpolation
24
- "#{'foo'}#{'bar'}"
25
- end
26
-
27
- Benchmark.ips do |x|
28
- x.report('String#+') { slow_plus }
29
- x.report('String#concat') { slow_concat }
30
- x.report('String#append') { slow_append }
31
- x.report('"foo" "bar"') { fast }
32
- x.report('"#{\'foo\'}#{\'bar\'}"') { fast_interpolation }
33
- x.compare!
34
- end