card-mod-bootstrap 0.19.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 597bd98057b94f7445f624be55d6a2d8c9865af97ee27ff62aa65b34d4abe8dc
4
- data.tar.gz: c111f6dcb7ce89d9168c54dc14e9eeac0dd7bd679ceff1cc115ddfbd6ac67d0e
3
+ metadata.gz: 627a72a8888f853f65e73bf7637e89d7dc816bfb32a548e9737bdff9388a2c85
4
+ data.tar.gz: a85a8cc182e3ef53b7db4b9219de53cacb0f8b4df3e4a359e637b90a9cd021c9
5
5
  SHA512:
6
- metadata.gz: cd5610e3a9ab3a7856120d4c14f1a7da8eda95432f0b0789f2147551e63455a881ebd7c5f93d2f64d914719421f1a23503d49d666ef01556f41025df00ad18fb
7
- data.tar.gz: c7f03f35cb04de89fea9b7b93d1a19bb3587c14b207a06e83977c5a89e946a44030412c8133953ce21ef1a49c1eefcdf6ba2d3387da070cb0a1181ea39bb935a
6
+ metadata.gz: 685e12bbee2abae8ed873c8d544642789566aa258d994963644a9210e2c75473df1fecbd6fe548e7274977e50863264ea37b6c7db71dd0dc652a0678f6aadf09
7
+ data.tar.gz: c07b909d96ab57b2e1581cb0a4bafbfc595b5bd25a545f65a19ab3caffd09f8f73490c1c92b274e69f390ed56d4134bfe3ac1a0c0da61424b22b5d27367aa83a
@@ -7,11 +7,11 @@ class Card
7
7
  carousel(*@args, &@build_block)
8
8
  end
9
9
 
10
- def carousel id, active_index, &block
10
+ def carousel(id, active_index, &)
11
11
  @id = id
12
12
  @active_item_index = active_index
13
13
  @items = []
14
- instance_exec(&block)
14
+ instance_exec(&)
15
15
 
16
16
  @html.div class: "carousel slide", id: id, "data-bs-ride" => "true" do
17
17
  indicators
@@ -3,8 +3,8 @@ class Card
3
3
  class Component
4
4
  # support class for bootstrap forms
5
5
  class Form < Component
6
- def render_content *args
7
- form(*args, &@build_block)
6
+ def render_content(*)
7
+ form(*, &@build_block)
8
8
  end
9
9
 
10
10
  #
@@ -35,8 +35,8 @@ class Card
35
35
  end
36
36
  end
37
37
 
38
- def label text=nil, &block
39
- @html.label text, &block
38
+ def label(text=nil, &)
39
+ @html.label(text, &)
40
40
  end
41
41
 
42
42
  def input type, text: nil, label: nil, id: nil
@@ -19,14 +19,14 @@ class Card
19
19
  @rendered = render_content
20
20
  end
21
21
 
22
- def prepend &block
22
+ def prepend(&)
23
23
  tmp = @content.pop
24
- instance_exec(&block)
24
+ instance_exec(&)
25
25
  @content << tmp
26
26
  end
27
27
 
28
- def insert &block
29
- instance_exec(&block)
28
+ def insert(&)
29
+ instance_exec(&)
30
30
  end
31
31
 
32
32
  def append &block
@@ -43,9 +43,9 @@ class Card
43
43
 
44
44
  private
45
45
 
46
- def tag_method_opts args, html_class, tag_opts, &tag_opts_block
46
+ def tag_method_opts(args, html_class, tag_opts, &)
47
47
  opts = {}
48
- _blah, opts, _blah = standardize_args args, &tag_opts_block if block_given?
48
+ _blah, opts, _blah = standardize_args(args, &) if block_given?
49
49
  add_classes opts, html_class, tag_opts.delete(:optional_classes)
50
50
  opts
51
51
  end
@@ -8,8 +8,8 @@ class Card
8
8
 
9
9
  # Like def_tag_method but always generates a div tag
10
10
  # The tag option is not available
11
- def def_div_method name, html_class, opts={}, &tag_block
12
- def_tag_method name, html_class, opts.merge(tag: :div), &tag_block
11
+ def def_div_method(name, html_class, opts={}, &)
12
+ def_tag_method(name, html_class, opts.merge(tag: :div), &)
13
13
  end
14
14
 
15
15
  # Defines a method that generates a html tag
@@ -10,11 +10,11 @@ class Card
10
10
  add_content content_tag(tag_name, collected_content, opts, false)
11
11
  end
12
12
 
13
- def process_content &content_block
13
+ def process_content(&)
14
14
  content, opts = yield
15
15
  wrappers = @wrap.pop
16
16
  if wrappers.present?
17
- process_wrappers wrappers, content, &content_block
17
+ process_wrappers(wrappers, content, &)
18
18
  else
19
19
  add_content content
20
20
  end
@@ -27,11 +27,11 @@ class Card
27
27
  end
28
28
  end
29
29
 
30
- def process_wrappers wrappers, content, &content_block
30
+ def process_wrappers(wrappers, content, &)
31
31
  while wrappers.present?
32
32
  wrapper = wrappers.shift
33
33
  if wrapper.is_a? Symbol
34
- send wrapper, &content_block
34
+ send(wrapper, &)
35
35
  else
36
36
  instance_exec content, &wrappers.shift
37
37
  end
@@ -2,12 +2,12 @@ class Card
2
2
  class Bootstrap
3
3
  # delegating methods to context
4
4
  module Delegate
5
- def method_missing method_name, *args, &block
5
+ def method_missing(method_name, *, &)
6
6
  # return super unless @context.respond_to? method_name
7
7
  if block_given?
8
- @context.send(method_name, *args, &block)
8
+ @context.send(method_name, *, &)
9
9
  else
10
- @context.send(method_name, *args)
10
+ @context.send(method_name, *)
11
11
  end
12
12
  end
13
13
 
@@ -4,7 +4,7 @@ class Card
4
4
  class OldComponent < Component
5
5
  include Content
6
6
 
7
- def initialize context, *args, &block
7
+ def initialize(context, *args, &)
8
8
  super
9
9
  @html = nil
10
10
  end
@@ -16,8 +16,8 @@ class Card
16
16
 
17
17
  # Like add_tag_method but always generates a div tag
18
18
  # The tag option is not available
19
- def add_div_method name, html_class, opts={}, &tag_block
20
- add_tag_method name, html_class, opts.merge(tag: :div), &tag_block
19
+ def add_div_method(name, html_class, opts={}, &)
20
+ add_tag_method(name, html_class, opts.merge(tag: :div), &)
21
21
  end
22
22
 
23
23
  # Defines a method that generates a html tag
@@ -64,12 +64,12 @@ class Card
64
64
 
65
65
  private
66
66
 
67
- def process_tag tag_name, &content_block
67
+ def process_tag(tag_name, &)
68
68
  @content.push "".html_safe
69
69
  @append << []
70
70
  @wrap << []
71
71
 
72
- opts = process_content(&content_block)
72
+ opts = process_content(&)
73
73
  process_collected_content tag_name, opts
74
74
  process_append
75
75
  ""
@@ -15,10 +15,10 @@ class Card
15
15
  @xm = Builder::XmlMarkup.new
16
16
  end
17
17
 
18
- def call *_args, &content_block
18
+ def call(*_args, &)
19
19
  component.content.push "".html_safe
20
20
 
21
- opts = process_content(&content_block)
21
+ opts = process_content(&)
22
22
  process_collected_content tag_name, opts
23
23
  process_append
24
24
  ""
@@ -34,14 +34,14 @@ class Card
34
34
  @component.respond_to? method
35
35
  end
36
36
 
37
- def prepend &block
37
+ def prepend(&)
38
38
  tmp = @content.pop
39
- instance_exec(&block)
39
+ instance_exec(&)
40
40
  @content << tmp
41
41
  end
42
42
 
43
- def wrap &block
44
- instance_exec(&block)
43
+ def wrap(&)
44
+ instance_exec(&)
45
45
  end
46
46
 
47
47
  def append &block
@@ -3,6 +3,7 @@ class Card
3
3
  class Bootstrap
4
4
  include Delegate
5
5
  extend ComponentLoader
6
+
6
7
  load_components
7
8
 
8
9
  attr_reader :context
@@ -11,7 +11,7 @@ format :html do
11
11
  end
12
12
  end
13
13
 
14
- def button_tag content_or_options=nil, options={}, &block
14
+ def button_tag(content_or_options=nil, options={}, &)
15
15
  bootstrapify_button(block_given? ? content_or_options : options)
16
16
  super
17
17
  end
@@ -77,12 +77,12 @@ class TableHelper
77
77
  end
78
78
  end
79
79
 
80
- def tag elem, *args, &block
80
+ def tag(elem, *, &)
81
81
  if @div_table
82
- add_div_table_class elem, *args
82
+ add_div_table_class(elem, *)
83
83
  elem = :div
84
84
  end
85
- @format.wrap_with elem, *args, &block
85
+ @format.wrap_with(elem, *, &)
86
86
  end
87
87
 
88
88
  private
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.19.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -17,70 +17,70 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.109.1
20
+ version: 1.110.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 1.109.1
27
+ version: 1.110.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: card-mod-edit
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 0.19.1
34
+ version: 0.20.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 0.19.1
41
+ version: 0.20.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: card-mod-bar_and_box
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 0.19.1
48
+ version: 0.20.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 0.19.1
55
+ version: 0.20.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: card-mod-style
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: 0.19.1
62
+ version: 0.20.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 0.19.1
69
+ version: 0.20.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: card-mod-script
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 0.19.1
76
+ version: 0.20.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.19.1
83
+ version: 0.20.0
84
84
  description: ''
85
85
  email:
86
86
  - info@decko.org
@@ -3931,7 +3931,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3931
3931
  - !ruby/object:Gem::Version
3932
3932
  version: '0'
3933
3933
  requirements: []
3934
- rubygems_version: 3.6.8
3934
+ rubygems_version: 3.7.2
3935
3935
  specification_version: 4
3936
3936
  summary: Bootstrap
3937
3937
  test_files: []