arql 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/lib/arql/definition.rb +2 -2
- data/lib/arql/ext/array.rb +10 -2
- data/lib/arql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf94862baf6c8e5ff36589e84a022e892b4b88664ecc300c51d313a541e982fd
|
4
|
+
data.tar.gz: baa0a4b30e5efeb4083347c18f2863faa764052505e46442e45dd9af519612b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa3a4aba5288c64c7969efe368713e9f2a64ff9dfde3f41d47b9d8f3ec2f64fbfbe5479d6dc1c95281d82f68497616f44f78e84b635e312b6c6e40528871e6cf
|
7
|
+
data.tar.gz: cae343a1411c59e683dcc99ee309d1ca91100c2c8cf22cbff37ffe04cc02e338d38562e0623a752c5f0803926fba1b0f5a2332074ec3f98083dadd0b8439ab0e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
arql (0.2.
|
4
|
+
arql (0.2.3)
|
5
5
|
activerecord (~> 6.0.3)
|
6
6
|
activesupport (~> 6.0.3)
|
7
7
|
caxlsx (~> 3.0.2)
|
@@ -19,12 +19,12 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
activemodel (6.0.3.
|
23
|
-
activesupport (= 6.0.3.
|
24
|
-
activerecord (6.0.3.
|
25
|
-
activemodel (= 6.0.3.
|
26
|
-
activesupport (= 6.0.3.
|
27
|
-
activesupport (6.0.3.
|
22
|
+
activemodel (6.0.3.3)
|
23
|
+
activesupport (= 6.0.3.3)
|
24
|
+
activerecord (6.0.3.3)
|
25
|
+
activemodel (= 6.0.3.3)
|
26
|
+
activesupport (= 6.0.3.3)
|
27
|
+
activesupport (6.0.3.3)
|
28
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
29
29
|
i18n (>= 0.7, < 2)
|
30
30
|
minitest (~> 5.1)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
method_source (1.0.0)
|
45
45
|
mimemagic (0.3.5)
|
46
46
|
mini_portile2 (2.4.0)
|
47
|
-
minitest (5.14.
|
47
|
+
minitest (5.14.2)
|
48
48
|
mysql2 (0.5.3)
|
49
49
|
net-ssh (6.1.0)
|
50
50
|
net-ssh-gateway (2.0.0)
|
data/lib/arql/definition.rb
CHANGED
data/lib/arql/ext/array.rb
CHANGED
@@ -13,8 +13,16 @@ class Array
|
|
13
13
|
end.join("\n")
|
14
14
|
end
|
15
15
|
|
16
|
-
def t(*attrs)
|
17
|
-
if attrs.present? && present? && first.is_a?(ActiveRecord::Base)
|
16
|
+
def t(*attrs, **options)
|
17
|
+
if (attrs.present? || options.present? && options[:except]) && present? && first.is_a?(ActiveRecord::Base)
|
18
|
+
if options.present? && options[:except]
|
19
|
+
attrs = first.attribute_names.map(&:to_sym) if attrs.empty?
|
20
|
+
if options[:except].is_a?(Regexp)
|
21
|
+
attrs.reject! { |e| e =~ options[:except] }
|
22
|
+
else
|
23
|
+
attrs -= [options[:except]].flatten
|
24
|
+
end
|
25
|
+
end
|
18
26
|
puts Terminal::Table.new { |t|
|
19
27
|
t << attrs
|
20
28
|
t << :separator
|
data/lib/arql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liu Xiang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|