sitepress-core 4.0.9 → 4.1.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: 76f5083f45b325ed030500df3cb10ba4451b42a11289802e6ab37cb58f13dd43
4
- data.tar.gz: 917a6015aa009c80b43f162f60d701c4ff65a77923c05af66cff03a18e8894f6
3
+ metadata.gz: c7461841a13cfaa83b926edf7ca3ef54ed7c9a282bd4054fa2306993a5ada35c
4
+ data.tar.gz: 99f35008c96f43823b2975970cb53d9a4a6a443ab66d77f612798f2becc3733b
5
5
  SHA512:
6
- metadata.gz: 9105ffbbc4843c5b93b6544f883c6f6ed3278c36c0d636f01dbc5a53024185c97894a2ab9c25d12d0f8aee027af1b5d1554e59f307213ca85ff053ecee0d5b9d
7
- data.tar.gz: bff8a41fce87336f05fdf8b14fd31eab4f7da527cf0bda4ac2d52cac812184e2929fd705f3584e566bedf7d31b0e3ded28dea87a0df37876375b37bb1f03b7db
6
+ metadata.gz: afa65610e1faa97f72fb4350794b67a8f1c2d98c37287bbfeac5b9e87d10ac84e2fdef14b5425843aa5f1533829842635711a1304affdf97e8cbe4b973a4f8e5
7
+ data.tar.gz: 651e1664c6004f574eda028a331cdb5f5a69fde8613b33275ded0cb715afd6e310a17dacdb0fe1a901aec827eeb1f6453150b3293e69de9a3ade5ae38241c5b2
@@ -65,8 +65,6 @@ module Sitepress
65
65
  end
66
66
 
67
67
  private
68
- # TODO: I don't want to look this up everytime I try to figure out the
69
- # extension. I'll have to create an extension registry .
70
68
 
71
69
  # Rails has handlers, like `:html` and `:raw` that are both
72
70
  # handlers and formats. If we don't account for this, then the object
@@ -112,25 +112,11 @@ module Sitepress
112
112
  view_context.render inline: body, type: handler
113
113
  end
114
114
 
115
- class << self
116
- attr_accessor :path_suffix_hack_that_you_should_not_use
117
-
118
- def path_suffix_hack_that_you_should_not_use
119
- @path_suffix_hack_that_you_should_not_use ||= ""
120
- end
121
- end
122
-
123
115
  private
124
116
  # Filters parent/child/sibling resources by a type. The default behavior is to only return
125
117
  # resources of the same type. For example given the pages `/a.html`, `/a.gif`, `/a/b.html`,
126
118
  # if you query the parent from page `/a/b.html` you'd only get `/a.html` by default. If you
127
119
  # query the parents via `parents(type: :all)` you'd get get [`/a.html`, `/a.gif`]
128
- #
129
- # TODO: When `type: :all` is scoped, some queries will mistakenly return single resources.
130
- # :all should return an array of arrays to accurately represention levels.
131
- #
132
- # TODO: Put a better extension/mime_type handler into resource tree, then instead of faltening
133
- # below and select, we could call a single map and pull out a resources
134
120
  def filter_resources(type: DEFAULT_FILTER_SCOPE, &block)
135
121
  return [] unless node
136
122
  nodes = block.call
@@ -156,9 +142,9 @@ module Sitepress
156
142
  elsif node.root? and format
157
143
  "#{node.default_name}.#{format}"
158
144
  elsif node.root?
159
- "#{node.default_name}#{self.class.path_suffix_hack_that_you_should_not_use}"
145
+ node.default_name
160
146
  elsif format.nil? or node.default_format == format
161
- "#{node.name}#{self.class.path_suffix_hack_that_you_should_not_use}"
147
+ node.name
162
148
  else
163
149
  "#{node.name}.#{format}"
164
150
  end
@@ -11,7 +11,6 @@ module Sitepress
11
11
  attr_reader :root_path
12
12
  attr_writer :resources_pipeline
13
13
 
14
- # TODO: Get rid of these so that folks have ot call site.resources.get ...
15
14
  extend Forwardable
16
15
  def_delegators :resources, :get, :glob
17
16
  def_delegators :root, :dig
@@ -1,3 +1,3 @@
1
1
  module Sitepress
2
- VERSION = "4.0.9".freeze
2
+ VERSION = "4.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitepress-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.9
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-10-11 00:00:00.000000000 Z
10
+ date: 2025-11-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler