ui_bibz 3.0.9 → 3.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f4c4175c6e3db48739cae5571ddf077acdd27b487f22e15ce8b608170cb5f8f
4
- data.tar.gz: 82c4fd7abf5d669e7af20c204680772389a56a28380b5c28e5c428d96f693ed7
3
+ metadata.gz: 54ca4e2e0b202ae39a08094990382124d427d76eba3f660363c38c1885149b0e
4
+ data.tar.gz: f0852432106832dbe47e0352eb5b429c871b915527a2521f67bee0f0cd354cc8
5
5
  SHA512:
6
- metadata.gz: ea5d33e9f0a31632f719e13c41fa2f8fc64dd1a74ee3a8ccb6ea93a697f91a3d885de3299ec806377fbf0127ae91b843b696e127eb84adee488cde4ccda9947f
7
- data.tar.gz: 9acaa8a446525e350a768717188e902f18a1046ef5043ada106f38bd00d032e2796425753ca7e203fbf1630096fa2b85a09a7ebeb0e3c6f8bbd48f709298b7de
6
+ metadata.gz: ffbedff59c7693aa52801cdb3160c37da738f5c6f1ba108c7c70381904b33011948ab43de44441dfa8206a11d880665e115383a5cd8e1fe85d7a55c2c0db7d07
7
+ data.tar.gz: 4f99eaa56f041cfec23eded17669fe997c9504d2423e10f5a636543b89d35373e3287199022936904df16d85ff71e0ec74d1f6cbd6f83fa462d74bc5313ecc8b
data/.rubocop.yml CHANGED
@@ -173,3 +173,6 @@ Rails/OutputSafety:
173
173
 
174
174
  Rails/SkipsModelValidations:
175
175
  Enabled: false
176
+
177
+ Style/OpenStructUse:
178
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.9)
4
+ ui_bibz (3.0.13)
5
5
  will-paginate-i18n
6
6
  will_paginate (~> 3.3.0)
7
7
  will_paginate-bootstrap4
@@ -9,60 +9,60 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (6.1.4.1)
13
- actionpack (= 6.1.4.1)
14
- activesupport (= 6.1.4.1)
12
+ actioncable (6.1.4.4)
13
+ actionpack (= 6.1.4.4)
14
+ activesupport (= 6.1.4.4)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.1.4.1)
18
- actionpack (= 6.1.4.1)
19
- activejob (= 6.1.4.1)
20
- activerecord (= 6.1.4.1)
21
- activestorage (= 6.1.4.1)
22
- activesupport (= 6.1.4.1)
17
+ actionmailbox (6.1.4.4)
18
+ actionpack (= 6.1.4.4)
19
+ activejob (= 6.1.4.4)
20
+ activerecord (= 6.1.4.4)
21
+ activestorage (= 6.1.4.4)
22
+ activesupport (= 6.1.4.4)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.1.4.1)
25
- actionpack (= 6.1.4.1)
26
- actionview (= 6.1.4.1)
27
- activejob (= 6.1.4.1)
28
- activesupport (= 6.1.4.1)
24
+ actionmailer (6.1.4.4)
25
+ actionpack (= 6.1.4.4)
26
+ actionview (= 6.1.4.4)
27
+ activejob (= 6.1.4.4)
28
+ activesupport (= 6.1.4.4)
29
29
  mail (~> 2.5, >= 2.5.4)
30
30
  rails-dom-testing (~> 2.0)
31
- actionpack (6.1.4.1)
32
- actionview (= 6.1.4.1)
33
- activesupport (= 6.1.4.1)
31
+ actionpack (6.1.4.4)
32
+ actionview (= 6.1.4.4)
33
+ activesupport (= 6.1.4.4)
34
34
  rack (~> 2.0, >= 2.0.9)
35
35
  rack-test (>= 0.6.3)
36
36
  rails-dom-testing (~> 2.0)
37
37
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.1.4.1)
39
- actionpack (= 6.1.4.1)
40
- activerecord (= 6.1.4.1)
41
- activestorage (= 6.1.4.1)
42
- activesupport (= 6.1.4.1)
38
+ actiontext (6.1.4.4)
39
+ actionpack (= 6.1.4.4)
40
+ activerecord (= 6.1.4.4)
41
+ activestorage (= 6.1.4.4)
42
+ activesupport (= 6.1.4.4)
43
43
  nokogiri (>= 1.8.5)
44
- actionview (6.1.4.1)
45
- activesupport (= 6.1.4.1)
44
+ actionview (6.1.4.4)
45
+ activesupport (= 6.1.4.4)
46
46
  builder (~> 3.1)
47
47
  erubi (~> 1.4)
48
48
  rails-dom-testing (~> 2.0)
49
49
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.1.4.1)
51
- activesupport (= 6.1.4.1)
50
+ activejob (6.1.4.4)
51
+ activesupport (= 6.1.4.4)
52
52
  globalid (>= 0.3.6)
53
- activemodel (6.1.4.1)
54
- activesupport (= 6.1.4.1)
55
- activerecord (6.1.4.1)
56
- activemodel (= 6.1.4.1)
57
- activesupport (= 6.1.4.1)
58
- activestorage (6.1.4.1)
59
- actionpack (= 6.1.4.1)
60
- activejob (= 6.1.4.1)
61
- activerecord (= 6.1.4.1)
62
- activesupport (= 6.1.4.1)
53
+ activemodel (6.1.4.4)
54
+ activesupport (= 6.1.4.4)
55
+ activerecord (6.1.4.4)
56
+ activemodel (= 6.1.4.4)
57
+ activesupport (= 6.1.4.4)
58
+ activestorage (6.1.4.4)
59
+ actionpack (= 6.1.4.4)
60
+ activejob (= 6.1.4.4)
61
+ activerecord (= 6.1.4.4)
62
+ activesupport (= 6.1.4.4)
63
63
  marcel (~> 1.0.0)
64
64
  mini_mime (>= 1.1.0)
65
- activesupport (6.1.4.1)
65
+ activesupport (6.1.4.4)
66
66
  concurrent-ruby (~> 1.0, >= 1.0.2)
67
67
  i18n (>= 1.6, < 2)
68
68
  minitest (>= 5.1)
@@ -83,7 +83,7 @@ GEM
83
83
  factory_bot_rails (4.11.1)
84
84
  factory_bot (~> 4.11.1)
85
85
  railties (>= 3.0.0)
86
- globalid (0.5.2)
86
+ globalid (1.0.0)
87
87
  activesupport (>= 5.0)
88
88
  haml (5.2.2)
89
89
  temple (>= 0.8.0)
@@ -99,14 +99,14 @@ GEM
99
99
  haml (>= 4.0, < 6)
100
100
  nokogiri (>= 1.6.0)
101
101
  ruby_parser (~> 3.5)
102
- i18n (1.8.10)
102
+ i18n (1.8.11)
103
103
  concurrent-ruby (~> 1.0)
104
104
  iniparse (1.5.0)
105
105
  jquery-rails (4.4.0)
106
106
  rails-dom-testing (>= 1, < 3)
107
107
  railties (>= 4.2.0)
108
108
  thor (>= 0.14, < 2.0)
109
- loofah (2.12.0)
109
+ loofah (2.13.0)
110
110
  crass (~> 1.0.2)
111
111
  nokogiri (>= 1.5.9)
112
112
  mail (2.7.1)
@@ -115,7 +115,7 @@ GEM
115
115
  method_source (1.0.0)
116
116
  mini_mime (1.1.2)
117
117
  mini_portile2 (2.6.1)
118
- minitest (5.14.4)
118
+ minitest (5.15.0)
119
119
  nio4r (2.5.8)
120
120
  nokogiri (1.12.5)
121
121
  mini_portile2 (~> 2.6.1)
@@ -125,43 +125,43 @@ GEM
125
125
  iniparse (~> 1.4)
126
126
  rexml (~> 3.2)
127
127
  parallel (1.21.0)
128
- parser (3.0.2.0)
128
+ parser (3.0.3.2)
129
129
  ast (~> 2.4.1)
130
130
  racc (1.6.0)
131
131
  rack (2.2.3)
132
132
  rack-test (1.1.0)
133
133
  rack (>= 1.0, < 3)
134
- rails (6.1.4.1)
135
- actioncable (= 6.1.4.1)
136
- actionmailbox (= 6.1.4.1)
137
- actionmailer (= 6.1.4.1)
138
- actionpack (= 6.1.4.1)
139
- actiontext (= 6.1.4.1)
140
- actionview (= 6.1.4.1)
141
- activejob (= 6.1.4.1)
142
- activemodel (= 6.1.4.1)
143
- activerecord (= 6.1.4.1)
144
- activestorage (= 6.1.4.1)
145
- activesupport (= 6.1.4.1)
134
+ rails (6.1.4.4)
135
+ actioncable (= 6.1.4.4)
136
+ actionmailbox (= 6.1.4.4)
137
+ actionmailer (= 6.1.4.4)
138
+ actionpack (= 6.1.4.4)
139
+ actiontext (= 6.1.4.4)
140
+ actionview (= 6.1.4.4)
141
+ activejob (= 6.1.4.4)
142
+ activemodel (= 6.1.4.4)
143
+ activerecord (= 6.1.4.4)
144
+ activestorage (= 6.1.4.4)
145
+ activesupport (= 6.1.4.4)
146
146
  bundler (>= 1.15.0)
147
- railties (= 6.1.4.1)
147
+ railties (= 6.1.4.4)
148
148
  sprockets-rails (>= 2.0.0)
149
149
  rails-dom-testing (2.0.3)
150
150
  activesupport (>= 4.2.0)
151
151
  nokogiri (>= 1.6)
152
152
  rails-html-sanitizer (1.4.2)
153
153
  loofah (~> 2.3)
154
- railties (6.1.4.1)
155
- actionpack (= 6.1.4.1)
156
- activesupport (= 6.1.4.1)
154
+ railties (6.1.4.4)
155
+ actionpack (= 6.1.4.4)
156
+ activesupport (= 6.1.4.4)
157
157
  method_source
158
158
  rake (>= 0.13)
159
159
  thor (~> 1.0)
160
160
  rainbow (3.0.0)
161
161
  rake (13.0.6)
162
- regexp_parser (2.1.1)
162
+ regexp_parser (2.2.0)
163
163
  rexml (3.2.5)
164
- rubocop (1.22.2)
164
+ rubocop (1.23.0)
165
165
  parallel (~> 1.10)
166
166
  parser (>= 3.0.0.0)
167
167
  rainbow (>= 2.2.2, < 4.0)
@@ -170,11 +170,11 @@ GEM
170
170
  rubocop-ast (>= 1.12.0, < 2.0)
171
171
  ruby-progressbar (~> 1.7)
172
172
  unicode-display_width (>= 1.4.0, < 3.0)
173
- rubocop-ast (1.12.0)
173
+ rubocop-ast (1.15.0)
174
174
  parser (>= 3.0.1.1)
175
- rubocop-minitest (0.15.2)
175
+ rubocop-minitest (0.17.0)
176
176
  rubocop (>= 0.90, < 2.0)
177
- rubocop-performance (1.11.5)
177
+ rubocop-performance (1.12.0)
178
178
  rubocop (>= 1.7.0, < 2.0)
179
179
  rubocop-ast (>= 0.4.0)
180
180
  rubocop-rails (2.12.4)
@@ -182,9 +182,9 @@ GEM
182
182
  rack (>= 1.1)
183
183
  rubocop (>= 1.7.0, < 2.0)
184
184
  ruby-progressbar (1.11.0)
185
- ruby_parser (3.17.0)
186
- sexp_processor (~> 4.15, >= 4.15.1)
187
- sexp_processor (4.15.3)
185
+ ruby_parser (3.18.1)
186
+ sexp_processor (~> 4.16)
187
+ sexp_processor (4.16.0)
188
188
  simple_form (5.1.0)
189
189
  actionpack (>= 5.2)
190
190
  activemodel (>= 5.2)
@@ -197,9 +197,9 @@ GEM
197
197
  sprockets (4.0.2)
198
198
  concurrent-ruby (~> 1.0)
199
199
  rack (> 1, < 3)
200
- sprockets-rails (3.2.2)
201
- actionpack (>= 4.0)
202
- activesupport (>= 4.0)
200
+ sprockets-rails (3.4.2)
201
+ actionpack (>= 5.2)
202
+ activesupport (>= 5.2)
203
203
  sprockets (>= 3.0.0)
204
204
  sqlite3 (1.4.2)
205
205
  temple (0.8.2)
@@ -208,6 +208,7 @@ GEM
208
208
  tzinfo (2.0.4)
209
209
  concurrent-ruby (~> 1.0)
210
210
  unicode-display_width (2.1.0)
211
+ webrick (1.7.0)
211
212
  websocket-driver (0.7.5)
212
213
  websocket-extensions (>= 0.1.0)
213
214
  websocket-extensions (0.1.5)
@@ -215,7 +216,8 @@ GEM
215
216
  will_paginate (3.3.1)
216
217
  will_paginate-bootstrap4 (0.2.2)
217
218
  will_paginate (~> 3.0, >= 3.0.0)
218
- yard (0.9.26)
219
+ yard (0.9.27)
220
+ webrick (~> 1.7.0)
219
221
  zeitwerk (2.5.1)
220
222
 
221
223
  PLATFORMS
@@ -82,7 +82,7 @@ module UiBibz::Concerns::Models::Searchable
82
82
 
83
83
  def self.generate_default_sql(sql)
84
84
  if sorting?
85
- sql.paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
85
+ sql.reorder(default_order).paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
86
86
  else
87
87
  sql.reorder(order_sql).paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
88
88
  end
@@ -111,6 +111,10 @@ module UiBibz::Concerns::Models::Searchable
111
111
  @tmp_params[:sort].nil? || @tmp_params[:direction].nil?
112
112
  end
113
113
 
114
+ def self.default_order
115
+ @arguments[:order] || { created_at: :desc }
116
+ end
117
+
114
118
  def self.search_by_query(sql)
115
119
  raise 'Add searchable_attributes method in Model' if @searchable_attributes.nil?
116
120
 
@@ -152,7 +156,7 @@ module UiBibz::Concerns::Models::Searchable
152
156
  end
153
157
 
154
158
  def self.order_sql
155
- sorting? ? "#{table_name}.id asc" : "#{@tmp_params[:sort]} #{@tmp_params[:direction]}"
159
+ sorting? ? '' : "#{@tmp_params[:sort]} #{@tmp_params[:direction]}"
156
160
  end
157
161
 
158
162
  def self.search_sort_paginate
data/lib/ui_bibz/infos.rb CHANGED
@@ -12,6 +12,6 @@ module UiBibz
12
12
  REPO = 'git+https://github.com/thooams/ui_bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams [Thomas HUMMEL]'
15
- VERSION = '3.0.9'
15
+ VERSION = '3.0.13'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -69,9 +69,9 @@ module UiBibz::Ui::Core::Forms::Selects
69
69
  def component_html_options
70
70
  super.merge({
71
71
  multiple: options[:multiple],
72
- disabled: options[:state] == :disabled,
73
- include_blank: false,
74
- prompt: false
72
+ disabled: options[:state] == :disabled
73
+ # include_blank: false,
74
+ # prompt: false
75
75
  })
76
76
  end
77
77
 
data/ui_bibz.gemspec CHANGED
@@ -48,4 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.add_development_dependency 'simple_form'
49
49
  s.add_development_dependency 'sqlite3'
50
50
  s.add_development_dependency 'yard'
51
+ s.metadata = {
52
+ 'rubygems_mfa_required' => 'true'
53
+ }
51
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.9
4
+ version: 3.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams [Thomas HUMMEL]
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -662,7 +662,8 @@ files:
662
662
  homepage: https://hummel.link/ui-bibz/
663
663
  licenses:
664
664
  - MIT
665
- metadata: {}
665
+ metadata:
666
+ rubygems_mfa_required: 'true'
666
667
  post_install_message:
667
668
  rdoc_options: []
668
669
  require_paths: