Utilisable avec sqlite3
This commit is contained in:
parent
c8edeef4ef
commit
231aeb759c
@ -5,7 +5,8 @@ Ceci est une application permettant de lister des évènements sur un calendier,
|
|||||||
d'être affichés.
|
d'être affichés.
|
||||||
|
|
||||||
Cette application est disponible sous la license AGPL version 3 ou supérieure.
|
Cette application est disponible sous la license AGPL version 3 ou supérieure.
|
||||||
Elle est hébergée ici: https://gitorious.org/agenda-du-libre-rails
|
Elle est hébergée ici: https://gitorious.org/agenda-du-libre-rails et visible
|
||||||
|
ici: http://agendadulibre.org
|
||||||
|
|
||||||
La technologie repose sur "Ruby on Rails", version 4 ou supérieure.
|
La technologie repose sur "Ruby on Rails", version 4 ou supérieure.
|
||||||
|
|
||||||
@ -25,13 +26,14 @@ Par exemple:
|
|||||||
~ $ bundle install --path vendor/bundle
|
~ $ bundle install --path vendor/bundle
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
La base de données peut être "sqlite3", "postgresql" ou "mysql". Vous devrez la
|
La base de données peut être "sqlite3", "postgresql" ou "mysql". Par défaut
|
||||||
configurer par le fichier `config/database.yml`.
|
sqlite3 est configurée, mais vous pouvez la modifier dans le fichier
|
||||||
|
`config/database.yml`.
|
||||||
|
|
||||||
Sous un environnement comme debian, il faut aussi les paquets "build-essential"
|
Sous un environnement comme debian, il faut aussi les paquets "build-essential"
|
||||||
et "libmysqlclient-dev".
|
et "libsqlite3-dev" (ou "libmysqlclient-dev").
|
||||||
|
|
||||||
Une fois configurée, mettez en place le schéma comme ceci:
|
Mettez en place le schéma comme ceci:
|
||||||
{{{
|
{{{
|
||||||
~ $ rake db:setup
|
~ $ rake db:setup
|
||||||
}}}
|
}}}
|
||||||
|
@ -23,5 +23,8 @@ ActiveAdmin.register_page 'Dashboard' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
panel "ActiveAdmin" do
|
||||||
|
para %(Currently deployed: #{`git describe --tags --abbrev=0`}, #{link_to(`git rev-parse --short HEAD`, "https://github.com/gregbell/active_admin/commit/#{`git rev-parse HEAD`}")}).html_safe
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -12,10 +12,10 @@ class Event < ActiveRecord::Base
|
|||||||
|
|
||||||
|
|
||||||
scope :moderated, -> { where moderated: true }
|
scope :moderated, -> { where moderated: true }
|
||||||
scope :past, -> { where('end_time < now()').order(start_time: :desc) }
|
scope :past, -> { where('end_time < ?', Date.today).order(start_time: :desc) }
|
||||||
scope :future, -> { where('end_time >= now()').order(start_time: :asc) }
|
scope :future, -> { where('end_time >= ?', Date.today).order(start_time: :asc) }
|
||||||
scope :future_30, -> {
|
scope :future_30, -> {
|
||||||
where('start_time >= now() and end_time <= ?', Date.today + 30)
|
where('start_time >= ? and end_time <= ?', Date.today, Date.today + 30)
|
||||||
.order :start_time
|
.order :start_time
|
||||||
}
|
}
|
||||||
scope :year, -> year {
|
scope :year, -> year {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
%em.city= @event.city
|
%em.city= @event.city
|
||||||
= @event.title
|
= @event.title
|
||||||
|
|
||||||
- if @event.persisted? && request.format == 'text/html' && controller.controller_name != 'moderations' && controller.controller_name != 'notes' && controller.action_name != 'edit' && controller.action_name != 'cancel'
|
- if @event.persisted? && request.format == 'text/html' && controller.controller_name == 'events' && controller.action_name == 'show'
|
||||||
%sidebar#lug-list
|
%sidebar#lug-list
|
||||||
%h1=t '.lug-list'
|
%h1=t '.lug-list'
|
||||||
- if @event.related_region
|
- if @event.related_region
|
||||||
|
@ -8,13 +8,10 @@ development:
|
|||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
# Do not set this db to the same as development or production.
|
# Do not set this db to the same as development or production.
|
||||||
test:
|
test:
|
||||||
adapter: mysql2
|
adapter: sqlite3
|
||||||
encoding: utf8
|
|
||||||
database: adl_test
|
|
||||||
pool: 5
|
pool: 5
|
||||||
username: manu
|
timeout: 5000
|
||||||
password:
|
database: db/test.sqlite3
|
||||||
socket: /var/run/mysqld/mysqld.sock
|
|
||||||
|
|
||||||
production:
|
production:
|
||||||
adapter: mysql2
|
adapter: mysql2
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class UsersControllerTest < ActionController::TestCase
|
class UsersControllerTest < ActionController::TestCase
|
||||||
|
include Devise::TestHelpers
|
||||||
|
|
||||||
setup do
|
setup do
|
||||||
@user = users(:one)
|
@user = users(:one)
|
||||||
|
|
||||||
|
sign_in users(:one)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should get index" do
|
test "should get index" do
|
||||||
|
Loading…
Reference in New Issue
Block a user