simplec 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/simplec/sitemaps_controller.rb +10 -0
- data/app/views/simplec/sitemaps/show.xml.nokogiri +10 -0
- data/config/routes.rb +5 -0
- data/lib/simplec.rb +1 -0
- data/lib/simplec/nokogiri_builder.rb +14 -0
- data/lib/simplec/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6da431d0794fc83ae168fc4d1f2855c197d92c88
|
4
|
+
data.tar.gz: 9cd04030ce94fbd255a5a5e7405acfe408950821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 402d2c6060119484e6cf59095622ca890487c6e31c5d7fd1484cde6e2dc98bd8bcf57db646f76f88ddf7a3c994676511be1d4e729f1cc7ec0c293833cfc208f1
|
7
|
+
data.tar.gz: 8a09931c608d7c9e30343808d587d0869be34b912a9e88c7fa98655735c9c90b9a02e391dcd066a217fcfd8049b5ccdfe8fd8458671d888b0a4f9c302b5d0819
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
Simplec::Engine.routes.draw do
|
2
2
|
|
3
3
|
scope constraints: Simplec::Subdomains do
|
4
|
+
get '/sitemap', to: 'sitemaps#show',
|
5
|
+
format: :xml,
|
6
|
+
constraints: {subdomain: [nil, 'www']}
|
7
|
+
|
4
8
|
resources :embedded_images, path: 'embedded-images', only: :create
|
9
|
+
|
5
10
|
root 'pages#show'
|
6
11
|
get '(*path)', to: 'pages#show', as: :page
|
7
12
|
end
|
data/lib/simplec.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
|
3
|
+
module Simplec
|
4
|
+
class NokogiriBuilder
|
5
|
+
class_attribute :default_format
|
6
|
+
self.default_format = Mime[:xml]
|
7
|
+
|
8
|
+
def self.call(template)
|
9
|
+
"xml = ::Nokogiri::XML::Builder.new(encoding: 'UTF-8') { |xml| #{template.source} }.to_xml;"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
ActionView::Template.register_template_handler :nokogiri, Simplec::NokogiriBuilder
|
data/lib/simplec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- app/controllers/simplec/application_controller.rb
|
132
132
|
- app/controllers/simplec/embedded_images_controller.rb
|
133
133
|
- app/controllers/simplec/pages_controller.rb
|
134
|
+
- app/controllers/simplec/sitemaps_controller.rb
|
134
135
|
- app/helpers/simplec/application_helper.rb
|
135
136
|
- app/jobs/simplec/application_job.rb
|
136
137
|
- app/mailers/simplec/application_mailer.rb
|
@@ -147,6 +148,7 @@ files:
|
|
147
148
|
- app/views/simplec/fields/_string.html.erb
|
148
149
|
- app/views/simplec/fields/_text.html.erb
|
149
150
|
- app/views/simplec/pages/show.html.erb
|
151
|
+
- app/views/simplec/sitemaps/show.xml.nokogiri
|
150
152
|
- config/routes.rb
|
151
153
|
- db/migrate/20170809204353_create_simplec_pages.rb
|
152
154
|
- db/migrate/20170809204511_create_simplec_subdomains.rb
|
@@ -159,6 +161,7 @@ files:
|
|
159
161
|
- lib/simplec/action_view/helper.rb
|
160
162
|
- lib/simplec/embedded_image_actions.rb
|
161
163
|
- lib/simplec/engine.rb
|
164
|
+
- lib/simplec/nokogiri_builder.rb
|
162
165
|
- lib/simplec/page_action_helpers.rb
|
163
166
|
- lib/simplec/version.rb
|
164
167
|
- lib/tasks/simplec_tasks.rake
|