syntropy 0.38.0 → 0.38.1

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: 85989e43beae58a319d108e1c8cf42f8265fdfaa0675c0fa2b0b8c8df5dbfbd1
4
- data.tar.gz: cd2dd5db7add2b3e3aa74f2a3fa02da3c1896b808a46be16b088e264875aec10
3
+ metadata.gz: 1ec61f53807ee4049d4c5e04ae42f66f3b4824733a04cad245d150a0c72f0acc
4
+ data.tar.gz: ee5b563302d15d6a8d58fc7460636b5f402f726f730c42799862ceb92cafa42f
5
5
  SHA512:
6
- metadata.gz: 3cd0fb5d085456bc8d51db049fecaf11f000071cde6b19dd224c7ec422e1fb749be3ba92dfd5b8a43e3e95313f99b1ffed5f926ca37abd5377e2badd249576f3
7
- data.tar.gz: c3a2b789fe2c9cfbff79b2245381f3ee76bad2e905e3f8408df2666af1495b51f93988d7085c1957330b194237f366e0999b43eb25b8e0e42954f07146aaa5cb
6
+ metadata.gz: 30d9fcc1b9d0db54e4faa8fa009e547d69e8b6b1beeb3684995b9c27c8f22ebffdffc5c3ec0000495aac235d21b6d61b8cb57a2e305941fc3ec00276c12d283c
7
+ data.tar.gz: 8453a4dfc06cba6e3cd741fb1260618af3825366cc937256cb0d2614c6dc520d5da983309c47010e493acbbae66d8a4cc50e898d3cc6723d9189364914c6579a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.38.1 2026-06-13
2
+
3
+ - Fix builtin app, controller extensions
4
+
1
5
  # 0.38.0 2026-06-13
2
6
 
3
7
  - Reimplement controller extensions: `dispatch_by_host`,
data/lib/syntropy/app.rb CHANGED
@@ -25,6 +25,24 @@ module Syntropy
25
25
  site_file_app(env) || default_app(env)
26
26
  end
27
27
 
28
+ BUILTIN_APPLET_app_root = File.expand_path(File.join(__dir__, 'applets/builtin'))
29
+
30
+ # Creates a builtin applet with the given environment hash. By default the
31
+ # builtin applet is mounted at /.syntropy.
32
+ #
33
+ # @param env [Hash] app environment
34
+ # @param mount_path [String] mount path for the builtin applet
35
+ # @return [Syntropy::App] applet
36
+ def builtin_applet(env, mount_path: '/.syntropy')
37
+ new(
38
+ machine: env[:machine],
39
+ app_root: BUILTIN_APPLET_app_root,
40
+ mount_path: mount_path,
41
+ builtin_applet_path: nil,
42
+ watch_files: nil
43
+ )
44
+ end
45
+
28
46
  private
29
47
 
30
48
  # Creates a multi-hostname app if a _site.rb file is detected.
@@ -171,7 +189,7 @@ module Syntropy
171
189
  # @return [void]
172
190
  def mount_builtin_applet
173
191
  path = @env[:builtin_applet_path]
174
- @builtin_applet ||= Syntropy.builtin_applet(@env, mount_path: path)
192
+ @builtin_applet ||= App.builtin_applet(@env, mount_path: path)
175
193
  @routing_tree.mount_applet(path, @builtin_applet)
176
194
  end
177
195
 
@@ -46,15 +46,14 @@ module Syntropy
46
46
 
47
47
  # Returns a list of parsed markdown pages at the given path.
48
48
  #
49
- # @param env [Hash] app environment hash
50
49
  # @param ref [String] directory path
51
50
  # @return [Array<Hash>] array of page entries
52
- def page_list(env, ref)
53
- full_path = File.join(env[:app_root], ref)
51
+ def page_list(ref)
52
+ full_path = File.join(@env[:app_root], ref)
54
53
  raise 'Not a directory' if !File.directory?(full_path)
55
54
 
56
55
  Dir[File.join(full_path, '*.md')].sort.map {
57
- atts, markdown = Syntropy::Markdown.parse(it, env)
56
+ atts, markdown = Syntropy::Markdown.parse(it, @env)
58
57
  { atts:, markdown: }
59
58
  }
60
59
  end
@@ -66,24 +65,6 @@ module Syntropy
66
65
  Syntropy::App.new(**)
67
66
  end
68
67
 
69
- BUILTIN_APPLET_app_root = File.expand_path(File.join(__dir__, 'applets/builtin'))
70
-
71
- # Creates a builtin applet with the given environment hash. By default the
72
- # builtin applet is mounted at /.syntropy.
73
- #
74
- # @param env [Hash] app environment
75
- # @param mount_path [String] mount path for the builtin applet
76
- # @return [Syntropy::App] applet
77
- def builtin_applet(env, mount_path: '/.syntropy')
78
- app(
79
- machine: env[:machine],
80
- app_root: BUILTIN_APPLET_app_root,
81
- mount_path: mount_path,
82
- builtin_applet_path: nil,
83
- watch_files: nil
84
- )
85
- end
86
-
87
68
  private
88
69
 
89
70
  # Finds sites in the root directory for the given environment hash, adds
@@ -243,14 +243,6 @@ module Syntropy
243
243
 
244
244
  attr_reader :__export_value__, :__dependencies__
245
245
 
246
- # Returns a list of pages found at the given ref.
247
- #
248
- # @param ref [String] directory reference
249
- # @return [Array] array of pages found in directory
250
- def page_list(ref)
251
- Syntropy.page_list(@env, ref)
252
- end
253
-
254
246
  # Returns true if the module is a collection module. See also
255
247
  # #collection_module!
256
248
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Syntropy
4
- VERSION = '0.38.0'
4
+ VERSION = '0.38.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syntropy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.38.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner