Commit d9599093 by Oleksandr Omelchuk

Merge branch 'social_network_registration' into 'dev'

Social network registration

See merge request !2
parents ee2d9f7a 622b829e
......@@ -12,6 +12,7 @@
/tmp/*
!/log/.keep
!/tmp/.keep
/vendor/*
# Ignore Byebug command history file.
.byebug_history
......@@ -5,7 +5,6 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end
gem 'rails', '~> 5.0.7', '>= 5.0.7.2'
gem 'mysql2', '>= 0.3.18', '< 0.6.0'
gem 'puma', '~> 3.0'
......@@ -15,10 +14,16 @@ gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'devise'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'omniauth-twitter'
gem 'haml'
gem 'bootstrap-sass'
gem 'gmaps4rails'
gem 'remotipart'
gem 'simple_form'
group :development, :test do
gem 'byebug', platform: :mri
......
......@@ -41,6 +41,7 @@ GEM
arel (7.1.4)
autoprefixer-rails (9.6.1.1)
execjs
bcrypt (3.1.13)
bindex (0.8.1)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
......@@ -56,8 +57,16 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
devise (4.7.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
ffi (1.11.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
......@@ -65,6 +74,7 @@ GEM
haml (5.1.2)
temple (>= 0.8.0)
tilt
hashie (3.6.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jbuilder (2.9.1)
......@@ -73,6 +83,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jwt (2.2.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
......@@ -85,10 +96,41 @@ GEM
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
mysql2 (0.5.2)
nio4r (2.5.0)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
oauth (0.5.4)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.9.0)
hashie (>= 3.4.6, < 3.7.0)
rack (>= 1.6.2, < 3)
omniauth-facebook (5.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-google-oauth2 (0.8.0)
jwt (>= 2.0)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.6)
omniauth-linkedin-oauth2 (1.0.0)
omniauth-oauth2
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.6.0)
oauth2 (~> 1.1)
omniauth (~> 1.9)
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
orm_adapter (0.5.0)
puma (3.12.1)
rack (2.0.7)
rack-test (0.6.3)
......@@ -121,6 +163,9 @@ GEM
rb-inotify (0.10.0)
ffi (~> 1.0)
remotipart (1.4.3)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
......@@ -134,6 +179,9 @@ GEM
tilt (>= 1.1, < 3)
sassc (2.2.0)
ffi (~> 1.9)
simple_form (4.1.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
......@@ -157,6 +205,8 @@ GEM
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
warden (1.2.8)
rack (>= 2.0.6)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
......@@ -173,16 +223,23 @@ DEPENDENCIES
bootstrap-sass
byebug
coffee-rails (~> 4.2)
devise
gmaps4rails
haml
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
mysql2 (>= 0.3.18, < 0.6.0)
omniauth
omniauth-facebook
omniauth-google-oauth2
omniauth-linkedin-oauth2
omniauth-twitter
puma (~> 3.0)
rails (~> 5.0.7, >= 5.0.7.2)
remotipart
sass-rails (~> 5.0)
simple_form
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
......
<svg id="SvgjsSvg1000" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="16" height="16"><defs id="SvgjsDefs1001"></defs><path id="SvgjsPath1007" d="M1750 797L1750 789.999L1743 789.999L1743 788L1750 788L1750 781L1752 781L1752 788L1759 788L1759 789.999L1752 789.999L1752 797Z " fill="#ff4628" transform="matrix(1,0,0,1,-1743,-781)"></path></svg>
\ No newline at end of file
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
body {
background-color: #fff;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
margin: 33px;
}
p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
margin: 33px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a {
color: #000;
&:visited {
color: #666;
}
&:hover {
color: #fff;
background-color: #000;
}
}
th {
padding-bottom: 5px;
}
td {
padding-bottom: 7px;
padding-left: 5px;
padding-right: 5px;
}
div {
&.field, &.actions {
margin-bottom: 10px;
}
}
#notice {
color: green;
}
.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
margin-bottom: 20px;
background-color: #f0f0f0;
h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0;
background-color: #c00;
color: #fff;
}
ul li {
font-size: 12px;
list-style: square;
}
}
label {
display: block;
}
// Place all the styles related to the templates controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
skip_before_filter :verify_authenticity_token
end
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
skip_before_action :verify_authenticity_token
def facebook
sign_in_with "Facebook"
end
def twitter
sign_in_with "Twitter"
end
def failure
redirect_to root_path
end
def google_oauth2
sign_in_with "Google"
end
def sign_in_with(provider_name)
@user = User.from_omniauth(request.env["omniauth.auth"])
sign_in_and_redirect @user, :event => :authentication
set_flash_message(:notice, :success, :kind => provider_name) if is_navigational_format?
end
end
\ No newline at end of file
class Users::SessionsController < Devise::SessionsController
def new
super
end
def create
auth_options = { :recall => "#{'home#index'}" }
self.resource = warden.authenticate!(auth_options)
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name, resource)
if !session[:return_to].blank?
redirect_to session[:return_to]
session[:return_to] = nil
else
respond_with resource, :location => after_sign_in_path_for(resource)
end
end
end
\ No newline at end of file
class UsersController < ApplicationController
before_filter :authenticate_user!
def index
@users = collection
end
def show
@user = resource
end
def new
@user = User.new
end
def create
@user = User.find_or_create_by(user_params)
@user.skip_password_validation = true
if @user.save
redirect_to edit_user_path(@user)
else
redirect_to root_path
end
end
def edit
@user = resource
end
def update
@user = resource
if @user.update(user_params)
sign_in @user
redirect_to user_path(@user)
else
render :edit
end
end
def destroy
@user = resource
@user.destroy
redirect_to root_path
end
private
def collection
User.all
end
def resource
User.find(params[:id])
end
def user_params
params.require(:user).permit(:email, :name, :location,
:password, :password_confirmation)
end
end
\ No newline at end of file
class User < ApplicationRecord
attr_accessor :skip_password_validation
validates :name, presence: true
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable, :omniauthable,
omniauth_providers: [:facebook, :google_oauth2, :twitter]
def self.new_with_session(params, session)
super.tap do |user|
if data = session["devise.facebook_data"] && session["devise.facebook_data"]["extra"]["raw_info"]
user.email = data["email"] if user.email.blank?
end
end
end
def self.from_omniauth(access_token)
data = access_token.info
user = User.where(email: data['email']).first
# Uncomment the section below if you want users to be created if they don't exist
unless user
user = User.create(name: data['name'],
email: data['email'],
password: Devise.friendly_token[0,20]
)
end
user
end
protected
# def password_required?
# return false if skip_password_validation
# super
# end
def password_required?
return false if skip_password_validation
if respond_to?(:reset_password_token)
return true if reset_password_token.present?
end
return true if new_record?
password.present? || password_confirmation.present?
end
end
<% unless current_user %>
<%= link_to "Sign in with Facebook", user_facebook_omniauth_authorize_path %>
<%= link_to "Sign in with Google", user_google_oauth2_omniauth_authorize_path %>
<%= link_to "Sign in with LinkedIn", user_linkedin_omniauth_authorize_path %>
<% else %> <%= current_user[:name] %>
<%= link_to "Logout", destroy_user_session_path, method: :delete %>
<% end %>
<h2>Resend confirmation instructions</h2>
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
</div>
<div class="actions">
<%= f.submit "Resend confirmation instructions" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
<p>Welcome <%= @email %>!</p>
<p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
<p>Hello <%= @email %>!</p>
<% if @resource.try(:unconfirmed_email?) %>
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
<% else %>
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
<% end %>
<p>Hello <%= @resource.email %>!</p>
<p>We're contacting you to notify you that your password has been changed.</p>
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
<p>Hello <%= @resource.email %>!</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
<p>Click the link below to unlock your account:</p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
<h2>Change your password</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<%= f.hidden_field :reset_password_token %>
<div class="field">
<%= f.label :password, "New password" %><br />
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em><br />
<% end %>
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
</div>
<div class="field">
<%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
</div>
<div class="actions">
<%= f.submit "Change my password" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
<h2>Forgot your password?</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>
<div class="actions">
<%= f.submit "Send me reset password instructions" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
<div class="field">
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
<%= f.password_field :password, autocomplete: "new-password" %>
<% if @minimum_password_length %>
<br />
<em><%= @minimum_password_length %> characters minimum</em>
<% end %>
</div>
<div class="field">
<%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
</div>
<div class="field">
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password, autocomplete: "current-password" %>
</div>
<div class="actions">
<%= f.submit "Update" %>
</div>
<% end %>
<h3>Cancel my account</h3>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
<%= link_to "Back", :back %>
%h2.font-weight-bold.text-center.pt-5 JOIN US
%p.text-center.hint-text Create your account
.form-group
.row
.col-md-6
= f.input :first_name, class: 'form-control', placeholder: "First Name", label: false
.col-md-6
= f.input :last_name, class: 'form-control', placeholder: "Last Name", label: false
.form-group
= f.simple_fields_for :own_organization do |o|
= o.input :name, class: 'form-control', placeholder: "Organization Name", label: false
.form-group
= f.input :email, class: 'form-control', placeholder: "Email", label: false
.form-group
= f.input :password, class: 'form-control', placeholder: "Password", label: false
.form-group
= f.input :password_confirmation, class: 'form-control', placeholder: "Confirm Password", label: false
.form-group.text-left
= f.check_box :terms_of_service
I accept the
= link_to "Terms of Use", "#"
\&amp;
= link_to "Privacy Policy", "#"
.form-group.text-center
= f.button :submit, "Register Now", class: "btn btn-success btn-lg"
.text-center
Already have an account?
= render "devise/shared/links"
\ No newline at end of file
<h2>Log in</h2>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>
<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "current-password" %>
</div>
<% if devise_mapping.rememberable? %>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end %>
<div class="actions">
<%= f.submit "Log in" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
<% if resource.errors.any? %>
<div id="error_explanation">
<h2>
<%= I18n.t("errors.messages.not_saved",
count: resource.errors.count,
resource: resource.class.model_name.human.downcase)
%>
</h2>
<ul>
<% resource.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<%- if controller_name != 'sessions' %>
<%= link_to "Log in", new_session_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
<% end %>
<% end %>
<h2>Resend unlock instructions</h2>
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>
<div class="actions">
<%= f.submit "Resend unlock instructions" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
......@@ -6,15 +6,11 @@
#1.tab-pane.tab-pane_people.active
.main_head_title
= image_tag ("logo_lg.png")
%h1
Середовище
%br/
Тепле Місто
.title_highlighted
Простір міста формюють його жителі
%h1 платформа тепле місто
.title_highlighted Простір міста формують його жителі
.tab-pane_content
.bot_btn
%a.btn.btn_main{"data-target" => "#modal", "data-toggle" => "modal"} Підтримати
%a.btn.btn_main{"data-target" => "#modal", "data-toggle" => "modal"} підтримати
.head_couters.clearfix
.counter
.counter_value
......@@ -37,7 +33,7 @@
.counter_digit
%span 0
.counter_gradient_top
.counter_text Обєднаних людей
.counter_text об'єднаних людей
.counter.counter_violet
.counter_value
.counter_digit
......@@ -56,7 +52,7 @@
.counter_digit
%span 0
.counter_gradient_top
.counter_text Зібраних коштів (грн)
.counter_text зібрано коштів
.cubes_wrap
.cubes_inner_wrap
#cube-wall.cube-wall
......@@ -194,7 +190,7 @@
%span.grid_item_content.tooltipstered
%a.get_involved_link.centered{"data-original-title" => "приєднатись", "data-placement" => "top", "data-toggle" => "tooltip", :href => "#"}
%span.get_involved_circle
%img.icon_plus{:alt => "", :src => "img/plus.svg"}/
%img.icon_plus{:alt => "", :src => "plus.svg"}/
.progress
.progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "58", :role => "progressbar", :style => "width: 58%"}
.progress_value_lg 58 / 100
......@@ -207,8 +203,8 @@
%a.round_link.soc_link_tw{:href => "#"}
%i.icon.icon_tw
.lang
%a.lang_link{:href => "#"} ENG
%a.lang_link.active{:href => "#"} UA
%a.lang_link{href: "/en"} ENG
%a.lang_link.active{href: "/uk"} UA
.section.section_grants
.container
.row
......@@ -600,7 +596,7 @@
.map_text
Етнічна, в першу чергу релігійна та мовно-культурна спільнота або сукупність індивидів, які існують зберігаються за межами свого регіону
#map.map
%a.btn.btn_default.btn_round.btn_bordered{"data-original-title" => "долучитись", "data-placement" => "top", "data-toggle" => "tooltip", :href => "#"}
%a.btn.btn_default.btn_round.btn_bordered{"data-original-title" => "долучитись", "data-placement" => "top", "data-target" => "#modal3", "data-toggle" => "modal",href: "#"}
%i.icon.icon_plus
.tooltip_templates
#tooltip_content_inner
......@@ -609,7 +605,7 @@
Технічний партнер
.tooltipster_title_name Cosmo-Trecel
%a.tooltipster_img{"data-target" => "#video", "data-toggle" => "modal", :href => "//www.youtube.com/embed/uX12dn47Dy0?rel=0&autoplay=1&showinfo=0html5=1"}
%img{:alt => "", :src => "img/tip_img1.png"}/
%img{:alt => "", :src => "tip_img1.png"}/
.tooltipster_bot
%a.tooltipster_link{:href => "#"} cosmo-travel.com.ua
%a.round_link{:href => "#"}
......
......@@ -26,7 +26,7 @@
%link{:href => "favicons/apple-touch-icon180.png", :rel => "apple-touch-icon", :sizes => "180x180"}
%body
= render 'partials/modal'
- if current_page?(root_path)
- if current_page?(root_path) || current_page?('/users/sign_in')
= render 'partials/black_header'
- else
= render 'partials/white_header'
......
......@@ -13,23 +13,26 @@
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav
%li
%a{:href => "#"} про палатформу
%a{:href => "#"} про платформу
%li
%a{:href => "#"} Ґранти
%a{:href => "#"} гранти
%li
%a{:href => "#"} Проекти
%a{:href => "#"} проекти
%li
%a{:href => "#"} Партнери
%a{:href => "#"} партнери
%li
%a{:href => "#"} DIGITAL WORKSHOP
%a{:href => "#"} digital workshop
%li
%a{:href => "#"} Про нас
%a{:href => "#"} про нас
%li
%a{:href => "#"} Новини
%a{:href => "#"} новини
%li
%a{:href => "#"} Звіти
%a{:href => "#"} звіти
%li
%a{:href => "#"} connectif
%li
- if current_user
= link_to('Logout', destroy_user_session_path, method: :delete)
%ul.nav.nav-tabs.nav_btns
%li.active
%a{"data-toggle" => "tab", :href => "#1"} Люди
......@@ -39,11 +42,12 @@
Ознайомтесь з дружніми бізнесами
які допомагають формувати
та покрищувати наше місто
- unless current_user
.login_wrap
%div
%button.login_btn{"data-target" => "#modal3", "data-toggle" => "modal"}
%button.login_btn{"data-target" => "#modal_log_in", "data-toggle" => "modal"}
= image_tag ("login.png")
.search_block
%input#search_field.search_field{:placeholder => "Пошук за іменем... ", :type => "text"}/
%input#search_field.search_field{placeholder: "Пошук по імені...", :type => "text"}/
%button.search_btn
%i.icon.icon_search
\ No newline at end of file
#modal.modal.fade.modal_styled{"aria-labelledby" => "modalLabel", :role => "dialog", :tabindex => "-1"}
= simple_form_for :user, url: users_path, authenticity_token: true do |f|
#modal3.modal.fade.modal_styled{"aria-labelledby" => "modalLabel", :role => "dialog", :tabindex => "-1"}
.modal-dialog{:role => "document"}
.modal-content
.modal-header
.modal-header_top.clearfix
.modal-header_top_bg
.modal-header_steps_wrap
%span.modal-header_step.active крок 1
%span.modal-header_step крок 2
%button.round_link.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
%i.icon.icon_close
.modal-header_bot
.row
.col-sm-5
%h3#modalLabel.modal-title Фондування
.col-sm-7.modal-header_bot_amount
.form-group
%label{:for => "id_1"}
%span.asterisk> *
Сума внеску в
%span.currency UAH
%input#id_1.form-control.amount_field{:type => "text", :value => "1 000 000 000"}/
%h3#modalLabel.modal-title Реєстрація
.help_text.absolute
%span.asterisk *
Поля обов'язкові для заповнення
.modal-body.modal-body_pb
%span.asterisk> *
Всі поля обов'язкові для заповнення
.modal-body
.row
.col-sm-9.modal-body_login
%h4.modal_subtitle
Авторизація
.form-group.form_ok
%label{:for => "id_2"}
%span.asterisk> *
Ім'я та прізвище
.field_wrap
%input#id_2.form-control{:type => "text", :value => "Сергій Тосканенок"}/
.form-group.form_error
реєстрація
.form-group
%label{:for => "id_3"}
%span.asterisk> *
E-mail
.field_wrap
%input#id_3.form-control{:type => "email", :value => "@neomaster@gmail.com"}/
%span.error_text Не коректно введено електронну адресу.
= f.email_field :email, class: 'form-control'
.form-group
%label{:for => "id_2"}
Ім'я та прізвище
.field_wrap
= f.input_field :name, class: 'form-control'
.form-group
%label{:for => "id_4"}
%span.asterisk> *
Населений пункт
.field_wrap
%input#id_4.form-control{:type => "text"}/
.checkbox.checkbox_padd
%input#check1{:name => "check", :type => "checkbox", :value => "check1"}/
%label{:for => "check1"} Підписатись на оновлення
.col-sm-3.modal-body_registration
%h4.modal_subtitle
Швидка реєстрація
.soc_btn_wrap.clearfix
%a.soc_btn.soc_btn_fb{:href => "#"}
%a.soc_btn.soc_btn_fb{:href => "/users/auth/facebook"}
%i.icon.icon_fb
%a.soc_btn.soc_btn_tw{:href => "#"}
%a.soc_btn.soc_btn_tw{:href => "/users/auth/twitter"}
%i.icon.icon_tw
%a.soc_btn.soc_btn_google{:href => "#"}
%a.soc_btn.soc_btn_google{:href => "/users/auth/google_oauth2"}
%i.icon.icon_google
.text-center
%a.btn.btn_primary{:href => "#"} Далі
#modal2.modal.fade.modal_styled{"aria-labelledby" => "modalLabel", :role => "dialog", :tabindex => "-1"}
.modal-dialog{:role => "document"}
.modal-content
.modal-header
.modal-header_top.clearfix
.modal-header_top_bg
.modal-header_steps_wrap
%span.modal-header_step крок 1
%span.modal-header_step.active крок 2
%button.round_link.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
%i.icon.icon_close
.modal-header_bot
.row
.col-sm-5
%h3#modalLabel.modal-title Фондування
.col-sm-7.modal-header_bot_amount
.form-group
%label{:for => "id_1"}
%span.asterisk> *
Сума внеску в
%span.currency UAH
%span.amount_value 1 000 000 000
.modal-body
.help_text Оберіть платіжну систему зручну для вас
.radio
.radio_item
%input#liqpay{:checked => "checked", :name => "payment_system", :type => "radio", :value => "liqpay"}/
%label{:for => "liqpay"}
%img{:alt => "", :src => "img/liqpay.png"}/
.radio_item
%input#webmoney{:name => "payment_system", :type => "radio", :value => "webmoney"}/
%label{:for => "webmoney"}
%img{:alt => "", :src => "img/webmoney.png"}/
.text-center.modal_btns
%a.btn.btn_primary{:href => "#"} оплатити
.nav_link
%a.link{:href => "#"} Назад
#modal3.modal.fade.modal_styled{"aria-labelledby" => "modalLabel", :role => "dialog", :tabindex => "-1"}
= f.button :submit, "Вхід", class: "btn btn-success btn-lg"
#modal_log_in.modal.fade.modal_styled.in{"aria-labelledby" => "modalLabel", :role => "dialog", :tabindex => "-1"}
.modal-dialog{:role => "document"}
.modal-content
#log_in_form
.modal-header
.modal-header_top.clearfix
.modal-header_top_bg
%button.round_link.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
%i.icon.icon_close
.modal-header_bot
%h3#modalLabel.modal-title Вхід
%h3#modalLabel.modal-title Увійти
.help_text.absolute
%span.asterisk *
Поля обов'язкові для заповнення
Заповніть всі поля
.modal-body
.row
.col-sm-9.modal-body_login
%h4.modal_subtitle
Авторизація
.form-group.form_ok
%label{:for => "id_2"}
%span.asterisk> *
Ім'я та прізвище
.field_wrap
%input#id_2.form-control{:type => "text", :value => "Сергій Тосканенок"}/
.form-group.form_error
= simple_form_for :user, url: session_path(:user), remote: true do |f|
%input{:name => "utf8", :type => "hidden", :value => "✓"}/
.form-group
%label{:for => "id_3"}
%span.asterisk> *
%span.asterisk>
E-mail
.field_wrap
%input#id_3.form-control{:type => "email", :value => "@neomaster@gmail.com"}/
%span.error_text Не коректно введено електронну адресу.
= f.email_field :email, autofocus: true, autocomplete: "email"
%span.error_text
.form-group
%label{:for => "id_4"}
%span.asterisk> *
Населений пункт
%label
%span.asterisk
%label{:for => "user_password"} Password
.field_wrap
%input#id_4.form-control{:type => "text"}/
= f.password_field :password, autocomplete: "current-password"
%span.error_text
.text-center
= f.submit "Log in"
.col-sm-3.modal-body_registration
%h4.modal_subtitle
Швидка реєстрація
.soc_btn_wrap.clearfix
%a.soc_btn.soc_btn_fb{:href => "#"}
%a.soc_btn.soc_btn_fb{href: "/users/auth/facebook"}
%i.icon.icon_fb
%a.soc_btn.soc_btn_tw{:href => "#"}
%i.icon.icon_tw
%a.soc_btn.soc_btn_google{:href => "#"}
%a.soc_btn.soc_btn_google{href: "/users/auth/google_oauth2"}
%i.icon.icon_google
.text-center
%a.btn.btn_primary{:href => "#"} Далі
/ = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
/ .field
/ = f.label :email
/ %br/
/ = f.email_field :email, autofocus: true, autocomplete: "email"
/ .field
/ = f.label :password
/ %br/
/ = f.password_field :password, autocomplete: "current-password"
/ - if devise_mapping.rememberable?
/ .field
/ = f.check_box :remember_me
/ = f.label :remember_me
/ .actions
/ = f.submit "Log in"
\ No newline at end of file
......@@ -14,22 +14,23 @@
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav
%li
%a{:href => "#"} про палатформу
%a{:href => "#"} про платформу
%li
%a{:href => "#"} Ґранти
%a{:href => "#"} гранти
%li
%a{:href => "#"} Проекти
%li.active
%a{:href => "#"}
Партнери
%span.sr-only (current)
%a{:href => "#"} проекти
%li
%a{:href => "#"} DIGITAL WORKSHOP
%a{:href => "#"} партнери
%li
%a{:href => "#"} Про нас
%a{:href => "#"} digital workshop
%li
%a{:href => "#"} Новини
%a{:href => "#"} про нас
%li
%a{:href => "#"} Звіти
%a{:href => "#"} новини
%li
%a{:href => "#"} звіти
%li
%a{:href => "#"} connectif
%li
- if current_user
= link_to('Logout', destroy_user_session_path, method: :delete)
.wrapper
.content
.img_line
.container
.centered_form
.pseudo_btns
%span.btn.btn_faked профіль користувача
.help_text
%span.asterisk *
Поля обов'язкові для заповнення
.form_container
= simple_form_for @user, url: user_path, html: { method: :put } do |f|
= f.error_notification
.form-group
%label{:for => "id_1"}
%span.asterisk> *
Як вас звати?
.field_wrap
= f.input :name, label: false, class: 'form-control'
.form-group
%label{:for => "id_3"}
%span.asterisk> *
E-mail
.field_wrap
= f.input :email,label: false, class: 'form-control'
.form-group
%label{:for => "id_5"}
Місто
.field_wrap
= f.input :location, label: false,class: 'form-control'
.form-group
%label{:for => "id_5"}
%span.asterisk> *
Пароль
.field_wrap
= f.input :password, label: false, class: 'form-control'
.form-group
%label{:for => "id_5"}
%span.asterisk> *
Підтвердження паролю
.field_wrap
= f.input :password_confirmation, label: false, class: 'form-control'
.form-group
%label{:for => "id_5"}
Фото або лого
.field_wrap.upload_wrap
.upload_bot.clearfix
= file_field :avatar, class: 'form-control'
.upload_img
= image_tag url_for(user.avatar) if @user.avatar
.text-center
= f.submit "Оновити", class: 'btn btn-success btn-lg'
.wrapper
.content
.img_line
.container
.centered_form
.pseudo_btns
%span.btn.btn_faked Профіль користувача
.form_container
.form-group
%label{:for => "id_1"} Ім'я та прізвище
.field_wrap
#{@user.name}
.form-group
%label{:for => "id_2"} Nickname
.field_wrap
.form-group
%label{:for => "id_3"} E-mail
.field_wrap
#{@user.email}
.form-group
%label{:for => "id_4"} Профіль соц. мережі
.field_wrap
https://plus.google.com/103689649494006504923
.form-group
%label{:for => "id_5"} Місто
.field_wrap
#{@user.location}
.form-group
%label{:for => "id_5"} Фото або лого
.field_wrap.upload_wrap
.upload_bot.clearfix
.upload_img
= image_tag url_for(@user.avatar)
.text-center
= link_to 'Редагувати', edit_user_path, class: 'btn btn-success btn-lg'
......@@ -8,8 +8,6 @@ Bundler.require(*Rails.groups)
module WarmCity
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
end
end
# Add configuration values here, as shown below.
#
# pusher_app_id: "2954"
# pusher_key: 7381a978f7dd7f9a1117
# pusher_secret: abdc3b896a0ffb85d373
# stripe_api_key: sk_test_2J0l093xOyW72XUYJHE4Dv2r
# stripe_publishable_key: pk_test_ro9jV5SNwGb1yYlQfzG17LHK
#
# production:
# stripe_api_key: sk_live_EeHnL644i6zo4Iyq4v1KdV9H
# stripe_publishable_key: pk_live_9lcthxpSIHbGwmdO941O1XVU
development:
FACEBOOK_APP_ID: "678588699322994"
FACEBOOK_APP_SECRET: "fb6f9a67539d5b2bbdc2e2e47c7d64f2"
\ No newline at end of file
......@@ -51,4 +51,5 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
end
Devise.setup do |config|
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
require 'devise/orm/active_record'
config.case_insensitive_keys = [:email]
config.strip_whitespace_keys = [:email]
config.skip_session_storage = [:http_auth]
config.stretches = Rails.env.test? ? 1 : 11
config.reconfirmable = true
config.expire_all_remember_me_on_sign_out = true
config.password_length = 6..128
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
config.reset_password_within = 6.hours
config.sign_out_via = [:delete, :get]
config.omniauth :facebook, "395576994435405", "22b5985763d0abbe82ec69f32ece46a6",
callback_url: "http://localhost:3000/users/auth/facebook/callback",
scope: 'email', info_fields: 'email,name'
config.omniauth :google_oauth2, "444952886435-8s76oeuc53otc8q84jork9mq4php7e7t.apps.googleusercontent.com",
"vfJkP71fOkfDKVYa3RgXR3lW", {}
config.omniauth :twitter, "c1uSeo1pm9Il2xLC6o8hIAv68", "JmCnAwaeZZjtZJcXcQzrfqmg5L4mMTJHuNsOaQnamVkVXJtcQN"
end
\ No newline at end of file
# frozen_string_literal: true
#
# Uncomment this and change the path if necessary to include your own
# components.
# See https://github.com/plataformatec/simple_form#custom-components to know
# more about custom components.
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
#
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
# complete input. You can remove any component from the
# wrapper, change the order or even add your own to the
# stack. The options given below are used to wrap the
# whole input.
config.wrappers :default, class: :input,
hint_class: :field_with_hint, error_class: :field_with_errors, valid_class: :field_without_errors do |b|
## Extensions enabled by default
# Any of these extensions can be disabled for a
# given input by passing: `f.input EXTENSION_NAME => false`.
# You can make any of these extensions optional by
# renaming `b.use` to `b.optional`.
# Determines whether to use HTML5 (:email, :url, ...)
# and required attributes
b.use :html5
# Calculates placeholders automatically from I18n
# You can also pass a string as f.input placeholder: "Placeholder"
b.use :placeholder
## Optional extensions
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
# to the input. If so, they will retrieve the values from the model
# if any exists. If you want to enable any of those
# extensions by default, you can change `b.optional` to `b.use`.
# Calculates maxlength from length validations for string inputs
# and/or database column lengths
b.optional :maxlength
# Calculate minlength from length validations for string inputs
b.optional :minlength
# Calculates pattern from format validations for string inputs
b.optional :pattern
# Calculates min and max from length validations for numeric inputs
b.optional :min_max
# Calculates readonly automatically from readonly attributes
b.optional :readonly
## Inputs
# b.use :input, class: 'input', error_class: 'is-invalid', valid_class: 'is-valid'
b.use :label_input
b.use :hint, wrap_with: { tag: :span, class: :hint }
b.use :error, wrap_with: { tag: :span, class: :error }
## full_messages_for
# If you want to display the full error message for the attribute, you can
# use the component :full_error, like:
#
# b.use :full_error, wrap_with: { tag: :span, class: :error }
end
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :default
# Define the way to render check boxes / radio buttons with labels.
# Defaults to :nested for bootstrap config.
# inline: input + label
# nested: label > input
config.boolean_style = :nested
# Default class for buttons
config.button_class = 'btn'
# Method used to tidy up errors. Specify any Rails Array method.
# :first lists the first message for each field.
# Use :to_sentence to list all errors for each field.
# config.error_method = :first
# Default tag used for error notification helper.
config.error_notification_tag = :div
# CSS class to add for error notification helper.
config.error_notification_class = 'error_notification'
# Series of attempts to detect a default label method for collection.
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
# Series of attempts to detect a default value method for collection.
# config.collection_value_methods = [ :id, :to_s ]
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
# config.collection_wrapper_tag = nil
# You can define the class to use on all collection wrappers. Defaulting to none.
# config.collection_wrapper_class = nil
# You can wrap each item in a collection of radio/check boxes with a tag,
# defaulting to :span.
# config.item_wrapper_tag = :span
# You can define a class to use in all item wrappers. Defaulting to none.
# config.item_wrapper_class = nil
# How the label text should be generated altogether with the required text.
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
# You can define the class to use on all labels. Default is nil.
# config.label_class = nil
# You can define the default class to be used on forms. Can be overriden
# with `html: { :class }`. Defaulting to none.
# config.default_form_class = nil
# You can define which elements should obtain additional classes
# config.generate_additional_classes_for = [:wrapper, :label, :input]
# Whether attributes are required by default (or not). Default is true.
# config.required_by_default = true
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
# These validations are enabled in SimpleForm's internal config but disabled by default
# in this configuration, which is recommended due to some quirks from different browsers.
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
# change this configuration to true.
config.browser_validations = false
# Collection of methods to detect if a file type was given.
# config.file_methods = [ :mounted_as, :file?, :public_filename, :attached? ]
# Custom mappings for input types. This should be a hash containing a regexp
# to match as key, and the input type that will be used when the field name
# matches the regexp as value.
# config.input_mappings = { /count/ => :integer }
# Custom wrappers for input types. This should be a hash containing an input
# type as key and the wrapper that will be used for all inputs with specified type.
# config.wrapper_mappings = { string: :prepend }
# Namespaces where SimpleForm should look for custom input classes that
# override default inputs.
# config.custom_inputs_namespaces << "CustomInputs"
# Default priority for time_zone inputs.
# config.time_zone_priority = nil
# Default priority for country inputs.
# config.country_priority = nil
# When false, do not use translations for labels.
# config.translate_labels = true
# Automatically discover new inputs in Rails' autoload path.
# config.inputs_discovery = true
# Cache SimpleForm inputs discovery
# config.cache_discovery = !Rails.env.development?
# Default class for inputs
# config.input_class = nil
# Define the default class of the input wrapper of the boolean input.
config.boolean_label_class = 'checkbox'
# Defines if the default input wrapper class should be included in radio
# collection wrappers.
# config.include_default_input_wrapper_class = true
# Defines which i18n scope will be used in Simple Form.
# config.i18n_scope = 'simple_form'
# Defines validation classes to the input_field. By default it's nil.
# config.input_field_valid_class = 'is-valid'
# config.input_field_error_class = 'is-invalid'
end
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
en:
devise:
confirmations:
confirmed: "Your email address has been successfully confirmed."
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
failure:
already_authenticated: "You are already signed in."
inactive: "Your account is not activated yet."
invalid: "Invalid %{authentication_keys} or password."
locked: "Your account is locked."
last_attempt: "You have one more attempt before your account is locked."
not_found_in_database: "Invalid %{authentication_keys} or password."
timeout: "Your session expired. Please sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing."
unconfirmed: "You have to confirm your email address before continuing."
mailer:
confirmation_instructions:
subject: "Confirmation instructions"
reset_password_instructions:
subject: "Reset password instructions"
unlock_instructions:
subject: "Unlock instructions"
email_changed:
subject: "Email Changed"
password_change:
subject: "Password Changed"
omniauth_callbacks:
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
success: "Successfully authenticated from %{kind} account."
passwords:
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
updated: "Your password has been changed successfully. You are now signed in."
updated_not_active: "Your password has been changed successfully."
registrations:
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
signed_up: "Welcome! You have signed up successfully."
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
updated: "Your account has been updated successfully."
updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again"
sessions:
signed_in: "Signed in successfully."
signed_out: "Signed out successfully."
already_signed_out: "Signed out successfully."
unlocks:
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
errors:
messages:
already_confirmed: "was already confirmed, please try signing in"
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
expired: "has expired, please request a new one"
not_found: "not found"
not_locked: "was not locked"
not_saved:
one: "1 error prohibited this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:"
# Files in the config/locales directory are used for internationalization
# and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:
#
# <%= t('hello') %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
en:
hello: "Hello world"
en:
simple_form:
"yes": 'Yes'
"no": 'No'
required:
text: 'required'
mark: '*'
# You can uncomment the line below if you need to overwrite the whole required html.
# When using html, text and mark won't be used.
# html: '<abbr title="required">*</abbr>'
error_notification:
default_message: "Please review the problems below:"
# Examples
# labels:
# defaults:
# password: 'Password'
# user:
# new:
# email: 'E-mail to sign in.'
# edit:
# email: 'E-mail.'
# hints:
# defaults:
# username: 'User name to sign in.'
# password: 'No special characters, please.'
# include_blanks:
# defaults:
# age: 'Rather not say'
# prompts:
# defaults:
# age: 'Select your age'
Rails.application.routes.draw do
root 'home#index'
devise_for :users, controllers: {omniauth_callbacks: "users/omniauth_callbacks",
registrations: "users", sessions: "users/sessions"}
resources :users
end
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rails secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: b1b8b2c8f26c31fb891d8f8eaf37f5bc26ea31ac8913a4acfe7e9013853eeb3df5e681187e8ed35df9e6526d9528973791f904727fe56d250d903ff21083ece6
GOOGLE_CLIENT_ID: 444952886435-8s76oeuc53otc8q84jork9mq4php7e7t.apps.googleusercontent.com
GOOGLE_SECRET_KEY: vfJkP71fOkfDKVYa3RgXR3lW
LINKEDIN_CLIENT_ID: 860rz2x1z3udrb
LINKEDIN_SECRET_KEY: peK2u8waxWK5h3Bq
GOOGLE_MAP_API_KEY: AIzaSyALmxk-nEaCo8KVfJTdAiVFPBKA9s0VnmM
test:
secret_key_base: dd24cc39a6555956e85cb7d60612c685b91249ed8760a957b155ced0177eb172674137f73ba33d8b886f14089469703830d76ddbd42a996897d8b77aac43b33a
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
# frozen_string_literal: true
class DeviseCreateUsers < ActiveRecord::Migration[5.0]
def change
create_table :users do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
# t.integer :sign_in_count, default: 0, null: false
# t.datetime :current_sign_in_at
# t.datetime :last_sign_in_at
# t.string :current_sign_in_ip
# t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps null: false
end
add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end
class AddOmniauthToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
add_column :users, :name, :string
add_column :users, :location, :string
add_column :users, :image, :text
end
end
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20190829110429) do
create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "provider"
t.string "uid"
t.string "name"
t.string "location"
t.text "image", limit: 65535
t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
end
end
<%# frozen_string_literal: true %>
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
<%%= f.error_notification %>
<%%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="form-inputs">
<%- attributes.each do |attribute| -%>
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
<%- end -%>
</div>
<div class="form-actions">
<%%= f.button :submit %>
</div>
<%% end %>
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
require 'test_helper'
class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
......@@ -12540,7 +12540,7 @@ img.rsImg {
padding-right: 119px;
}
.form_container .form-group {
margin-bottom: 32px;
margin-bottom: 10px;
}
.form_container .checkbox {
margin-left: 171px;
......
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bcrypt-3.1.13/ext/mri
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-1quew5h.rb extconf.rb
creating Makefile
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bcrypt-3.1.13/ext/mri
make "DESTDIR=" clean
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bcrypt-3.1.13/ext/mri
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt_blowfish.c
gcc -D__SKIP_GNU -c -o x86.o x86.S
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bcrypt-3.1.13/ext/mri
make "DESTDIR=" install
/usr/bin/install -c -m 0755 bcrypt_ext.so ./.gem.20190829-21053-p5bkhv
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bindex-0.8.1/ext/skiptrace
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-2s2gic.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-pmd8ci.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
creating Makefile
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bindex-0.8.1/ext/skiptrace
......@@ -12,4 +16,8 @@ linking shared-object skiptrace/internal/cruby.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/bindex-0.8.1/ext/skiptrace
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 cruby.so ./.gem.20190829-21053-101w0nn/skiptrace/internal
=======
/usr/bin/install -c -m 0755 cruby.so ./.gem.20190904-28794-11lm8ti/skiptrace/internal
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/byebug-11.0.1/ext/byebug
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-ijsgqh.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-jkcmib.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
creating Makefile
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/byebug-11.0.1/ext/byebug
......@@ -16,4 +20,8 @@ linking shared-object byebug/byebug.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/byebug-11.0.1/ext/byebug
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 byebug.so ./.gem.20190829-21053-18ounij/byebug
=======
/usr/bin/install -c -m 0755 byebug.so ./.gem.20190904-28794-oe6oze/byebug
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/ffi-1.11.1/ext/ffi_c
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-1iqlvkg.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-ibab7w.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... yes
checking for shlwapi.h... no
......@@ -44,4 +48,8 @@ linking shared-object ffi_c.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/ffi-1.11.1/ext/ffi_c
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 ffi_c.so ./.gem.20190829-21053-9dket4
=======
/usr/bin/install -c -m 0755 ffi_c.so ./.gem.20190904-28794-10ponnu
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/mysql2-0.5.2/ext/mysql2
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-vow6f.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-1a6m2us.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
......@@ -57,4 +61,8 @@ linking shared-object mysql2/mysql2.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/mysql2-0.5.2/ext/mysql2
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 mysql2.so ./.gem.20190829-21053-oofvsg/mysql2
=======
/usr/bin/install -c -m 0755 mysql2.so ./.gem.20190904-28794-13lpcbi/mysql2
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/nio4r-2.5.0/ext/nio4r
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-1sbeqn2.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-q8vpi2.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
checking for unistd.h... yes
checking for sys/select.h... yes
checking for port_event_t in poll.h... no
......@@ -483,4 +487,8 @@ linking shared-object nio4r_ext.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/nio4r-2.5.0/ext/nio4r
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 nio4r_ext.so ./.gem.20190829-21053-1xue6ga
=======
/usr/bin/install -c -m 0755 nio4r_ext.so ./.gem.20190904-28794-nkwk5z
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/nokogiri-1.10.4/ext/nokogiri
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-1blgpcl.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-18hr11c.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
......@@ -140,4 +144,8 @@ rm -rf /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/no
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/nokogiri-1.10.4/ext/nokogiri
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 nokogiri.so ./.gem.20190829-21053-1k9q96i/nokogiri
=======
/usr/bin/install -c -m 0755 nokogiri.so ./.gem.20190904-28794-10ba85g/nokogiri
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/puma-3.12.1/ext/puma_http11
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-pmuaso.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-nmobxe.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
......@@ -122,4 +126,8 @@ linking shared-object puma/puma_http11.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/puma-3.12.1/ext/puma_http11
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 puma_http11.so ./.gem.20190829-21053-16cikns/puma
=======
/usr/bin/install -c -m 0755 puma_http11.so ./.gem.20190904-28794-wmj6sz/puma
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/websocket-driver-0.6.5/ext/websocket-driver
<<<<<<< HEAD
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190829-21053-njm1kk.rb extconf.rb
=======
/home/mmakogin/.rvm/rubies/ruby-2.3.3/bin/ruby -I /home/mmakogin/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190904-28794-gj8d4p.rb extconf.rb
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
creating Makefile
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/websocket-driver-0.6.5/ext/websocket-driver
......@@ -12,4 +16,8 @@ linking shared-object websocket_mask.so
current directory: /home/mmakogin/Desktop/projects/warm_city/vendor/cache/ruby/2.3.0/gems/websocket-driver-0.6.5/ext/websocket-driver
make "DESTDIR=" install
<<<<<<< HEAD
/usr/bin/install -c -m 0755 websocket_mask.so ./.gem.20190829-21053-193ujsc
=======
/usr/bin/install -c -m 0755 websocket_mask.so ./.gem.20190904-28794-1eb52gj
>>>>>>> ee2d9f7aa40b6bf61913178600033f52dc7a1fc6
doc
pkg
tmp
*.o
*.bundle
*.so
*.jar
.DS_Store
.rbenv-gemsets
--color
--backtrace
--format documentation
language: ruby
before_install:
- "echo 'gem: --no-rdoc --no-ri' > ~/.gemrc"
- gem update --system 2.7.8
- gem install bundler -v 1.17.3
rvm:
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- ruby-head
- jruby-head
- rbx-3
script: bundle exec rake
1.0.0 Feb 27 2007
- Initial release.
2.0.0 Mar 07 2007
- Removed BCrypt::Password#exactly_equals -- use BCrypt::Password#eql? instead.
- Added BCrypt::Password#is_password?.
- Refactored out BCrypt::Internals into more useful BCrypt::Engine.
- Added validation of secrets -- nil is not healthy.
2.0.1 Mar 09 2007
- Fixed load path issues
- Fixed crashes when hashing weird values (e.g., false, etc.)
2.0.2 Jun 06 2007
- Fixed example code in the README [Winson]
- Fixed Solaris compatibility [Jeremy LaTrasse, Twitter crew]
2.0.3 May 07 2008
- Made exception classes descend from StandardError, not Exception [Dan42]
- Changed BCrypt::Engine.hash to BCrypt::Engine.hash_secret to avoid Merb
sorting issues. [Lee Pope]
2.0.4 Mar 09 2009
- Added Ruby 1.9 compatibility. [Genki Takiuchi]
- Fixed segfaults on some different types of empty strings. [Mike Pomraning]
2.0.5 Mar 11 2009
- Fixed Ruby 1.8.5 compatibility. [Mike Pomraning]
2.1.0 Aug 12 2009
- Improved code coverage, unit tests, and build chain. [Hongli Lai]
- Ruby 1.9 compatibility fixes. [Hongli Lai]
- JRuby support, using Damien Miller's jBCrypt. [Hongli Lai]
- Ruby 1.9 GIL releasing for high-cost hashes. [Hongli Lai]
2.1.1 Aug 14 2009
- JVM 1.4/1.5 compatibility [Hongli Lai]
2.1.2 Sep 16 2009
- Fixed support for Solaris, OpenSolaris.
3.0.0 Aug 24 2011
- Bcrypt C implementation replaced with a public domain implementation.
- License changed to MIT
3.0.1 Sep 12 2011
- create raises an exception if the cost is higher than 31. GH #27
3.1.0 May 07 2013
- Add BCrypt::Password.valid_hash?(str) to check if a string is a valid bcrypt password hash
- BCrypt::Password cost should be set to DEFAULT_COST if nil
- Add BCrypt::Engine.cost attribute for getting/setting a default cost externally
3.1.1 Jul 10 2013
- Remove support for Ruby 1.8 in compiled win32 binaries
3.1.2 Aug 26 2013
- Add support for Ruby 1.8 and 2.0 (in addition to 1.9) in compiled Windows binaries
- Add support for 64-bit Windows
3.1.3 Feb 21 2014
- Add support for Ruby 2.1 in compiled Windows binaries
- Rename gem from "bcrypt-ruby" to just "bcrypt". [GH #86 by @sferik]
3.1.6 Feb 21 2014
- Dummy version of "bcrypt-ruby" needed a couple version bumps to fix some
bugs. It felt wrong to have that at a higher version than the real gem, so
the real gem is getting bumped to 3.1.6.
3.1.7 Feb 24 2014
- Rebuild corrupt Java binary version of gem [GH #90]
- The 2.1 support for Windows binaries alleged in 3.1.3 was a lie -- documentation removed
3.1.8 Oct 23 2014
- Add support for Ruby 2.1 in compiled Windows binaries [GH #102]
3.1.9 Oct 23 2014
- Rebuild corrupt binaries
3.1.10 Jan 28 2015
- Fix issue with dumping a BCrypt::Password instance to YAML in Ruby 2.2 [GH #107 by @mattwildig]
3.1.11 Mar 06 2016
- Add support for Ruby 2.2 in compiled Windows binaries
3.1.12 May 16 2018
- Add support for Ruby 2.3, 2.4, and 2.5 in compiled Windows binaries
- Fix compatibility with libxcrypt [GH #164 by @besser82]
[DRAFT] 4.0.0 MMM DD YYYY
- No longer include compiled binaries for Windows. See GH #173.
- Update C and Java implementations to latest versions [GH #182 by @fonica]
- Bump default cost to 12 [GH #181 by @bdewater]
- Remove explicit support for Rubies 1.8 and 1.9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment