aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2015-02-09 14:28:03 +0100
committerLuc Donnet2015-02-09 14:28:03 +0100
commitfc4f3d87cf4418083b5a8a0ee24669f430106703 (patch)
tree0f390c3bf7fc0f5ef729d0f2c65c71a76dd5b13c
parent85c1db258c11d660bc3e55e0229b1302aae1d02f (diff)
downloadchouette-core-fc4f3d87cf4418083b5a8a0ee24669f430106703.tar.bz2
Initialize sitemap to use help with search engine
-rw-r--r--Capfile3
-rw-r--r--Gemfile11
-rw-r--r--Gemfile.lock88
-rw-r--r--config/deploy.rb2
-rw-r--r--config/sitemap.rb30
-rw-r--r--public/favicon.ico0
-rw-r--r--public/robots.txt1
7 files changed, 99 insertions, 36 deletions
diff --git a/Capfile b/Capfile
index 6f2b99a42..32b3f64d1 100644
--- a/Capfile
+++ b/Capfile
@@ -1,8 +1,9 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
require 'bundler/capistrano'
+require 'capistrano/sitemap_generator'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
-load 'config/deploy' # remove this line to skip loading any of the default tasks \ No newline at end of file
+load 'config/deploy' # remove this line to skip loading any of the default tasks
diff --git a/Gemfile b/Gemfile
index 2018d32e3..6e8e1462f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
source 'https://rails-assets.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '4.1.8'
+gem 'rails', '4.1.9'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
@@ -36,8 +36,13 @@ gem 'spring', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
+# Sitemap
+gem "sitemap_generator"
-gem 'rest_client'
+# API Rest
+gem 'faraday', '~> 0.9.1'
+gem 'faraday_middleware', '~> 0.9.1'
+gem 'kleisli'
platforms :jruby do
gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.3'
@@ -130,6 +135,8 @@ end
group :test, :development do
gem "rspec-rails", "~> 3.1.0"
gem 'capybara', "~> 2.4.0"
+ gem 'capybara-webkit'
+ gem 'poltergeist'
gem 'launchy'
gem 'factory_girl_rails', '1.7'
# gem 'i18n-tasks'
diff --git a/Gemfile.lock b/Gemfile.lock
index d5d62f453..88119a967 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/afimb/ninoxe.git
- revision: 2f7b4b1d91727211c75f98953443fc4088ac2dc2
+ revision: 581fb0b69e22ede7b176116462848b3d2592423b
branch: rails4
specs:
ninoxe (1.1.3)
@@ -26,32 +26,32 @@ GEM
RedCloth (4.2.9)
RedCloth (4.2.9-java)
SyslogLogger (1.4.1)
- actionmailer (4.1.8)
- actionpack (= 4.1.8)
- actionview (= 4.1.8)
+ actionmailer (4.1.9)
+ actionpack (= 4.1.9)
+ actionview (= 4.1.9)
mail (~> 2.5, >= 2.5.4)
- actionpack (4.1.8)
- actionview (= 4.1.8)
- activesupport (= 4.1.8)
+ actionpack (4.1.9)
+ actionview (= 4.1.9)
+ activesupport (= 4.1.9)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- actionview (4.1.8)
- activesupport (= 4.1.8)
+ actionview (4.1.9)
+ activesupport (= 4.1.9)
builder (~> 3.1)
erubis (~> 2.7.0)
- activemodel (4.1.8)
- activesupport (= 4.1.8)
+ activemodel (4.1.9)
+ activesupport (= 4.1.9)
builder (~> 3.1)
- activerecord (4.1.8)
- activemodel (= 4.1.8)
- activesupport (= 4.1.8)
+ activerecord (4.1.9)
+ activemodel (= 4.1.9)
+ activesupport (= 4.1.9)
arel (~> 5.0.0)
activerecord-jdbc-adapter (1.3.13)
activerecord (>= 2.2)
activerecord-jdbcpostgresql-adapter (1.3.13)
activerecord-jdbc-adapter (~> 1.3.13)
jdbc-postgres (>= 9.1)
- activesupport (4.1.8)
+ activesupport (4.1.9)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
@@ -92,9 +92,13 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
+ capybara-webkit (1.4.1)
+ capybara (>= 2.3.0, < 2.5.0)
+ json
celluloid (0.16.0)
timers (~> 4.0.0)
choice (0.1.7)
+ cliver (0.3.2)
cocoon (1.2.6)
coderay (1.1.0)
coffee-rails (4.0.1)
@@ -140,6 +144,10 @@ GEM
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
railties (>= 3.0.0)
+ faraday (0.9.1)
+ multipart-post (>= 1.2, < 3)
+ faraday_middleware (0.9.1)
+ faraday (>= 0.7.4, < 0.10)
fastercsv (1.5.5)
ffi (1.9.6)
ffi (1.9.6-java)
@@ -210,6 +218,7 @@ GEM
jruby-rack (>= 1.1.10)
json (1.8.2)
json (1.8.2-java)
+ kleisli (0.2.6)
language_engine (0.0.6)
rails (~> 4.1.1)
launchy (2.3.0)
@@ -235,6 +244,7 @@ GEM
morrisjs-rails (0.4.3)
railties (> 3.1, < 5)
multi_json (1.10.1)
+ multipart-post (2.0.0)
nenv (0.1.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
@@ -243,7 +253,6 @@ GEM
net-ssh (2.6.2)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
- netrc (0.7.9)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
nokogiri (1.6.5-java)
@@ -253,6 +262,11 @@ GEM
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
pg (0.17.1)
+ poltergeist (1.5.1)
+ capybara (~> 2.1)
+ cliver (~> 0.3.1)
+ multi_json (~> 1.0)
+ websocket-driver (>= 0.2.0)
polyamorous (1.1.0)
activerecord (>= 3.0)
pry (0.10.1)
@@ -271,15 +285,15 @@ GEM
rack (>= 0.9.1)
rack-test (0.6.3)
rack (>= 1.0)
- rails (4.1.8)
- actionmailer (= 4.1.8)
- actionpack (= 4.1.8)
- actionview (= 4.1.8)
- activemodel (= 4.1.8)
- activerecord (= 4.1.8)
- activesupport (= 4.1.8)
+ rails (4.1.9)
+ actionmailer (= 4.1.9)
+ actionpack (= 4.1.9)
+ actionview (= 4.1.9)
+ activemodel (= 4.1.9)
+ activerecord (= 4.1.9)
+ activesupport (= 4.1.9)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.1.8)
+ railties (= 4.1.9)
sprockets-rails (~> 2.0)
rails-assets-bootstrap (3.1.1)
rails-assets-jquery (>= 1.9.0)
@@ -309,9 +323,9 @@ GEM
rails-i18n (4.0.3)
i18n (~> 0.6)
railties (~> 4.0)
- railties (4.1.8)
- actionpack (= 4.1.8)
- activesupport (= 4.1.8)
+ railties (4.1.9)
+ actionpack (= 4.1.9)
+ activesupport (= 4.1.9)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
@@ -330,8 +344,6 @@ GEM
json (~> 1.4)
responders (1.1.2)
railties (>= 3.2, < 4.2)
- rest_client (1.8.2)
- netrc (~> 0.7.7)
rgeo (0.3.20)
roo (1.13.2)
nokogiri
@@ -372,6 +384,8 @@ GEM
simple_form (3.1.0)
actionpack (~> 4.0)
activemodel (~> 4.0)
+ sitemap_generator (5.0.5)
+ builder
slop (3.6.0)
spoon (0.0.4)
ffi
@@ -383,7 +397,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.2.2)
+ sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
@@ -424,6 +438,11 @@ GEM
rubyzip (>= 0.9, < 1.2)
warden (1.2.3)
rack (>= 1.0)
+ websocket-driver (0.5.1)
+ websocket-extensions (>= 0.1.0)
+ websocket-driver (0.5.1-java)
+ websocket-extensions (>= 0.1.0)
+ websocket-extensions (0.1.1)
will_paginate-bootstrap (1.0.0)
will_paginate (>= 3.0.3)
xpath (2.0.0)
@@ -445,6 +464,7 @@ DEPENDENCIES
capistrano
capistrano-ext
capybara (~> 2.4.0)
+ capybara-webkit
cocoon
coffee-rails (~> 4.0.0)
daemons
@@ -455,6 +475,8 @@ DEPENDENCIES
devise-i18n
devise_invitable
factory_girl_rails (= 1.7)
+ faraday (~> 0.9.1)
+ faraday_middleware (~> 0.9.1)
font-awesome-sass (~> 4.2.0)
formtastic (= 2.3.1)
georuby (= 2.3.0)
@@ -469,6 +491,7 @@ DEPENDENCIES
jruby-openssl
jruby-rack-worker
json
+ kleisli
language_engine (= 0.0.6)
launchy
map_layers (= 0.0.4)
@@ -477,8 +500,9 @@ DEPENDENCIES
morrisjs-rails
ninoxe!
pg
+ poltergeist
rabl
- rails (= 4.1.8)
+ rails (= 4.1.9)
rails-assets-bootstrap-sass-official (~> 3.3.0)
rails-assets-eonasdan-bootstrap-datetimepicker (~> 3.1.3)
rails-assets-jquery-tokeninput (~> 1.7.0)
@@ -492,13 +516,13 @@ DEPENDENCIES
raphael-rails
rb-fsevent
rb-inotify
- rest_client
roo
rspec-rails (~> 3.1.0)
rubyzip (~> 1.1.6)
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
simple_form (~> 3.1.0)
+ sitemap_generator
spring
sqlite3
squeel
diff --git a/config/deploy.rb b/config/deploy.rb
index 0f8a3f673..32cb71385 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -20,7 +20,7 @@ set :copy_exclude, ".git/*"
ssh_options[:forward_agent] = true
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")]
-after "deploy:update", "deploy:cleanup", "deploy:group_writable"
+after "deploy:update", "deploy:cleanup", "deploy:group_writable", "deploy:sitemap:refresh"
after "deploy:update_code", "deploy:symlink_shared", "deploy:chouette_command", "deploy:gems"
# ugly workaround for bug https://github.com/capistrano/capistrano/issues/81
before "deploy:assets:precompile", "deploy:symlink_shared"
diff --git a/config/sitemap.rb b/config/sitemap.rb
new file mode 100644
index 000000000..f76476c4e
--- /dev/null
+++ b/config/sitemap.rb
@@ -0,0 +1,30 @@
+# Set the host name for URL creation
+SitemapGenerator::Sitemap.default_host = "http://appli.chouette.mobi/chouette2/"
+
+SitemapGenerator::Sitemap.create do
+ # Put links creation logic here.
+ #
+ # The root path '/' and sitemap index file are added automatically for you.
+ # Links are added to the Sitemap in the order they are specified.
+ #
+ # Usage: add(path, options={})
+ # (default options are used if you don't specify)
+ #
+ # Defaults: :priority => 0.5, :changefreq => 'weekly',
+ # :lastmod => Time.now, :host => default_host
+ #
+ # Examples:
+ #
+ # Add '/articles'
+ #
+ # add articles_path, :priority => 0.7, :changefreq => 'daily'
+ #
+ # Add all articles:
+ #
+ # Article.find_each do |article|
+ # add article_path(article), :lastmod => article.updated_at
+ # end
+
+ add '/help'
+
+end
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index e69de29bb..000000000
--- a/public/favicon.ico
+++ /dev/null
diff --git a/public/robots.txt b/public/robots.txt
index 085187fa5..83584fb50 100644
--- a/public/robots.txt
+++ b/public/robots.txt
@@ -3,3 +3,4 @@
# To ban all spiders from the entire site uncomment the next two lines:
# User-Agent: *
# Disallow: /
+Sitemap: http://appli.chouette.mobi/chouette2/sitemap.xml.gz