niceql 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -1
- data/README.md +5 -4
- data/Rakefile +3 -1
- data/bin/console +1 -0
- data/lib/generators/niceql/install_generator.rb +4 -2
- data/lib/generators/templates/niceql_initializer.rb +3 -1
- data/lib/niceql/version.rb +3 -1
- data/lib/niceql.rb +337 -105
- data/niceql.gemspec +19 -11
- metadata +37 -11
- data/lib/benchmark/cat.rb +0 -34
- data/lib/benchmark/gsub.rb +0 -34
- data/lib/benchmark/txt +0 -748
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: niceql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alekseyl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: awesome_print
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +38,20 @@ dependencies:
|
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
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'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: rake
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,21 +67,21 @@ dependencies:
|
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: 12.3.3
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: rubocop-shopify
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
75
|
+
version: 2.0.0
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
82
|
+
version: 2.0.0
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
84
|
+
name: benchmark-ips
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - ">="
|
@@ -67,7 +95,7 @@ dependencies:
|
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
98
|
+
name: differ
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - ">="
|
@@ -81,7 +109,7 @@ dependencies:
|
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: pry-byebug
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - ">="
|
@@ -119,6 +147,7 @@ extensions: []
|
|
119
147
|
extra_rdoc_files: []
|
120
148
|
files:
|
121
149
|
- ".gitignore"
|
150
|
+
- ".rubocop.yml"
|
122
151
|
- ".travis.yml"
|
123
152
|
- CHANGELOG.md
|
124
153
|
- Gemfile
|
@@ -129,9 +158,6 @@ files:
|
|
129
158
|
- bin/setup
|
130
159
|
- err_now.png
|
131
160
|
- err_was.png
|
132
|
-
- lib/benchmark/cat.rb
|
133
|
-
- lib/benchmark/gsub.rb
|
134
|
-
- lib/benchmark/txt
|
135
161
|
- lib/generators/niceql/install_generator.rb
|
136
162
|
- lib/generators/templates/niceql_initializer.rb
|
137
163
|
- lib/niceql.rb
|
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
|
data/lib/benchmark/gsub.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
|