quadro 0.5.4 → 0.5.5
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 +8 -8
- data/README.md +1 -0
- data/app/controllers/quadro/application_controller.rb +4 -0
- data/app/controllers/quadro/tools_controller.rb +13 -0
- data/app/models/quadro/page.rb +1 -1
- data/app/views/quadro/feeds/atom.xml.builder +1 -1
- data/app/views/quadro/feeds/rss.xml.builder +1 -1
- data/app/views/quadro/shared/_toolbar.html.haml +5 -0
- data/app/views/quadro/shared/templates/page/_list.html.haml +1 -1
- data/app/views/quadro/shared/templates/page/_thumbnail.html.haml +1 -1
- data/app/views/quadro/tools/sitemap_notifier.js.erb +1 -0
- data/config/initializers/sitemap_notifier.rb +16 -0
- data/config/routes.rb +2 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_list.html.haml +1 -1
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_thumbnail.html.haml +1 -1
- data/lib/quadro/loader.rb +1 -0
- data/lib/quadro/version.rb +1 -1
- data/test/dummy/app/views/quadro/shared/templates/page/_list.html.haml +1 -1
- data/test/dummy/app/views/quadro/shared/templates/page/_thumbnail.html.haml +1 -1
- data/test/dummy/db/{test.sqlite3 → development.sqlite3} +0 -0
- data/test/dummy/db/migrate/20160619183944_add_published_at_field_on_quadro_pages.quadro.rb +6 -0
- data/test/dummy/db/schema.rb +2 -1
- data/test/dummy/log/development.log +2 -0
- data/test/dummy/log/test.log +0 -3
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTI2OTNmYjgxZmJkNzk0NjQ4YTllNmQxZDBiMzc3NDhkODUxM2RkOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDIxNGFhNjE3ZjkwMjIxMzcwZGYwYjlmMjA0YmY3YzBlYWQxYzM3OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDYxYjZmZjhhZjFlNmU2NDFiMzUxNDM3MDMwOTEwYjdjZjUyYzliZDA2YjNi
|
10
|
+
YzlhNTBkMTc1MDJhZDI3ZTZmYmIyYTcwMWM0MTgyODllYmIzZTg0NDExMzJl
|
11
|
+
ZmE4ZTc2ODg0ODhhODM0YThhNjMxY2MzMDk1ZjE4NGNkZjVmMzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTRjOWI4OGQxZTYzOGM3MGM4OGRmMzg2ZGNlODE1NjIzMTZhMDc4ODkxOGY3
|
14
|
+
YWM0NmJlMDUyZWY2OGFmY2FlNmY4YzBmMzkwNzRjYjMwZGEyMjUzOTAwNTlh
|
15
|
+
ZWQ2YTQyMjViYzBkMTJlNWUzMjA2ZDU3NjJlMjY4ZWViODM5NDk=
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ With **Quadro** you have the following features:
|
|
13
13
|
- Create your own templates.
|
14
14
|
- Make any area on your template editable.
|
15
15
|
- Auto-generated sitemap.xml.
|
16
|
+
- Manual sitemap.xml ping to search engines (production only).
|
16
17
|
- Upload images for each page.
|
17
18
|
- Use summernote as inline content editor.
|
18
19
|
- Slider with slick carousel.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require_dependency 'quadro/application_controller'
|
2
|
+
|
3
|
+
module Quadro
|
4
|
+
class ToolsController < ApplicationController
|
5
|
+
before_filter :authenticate_user!
|
6
|
+
|
7
|
+
respond_to :js, :json, :xml
|
8
|
+
|
9
|
+
def sitemap_notifier
|
10
|
+
notifier.run(sitemap_url)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/app/models/quadro/page.rb
CHANGED
@@ -36,7 +36,7 @@ module Quadro
|
|
36
36
|
delegate :name, :email, to: :author, prefix: true, allow_nil: true
|
37
37
|
|
38
38
|
# scopes
|
39
|
-
scope :ordered, order('quadro_pages.created_at DESC')
|
39
|
+
scope :ordered, order('quadro_pages.published_at DESC, quadro_pages.created_at DESC')
|
40
40
|
scope :published, where('quadro_pages.published_at IS NOT NULL')
|
41
41
|
|
42
42
|
# methods
|
@@ -15,7 +15,7 @@ xml.feed xmlns: "http://www.w3.org/2005/Atom" do
|
|
15
15
|
xml.id Quadro.railtie_routes_url_helpers.page_url(page)
|
16
16
|
xml.title page.title
|
17
17
|
xml.updated l(page.updated_at, format: :atom, locale: :en)
|
18
|
-
xml.published l(page.
|
18
|
+
xml.published l(page.published_at, format: :atom, locale: :en)
|
19
19
|
xml.summary page.summary
|
20
20
|
xml.author do
|
21
21
|
xml.name page.author_name
|
@@ -16,7 +16,7 @@ xml.rss version: "2.0" do
|
|
16
16
|
xml.title page.title
|
17
17
|
xml.description page.summary
|
18
18
|
xml.link Quadro.railtie_routes_url_helpers.page_url(page)
|
19
|
-
xml.pubDate l(page.
|
19
|
+
xml.pubDate l(page.published_at, format: :rss, locale: :en)
|
20
20
|
xml.author page.author_email
|
21
21
|
xml.guid Quadro.railtie_routes_url_helpers.page_url(page), isPermaLink: true
|
22
22
|
end
|
@@ -59,6 +59,11 @@
|
|
59
59
|
= current_user.email
|
60
60
|
%b.caret
|
61
61
|
%ul.dropdown-menu
|
62
|
+
- unless Rails.env.development?
|
63
|
+
%li
|
64
|
+
= link_to sitemap_notifier_path, remote: true do
|
65
|
+
%i.fa.fa-sitemap
|
66
|
+
Notify sitemap.xml
|
62
67
|
%li
|
63
68
|
= link_to edit_user_path, remote: true do
|
64
69
|
%i.fa.fa-user
|
@@ -0,0 +1 @@
|
|
1
|
+
new Message('Sitemap notified');
|
@@ -0,0 +1,16 @@
|
|
1
|
+
SitemapNotifier::Notifier.configure do |config|
|
2
|
+
# Set URL to your sitemap. This is required.
|
3
|
+
# config.sitemap_url = Quadro.railtie_routes_url_helpers.sitemap_url
|
4
|
+
|
5
|
+
# Enabled in which environments – default is [:production]
|
6
|
+
# config.environments = [:development, :production]
|
7
|
+
|
8
|
+
# Delay to wait between notifications – default is 10 minutes
|
9
|
+
config.delay = 2.minutes
|
10
|
+
|
11
|
+
# Additional urls to ping
|
12
|
+
# config.ping_urls << "http://localhost:3000/ping?sitemap=%{sitemap_url}"
|
13
|
+
|
14
|
+
# If you don't want the notifications to run in the background
|
15
|
+
config.background = false
|
16
|
+
end
|
data/config/routes.rb
CHANGED
@@ -10,6 +10,8 @@ Quadro::Engine.routes.draw do
|
|
10
10
|
match 'sitemap.xml', to: 'sitemaps#sitemap', as: 'sitemap', format: 'xml'
|
11
11
|
match 'robots.txt', to: 'robots#index', as: 'robots', format: 'txt'
|
12
12
|
|
13
|
+
get 'tools/sitemap_notifier', to: 'tools#sitemap_notifier', as: 'sitemap_notifier'
|
14
|
+
|
13
15
|
resources :pages, path: '/' do
|
14
16
|
member do
|
15
17
|
post :form
|
data/lib/quadro/loader.rb
CHANGED
data/lib/quadro/version.rb
CHANGED
File without changes
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20160619183944) do
|
15
15
|
|
16
16
|
create_table "quadro_assets", :force => true do |t|
|
17
17
|
t.integer "assetable_id"
|
@@ -52,6 +52,7 @@ ActiveRecord::Schema.define(:version => 20160615055721) do
|
|
52
52
|
t.datetime "deleted_at"
|
53
53
|
t.datetime "created_at", :null => false
|
54
54
|
t.datetime "updated_at", :null => false
|
55
|
+
t.datetime "published_at"
|
55
56
|
end
|
56
57
|
|
57
58
|
add_index "quadro_pages", ["ancestry"], :name => "index_quadro_pages_on_ancestry"
|
data/test/dummy/log/test.log
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quadro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hugo Gilmar Erazo
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 1.0.8
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: sitemap_notifier
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ~>
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 1.0.0
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ~>
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 1.0.0
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: jquery-rails
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -547,6 +561,7 @@ files:
|
|
547
561
|
- app/controllers/quadro/feeds_controller.rb
|
548
562
|
- app/controllers/quadro/pages_controller.rb
|
549
563
|
- app/controllers/quadro/robots_controller.rb
|
564
|
+
- app/controllers/quadro/tools_controller.rb
|
550
565
|
- app/controllers/quadro/users_controller.rb
|
551
566
|
- app/controllers/quadro/widgets_controller.rb
|
552
567
|
- app/helpers/quadro/application_helper.rb
|
@@ -602,6 +617,7 @@ files:
|
|
602
617
|
- app/views/quadro/shared/templates/_sidebar.html.haml
|
603
618
|
- app/views/quadro/shared/templates/page/_list.html.haml
|
604
619
|
- app/views/quadro/shared/templates/page/_thumbnail.html.haml
|
620
|
+
- app/views/quadro/tools/sitemap_notifier.js.erb
|
605
621
|
- app/views/quadro/users/_edit.html.haml
|
606
622
|
- app/views/quadro/users/edit.js.erb
|
607
623
|
- app/views/quadro/users/update.js.erb
|
@@ -654,6 +670,7 @@ files:
|
|
654
670
|
- config/initializers/simple_form.rb
|
655
671
|
- config/initializers/simple_form_bootstrap.rb
|
656
672
|
- config/initializers/sitemap.rb
|
673
|
+
- config/initializers/sitemap_notifier.rb
|
657
674
|
- config/locales/devise.en.yml
|
658
675
|
- config/locales/kaminari.en.yml
|
659
676
|
- config/locales/quadro.en.yml
|
@@ -728,13 +745,14 @@ files:
|
|
728
745
|
- test/dummy/config/locales/en.yml
|
729
746
|
- test/dummy/config/routes.rb
|
730
747
|
- test/dummy/db/GeoLite2-Country.mmdb
|
748
|
+
- test/dummy/db/development.sqlite3
|
731
749
|
- test/dummy/db/migrate/20160615055717_create_quadro_widgets.quadro.rb
|
732
750
|
- test/dummy/db/migrate/20160615055718_create_quadro_pages.quadro.rb
|
733
751
|
- test/dummy/db/migrate/20160615055719_create_quadro_assets.quadro.rb
|
734
752
|
- test/dummy/db/migrate/20160615055720_devise_create_quadro_users.quadro.rb
|
735
753
|
- test/dummy/db/migrate/20160615055721_create_quadro_interactions.quadro.rb
|
754
|
+
- test/dummy/db/migrate/20160619183944_add_published_at_field_on_quadro_pages.quadro.rb
|
736
755
|
- test/dummy/db/schema.rb
|
737
|
-
- test/dummy/db/test.sqlite3
|
738
756
|
- test/dummy/log/development.log
|
739
757
|
- test/dummy/log/test.log
|
740
758
|
- test/dummy/public/404.html
|
@@ -813,12 +831,13 @@ test_files:
|
|
813
831
|
- test/dummy/config/initializers/session_store.rb
|
814
832
|
- test/dummy/config/initializers/secret_token.rb
|
815
833
|
- test/dummy/db/migrate/20160615055717_create_quadro_widgets.quadro.rb
|
834
|
+
- test/dummy/db/migrate/20160619183944_add_published_at_field_on_quadro_pages.quadro.rb
|
816
835
|
- test/dummy/db/migrate/20160615055721_create_quadro_interactions.quadro.rb
|
817
836
|
- test/dummy/db/migrate/20160615055720_devise_create_quadro_users.quadro.rb
|
818
837
|
- test/dummy/db/migrate/20160615055718_create_quadro_pages.quadro.rb
|
819
838
|
- test/dummy/db/migrate/20160615055719_create_quadro_assets.quadro.rb
|
839
|
+
- test/dummy/db/development.sqlite3
|
820
840
|
- test/dummy/db/schema.rb
|
821
|
-
- test/dummy/db/test.sqlite3
|
822
841
|
- test/dummy/db/GeoLite2-Country.mmdb
|
823
842
|
- test/test_helper.rb
|
824
843
|
- test/integration/navigation_test.rb
|