sitepress-rails 4.0.5 → 4.0.8
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/engine.rb +2 -5
- data/lib/sitepress/rails.rb +0 -1
- data/rails/app/controllers/concerns/sitepress/site_pages.rb +15 -74
- data/rails/lib/generators/sitepress/controller/templates/controllers/site_controller.rb +0 -11
- data/rails/lib/generators/sitepress/install/install_generator.rb +4 -2
- data/rails/lib/generators/sitepress/install/templates/pages/index.html.erb +27 -3
- data/sitepress-rails.gemspec +1 -1
- data/spec/dummy/log/test.log +13374 -40118
- data/spec/dummy/tmp/local_secret.txt +1 -0
- data/spec/sitepress/sitepress_site_controller_spec.rb +1 -5
- metadata +13 -16
- data/lib/sitepress/rendition.rb +0 -28
@@ -0,0 +1 @@
|
|
1
|
+
0b6fbfb4055bb9947ef9e77eb2089e22f780ba281a366a3757aef872cb5b307085e5997b666ffd715290bfa71774092d2fe20727495f8719a0a6bcffd550c151
|
@@ -4,11 +4,7 @@ describe Sitepress::SiteController, type: :controller do
|
|
4
4
|
# Rails 5 introduces a new format of calling the `get` rspec helper method.
|
5
5
|
def get_resource(path)
|
6
6
|
request.env["PATH_INFO"] = path
|
7
|
-
|
8
|
-
get :show, params: { resource_path: path }
|
9
|
-
else
|
10
|
-
get :show, resource_path: path
|
11
|
-
end
|
7
|
+
get :show, params: { resource_path: path }
|
12
8
|
end
|
13
9
|
|
14
10
|
let(:site) { Sitepress.configuration.site }
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitepress-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rspec-rails
|
@@ -44,56 +43,56 @@ dependencies:
|
|
44
43
|
requirements:
|
45
44
|
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
46
|
+
version: '7.0'
|
48
47
|
type: :development
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
53
|
+
version: '7.0'
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: sitepress-core
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - '='
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.0.
|
60
|
+
version: 4.0.8
|
62
61
|
type: :runtime
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - '='
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.0.
|
67
|
+
version: 4.0.8
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
69
|
name: railties
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
74
|
+
version: '7.0'
|
76
75
|
type: :runtime
|
77
76
|
prerelease: false
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
79
|
- - ">="
|
81
80
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
81
|
+
version: '7.0'
|
83
82
|
- !ruby/object:Gem::Dependency
|
84
83
|
name: actionpack
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
86
|
- - ">="
|
88
87
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
88
|
+
version: '7.0'
|
90
89
|
type: :runtime
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
93
|
- - ">="
|
95
94
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
95
|
+
version: '7.0'
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
97
|
name: sprockets-rails
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +107,6 @@ dependencies:
|
|
108
107
|
- - ">="
|
109
108
|
- !ruby/object:Gem::Version
|
110
109
|
version: 2.0.0
|
111
|
-
description:
|
112
110
|
email:
|
113
111
|
- bradgessler@gmail.com
|
114
112
|
executables: []
|
@@ -131,7 +129,6 @@ files:
|
|
131
129
|
- lib/sitepress/rails_configuration.rb
|
132
130
|
- lib/sitepress/renderers/controller.rb
|
133
131
|
- lib/sitepress/renderers/server.rb
|
134
|
-
- lib/sitepress/rendition.rb
|
135
132
|
- lib/sitepress/route_constraint.rb
|
136
133
|
- lib/sitepress/routing_mapper.rb
|
137
134
|
- lib/tasks/sitepress_tasks.rake
|
@@ -206,6 +203,7 @@ files:
|
|
206
203
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
207
204
|
- spec/dummy/public/apple-touch-icon.png
|
208
205
|
- spec/dummy/public/favicon.ico
|
206
|
+
- spec/dummy/tmp/local_secret.txt
|
209
207
|
- spec/sitepress-rails_spec.rb
|
210
208
|
- spec/sitepress/compiler_spec.rb
|
211
209
|
- spec/sitepress/model_spec.rb
|
@@ -227,7 +225,6 @@ metadata:
|
|
227
225
|
homepage_uri: https://sitepress.cc/
|
228
226
|
source_code_uri: https://github.com/sitepress/sitepress
|
229
227
|
changelog_uri: https://github.com/sitepress/sitepress/tags
|
230
|
-
post_install_message:
|
231
228
|
rdoc_options: []
|
232
229
|
require_paths:
|
233
230
|
- lib
|
@@ -242,8 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
239
|
- !ruby/object:Gem::Version
|
243
240
|
version: '0'
|
244
241
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
246
|
-
signing_key:
|
242
|
+
rubygems_version: 3.6.2
|
247
243
|
specification_version: 4
|
248
244
|
summary: Sitepress rails integration.
|
249
245
|
test_files:
|
@@ -305,6 +301,7 @@ test_files:
|
|
305
301
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
306
302
|
- spec/dummy/public/apple-touch-icon.png
|
307
303
|
- spec/dummy/public/favicon.ico
|
304
|
+
- spec/dummy/tmp/local_secret.txt
|
308
305
|
- spec/sitepress/compiler_spec.rb
|
309
306
|
- spec/sitepress/model_spec.rb
|
310
307
|
- spec/sitepress/rails_configuration_spec.rb
|
data/lib/sitepress/rendition.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
module Sitepress
|
2
|
-
# Encapsulates the data needed to render a resource from a controller. This
|
3
|
-
# lets us keep the functions in the controller more functional, which makes them
|
4
|
-
# easier to override by the end users.
|
5
|
-
class Rendition
|
6
|
-
attr_accessor :resource, :output, :layout
|
7
|
-
|
8
|
-
def initialize(resource, layout: nil)
|
9
|
-
@resource = resource
|
10
|
-
end
|
11
|
-
|
12
|
-
def mime_type
|
13
|
-
resource.mime_type.to_s
|
14
|
-
end
|
15
|
-
|
16
|
-
def handler
|
17
|
-
resource.handler
|
18
|
-
end
|
19
|
-
|
20
|
-
def source
|
21
|
-
resource.body
|
22
|
-
end
|
23
|
-
|
24
|
-
def layout
|
25
|
-
resource.data.fetch("layout", @layout)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|