phlex-slotable 0.3.0 → 0.3.1

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: 6daa3c251793367884c7260e217d1df50891db3e5e5d07d3510dce8dc9dab868
4
- data.tar.gz: 95a6c59d0c7571933821a8df89b76542789d16fe222677b7be48af06730bd7f1
3
+ metadata.gz: 7ed2552d628d6851db0da87a5105818d55b5a28bda04d7b5dd9dc0f6fe7357a5
4
+ data.tar.gz: dd6b66cb419fae64ee1ea963670735a3773a6d1c26bf18c2cc1be01ad43e559b
5
5
  SHA512:
6
- metadata.gz: 1c04f7d85f3068f064d8b45566de267975cd73d86d5fe7b34114865836b8cdf064cc218f01c86ddc5ffce9b942d39b1ca63f4188af23222e86f4cd6570ad516b
7
- data.tar.gz: 14ac74deabd99d4af0b9370279bb0bf592d9116426c7037f40cee94c198f2d92a3dd034577218b6aaa0fa118cc7e54869966177ada7564ee96b00ca2d0e78687
6
+ metadata.gz: 0aafc0d75f3907534255f8ffdc8800e8541373884c5e149afc12dfd5f1e811644c6f037ec32640501f8faec83dace3ea6368c6a17c51fe88b2e27557813f4b70
7
+ data.tar.gz: a5d11b19a175d1228c0ec7561986dbec0f0a976829b0b0300d599c15d32e801d9afcd4fd2dabdd3a180efccf2f12bde9673ee84744c712fa9aca7b77f3a8e412
data/.standard.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/standardrb/standard
3
- ruby_version: 3.0
3
+ ruby_version: 3.3
4
+ format: progress
5
+ parallel: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.1] - 2024-02-14
4
+ - Support Ruby 2.7
5
+
6
+ *stephannv*
7
+
3
8
  ## [0.3.0] - 2024-02-14
4
9
 
5
10
  - Match Slotable peformance with DeferredRender
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  > Please note that Phlex::Slotable is currently under development and may undergo changes to its API before reaching the stable release (1.0.0). As a result, there may be breaking changes that affect its usage.
3
3
 
4
4
  # Phlex::Slotable
5
+ [![CI](https://github.com/stephannv/phlex-slotable/actions/workflows/main.yml/badge.svg)](https://github.com/stephannv/phlex-slotable/actions/workflows/main.yml)
5
6
 
6
7
  Phlex::Slotable enables slots feature to [Phlex](https://www.phlex.fun/) views. Inspired by ViewComponent.
7
8
 
data/benchmark/main.rb CHANGED
@@ -102,4 +102,5 @@ puts
102
102
  Benchmark.ips do |x|
103
103
  x.report("Deferred") { DeferredListExample.new.call }
104
104
  x.report("Slotable") { SlotableListExample.new.call }
105
+ x.compare!
105
106
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlex
4
4
  module Slotable
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
@@ -62,7 +62,9 @@ module Phlex
62
62
  RUBY
63
63
  else
64
64
  <<-RUBY
65
- def #{slot_name}_slot = @#{slot_name}_slot
65
+ def #{slot_name}_slot
66
+ @#{slot_name}_slot
67
+ end
66
68
  private :#{slot_name}_slot
67
69
  RUBY
68
70
  end
@@ -73,12 +75,16 @@ module Phlex
73
75
  def define_predicate_method(slot_name, many:)
74
76
  predicate_method = if many
75
77
  <<-RUBY
76
- def #{slot_name}_slots? = #{slot_name}_slots.any?
78
+ def #{slot_name}_slots?
79
+ #{slot_name}_slots.any?
80
+ end
77
81
  private :#{slot_name}_slots?
78
82
  RUBY
79
83
  else
80
84
  <<-RUBY
81
- def #{slot_name}_slot? = !#{slot_name}_slot.nil?
85
+ def #{slot_name}_slot?
86
+ !#{slot_name}_slot.nil?
87
+ end
82
88
  private :#{slot_name}_slot?
83
89
  RUBY
84
90
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-slotable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - stephann