avo 2.39.0 → 2.41.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: babf1d23e5b710f7a868e3cf92a6c93cf38dab521ce56fcac29da0e81cf3fb4a
4
- data.tar.gz: 0b09066f69c8d9bc60e08ef539e1bd3c447f1b982e704e282d1f40ae7b753b1c
3
+ metadata.gz: 51cdcebc4079db0bc531fbec4a0e9d3872a7270bd7f2e0f1b5e88111af6b9700
4
+ data.tar.gz: e0520aa64343da6381a016b0b08b471a6b37389e42a8d01f7676f237d37b7525
5
5
  SHA512:
6
- metadata.gz: 8195af9c52ef84949af28140a1e490814bc4b90c093cc1a472fc81f15177fd029ef77530c31a19256ad43eaf423d8e6a8b81368410ed54367deb63969c2ff6f7
7
- data.tar.gz: 534e22265c6b513c97df4e9166749b1f60800b84354ca43f667120fe26505f3b51b84d4ff4badeebe546cfe7f2280cb526658f37370d2888a17ae2803abee8d0
6
+ metadata.gz: a1b077a1cac9372943eec04cc718c6f7a0eabbdd457cf38c5355cbefd3ea3d9908a4713322ad9d24c1ea5a6bcfab509647a3b7f979d3de000ce6dd24e2427f21
7
+ data.tar.gz: 73aae293a9b3e50178e15fe9e4a2d131928704e64c70822183ac974eefd5efc8209a5862ec61d33d08e76e0f56c7d29f8e16d5376730ba3a819352b72e165455
data/Gemfile CHANGED
@@ -91,10 +91,10 @@ group :test do
91
91
  gem "rspec-rails", "~> 4.0.0"
92
92
  gem "rails-controller-testing"
93
93
  # Adds support for Capybara system testing and selenium driver
94
- gem "capybara", "3.36"
94
+ gem "capybara"
95
95
  gem "selenium-webdriver"
96
96
  # Easy installation and use of web drivers to run system tests with browsers
97
- gem "webdrivers"
97
+ gem "webdrivers", ">= 5.3.0"
98
98
  gem "fuubar"
99
99
  gem "simplecov", require: false
100
100
  gem "simplecov-cobertura"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.39.0)
4
+ avo (2.41.0)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -19,40 +19,40 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- actioncable (6.1.7.4)
23
- actionpack (= 6.1.7.4)
24
- activesupport (= 6.1.7.4)
22
+ actioncable (6.1.7.6)
23
+ actionpack (= 6.1.7.6)
24
+ activesupport (= 6.1.7.6)
25
25
  nio4r (~> 2.0)
26
26
  websocket-driver (>= 0.6.1)
27
- actionmailbox (6.1.7.4)
28
- actionpack (= 6.1.7.4)
29
- activejob (= 6.1.7.4)
30
- activerecord (= 6.1.7.4)
31
- activestorage (= 6.1.7.4)
32
- activesupport (= 6.1.7.4)
27
+ actionmailbox (6.1.7.6)
28
+ actionpack (= 6.1.7.6)
29
+ activejob (= 6.1.7.6)
30
+ activerecord (= 6.1.7.6)
31
+ activestorage (= 6.1.7.6)
32
+ activesupport (= 6.1.7.6)
33
33
  mail (>= 2.7.1)
34
- actionmailer (6.1.7.4)
35
- actionpack (= 6.1.7.4)
36
- actionview (= 6.1.7.4)
37
- activejob (= 6.1.7.4)
38
- activesupport (= 6.1.7.4)
34
+ actionmailer (6.1.7.6)
35
+ actionpack (= 6.1.7.6)
36
+ actionview (= 6.1.7.6)
37
+ activejob (= 6.1.7.6)
38
+ activesupport (= 6.1.7.6)
39
39
  mail (~> 2.5, >= 2.5.4)
40
40
  rails-dom-testing (~> 2.0)
41
- actionpack (6.1.7.4)
42
- actionview (= 6.1.7.4)
43
- activesupport (= 6.1.7.4)
41
+ actionpack (6.1.7.6)
42
+ actionview (= 6.1.7.6)
43
+ activesupport (= 6.1.7.6)
44
44
  rack (~> 2.0, >= 2.0.9)
45
45
  rack-test (>= 0.6.3)
46
46
  rails-dom-testing (~> 2.0)
47
47
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
48
- actiontext (6.1.7.4)
49
- actionpack (= 6.1.7.4)
50
- activerecord (= 6.1.7.4)
51
- activestorage (= 6.1.7.4)
52
- activesupport (= 6.1.7.4)
48
+ actiontext (6.1.7.6)
49
+ actionpack (= 6.1.7.6)
50
+ activerecord (= 6.1.7.6)
51
+ activestorage (= 6.1.7.6)
52
+ activesupport (= 6.1.7.6)
53
53
  nokogiri (>= 1.8.5)
54
- actionview (6.1.7.4)
55
- activesupport (= 6.1.7.4)
54
+ actionview (6.1.7.6)
55
+ activesupport (= 6.1.7.6)
56
56
  builder (~> 3.1)
57
57
  erubi (~> 1.4)
58
58
  rails-dom-testing (~> 2.0)
@@ -62,22 +62,22 @@ GEM
62
62
  addressable
63
63
  active_median (0.3.3)
64
64
  activesupport (>= 5.2)
65
- activejob (6.1.7.4)
66
- activesupport (= 6.1.7.4)
65
+ activejob (6.1.7.6)
66
+ activesupport (= 6.1.7.6)
67
67
  globalid (>= 0.3.6)
68
- activemodel (6.1.7.4)
69
- activesupport (= 6.1.7.4)
70
- activerecord (6.1.7.4)
71
- activemodel (= 6.1.7.4)
72
- activesupport (= 6.1.7.4)
73
- activestorage (6.1.7.4)
74
- actionpack (= 6.1.7.4)
75
- activejob (= 6.1.7.4)
76
- activerecord (= 6.1.7.4)
77
- activesupport (= 6.1.7.4)
68
+ activemodel (6.1.7.6)
69
+ activesupport (= 6.1.7.6)
70
+ activerecord (6.1.7.6)
71
+ activemodel (= 6.1.7.6)
72
+ activesupport (= 6.1.7.6)
73
+ activestorage (6.1.7.6)
74
+ actionpack (= 6.1.7.6)
75
+ activejob (= 6.1.7.6)
76
+ activerecord (= 6.1.7.6)
77
+ activesupport (= 6.1.7.6)
78
78
  marcel (~> 1.0)
79
79
  mini_mime (>= 1.1.0)
80
- activesupport (6.1.7.4)
80
+ activesupport (6.1.7.6)
81
81
  concurrent-ruby (~> 1.0, >= 1.0.2)
82
82
  i18n (>= 1.6, < 2)
83
83
  minitest (>= 5.1)
@@ -87,7 +87,7 @@ GEM
87
87
  activerecord (>= 6.0, < 7.1)
88
88
  acts_as_list (1.1.0)
89
89
  activerecord (>= 4.2)
90
- addressable (2.8.1)
90
+ addressable (2.8.5)
91
91
  public_suffix (>= 2.0.2, < 6.0)
92
92
  annotate (3.2.0)
93
93
  activerecord (>= 3.2, < 8.0)
@@ -131,7 +131,7 @@ GEM
131
131
  bump (0.10.0)
132
132
  bundler-integrity (1.0.9)
133
133
  byebug (11.1.3)
134
- capybara (3.36.0)
134
+ capybara (3.39.2)
135
135
  addressable
136
136
  matrix
137
137
  mini_mime (>= 0.1.3)
@@ -141,7 +141,6 @@ GEM
141
141
  regexp_parser (>= 1.5, < 3.0)
142
142
  xpath (~> 3.2)
143
143
  chartkick (4.2.1)
144
- childprocess (4.1.0)
145
144
  concurrent-ruby (1.2.2)
146
145
  countries (4.2.3)
147
146
  i18n_data (~> 0.16.0)
@@ -254,12 +253,12 @@ GEM
254
253
  actionpack (>= 3.2.0, < 7.1)
255
254
  method_source (1.0.0)
256
255
  mini_magick (4.12.0)
257
- mini_mime (1.1.2)
258
- mini_portile2 (2.8.2)
256
+ mini_mime (1.1.5)
257
+ mini_portile2 (2.8.4)
259
258
  minitest (5.19.0)
260
259
  msgpack (1.5.6)
261
260
  multi_xml (0.6.0)
262
- net-imap (0.3.6)
261
+ net-imap (0.3.7)
263
262
  date
264
263
  net-protocol
265
264
  net-pop (0.1.2)
@@ -269,10 +268,10 @@ GEM
269
268
  net-smtp (0.3.3)
270
269
  net-protocol
271
270
  nio4r (2.5.9)
272
- nokogiri (1.15.2)
271
+ nokogiri (1.15.4)
273
272
  mini_portile2 (~> 2.8.2)
274
273
  racc (~> 1.4)
275
- nokogiri (1.15.2-x86_64-linux)
274
+ nokogiri (1.15.4-x86_64-linux)
276
275
  racc (~> 1.4)
277
276
  orm_adapter (0.5.0)
278
277
  pagy (6.0.4)
@@ -283,36 +282,37 @@ GEM
283
282
  prefixed_ids (1.4.0)
284
283
  hashids (>= 1.0.0, < 2.0.0)
285
284
  rails (>= 6.0.0)
286
- public_suffix (5.0.1)
287
- puma (5.6.5)
285
+ public_suffix (5.0.3)
286
+ puma (5.6.7)
288
287
  nio4r (~> 2.0)
289
288
  pundit (2.2.0)
290
289
  activesupport (>= 3.0.0)
291
290
  racc (1.7.1)
292
- rack (2.2.7)
291
+ rack (2.2.8)
293
292
  rack-test (2.1.0)
294
293
  rack (>= 1.3)
295
- rails (6.1.7.4)
296
- actioncable (= 6.1.7.4)
297
- actionmailbox (= 6.1.7.4)
298
- actionmailer (= 6.1.7.4)
299
- actionpack (= 6.1.7.4)
300
- actiontext (= 6.1.7.4)
301
- actionview (= 6.1.7.4)
302
- activejob (= 6.1.7.4)
303
- activemodel (= 6.1.7.4)
304
- activerecord (= 6.1.7.4)
305
- activestorage (= 6.1.7.4)
306
- activesupport (= 6.1.7.4)
294
+ rails (6.1.7.6)
295
+ actioncable (= 6.1.7.6)
296
+ actionmailbox (= 6.1.7.6)
297
+ actionmailer (= 6.1.7.6)
298
+ actionpack (= 6.1.7.6)
299
+ actiontext (= 6.1.7.6)
300
+ actionview (= 6.1.7.6)
301
+ activejob (= 6.1.7.6)
302
+ activemodel (= 6.1.7.6)
303
+ activerecord (= 6.1.7.6)
304
+ activestorage (= 6.1.7.6)
305
+ activesupport (= 6.1.7.6)
307
306
  bundler (>= 1.15.0)
308
- railties (= 6.1.7.4)
307
+ railties (= 6.1.7.6)
309
308
  sprockets-rails (>= 2.0.0)
310
309
  rails-controller-testing (1.0.5)
311
310
  actionpack (>= 5.0.1.rc1)
312
311
  actionview (>= 5.0.1.rc1)
313
312
  activesupport (>= 5.0.1.rc1)
314
- rails-dom-testing (2.0.3)
315
- activesupport (>= 4.2.0)
313
+ rails-dom-testing (2.2.0)
314
+ activesupport (>= 5.0.0)
315
+ minitest
316
316
  nokogiri (>= 1.6)
317
317
  rails-html-sanitizer (1.6.0)
318
318
  loofah (~> 2.21)
@@ -320,9 +320,9 @@ GEM
320
320
  rails-i18n (7.0.5)
321
321
  i18n (>= 0.7, < 2)
322
322
  railties (>= 6.0.0, < 8)
323
- railties (6.1.7.4)
324
- actionpack (= 6.1.7.4)
325
- activesupport (= 6.1.7.4)
323
+ railties (6.1.7.6)
324
+ actionpack (= 6.1.7.6)
325
+ activesupport (= 6.1.7.6)
326
326
  method_source
327
327
  rake (>= 12.2)
328
328
  thor (~> 1.0)
@@ -336,11 +336,11 @@ GEM
336
336
  rb-inotify (0.10.1)
337
337
  ffi (~> 1.0)
338
338
  redis (4.8.1)
339
- regexp_parser (2.7.0)
339
+ regexp_parser (2.8.1)
340
340
  responders (3.0.1)
341
341
  actionpack (>= 5.0)
342
342
  railties (>= 5.0)
343
- rexml (3.2.5)
343
+ rexml (3.2.6)
344
344
  rspec-core (3.11.0)
345
345
  rspec-support (~> 3.11.0)
346
346
  rspec-expectations (3.11.1)
@@ -381,10 +381,10 @@ GEM
381
381
  ruby-vips (2.1.4)
382
382
  ffi (~> 1.12)
383
383
  rubyzip (2.3.2)
384
- selenium-webdriver (4.1.0)
385
- childprocess (>= 0.5, < 5.0)
384
+ selenium-webdriver (4.10.0)
386
385
  rexml (~> 3.2, >= 3.2.5)
387
- rubyzip (>= 1.2.2)
386
+ rubyzip (>= 1.2.2, < 3.0)
387
+ websocket (~> 1.0)
388
388
  simple_po_parser (1.1.6)
389
389
  simplecov (0.22.0)
390
390
  docile (~> 1.1)
@@ -433,15 +433,16 @@ GEM
433
433
  activemodel (>= 6.0.0)
434
434
  bindex (>= 0.4.0)
435
435
  railties (>= 6.0.0)
436
- webdrivers (5.2.0)
436
+ webdrivers (5.3.1)
437
437
  nokogiri (~> 1.6)
438
438
  rubyzip (>= 1.3.0)
439
- selenium-webdriver (~> 4.0)
439
+ selenium-webdriver (~> 4.0, < 4.11)
440
440
  webmock (3.18.1)
441
441
  addressable (>= 2.8.0)
442
442
  crack (>= 0.3.2)
443
443
  hashdiff (>= 0.4.0, < 2.0.0)
444
- websocket-driver (0.7.5)
444
+ websocket (1.2.9)
445
+ websocket-driver (0.7.6)
445
446
  websocket-extensions (>= 0.1.0)
446
447
  websocket-extensions (0.1.5)
447
448
  xpath (3.2.0)
@@ -469,7 +470,7 @@ DEPENDENCIES
469
470
  bump
470
471
  bundler-integrity (~> 1.0)
471
472
  byebug
472
- capybara (= 3.36)
473
+ capybara
473
474
  chartkick
474
475
  countries
475
476
  cssbundling-rails
@@ -519,9 +520,9 @@ DEPENDENCIES
519
520
  test-prof
520
521
  tzinfo-data
521
522
  web-console (>= 3.3.0)
522
- webdrivers
523
+ webdrivers (>= 5.3.0)
523
524
  webmock
524
525
  zeitwerk
525
526
 
526
527
  BUNDLED WITH
527
- 2.4.12
528
+ 2.4.18
@@ -1,24 +1 @@
1
- <%
2
- backgrounds = {
3
- info: 'bg-blue-500',
4
- success: 'bg-green-500',
5
- danger: 'bg-red-500',
6
- warning: 'bg-yellow-500',
7
- }
8
-
9
- label = @value
10
- background = :info
11
-
12
- @options.invert.each do |values, type|
13
- if [values].flatten.map { |value| value }.include? @value
14
- label = @value
15
- background = type.to_sym
16
- next
17
- end
18
- end
19
-
20
- classes = 'whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold block text-center truncate '
21
-
22
- classes += "#{backgrounds[background]} text-white" if backgrounds[background].present?
23
- %>
24
- <span class="<%= classes %>" style="max-width: 120px;"><%= label %></span>
1
+ <span class="<%= classes %>" style="max-width: 120px;"><%= @value %></span>
@@ -4,5 +4,29 @@ class Avo::Fields::Common::BadgeViewerComponent < ViewComponent::Base
4
4
  def initialize(value:, options:)
5
5
  @value = value
6
6
  @options = options
7
+ @backgrounds = {
8
+ info: "bg-blue-500",
9
+ success: "bg-green-500",
10
+ danger: "bg-red-500",
11
+ warning: "bg-yellow-500",
12
+ neutral: "bg-gray-500"
13
+ }
14
+ end
15
+
16
+ def classes
17
+ background = :info
18
+
19
+ @options.invert.each do |values, type|
20
+ if [values].flatten.map { |value| value }.include? @value
21
+ background = type.to_sym
22
+ next
23
+ end
24
+ end
25
+
26
+ classes = "whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold block text-center truncate "
27
+
28
+ classes += "#{@backgrounds[background]} text-white" if @backgrounds[background].present?
29
+
30
+ classes
7
31
  end
8
32
  end
@@ -51,14 +51,14 @@ module Avo
51
51
  scope: resource.class.scope
52
52
  ).handle
53
53
 
54
+ query = apply_scope(query) if should_apply_any_scope?
55
+
54
56
  # Get the count
55
57
  results_count = query.reselect(resource.model_class.primary_key).count
56
58
 
57
59
  # Get the results
58
60
  query = query.limit(8)
59
61
 
60
- query = apply_scope(query) if should_apply_any_scope?
61
-
62
62
  results = apply_search_metadata(query, resource)
63
63
 
64
64
  header = resource.plural_name
data/db/factories.rb CHANGED
@@ -32,7 +32,7 @@ FactoryBot.define do
32
32
  factory :project do
33
33
  name { Faker::App.name }
34
34
  status { ['closed', :rejected, :failed, 'loading', :running, :waiting].sample }
35
- stage { ["Discovery", "Idea", "Done", "On hold", "Cancelled"].sample }
35
+ stage { ["Discovery", "Idea", "Done", "On hold", "Cancelled", "Drafting"].sample }
36
36
  budget { Faker::Number.decimal(l_digits: 4) }
37
37
  country { Faker::Address.country_code }
38
38
  description { Faker::Markdown.sandwich(sentences: 5) }
@@ -8,7 +8,7 @@ module Avo
8
8
 
9
9
  hide_on [:edit, :new]
10
10
 
11
- default_options = {info: :info, success: :success, danger: :danger, warning: :warning}
11
+ default_options = {info: :info, success: :success, danger: :danger, warning: :warning, neutral: :neutral}
12
12
  @options = args[:options].present? ? default_options.merge(args[:options]) : default_options
13
13
  end
14
14
  end
@@ -47,7 +47,7 @@ module Avo
47
47
  def except_on(*where)
48
48
  show_on_all
49
49
  normalize_views(where).flatten.each do |view|
50
- show_on_view view
50
+ hide_on_view view
51
51
  end
52
52
  end
53
53
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.39.0" unless const_defined?(:VERSION)
2
+ VERSION = "2.41.0" unless const_defined?(:VERSION)
3
3
  end
@@ -7997,10 +7997,6 @@ trix-toolbar .trix-button-group:not(:first-child){
7997
7997
  text-transform:capitalize
7998
7998
  }
7999
7999
 
8000
- .italic{
8001
- font-style:italic
8002
- }
8003
-
8004
8000
  .leading-6{
8005
8001
  line-height:1.5rem
8006
8002
  }
@@ -8199,16 +8195,6 @@ trix-toolbar .trix-button-group:not(:first-child){
8199
8195
  color:rgb(22 163 74 / var(--tw-text-opacity))
8200
8196
  }
8201
8197
 
8202
- .\!text-pink-600{
8203
- --tw-text-opacity:1 !important;
8204
- color:rgb(219 39 119 / var(--tw-text-opacity)) !important
8205
- }
8206
-
8207
- .underline{
8208
- -webkit-text-decoration-line:underline;
8209
- text-decoration-line:underline
8210
- }
8211
-
8212
8198
  .no-underline{
8213
8199
  -webkit-text-decoration-line:none;
8214
8200
  text-decoration-line:none
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.39.0
4
+ version: 2.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-08-15 00:00:00.000000000 Z
12
+ date: 2023-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord