lifeform 0.14.0 → 0.16.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: e2d1f633cb9ed57185677f4cf2e7f6f546fdc8719b6c2d26581ebf1435268980
4
- data.tar.gz: 1cf80390c11ecc03347e006f617c93baa1a3f795db47e5af22a349b591535d5c
3
+ metadata.gz: a757ed6ce30cf3a892760a6b9c3c9ba3699475cc8502a90e9de07b56a7a3fb2a
4
+ data.tar.gz: e17f65492dbc44c4a1e874f56b3a336941db2b914986cecce64006119ff71383
5
5
  SHA512:
6
- metadata.gz: 159eeda3cc314b5f8d4ff35916c62bc48751f993f2ebe2eff354d32adad130624fe9c7efd87e67b1265eaea6576bb6df21af10b5bff93df7a676094b0e8fbc87
7
- data.tar.gz: aac90b79ca2f2599d1017c1e7543e1ad740c08927feb4f008c4f53df8b5eb32a361901ed725d0ed2354cfebeb68cbabc4188aa41674cc5fb7aa60f6d6cf2dbed
6
+ metadata.gz: 3a607e2b89f5c52e5ae900b60b53009e5b59f8591ab1ff08b27378eff829cc3eaaa0436561d39caaa0d69583501919132b50856098747f979389c5125d3d2316
7
+ data.tar.gz: badaefd5cd10695da7730f2441cbccaa5e439c6be23e3e77a3d0121dc6be12aecaa0fca28710b65d5990c4359d8c1033f9f56ef7daf3bb44cace089b7958552f
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ ruby-3.1.4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.16.0] - 2025-09-11
11
+
12
+ - Migrate repo to Codeberg
13
+ - Minimum supported Ruby version is 3.1
14
+
15
+ ## [0.15.0] - 2024-04-17
16
+
17
+ - Add compatibility fixes re: Streamlined
18
+
10
19
  ## [0.14.0] - 2024-03-03
11
20
 
12
21
  - 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.16.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,39 @@ 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
- erubi (1.12.0)
37
- hash_with_dot_access (1.2.0)
38
- activesupport (>= 5.0.0, < 8.0)
39
- i18n (1.14.1)
35
+ erubi (1.13.1)
36
+ hash_with_dot_access (2.2.0)
37
+ i18n (1.14.4)
40
38
  concurrent-ruby (~> 1.0)
41
39
  jaro_winkler (1.5.6)
42
- json (2.6.3)
40
+ json (2.7.2)
43
41
  kramdown (2.4.0)
44
42
  rexml
45
43
  kramdown-parser-gfm (1.1.0)
46
44
  kramdown (~> 2.0)
47
45
  language_server-protocol (3.17.0.3)
48
- minitest (5.20.0)
46
+ minitest (5.22.3)
49
47
  minitest-reporters (1.6.1)
50
48
  ansi
51
49
  builder
52
50
  minitest (>= 5.0)
53
51
  ruby-progressbar
54
- mutex_m (0.1.2)
55
- nokogiri (1.15.4-arm64-darwin)
52
+ mutex_m (0.2.0)
53
+ nokogiri (1.16.4-arm64-darwin)
56
54
  racc (~> 1.4)
57
- nokogiri (1.15.4-x86_64-linux)
55
+ nokogiri (1.16.4-x86_64-linux)
58
56
  racc (~> 1.4)
59
- parallel (1.23.0)
60
- parser (3.2.2.4)
57
+ parallel (1.24.0)
58
+ parser (3.3.0.5)
61
59
  ast (~> 2.4.1)
62
60
  racc
63
61
  racc (1.7.3)
@@ -66,41 +64,40 @@ GEM
66
64
  minitest
67
65
  nokogiri (>= 1.6)
68
66
  rainbow (3.1.1)
69
- rake (13.1.0)
70
- regexp_parser (2.8.2)
67
+ rake (13.2.1)
68
+ regexp_parser (2.9.0)
71
69
  reverse_markdown (2.1.1)
72
70
  nokogiri
73
71
  rexml (3.2.6)
74
- rubocop (1.57.2)
72
+ rubocop (1.63.2)
75
73
  json (~> 2.3)
76
74
  language_server-protocol (>= 3.17.0)
77
75
  parallel (~> 1.10)
78
- parser (>= 3.2.2.4)
76
+ parser (>= 3.3.0.2)
79
77
  rainbow (>= 2.2.2, < 4.0)
80
78
  regexp_parser (>= 1.8, < 3.0)
81
79
  rexml (>= 3.2.5, < 4.0)
82
- rubocop-ast (>= 1.28.1, < 2.0)
80
+ rubocop-ast (>= 1.31.1, < 2.0)
83
81
  ruby-progressbar (~> 1.7)
84
82
  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)
83
+ rubocop-ast (1.31.2)
84
+ parser (>= 3.3.0.4)
85
+ rubocop-bridgetown (0.5.0)
88
86
  rubocop (~> 1.23)
89
87
  rubocop-performance (~> 1.12)
90
88
  rubocop-minitest (0.20.1)
91
89
  rubocop (>= 0.90, < 2.0)
92
- rubocop-performance (1.19.1)
93
- rubocop (>= 1.7.0, < 2.0)
94
- rubocop-ast (>= 0.4.0)
90
+ rubocop-performance (1.21.0)
91
+ rubocop (>= 1.48.1, < 2.0)
92
+ rubocop-ast (>= 1.31.1, < 2.0)
95
93
  rubocop-rake (0.6.0)
96
94
  rubocop (~> 1.0)
97
95
  ruby-progressbar (1.13.0)
98
- ruby2_keywords (0.0.5)
99
- sequel (5.74.0)
96
+ sequel (5.96.0)
100
97
  bigdecimal
101
- serbea (2.1.0)
102
- erubi (>= 1.10)
103
- tilt (~> 2.0)
98
+ serbea (2.3.0)
99
+ erubi (>= 1.11)
100
+ tilt (>= 2.1)
104
101
  solargraph (0.45.0)
105
102
  backport (~> 1.2)
106
103
  benchmark
@@ -116,16 +113,16 @@ GEM
116
113
  thor (~> 1.0)
117
114
  tilt (~> 2.0)
118
115
  yard (~> 0.9, >= 0.9.24)
119
- streamlined (0.3.1)
116
+ streamlined (0.6.1)
120
117
  serbea (>= 2.1)
121
118
  zeitwerk (~> 2.5)
122
- thor (1.3.0)
119
+ thor (1.3.1)
123
120
  tilt (2.3.0)
124
121
  tzinfo (2.0.6)
125
122
  concurrent-ruby (~> 1.0)
126
123
  unicode-display_width (2.5.0)
127
- yard (0.9.34)
128
- zeitwerk (2.6.12)
124
+ yard (0.9.36)
125
+ zeitwerk (2.6.18)
129
126
 
130
127
  PLATFORMS
131
128
  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 focused on the [Bridgetown](https://www.bridgetownrb.com) (and Roda) framework.
4
4
 
5
5
  ## Installation
6
6
 
@@ -76,12 +76,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
76
76
 
77
77
  ## Contributing
78
78
 
79
- Bug reports and pull requests are welcome on GitHub at https://github.com/bridgetownrb/lifeform. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/bridgetownrb/lifeform/blob/main/CODE_OF_CONDUCT.md).
79
+ Bug reports and pull requests are welcome on GitHub at https://codeberg.org/jaredwhite/lifeform. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://codeberg.org/jaredwhite/lifeform/src/main/CODE_OF_CONDUCT.md).
80
80
 
81
81
  ## License
82
82
 
83
83
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
84
-
85
- ## Code of Conduct
86
-
87
- Everyone interacting in the Lifeform project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/bridgetownrb/lifeform/blob/main/CODE_OF_CONDUCT.md).
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.16.0"
5
5
  end
data/lifeform.gemspec CHANGED
@@ -9,9 +9,9 @@ Gem::Specification.new do |spec|
9
9
  spec.email = "maintainers@bridgetownrb.com"
10
10
 
11
11
  spec.summary = "Component-centric form object rendering for Ruby"
12
- spec.homepage = "https://github.com/bridgetownrb/lifeform"
12
+ spec.homepage = "https://codeberg.org/jaredwhite/lifeform"
13
13
  spec.license = "MIT"
14
- spec.required_ruby_version = ">= 3.0"
14
+ spec.required_ruby_version = ">= 3.1"
15
15
  spec.metadata["rubygems_mfa_required"] = "true"
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
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.16.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: 2025-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hash_with_dot_access
@@ -97,7 +97,7 @@ files:
97
97
  - lib/lifeform/libraries/shoelace/submit_button.rb
98
98
  - lib/lifeform/version.rb
99
99
  - lifeform.gemspec
100
- homepage: https://github.com/bridgetownrb/lifeform
100
+ homepage: https://codeberg.org/jaredwhite/lifeform
101
101
  licenses:
102
102
  - MIT
103
103
  metadata:
@@ -110,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: '3.0'
113
+ version: '3.1'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.3.3
120
+ rubygems_version: 3.3.26
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Component-centric form object rendering for Ruby