Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.3.1
ruby-2.3.4
23 changes: 8 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
source 'https://rubygems.org'
ruby '2.3.1'
ruby '2.3.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.15'

gem 'devise', '~> 3.5', '>= 3.5.1'
Expand All @@ -19,35 +17,29 @@ gem 'rmagick', '~> 2.15', '>= 2.15.4'
gem 'mini_magick', '~> 4.5', '>= 4.5.1'
gem 'kaminari', '~> 0.16.3'
gem 'ckeditor', '~> 4.2'
gem 'virtus', '~> 1.0', '>= 1.0.5'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'dropzonejs-rails', '~> 0.8.2'
gem 'toastr-rails', '~> 1.0', '>= 1.0.3'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

gem 'slim-rails', '~> 3.1'

gem 'foreman', '~> 0.83.0'

group :development, :test do
gem 'byebug'
gem 'pry', '~> 0.10.4'
gem 'pry-rails', '~> 0.3.6'
gem 'rails-erd', '~> 1.4', '>= 1.4.7'
gem 'rspec-rails', '~> 3.5', '>= 3.5.1'
gem 'factory_girl_rails', '~> 4.7'
gem 'faker', '~> 1.8', '>= 1.8.7'
gem 'capybara', '~> 2.11'
gem 'launchy', '~> 2.4', '>= 2.4.3'
gem 'selenium-webdriver', '~> 2.53'
Expand All @@ -56,7 +48,8 @@ end

group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'spring-commands-rspec', '~> 1.0', '>= 1.0.4'
gem 'better_errors', '~> 2.4'
gem 'capistrano', '~> 3.4'
gem 'capistrano-rails', '~> 1.2', '>= 1.2.3'
gem 'capistrano-bundler', '~> 1.2'
Expand Down
48 changes: 42 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ GEM
airbrussh (1.1.2)
sshkit (>= 1.6.1, != 1.7.0)
arel (6.0.3)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bcrypt (3.1.11)
better_errors (2.4.0)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
Expand Down Expand Up @@ -82,7 +90,9 @@ GEM
activesupport (>= 3.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1)
coderay (1.1.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
Expand All @@ -94,6 +104,8 @@ GEM
concurrent-ruby (1.0.2)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (3.5.10)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
Expand All @@ -103,13 +115,19 @@ GEM
warden (~> 1.2.3)
devise-bootstrap-views (0.0.8)
diff-lcs (1.2.5)
dropzonejs-rails (0.8.2)
rails (> 3.1)
equalizer (0.0.11)
erubi (1.7.0)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
railties (>= 3.0.0)
faker (1.8.7)
i18n (>= 0.7)
faraday (0.10.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.17)
Expand All @@ -121,6 +139,7 @@ GEM
activesupport (>= 4.1.0)
hashie (3.4.6)
i18n (0.7.0)
ice_nine (0.11.2)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
Expand Down Expand Up @@ -197,6 +216,8 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-rails (0.3.6)
pry (>= 0.10.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
Expand Down Expand Up @@ -284,7 +305,10 @@ GEM
railties (>= 3.1)
slim (~> 3.0)
slop (3.6.0)
spring (1.7.2)
spring (2.0.2)
activesupport (>= 4.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -299,6 +323,8 @@ GEM
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
toastr-rails (1.0.3)
railties (>= 3.1.0)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
Expand All @@ -314,6 +340,11 @@ GEM
unicorn (5.2.0)
kgio (~> 2.6)
raindrops (~> 0.7)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.6)
rack (>= 1.0)
web-console (2.3.0)
Expand All @@ -329,6 +360,7 @@ PLATFORMS
ruby

DEPENDENCIES
better_errors (~> 2.4)
byebug
capistrano (~> 3.4)
capistrano-bundler (~> 1.2)
Expand All @@ -341,7 +373,9 @@ DEPENDENCIES
database_cleaner (~> 1.5, >= 1.5.1)
devise (~> 3.5, >= 3.5.1)
devise-bootstrap-views (~> 0.0.8)
dropzonejs-rails (~> 0.8.2)
factory_girl_rails (~> 4.7)
faker (~> 1.8, >= 1.8.7)
font-awesome-rails (~> 4.7, >= 4.7.0.1)
foreman (~> 0.83.0)
jbuilder (~> 2.0)
Expand All @@ -353,7 +387,7 @@ DEPENDENCIES
omniauth-google-oauth2 (~> 0.4.1)
omniauth-twitter (~> 1.2, >= 1.2.1)
pg (~> 0.15)
pry (~> 0.10.4)
pry-rails (~> 0.3.6)
rails (= 4.2.6)
rails-erd (~> 1.4, >= 1.4.7)
rails_12factor
Expand All @@ -364,15 +398,17 @@ DEPENDENCIES
selenium-webdriver (~> 2.53)
shoulda-matchers (~> 3.1, >= 3.1.1)
slim-rails (~> 3.1)
spring
spring-commands-rspec (~> 1.0, >= 1.0.4)
toastr-rails (~> 1.0, >= 1.0.3)
turbolinks
twitter-bootstrap-rails (~> 3.2, >= 3.2.2)
uglifier (>= 1.3.0)
unicorn (~> 5.1)
virtus (~> 1.0, >= 1.0.5)
web-console (~> 2.0)

RUBY VERSION
ruby 2.3.1p112
ruby 2.3.4p301

BUNDLED WITH
1.12.5
1.16.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
## Nezlamni
<a href="https://codeclimate.com/github/maestro5/Nezlamni"><img src="https://codeclimate.com/github/maestro5/Nezlamni/badges/gpa.svg" /></a>
#### Volunteer project to raise funds for children [Heroku] (https://nezlamni.herokuapp.com/)
15 changes: 15 additions & 0 deletions app/assets/javascripts/account_images.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$ ->
Dropzone.autoDiscover = false
$('#account-images').dropzone
paramName: 'imageable[image]'
addRemoveLinks: true
url: $(this).attr('data-action')
init: ->
@on 'removedfile', (file) ->
if file.xhr
# console.log(file.xhr.responseURL + '/' + JSON.parse(file.xhr.response).id);
img_id = JSON.parse(file.xhr.response).id
$.ajax
url: file.xhr.responseURL + '/' + img_id
type: 'DELETE'
@on 'success', (file, image) ->
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require dropzone
//= require toastr
//= require ckeditor/init
//= require turbolinks
//= require_tree .
21 changes: 21 additions & 0 deletions app/assets/javascripts/errors.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$(document).on 'turbolinks:load', ->
$('#edit-account').on 'ajax:error', (e, data, status, xhr) ->
model_name = Object.keys(data.responseJSON)[0]
errors = data.responseJSON[model_name]

# remove errors
$('.has-error').removeClass 'has-error'
$('.has-feedback').removeClass 'has-feedback'
$('.help-block').remove()
$('.form-control-feedback').remove()

# add errors
for i of errors
el = $('#' + model_name + '_' + i)
el.closest('.form-group').addClass 'has-error has-feedback'
el.after '<span class="fa fa-exclamation-circle form-control-feedback"></span>'
m = errors[i].length - 1
while m >= 0
el.after '<small class="help-block">' + errors[i][m] + '</small>'
m--

1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* file per style scope.
*
*= require devise_bootstrap_views
*= require dropzone/dropzone
*= require_tree .
*= require_self
*/
6 changes: 6 additions & 0 deletions app/assets/stylesheets/custom.css.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "toastr";

#profile {
padding: 0;
}
Expand All @@ -15,4 +17,8 @@
.profile {
width: 50px;
height: 50px;
}

.has-error .form-control-feedback {
top: 9px;
}
Loading