card-mod-bootstrap 0.15.3 → 0.15.4

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: fcc4d3f01161cab61f303a009c5d1d0d58451a8975827aaef823b1b8e6946d5f
4
- data.tar.gz: 1694abfdd21867f547f11cc06a8ae5dbb37a4fc5e72ac8ede055f05f5f50fbac
3
+ metadata.gz: c628b9b3af9f8b33eb07501f9759c886f99ebe516e964963e6459b65da8edbe9
4
+ data.tar.gz: 6961fa91501b8e68b14cea4d69c28b96e7392e67e288f3651caf8a197628a64e
5
5
  SHA512:
6
- metadata.gz: 286075019b819cad49206df3e9c8c948cc79e9a0b610cc3f1cd9b92f8d8c512fa27c59eac2849c2c56d9f324ac4aadb386c9bb462de9dafb9cf00afd2f88b914
7
- data.tar.gz: 2a86694796056a962b6925042ada22a14364c83ea2c6d02089706e3faa19e6bf70236f9ee489cf7c62b2c5fcd1705e32b7f64fa0f87285dd1338782422b14954
6
+ metadata.gz: 3652d0841c72294560468936fa600a0c121329a12e78ffc2199fc85c8b84d8a3860219ea68d9bd92b67cc69d647161f92421cd52abfbb87168bc1d59e8b2ab0e
7
+ data.tar.gz: c394ca1d50ec9f00028320e3b0034ab74d8c044c0d75df15e319e33b8073f8840115cc0c7a234f1d7fbf99123b81f4408caf969d7c2d235449a6ff0b7d958ef3
@@ -3,32 +3,34 @@ class RemoveCustomizedBootswatchSkins < Cardio::Migration::Core
3
3
  def up
4
4
  return unless Card::Codename[:customized_bootswatch_skin]
5
5
 
6
+ clean_up_stylesheet_lists
6
7
  convert_bootswatch_skins
7
8
  delete_code_card :customized_bootswatch_skin
8
9
  end
9
10
 
10
11
  def convert_bootswatch_skins
11
- parent_field_name = :parent.cardname
12
+ parent_field_name = Card::Codename.exist?(:parent) ? :parent.cardname : "parent"
12
13
  Card.search(type_id: ::Card::CustomizedBootswatchSkinID) do |card|
13
14
  update_args = { type_id: Card::BootswatchSkinID, skip: :asset_input_changed }
14
15
  parent = find_parent(card.name)
15
16
  if parent && parent.id != card.id
16
17
  update_args[:subcards] = { "+#{parent_field_name}" => { content: parent.name } }
17
18
  end
18
- # delete_empty_stylesheets card
19
+ fix_stylesheets_field card
19
20
  card.field(:variables)&.update content: ""
20
21
  card.update! update_args
21
22
  end
22
23
  Card::Cache.reset_all
23
24
  end
24
25
 
25
- # def delete_empty_stylesheets card
26
- # s = card.fetch :stylesheets
27
- # binding.pry
28
- # return unless s&.item_names.present?
29
- #
30
- # s.update! content: (s.item_cards.map { |c| c.name if c.real? }.compact)
31
- # end
26
+ def fix_stylesheets_field skin
27
+ fld = skin.field :stylesheets
28
+ return unless fld.real? && fld.try(:item_names).present?
29
+ fld.content = fld.item_names.select do |i|
30
+ fld.try(:ok_item_types)&.include? i.card&.type_code
31
+ end
32
+ fld.save!
33
+ end
32
34
 
33
35
  def find_parent card_name
34
36
  potential_parent_name = card_name.downcase.sub("customized", "").gsub(/\d/, "").strip
@@ -9,5 +9,5 @@
9
9
  - if subheader
10
10
  .accordion-subheader.bg-light.p-2.text-end
11
11
  = subheader
12
- .accordion-body{ class: classy("accordion-body") }
12
+ .d0-card-body{ class: classy("accordion-body") }
13
13
  = body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.3
4
+ version: 0.15.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-03-29 00:00:00.000000000 Z
13
+ date: 2023-04-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,70 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.3
21
+ version: 1.105.4
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.3
28
+ version: 1.105.4
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-edit
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.3
35
+ version: 0.15.4
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.15.3
42
+ version: 0.15.4
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-bar_and_box
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.15.3
49
+ version: 0.15.4
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.15.3
56
+ version: 0.15.4
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-style
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.3
63
+ version: 0.15.4
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.3
70
+ version: 0.15.4
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: card-mod-script
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.15.3
77
+ version: 0.15.4
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.15.3
84
+ version: 0.15.4
85
85
  description: ''
86
86
  email:
87
87
  - info@decko.org