roda-phlex 0.3.0 → 1.0.0.beta1

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: 1012a871d2413c575d0807b04cfc92d9c39bbddc82b3a5769c398a82a1868951
4
- data.tar.gz: 371dac4531e28280836ad52dcb623ef4fef01b7331c2a1a364c9f58fc0b598b8
3
+ metadata.gz: ab83be491f6ff213f1097afe81e6f3af4fba92b87cce26826deae0f2814df623
4
+ data.tar.gz: e874de74010cf0c913df896d356337fc8ed59434a435e037e404de0e650f8268
5
5
  SHA512:
6
- metadata.gz: 0a1221224003fa28b9ea5d73eccd8a93d60d0186d01dd05f2c28947cabfc3b7c1d7b1349159b2778777fe03af25affa4643780505a1b197ec80e9741ae191460
7
- data.tar.gz: c044bf1340e4c95bd72d37c64f1f5af3a183950237b8884d451be51a74e3792eb4fc3a7c6b107779eacaec6e4ce0dd4570aaed7fb075a89664ffa3087ef8cd22
6
+ metadata.gz: e9b359e8a1c34db8c4f1817358bf3b423c63186515455bef90daad7e3135f014c967d70d0086c5a51af3253796a69da3d8ee0399d57c49237991d9323af0d53c
7
+ data.tar.gz: 6f284a8c8ef79ab27ecc5f3ab370381eb1f4396c727907a49494681317b7db70a11bc797fada70af76f03502660e87835df7568fff8eccb29f95f9a72c57e5d4
data/.standard.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/standardrb/standard
3
- ruby_version: 3.0
3
+ ruby_version: 3.2
data/CHANGELOG.md CHANGED
@@ -4,25 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
6
 
7
- ## [Unreleased]
7
+ ## [1.0.0.beta1] - 2025-01-06
8
8
 
9
9
  ### Added
10
10
 
11
- ### Changed
12
-
13
- ### Deprecated
14
-
15
- ### Removed
16
-
17
- ### Fixed
18
-
19
- ### Security
20
-
21
- ## [0.3.0] - 2025-01-27
22
-
23
- ### Added
24
-
25
- - Support for Phlex Component context. (`HelloWorld.new.call(context: {some: :data})`).
11
+ - Support for Phlex 2.0 Component context. (`HelloWorld.new.call(context: {some: :data})`).
26
12
  + Like layout options, the `:context` plugin option can be used to set a default context.
27
13
  The value will be`dup`ed on first use.
28
14
  + `#phlex_context` method to access the context.
@@ -34,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
34
20
 
35
21
  ### Changed
36
22
 
23
+ - Update to phlex 2.0.
37
24
  - `#phlex_layout`, `#phlex_layout_opts`, `#phlex_layout_handler` no longer accept a value to set their value.
38
25
  Use their corresponding `#set_*` methods instead.
39
26
 
@@ -72,8 +59,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
72
59
 
73
60
  ________________________________________________________________________________
74
61
 
75
- [Unreleased]: https://github.com/fnordfish/roda-phlex/compare/v0.3.0...phlex-1
76
- [0.3.0]: https://github.com/fnordfish/roda-phlex/releases/tag/v0.3.0
62
+ [Unreleased]: https://github.com/fnordfish/roda-phlex/compare/v0.2.0...main
77
63
  [0.2.0]: https://github.com/fnordfish/roda-phlex/releases/tag/v0.2.0
78
64
  [0.1.0]: https://github.com/fnordfish/roda-phlex/releases/tag/v0.1.0
79
65
 
data/lib/roda/phlex.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  class Roda
4
4
  module RodaPlugins
5
5
  module Phlex
6
- VERSION = "0.3.0"
6
+ VERSION = "1.0.0.beta1"
7
7
  end
8
8
  end
9
9
  end
@@ -78,7 +78,7 @@ class Roda
78
78
  delegate_mod = Module.new do
79
79
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
80
80
  def #{delegate_name}
81
- @_view_context
81
+ @_context.view_context
82
82
  end
83
83
  RUBY
84
84
 
@@ -195,21 +195,12 @@ class Roda
195
195
  obj
196
196
  end
197
197
 
198
- opts = {view_context: self}
199
- if context
200
- opts[:context] = if context.is_a?(::Phlex::Context)
201
- context
202
- else
203
- ::Phlex::Context.new(context)
204
- end
205
- end
206
-
207
198
  if stream
208
199
  self.stream do |out|
209
- renderer.call(out, **opts)
200
+ renderer.call(out, context: context, view_context: self)
210
201
  end
211
202
  else
212
- renderer.call(**opts)
203
+ renderer.call(context: context, view_context: self)
213
204
  end
214
205
  end
215
206
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-phlex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Schulze
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-27 00:00:00.000000000 Z
10
+ date: 2025-01-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: phlex
@@ -15,20 +15,20 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 1.7.0
18
+ version: 2.0.0.rc1
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '2'
21
+ version: '3'
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.7.0
28
+ version: 2.0.0.rc1
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '2'
31
+ version: '3'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: roda
34
34
  requirement: !ruby/object:Gem::Requirement