lifeform 0.14.0 → 0.15.0

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: e2d1f633cb9ed57185677f4cf2e7f6f546fdc8719b6c2d26581ebf1435268980
4
- data.tar.gz: 1cf80390c11ecc03347e006f617c93baa1a3f795db47e5af22a349b591535d5c
3
+ metadata.gz: 0d7eca3cad846f501a2e7c536a1b425892f4345edf541f9c075247f43a0bd745
4
+ data.tar.gz: ecaed27fc58d8f4ee1d4124949e2b70880aee361adfce0a6c88ba4f1a4b15d5d
5
5
  SHA512:
6
- metadata.gz: 159eeda3cc314b5f8d4ff35916c62bc48751f993f2ebe2eff354d32adad130624fe9c7efd87e67b1265eaea6576bb6df21af10b5bff93df7a676094b0e8fbc87
7
- data.tar.gz: aac90b79ca2f2599d1017c1e7543e1ad740c08927feb4f008c4f53df8b5eb32a361901ed725d0ed2354cfebeb68cbabc4188aa41674cc5fb7aa60f6d6cf2dbed
6
+ metadata.gz: 64ebc935866d5a6cfdf196ef9e9415d2a54a583d7782799cfbe5dfa4487000a6bf84565a4af004c6cda90bc4033c7405b58061111f46ce690a7f9159569ec0ac
7
+ data.tar.gz: dd0cf0480e6ec9b64d76235365952a398e1f79514c3903f870a8683fbbce6fcedb26356005b8b8bf4892159130fa22c733886f68df24789bcd09f85fb58cd52f
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.15.0] - 2024-04-17
11
+
12
+ - Add compatibility fixes re: Streamlined
13
+
10
14
  ## [0.14.0] - 2024-03-03
11
15
 
12
16
  - Add Rodauth support in Bridgetown
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifeform (0.14.0)
4
+ lifeform (0.15.0)
5
5
  hash_with_dot_access (>= 1.2)
6
6
  sequel (>= 5.72)
7
7
  streamlined (>= 0.2.0)
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (7.1.1)
13
+ activesupport (7.1.3.2)
14
14
  base64
15
15
  bigdecimal
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -23,41 +23,40 @@ GEM
23
23
  ansi (1.5.0)
24
24
  ast (2.4.2)
25
25
  backport (1.2.0)
26
- base64 (0.1.1)
27
- benchmark (0.2.1)
28
- bigdecimal (3.1.4)
26
+ base64 (0.2.0)
27
+ benchmark (0.3.0)
28
+ bigdecimal (3.1.7)
29
29
  builder (3.2.4)
30
- concurrent-ruby (1.2.2)
30
+ concurrent-ruby (1.2.3)
31
31
  connection_pool (2.4.1)
32
- diff-lcs (1.5.0)
33
- drb (2.1.1)
34
- ruby2_keywords
32
+ diff-lcs (1.5.1)
33
+ drb (2.2.1)
35
34
  e2mmap (0.1.0)
36
35
  erubi (1.12.0)
37
36
  hash_with_dot_access (1.2.0)
38
37
  activesupport (>= 5.0.0, < 8.0)
39
- i18n (1.14.1)
38
+ i18n (1.14.4)
40
39
  concurrent-ruby (~> 1.0)
41
40
  jaro_winkler (1.5.6)
42
- json (2.6.3)
41
+ json (2.7.2)
43
42
  kramdown (2.4.0)
44
43
  rexml
45
44
  kramdown-parser-gfm (1.1.0)
46
45
  kramdown (~> 2.0)
47
46
  language_server-protocol (3.17.0.3)
48
- minitest (5.20.0)
47
+ minitest (5.22.3)
49
48
  minitest-reporters (1.6.1)
50
49
  ansi
51
50
  builder
52
51
  minitest (>= 5.0)
53
52
  ruby-progressbar
54
- mutex_m (0.1.2)
55
- nokogiri (1.15.4-arm64-darwin)
53
+ mutex_m (0.2.0)
54
+ nokogiri (1.16.4-arm64-darwin)
56
55
  racc (~> 1.4)
57
- nokogiri (1.15.4-x86_64-linux)
56
+ nokogiri (1.16.4-x86_64-linux)
58
57
  racc (~> 1.4)
59
- parallel (1.23.0)
60
- parser (3.2.2.4)
58
+ parallel (1.24.0)
59
+ parser (3.3.0.5)
61
60
  ast (~> 2.4.1)
62
61
  racc
63
62
  racc (1.7.3)
@@ -66,37 +65,36 @@ GEM
66
65
  minitest
67
66
  nokogiri (>= 1.6)
68
67
  rainbow (3.1.1)
69
- rake (13.1.0)
70
- regexp_parser (2.8.2)
68
+ rake (13.2.1)
69
+ regexp_parser (2.9.0)
71
70
  reverse_markdown (2.1.1)
72
71
  nokogiri
73
72
  rexml (3.2.6)
74
- rubocop (1.57.2)
73
+ rubocop (1.63.2)
75
74
  json (~> 2.3)
76
75
  language_server-protocol (>= 3.17.0)
77
76
  parallel (~> 1.10)
78
- parser (>= 3.2.2.4)
77
+ parser (>= 3.3.0.2)
79
78
  rainbow (>= 2.2.2, < 4.0)
80
79
  regexp_parser (>= 1.8, < 3.0)
81
80
  rexml (>= 3.2.5, < 4.0)
82
- rubocop-ast (>= 1.28.1, < 2.0)
81
+ rubocop-ast (>= 1.31.1, < 2.0)
83
82
  ruby-progressbar (~> 1.7)
84
83
  unicode-display_width (>= 2.4.0, < 3.0)
85
- rubocop-ast (1.30.0)
86
- parser (>= 3.2.1.0)
87
- rubocop-bridgetown (0.4.1)
84
+ rubocop-ast (1.31.2)
85
+ parser (>= 3.3.0.4)
86
+ rubocop-bridgetown (0.5.0)
88
87
  rubocop (~> 1.23)
89
88
  rubocop-performance (~> 1.12)
90
89
  rubocop-minitest (0.20.1)
91
90
  rubocop (>= 0.90, < 2.0)
92
- rubocop-performance (1.19.1)
93
- rubocop (>= 1.7.0, < 2.0)
94
- rubocop-ast (>= 0.4.0)
91
+ rubocop-performance (1.21.0)
92
+ rubocop (>= 1.48.1, < 2.0)
93
+ rubocop-ast (>= 1.31.1, < 2.0)
95
94
  rubocop-rake (0.6.0)
96
95
  rubocop (~> 1.0)
97
96
  ruby-progressbar (1.13.0)
98
- ruby2_keywords (0.0.5)
99
- sequel (5.74.0)
97
+ sequel (5.79.0)
100
98
  bigdecimal
101
99
  serbea (2.1.0)
102
100
  erubi (>= 1.10)
@@ -116,16 +114,16 @@ GEM
116
114
  thor (~> 1.0)
117
115
  tilt (~> 2.0)
118
116
  yard (~> 0.9, >= 0.9.24)
119
- streamlined (0.3.1)
117
+ streamlined (0.5.2)
120
118
  serbea (>= 2.1)
121
119
  zeitwerk (~> 2.5)
122
- thor (1.3.0)
120
+ thor (1.3.1)
123
121
  tilt (2.3.0)
124
122
  tzinfo (2.0.6)
125
123
  concurrent-ruby (~> 1.0)
126
124
  unicode-display_width (2.5.0)
127
- yard (0.9.34)
128
- zeitwerk (2.6.12)
125
+ yard (0.9.36)
126
+ zeitwerk (2.6.13)
129
127
 
130
128
  PLATFORMS
131
129
  arm64-darwin-21
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Lifeform
2
2
 
3
- Component-centric form object rendering for Ruby. Rails and Bridgetown both supported.
3
+ Component-centric form object rendering for Ruby. Bridgetown, Roda, and Rails all supported.
4
4
 
5
5
  ## Installation
6
6
 
data/lib/lifeform/form.rb CHANGED
@@ -197,7 +197,7 @@ module Lifeform
197
197
  form_tag = library::FORM_TAG
198
198
  parameters[:action] ||= url || (model ? helpers.send(self.class.const_get(:MODEL_PATH_HELPER), model) : nil)
199
199
 
200
- html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc
200
+ html -> { <<~HTML # rubocop:disable Bridgetown/InsecureHeredoc
201
201
  <#{form_tag} #{html_attributes attributes}>
202
202
  #{add_authenticity_token unless parameters[:method].to_s.casecmp("get").zero?}
203
203
  #{@method_tag&.() || ""}
@@ -24,17 +24,17 @@ module Lifeform
24
24
  return "" if !@if.nil? && !@if
25
25
 
26
26
  button_tag = dashed self.class.const_get(:BUTTON_TAG)
27
- label_text = block ? capture(self, &block) : @label.is_a?(Proc) ? @label.pipe : @label # rubocop:disable Style/NestedTernaryOperator
27
+ label_text = block ? capture(self, &block) : @label
28
28
 
29
- field_body = html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc
30
- <#{button_tag}#{html_attributes @attributes, prefix_space: true}>#{text -> { label_text }}</#{button_tag}>
29
+ field_body = html -> { <<~HTML # rubocop:disable Bridgetown/InsecureHeredoc
30
+ <#{button_tag}#{html_attributes @attributes, prefix_space: true}>#{text label_text}</#{button_tag}>
31
31
  HTML
32
32
  }
33
33
 
34
34
  return field_body unless self.class.const_get(:WRAPPER_TAG)
35
35
 
36
36
  wrapper_tag = dashed self.class.const_get(:WRAPPER_TAG)
37
- html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc
37
+ html -> { <<~HTML # rubocop:disable Bridgetown/InsecureHeredoc
38
38
  <#{wrapper_tag} #{html_attributes name: @attributes[:name]}>#{field_body}</#{wrapper_tag}>
39
39
  HTML
40
40
  }
@@ -41,13 +41,13 @@ module Lifeform
41
41
  def value_for_model = @model.send(attributes[:name])
42
42
 
43
43
  def handle_labels
44
- label_text = attributes[:label].is_a?(Proc) ? attributes[:label].pipe : attributes[:label]
44
+ label_text = attributes[:label]
45
45
  label_name = (attributes[:id] || attributes[:name]).to_s
46
46
 
47
47
  @attributes = attributes.filter_map { |k, v| [k, v] unless k == :label }.to_h
48
48
 
49
49
  -> { <<~HTML
50
- <label for="#{text -> { label_name }}">#{text -> { label_text }}</label>
50
+ <label for="#{text -> { label_name }}">#{text label_text}</label>
51
51
  HTML
52
52
  }
53
53
  end
@@ -58,7 +58,7 @@ module Lifeform
58
58
  input_tag = dashed self.class.const_get(:INPUT_TAG)
59
59
  closing_tag = input_tag != "input"
60
60
 
61
- field_body = html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc
61
+ field_body = html -> { <<~HTML # rubocop:disable Bridgetown/InsecureHeredoc
62
62
  #{html(@label || -> {}).to_s.strip}
63
63
  <#{input_tag} #{html_attributes type: @field_type.to_s, **@attributes}>#{
64
64
  "</#{input_tag}>" if closing_tag
@@ -70,7 +70,7 @@ module Lifeform
70
70
  return field_body unless self.class.const_get(:WRAPPER_TAG)
71
71
 
72
72
  wrapper_tag = dashed self.class.const_get(:WRAPPER_TAG)
73
- html -> { <<~HTML # rubocop:disable Bridgetown/HTMLEscapedHeredoc
73
+ html -> { <<~HTML # rubocop:disable Bridgetown/InsecureHeredoc
74
74
  <#{wrapper_tag} #{html_attributes name: @attributes[:name]}>#{field_body.to_s.strip}</#{wrapper_tag}>
75
75
  HTML
76
76
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lifeform
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifeform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-03 00:00:00.000000000 Z
11
+ date: 2024-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hash_with_dot_access