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 +4 -4
- data/lib/sitepress/path.rb +0 -2
- data/lib/sitepress/resource.rb +2 -16
- data/lib/sitepress/site.rb +0 -1
- data/lib/sitepress/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7461841a13cfaa83b926edf7ca3ef54ed7c9a282bd4054fa2306993a5ada35c
|
|
4
|
+
data.tar.gz: 99f35008c96f43823b2975970cb53d9a4a6a443ab66d77f612798f2becc3733b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afa65610e1faa97f72fb4350794b67a8f1c2d98c37287bbfeac5b9e87d10ac84e2fdef14b5425843aa5f1533829842635711a1304affdf97e8cbe4b973a4f8e5
|
|
7
|
+
data.tar.gz: 651e1664c6004f574eda028a331cdb5f5a69fde8613b33275ded0cb715afd6e310a17dacdb0fe1a901aec827eeb1f6453150b3293e69de9a3ade5ae38241c5b2
|
data/lib/sitepress/path.rb
CHANGED
|
@@ -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
|
data/lib/sitepress/resource.rb
CHANGED
|
@@ -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
|
-
|
|
145
|
+
node.default_name
|
|
160
146
|
elsif format.nil? or node.default_format == format
|
|
161
|
-
|
|
147
|
+
node.name
|
|
162
148
|
else
|
|
163
149
|
"#{node.name}.#{format}"
|
|
164
150
|
end
|
data/lib/sitepress/site.rb
CHANGED
data/lib/sitepress/version.rb
CHANGED
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
|
|
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
|
+
date: 2025-11-13 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|