Meilleur gemfile et autre test, initial...
This commit is contained in:
parent
a0cd381d43
commit
21fae253da
2
Gemfile
2
Gemfile
|
@ -43,7 +43,7 @@ end
|
||||||
# Use debugger
|
# Use debugger
|
||||||
# gem 'debugger', group: [:development, :test]
|
# gem 'debugger', group: [:development, :test]
|
||||||
|
|
||||||
gem 'haml-rails', '>= 0.3.4', group: :development
|
gem 'haml-rails'
|
||||||
gem 'activeadmin', github: 'gregbell/active_admin'
|
gem 'activeadmin', github: 'gregbell/active_admin'
|
||||||
gem 'rails-i18n'
|
gem 'rails-i18n'
|
||||||
gem 'devise-i18n'
|
gem 'devise-i18n'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/gregbell/active_admin.git
|
remote: git://github.com/gregbell/active_admin.git
|
||||||
revision: 529bfeaa54858d2071c932eb6ddbd399832efbd9
|
revision: 3a8934afb08a586099374975f210f95b43ac9e50
|
||||||
specs:
|
specs:
|
||||||
activeadmin (1.0.0.pre)
|
activeadmin (1.0.0.pre)
|
||||||
arbre (~> 1.0)
|
arbre (~> 1.0)
|
||||||
|
@ -236,7 +236,7 @@ DEPENDENCIES
|
||||||
guard-bundler
|
guard-bundler
|
||||||
guard-livereload
|
guard-livereload
|
||||||
guard-test
|
guard-test
|
||||||
haml-rails (>= 0.3.4)
|
haml-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
jquery-rails
|
jquery-rails
|
||||||
jquery-turbolinks
|
jquery-turbolinks
|
||||||
|
|
29
Guardfile
29
Guardfile
|
@ -1,24 +1,23 @@
|
||||||
# A sample Guardfile
|
# A sample Guardfile
|
||||||
# More info at https://github.com/guard/guard#readme
|
# More info at https://github.com/guard/guard#readme
|
||||||
|
|
||||||
|
guard :test do
|
||||||
|
watch(%r{^test/.+_test\.rb$})
|
||||||
|
watch('test/test_helper.rb') { 'test' }
|
||||||
|
|
||||||
|
# Rails 4
|
||||||
|
watch(%r{^app/(.+)\.rb}) { |m| "test/#{m[1]}_test.rb" }
|
||||||
|
watch(%r{^app/controllers/application_controller\.rb}) { 'test/controllers' }
|
||||||
|
watch(%r{^app/controllers/(.+)_controller\.rb}) { |m| "test/integration/#{m[1]}_test.rb" }
|
||||||
|
watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
||||||
|
watch(%r{^lib/(.+)\.rb}) { |m| "test/lib/#{m[1]}_test.rb" }
|
||||||
|
end
|
||||||
|
|
||||||
guard :livereload do
|
guard :livereload do
|
||||||
watch(%r{app/views/.+\.(erb|haml|slim)})
|
watch(%r{app/views/.+\.(erb|haml|slim)$})
|
||||||
watch(%r{app/helpers/.+\.rb})
|
watch(%r{app/helpers/.+\.rb})
|
||||||
watch(%r{public/.+\.(css|js|html)})
|
watch(%r{public/.+\.(css|js|html)})
|
||||||
watch(%r{config/locales/.+\.yml})
|
watch(%r{config/locales/.+\.yml})
|
||||||
# Rails Assets Pipeline
|
# Rails Assets Pipeline
|
||||||
watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
|
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
|
||||||
end
|
|
||||||
|
|
||||||
guard :test do
|
|
||||||
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
|
||||||
watch(%r{^test/.+_test\.rb$})
|
|
||||||
watch('test/test_helper.rb') { "test" }
|
|
||||||
|
|
||||||
# Rails example
|
|
||||||
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
|
||||||
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
|
||||||
watch(%r{^app/views/.+\.rb$}) { "test/integration" }
|
|
||||||
watch(%r{^app/views/.+\.haml$}) { "test/integration" }
|
|
||||||
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,5 +3,5 @@ class ApplicationController < ActionController::Base
|
||||||
# For APIs, you may want to use :null_session instead.
|
# For APIs, you may want to use :null_session instead.
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
before_action :authenticate_admin_user!
|
#before_action :authenticate_admin_user!
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
|
|
||||||
%header.top
|
%header.top
|
||||||
%h1= link_to 'Agenda du libre', root_url
|
%h1= link_to 'Agenda du libre', root_url
|
||||||
- if admin_user_signed_in?
|
//- if admin_user_signed_in?
|
||||||
- else
|
//- else
|
||||||
= link_to t('.login'), new_user_session_path, class: :login
|
// = link_to t('.login'), new_user_session_path, class: :login
|
||||||
|
|
||||||
= yield
|
= yield
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class UserTest < ActiveSupport::TestCase
|
class UserTest < ActiveSupport::TestCase
|
||||||
# test "the truth" do
|
test "the truth" do
|
||||||
# assert true
|
assert true
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue