Browse Source

User login error fixed

development
G0dwin 11 years ago
parent
commit
20c9791f52
  1. 44
      Gemfile
  2. 56
      Gemfile.lock
  3. 7
      README.md
  4. 5
      app/assets/javascripts/application.js.coffee
  5. 3
      app/controllers/pages_controller.rb
  6. 2
      app/views/layouts/fields/_errors_default.html.haml
  7. 3574
      config/locales/translation-info.yml
  8. 7
      spec/support/delorean.rb
  9. 8
      spec/support/postgresql.rb

44
Gemfile

@ -2,75 +2,37 @@ source 'http://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
# Servers
# gem 'puma'
# gem 'unicorn'
# gem 'openssl', '~> 1.1.0'
gem 'eventmachine'
# Multi-environment configuration
# gem 'simpleconfig'
# API
# gem 'rabl'
# ORM
gem 'pg'
# Security
# gem 'secure_headers'
#gem 'dotenv-rails', :groups => [:development, :test]
# Miscellanea
# gem 'google-analytics-rails'
gem 'haml'
# gem 'http_accept_language'
gem 'jquery-rails'
gem 'jquery-ui-rails'
# gem 'resque', require: 'resque/server' # Resque web interface
# Assets
gem 'coffee-rails', '~> 4.0.0'
gem 'haml_assets'
gem 'handlebars_assets'
gem 'i18n-js'
gem 'i18n-active_record',
:git => 'git://github.com/svenfuchs/i18n-active_record.git',
:require => 'i18n/active_record'
gem 'jquery-turbolinks'
gem 'sass-rails', '~> 4.0.0'
gem "compass-rails", "~> 1.1.3"
gem 'foundation-rails'
#gem 'turbolinks' # This would be great to have working, right now lets focus on gettting it working without it.
gem 'uglifier', '>= 1.3.0'
gem 'sorcery', '>= 0.8.1'
gem 'oauth2', '~> 0.8.0'
gem 'ruby-drupal-hash'
gem 'redis'
gem 'carrierwave'
gem 'carrierwave-imageoptimizer'
gem 'mini_magick'
gem 'carmen', :path => '../carmen/' if File.directory?('../carmen/') && RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
gem 'carmen-rails'
# gem 'carmen', :path => '../carmen/' if File.directory?('../carmen/') && RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
#gem 'carmen-rails'
gem 'nested_form'
gem 'acts_as_list'
gem 'geocoder'
gem 'forgery'
gem 'paper_trail'
# gem 'panoramio-rb' # make it easier to let users get nice backdrops for their conferences etc
group :development, :test do
gem 'debugger'
gem 'delorean'
gem 'rspec'
gem 'rspec-rails'
end
group :development do
gem 'bullet'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
@ -84,8 +46,6 @@ group :test do
gem 'guard-rspec'
gem 'factory_girl_rails'
gem 'coveralls', require: false
gem 'database_cleaner'
gem 'email_spec'
gem 'launchy'
gem 'selenium-webdriver'
gem 'simplecov', require: false

56
Gemfile.lock

@ -56,9 +56,6 @@ GEM
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.1.4)
bullet (4.8.0)
activesupport
uniform_notifier (>= 1.4.0)
callsite (0.0.11)
capybara (2.2.1)
mime-types (>= 1.16)
@ -66,11 +63,6 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carmen (1.0.1)
unicode_utils (~> 1.4.0)
carmen-rails (1.0.1)
carmen (~> 1.0.0)
rails
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
@ -86,7 +78,6 @@ GEM
nio4r (>= 0.5.0)
childprocess (0.5.2)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
chunky_png (1.3.0)
coderay (1.1.0)
coffee-rails (4.0.1)
@ -96,7 +87,6 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.7.0)
columnize (0.3.6)
compass (0.12.5)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
@ -112,24 +102,10 @@ GEM
thor
crack (0.4.2)
safe_yaml (~> 1.0.0)
database_cleaner (1.2.0)
debug_inspector (0.0.2)
debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.2)
delorean (2.1.0)
chronic
diff-lcs (1.2.5)
docile (1.1.3)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
erubis (2.7.0)
eventmachine (1.0.3)
eventmachine (1.0.3-x86-mingw32)
execjs (2.0.2)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
@ -163,26 +139,13 @@ GEM
activesupport (~> 4.0.0)
haml (>= 3.1, < 5.0)
railties (~> 4.0.0)
haml_assets (0.2.2)
haml
tilt
handlebars_assets (0.15)
execjs (>= 1.2.9)
multi_json
sprockets (>= 2.0.3)
tilt
hike (1.2.3)
httpauth (0.2.1)
i18n (0.6.9)
i18n-js (2.1.2)
i18n
image_optimizer (1.2.1)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-turbolinks (2.0.2)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (4.2.0)
railties (>= 3.2.16)
json (1.8.1)
@ -266,7 +229,6 @@ GEM
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
ffi (>= 0.5.0)
redis (3.0.7)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
@ -285,7 +247,6 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
ruby-drupal-hash (0.0.3)
rubyzip (1.1.3)
safe_yaml (1.0.2)
sass (3.2.19)
@ -329,14 +290,10 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
tzinfo (0.3.39)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicode_utils (1.4.0)
uniform_notifier (1.4.0)
wdm (0.1.0)
webmock (1.17.4)
addressable (>= 2.2.7)
@ -355,19 +312,12 @@ DEPENDENCIES
awesome_print
better_errors
binding_of_caller
bullet
capybara
carmen-rails
carrierwave
carrierwave-imageoptimizer
coffee-rails (~> 4.0.0)
compass-rails (~> 1.1.3)
coveralls
database_cleaner
debugger
delorean
email_spec
eventmachine
factory_girl_rails
forgery
foundation-rails
@ -375,12 +325,8 @@ DEPENDENCIES
guard-rspec
haml
haml-rails
haml_assets
handlebars_assets
i18n-active_record!
i18n-js
jquery-rails
jquery-turbolinks
jquery-ui-rails
launchy
meta_request
@ -392,10 +338,8 @@ DEPENDENCIES
rails (= 4.0.0)
rails-footnotes!
rails_12factor
redis
rspec
rspec-rails
ruby-drupal-hash
sass-rails (~> 4.0.0)
selenium-webdriver
simplecov

7
README.md

@ -96,8 +96,6 @@ The method can be used as follows:
_ 'basename.my_key', :paragraph
_ 'basename.my_key' do
<input type="text" placeholder="_!" />
end
If the key does not exist, the previos lines will produce the following respectively:
@ -109,10 +107,9 @@ If the key does not exist, the previos lines will produce the following respecti
tellus. Proin eget tortor risus. Donec sollicitudin molestie
malesuada. Donec rutrum congue leo eget malesuada.'
<input type="text" placeholder="my_key" />
If the user has sufficient rights, these blocks will also be surrounded by the necessary markup to allow them to be selected and edited by the user.
Translations are recorded during testing and committed to the repository when pushing to github. After pulling down the latest version from github you should always run `rake translations:migrate` to put the latest migrations into your database.
### Style Guide ###
@ -121,4 +118,4 @@ On hold until our design team determines a director for our identity.
## Testing Practices ##
Once tests are set up, we will ensure 100% code coverage. This higher than normal amount is due to the fact that the application will capture all translations, on which pages they occur, and which keys are missing languages in each available language.
Our focus will be on integration testing using Capybara. While testing the app records all translations that it finds, whether or not they exist, and which pages that they were found on.

5
app/assets/javascripts/application.js.coffee

@ -12,14 +12,9 @@
# require jquery_nested_form
# I18n
#= require i18n
#= require i18n/translations
'use strict'
I18n.defaultLocale = '<%= I18n.default_locale %>'
I18n.locale = $('html').attr 'lang'
try Typekit.load() catch
startSpinner = ->

3
app/controllers/pages_controller.rb

@ -1,6 +1,3 @@
require 'rubygems'
require 'ruby_drupal_hash'
include ApplicationHelper
class PagesController < ApplicationController

2
app/views/layouts/fields/_errors_default.html.haml

@ -1,5 +1,5 @@
- # we should render errors here
- if @record.errors.any?
- if @record && @record.errors.any?
.form-errors
%ul
- @record.errors.full_messages.each do |msg|

3574
config/locales/translation-info.yml

File diff suppressed because it is too large

7
spec/support/delorean.rb

@ -1,7 +0,0 @@
RSpec.configure do |config|
config.include Delorean
config.before(:each) do
back_to_the_present
end
end

8
spec/support/postgresql.rb

@ -1,15 +1,15 @@
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
#DatabaseCleaner.strategy = :transaction
#DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.start
#DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
#DatabaseCleaner.clean
end
end

Loading…
Cancel
Save