Meilleur gemfile et autre test, initial...

This commit is contained in:
echarp 2013-11-25 00:35:40 +01:00
parent a0cd381d43
commit 21fae253da
6 changed files with 24 additions and 25 deletions

View File

@ -43,7 +43,7 @@ end
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'haml-rails', '>= 0.3.4', group: :development
gem 'haml-rails'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'rails-i18n'
gem 'devise-i18n'

View File

@ -1,6 +1,6 @@
GIT
remote: git://github.com/gregbell/active_admin.git
revision: 529bfeaa54858d2071c932eb6ddbd399832efbd9
revision: 3a8934afb08a586099374975f210f95b43ac9e50
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0)
@ -236,7 +236,7 @@ DEPENDENCIES
guard-bundler
guard-livereload
guard-test
haml-rails (>= 0.3.4)
haml-rails
jbuilder
jquery-rails
jquery-turbolinks

View File

@ -1,24 +1,23 @@
# A sample Guardfile
# 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
watch(%r{app/views/.+\.(erb|haml|slim)})
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
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"] }
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end

View File

@ -3,5 +3,5 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_action :authenticate_admin_user!
#before_action :authenticate_admin_user!
end

View File

@ -34,9 +34,9 @@
%header.top
%h1= link_to 'Agenda du libre', root_url
- if admin_user_signed_in?
- else
= link_to t('.login'), new_user_session_path, class: :login
//- if admin_user_signed_in?
//- else
// = link_to t('.login'), new_user_session_path, class: :login
= yield

View File

@ -1,7 +1,7 @@
require 'test_helper'
class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
test "the truth" do
assert true
end
end