table_on_steroids 0.1.1.13 → 0.1.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +58 -56
- data/app/controllers/concerns/table_on_steroids/table_concern.rb +10 -5
- data/lib/table_on_steroids/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0ba364a74ea76311ca1e2772cef86408871a3756499e82793fa63a4f8b95da3
|
4
|
+
data.tar.gz: fe1b250ade931bf258446c94ec756ef969a75d536d89a35f2e5375e6f6bedb7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be347b11343d1cd0860755b40021a2361c1ea80796a5f43ee3f1483ada2fe832dd1389bb350e7bdb5f70e6d92eaece218becfc54b02fc6086531f3db146c93c7
|
7
|
+
data.tar.gz: 2ee840fe5b762f283849597770f6d8a73c8b296095c684bc59adb17da884a05f60d15f472e4bf2248616e137ab7980a2ee1b551d03f2e456962fae17c0f80d3c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
table_on_steroids (0.1.1.
|
4
|
+
table_on_steroids (0.1.1.14)
|
5
5
|
bootstrap-datepicker-rails (~> 1)
|
6
6
|
bootstrap-select-rails (~> 1.3)
|
7
7
|
kaminari (~> 1.1)
|
@@ -9,74 +9,77 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (6.
|
13
|
-
actionview (= 6.
|
14
|
-
activesupport (= 6.
|
15
|
-
rack (~> 2.0)
|
12
|
+
actionpack (6.1.4.7)
|
13
|
+
actionview (= 6.1.4.7)
|
14
|
+
activesupport (= 6.1.4.7)
|
15
|
+
rack (~> 2.0, >= 2.0.9)
|
16
16
|
rack-test (>= 0.6.3)
|
17
17
|
rails-dom-testing (~> 2.0)
|
18
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (6.
|
20
|
-
activesupport (= 6.
|
19
|
+
actionview (6.1.4.7)
|
20
|
+
activesupport (= 6.1.4.7)
|
21
21
|
builder (~> 3.1)
|
22
22
|
erubi (~> 1.4)
|
23
23
|
rails-dom-testing (~> 2.0)
|
24
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activemodel (6.
|
26
|
-
activesupport (= 6.
|
27
|
-
activerecord (6.
|
28
|
-
activemodel (= 6.
|
29
|
-
activesupport (= 6.
|
30
|
-
activesupport (6.
|
25
|
+
activemodel (6.1.4.7)
|
26
|
+
activesupport (= 6.1.4.7)
|
27
|
+
activerecord (6.1.4.7)
|
28
|
+
activemodel (= 6.1.4.7)
|
29
|
+
activesupport (= 6.1.4.7)
|
30
|
+
activesupport (6.1.4.7)
|
31
31
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
32
|
-
i18n (>=
|
33
|
-
minitest (
|
34
|
-
tzinfo (~>
|
35
|
-
zeitwerk (~> 2.
|
36
|
-
bootstrap-datepicker-rails (1.
|
32
|
+
i18n (>= 1.6, < 2)
|
33
|
+
minitest (>= 5.1)
|
34
|
+
tzinfo (~> 2.0)
|
35
|
+
zeitwerk (~> 2.3)
|
36
|
+
bootstrap-datepicker-rails (1.10.0.1)
|
37
37
|
railties (>= 3.0)
|
38
38
|
bootstrap-select-rails (1.13.8)
|
39
|
-
builder (3.
|
40
|
-
concurrent-ruby (1.
|
41
|
-
crass (1.0.
|
39
|
+
builder (3.3.0)
|
40
|
+
concurrent-ruby (1.3.4)
|
41
|
+
crass (1.0.6)
|
42
42
|
diff-lcs (1.3)
|
43
|
-
erubi (1.
|
44
|
-
i18n (1.
|
43
|
+
erubi (1.13.0)
|
44
|
+
i18n (1.14.6)
|
45
45
|
concurrent-ruby (~> 1.0)
|
46
|
-
kaminari (1.
|
46
|
+
kaminari (1.2.2)
|
47
47
|
activesupport (>= 4.1.0)
|
48
|
-
kaminari-actionview (= 1.
|
49
|
-
kaminari-activerecord (= 1.
|
50
|
-
kaminari-core (= 1.
|
51
|
-
kaminari-actionview (1.
|
48
|
+
kaminari-actionview (= 1.2.2)
|
49
|
+
kaminari-activerecord (= 1.2.2)
|
50
|
+
kaminari-core (= 1.2.2)
|
51
|
+
kaminari-actionview (1.2.2)
|
52
52
|
actionview
|
53
|
-
kaminari-core (= 1.
|
54
|
-
kaminari-activerecord (1.
|
53
|
+
kaminari-core (= 1.2.2)
|
54
|
+
kaminari-activerecord (1.2.2)
|
55
55
|
activerecord
|
56
|
-
kaminari-core (= 1.
|
57
|
-
kaminari-core (1.
|
58
|
-
loofah (2.
|
56
|
+
kaminari-core (= 1.2.2)
|
57
|
+
kaminari-core (1.2.2)
|
58
|
+
loofah (2.22.0)
|
59
59
|
crass (~> 1.0.2)
|
60
|
-
nokogiri (>= 1.
|
61
|
-
method_source (
|
62
|
-
mini_portile2 (2.
|
63
|
-
minitest (5.
|
64
|
-
nokogiri (1.
|
65
|
-
mini_portile2 (~> 2.
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
60
|
+
nokogiri (>= 1.12.0)
|
61
|
+
method_source (1.1.0)
|
62
|
+
mini_portile2 (2.6.1)
|
63
|
+
minitest (5.15.0)
|
64
|
+
nokogiri (1.12.5)
|
65
|
+
mini_portile2 (~> 2.6.1)
|
66
|
+
racc (~> 1.4)
|
67
|
+
racc (1.8.1)
|
68
|
+
rack (2.2.9)
|
69
|
+
rack-test (2.1.0)
|
70
|
+
rack (>= 1.3)
|
71
|
+
rails-dom-testing (2.2.0)
|
72
|
+
activesupport (>= 5.0.0)
|
73
|
+
minitest
|
71
74
|
nokogiri (>= 1.6)
|
72
|
-
rails-html-sanitizer (1.
|
73
|
-
loofah (~> 2.
|
74
|
-
railties (6.
|
75
|
-
actionpack (= 6.
|
76
|
-
activesupport (= 6.
|
75
|
+
rails-html-sanitizer (1.5.0)
|
76
|
+
loofah (~> 2.19, >= 2.19.1)
|
77
|
+
railties (6.1.4.7)
|
78
|
+
actionpack (= 6.1.4.7)
|
79
|
+
activesupport (= 6.1.4.7)
|
77
80
|
method_source
|
78
|
-
rake (>= 0.
|
79
|
-
thor (
|
81
|
+
rake (>= 0.13)
|
82
|
+
thor (~> 1.0)
|
80
83
|
rake (10.5.0)
|
81
84
|
rspec (3.8.0)
|
82
85
|
rspec-core (~> 3.8.0)
|
@@ -91,11 +94,10 @@ GEM
|
|
91
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
92
95
|
rspec-support (~> 3.8.0)
|
93
96
|
rspec-support (3.8.0)
|
94
|
-
thor (
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
zeitwerk (2.2.1)
|
97
|
+
thor (1.2.2)
|
98
|
+
tzinfo (2.0.6)
|
99
|
+
concurrent-ruby (~> 1.0)
|
100
|
+
zeitwerk (2.6.18)
|
99
101
|
|
100
102
|
PLATFORMS
|
101
103
|
ruby
|
@@ -40,7 +40,6 @@ module TableOnSteroids
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def filter_and_order(objects, columns_on_steroid, global_search = nil, include_counts = false, all_pages = false, table_on_steroids = nil, rows_to_display = nil)
|
43
|
-
|
44
43
|
limit = rows_to_display || OBJECTS_PER_PAGE
|
45
44
|
|
46
45
|
# execute the global search if you have one
|
@@ -102,15 +101,21 @@ module TableOnSteroids
|
|
102
101
|
include_counts ? [objects, total_pages, total_count, page] : objects
|
103
102
|
end
|
104
103
|
|
105
|
-
def table_csv(objects, columns_on_steroid)
|
104
|
+
def table_csv(objects, columns_on_steroid, client = false)
|
106
105
|
titles = []
|
106
|
+
value_lambda = :download_value_lambda
|
107
|
+
label = :download_label
|
108
|
+
if(client)
|
109
|
+
value_lambda = :client_download_value_lambda
|
110
|
+
label = :client_download_label
|
111
|
+
end
|
107
112
|
csvs = CSV.generate do |csv|
|
108
|
-
columns_on_steroid.select { |_c, v| v[
|
113
|
+
columns_on_steroid.select { |_c, v| v[value_lambda].present? }.each { |_c, v| (v[label].present? ? titles.push(*v[label]) : titles << v[:label]) }
|
109
114
|
csv << titles
|
110
115
|
objects.each do |o|
|
111
116
|
vals = []
|
112
|
-
columns_on_steroid.select { |_c, v| v[
|
113
|
-
vals.push(*v[
|
117
|
+
columns_on_steroid.select { |_c, v| v[value_lambda].present? }.each do |_c, v|
|
118
|
+
vals.push(*v[value_lambda].call(o))
|
114
119
|
end
|
115
120
|
csv << vals
|
116
121
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_on_steroids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marieke Gueye
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap-datepicker-rails
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.7.
|
155
|
+
rubygems_version: 2.7.6.2
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Create awesome tables for rails
|