Skip to content

Commit

Permalink
fixes conflicts [#226]
Browse files Browse the repository at this point in the history
  • Loading branch information
decabeza committed Aug 25, 2015
2 parents 7d17209 + 6bfe369 commit 82c4040
Show file tree
Hide file tree
Showing 57 changed files with 862 additions and 158 deletions.
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
gem 'rails', '4.2.4'
# Use PostgreSQL
gem 'pg'
# Use SCSS for stylesheets
Expand All @@ -21,6 +21,11 @@ gem 'turbolinks'
gem 'devise'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'

gem 'kaminari'
gem 'acts_as_commentable_with_threading'
gem 'acts-as-taggable-on'
Expand All @@ -32,7 +37,7 @@ gem 'simple_captcha2', require: 'simple_captcha'
gem 'ckeditor'
gem 'cancancan'
gem 'social-share-button'
gem 'initialjs-rails'
gem 'initialjs-rails', '0.2.0'
gem 'unicorn'
gem 'paranoia'

Expand Down
104 changes: 69 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.3)
actionpack (= 4.2.3)
actionview (= 4.2.3)
activejob (= 4.2.3)
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.3)
actionview (= 4.2.3)
activesupport (= 4.2.3)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.3)
activesupport (= 4.2.3)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.3)
activesupport (= 4.2.3)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.3)
activesupport (= 4.2.3)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.3)
activemodel (= 4.2.3)
activesupport (= 4.2.3)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.3)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand Down Expand Up @@ -133,6 +133,8 @@ GEM
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
foundation-rails (5.5.2.1)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
Expand All @@ -150,6 +152,7 @@ GEM
activesupport (>= 4.1.0)
groupdate (2.4.0)
activesupport (>= 3)
hashie (3.4.2)
highline (1.7.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
Expand All @@ -162,13 +165,14 @@ GEM
i18n
term-ansicolor (>= 1.3.2)
terminal-table (>= 1.5.1)
initialjs-rails (0.1.0)
initialjs-rails (0.2.0)
railties (>= 3.1, < 5.0)
jquery-rails (4.0.4)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
jwt (1.5.1)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
Expand All @@ -181,20 +185,46 @@ GEM
actionmailer (>= 3.2)
letter_opener (~> 1.0)
railties (>= 3.2)
loofah (2.0.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.8.0)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
netrc (0.10.3)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
oauth (0.4.7)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-facebook (2.0.1)
omniauth-oauth2 (~> 1.2)
omniauth-google-oauth2 (0.2.6)
omniauth (> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.3.1)
oauth2 (~> 1.0)
omniauth (~> 1.2)
omniauth-twitter (1.2.1)
json (~> 1.3)
omniauth-oauth (~> 1.1)
orm_adapter (0.5.0)
paranoia (2.1.3)
activerecord (~> 4.0)
Expand All @@ -209,28 +239,28 @@ GEM
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.3)
actionmailer (= 4.2.3)
actionpack (= 4.2.3)
actionview (= 4.2.3)
activejob (= 4.2.3)
activemodel (= 4.2.3)
activerecord (= 4.2.3)
activesupport (= 4.2.3)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.3)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.3)
actionpack (= 4.2.3)
activesupport (= 4.2.3)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.15.0)
Expand Down Expand Up @@ -283,7 +313,7 @@ GEM
coffee-rails
sass-rails
spring (1.3.6)
sprockets (3.2.0)
sprockets (3.3.3)
rack (~> 1.0)
sprockets-rails (2.3.2)
actionpack (>= 3.0)
Expand Down Expand Up @@ -357,16 +387,20 @@ DEPENDENCIES
fuubar
groupdate
i18n-tasks
initialjs-rails
initialjs-rails (= 0.2.0)
jquery-rails
kaminari
launchy
letter_opener_web (~> 1.3.0)
omniauth
omniauth-facebook
omniauth-google-oauth2
omniauth-twitter
paranoia
pg
poltergeist
quiet_assets
rails (= 4.2.3)
rails (= 4.2.4)
responders
rspec-rails (~> 3.0)
sass-rails (~> 5.0)
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,20 @@ Para ejecutar la aplicación en local:
bundle exec bin/rails s
```

Prerequisitos para los tests: tener instalado PhantomJS >= 2.0
Prerequisitos para los tests: tener instalado PhantomJS >= 2.0

Para ejecutar los tests:

```
bundle exec bin/rspec
```

### OAuth

Para probar los servicios de autenticación mediante proveedores externos OAuth — en este momento Twitter, Facebook y Google —, necesitas crear una "aplicación" en cada una de las plataformas soportadas y configurar la *key* y el *secret* proporcionados en tu *secrets.yml*

En el caso de Google, comprueba que las APIs *Contacts API* y *Google+ API* están habilitadas para la aplicación.

## Licencia

El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt))
Expand Down
Binary file added app/assets/images/admin_avatar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/moderator_avatar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/javascripts/moderator_comment.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ App.ModeratorComments =
$("##{id} .comment-body:first").addClass("faded")

hide_moderator_actions: (id) ->
$("##{id} #moderator-comment-actions:first").hide()
$("##{id} .js-moderator-comment-actions").hide()
2 changes: 1 addition & 1 deletion app/assets/javascripts/moderator_debates.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ App.ModeratorDebates =
$("#comments").addClass("faded")

hide_moderator_actions: (id) ->
$("##{id} #moderator-debate-actions:first").hide()
$("##{id} .js-moderator-debate-actions:first").hide()
10 changes: 10 additions & 0 deletions app/assets/stylesheets/debates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@

.panel {
border: 0;
border-radius: 0;
margin-bottom: 0;
min-height: rem-calc(192);
padding: 0 rem-calc(12) rem-calc(2) rem-calc(12);
Expand Down Expand Up @@ -567,6 +568,15 @@
background: $comment-author;
padding: rem-calc(6) rem-calc(12);
}

&.is-admin {
background: $comment-admin;
padding: rem-calc(6) rem-calc(12);
}

&.is-moderator {
@extend .is-admin;
}
}
}

Expand Down
23 changes: 15 additions & 8 deletions app/assets/stylesheets/participacion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -566,19 +566,19 @@ form {
line-height: $line-height;
}

input[type]:not([type=submit]):not([type=file]) {
input[type]:not([type=submit]):not([type=file]):not([type=checkbox]) {
background: $input-bg;
height: rem-calc(48);
margin-bottom: rem-calc(16);
}

input[type="checkbox"] {
height: rem-calc(24) !important;
margin: 0 !important;
input[type="checkbox"] + label,
input[type="radio"] + label {
margin-right: 0;
}

input[type=file] {
margin: rem-calc(12) 0;
margin: rem-calc(12) 0 rem-calc(12) rem-calc(6);
}

.note {
Expand All @@ -597,8 +597,7 @@ form {
font-size: rem-calc(14);
font-weight: normal;
line-height: $line-height;
margin: 0 0 0 rem-calc(6);
vertical-align: top;
vertical-align: middle;
}

.captcha {
Expand All @@ -609,6 +608,10 @@ form {
margin-bottom: 0 !important;
}
}

.button.margin-top {
margin-top: rem-calc(24);
}
}

// 09. Alerts
Expand Down Expand Up @@ -707,11 +710,15 @@ form {
}
}

img.initialjs-avatar, img.avatar {
img.admin-avatar, img.moderator-avatar {
border-radius: rem-calc(1000);
position: relative;
}

img.initialjs-avatar {
@extend .moderator-avatar;
}

.author-deleted {
background-color: rgba(255,255,255,.5);
color: rgba(0,0,0,.4);
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ $author: #008CCF;
$association: #C0392B;

$comment-author: rgba(45,144,248,.15);
$comment-official: rgba(70,219,145,.3);
$comment-level-5: rgba(255,241,204,1);
$comment-admin: rgba(45,144,248,.15);
$comment-official: rgba(70,219,145,.3);

// 06. Responsive
// - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception

before_action :ensure_signup_complete

rescue_from CanCan::AccessDenied do |exception|
redirect_to main_app.root_url, alert: exception.message
end
Expand Down Expand Up @@ -40,4 +42,13 @@ def set_layout
def set_debate_votes(debates)
@voted_values = current_user ? current_user.debate_votes(debates) : {}
end

def ensure_signup_complete
# Ensure we don't go into an infinite loop
return if action_name.in? %w(finish_signup do_finish_signup)

if user_signed_in? && !current_user.email_provided?
redirect_to finish_signup_path
end
end
end

0 comments on commit 82c4040

Please sign in to comment.