Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #814 from omu/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
msdundar authored Feb 18, 2019
2 parents fb280f7 + 092e636 commit 3142c35
Show file tree
Hide file tree
Showing 207 changed files with 1,407 additions and 1,256 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

**Sistem/Ops etkileri:**

[//]: # (Bu PR merge edildiğinde sunucular üzerinde bir değişiklik - paket kurulması, buildpack eklenmesi vb. - yapılması gerekecekmi, açıklayın.)
[//]: # (Bu PR merge edildiğinde sunucular üzerinde bir değişiklik - paket kurulması, buildpack eklenmesi vb. - yapılması gerekecek mi, açıklayın.)

**Kontrol listesi:**

Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ notifications:
on_failure: change
rooms:
- secure: ljbXmcdLA/wv+j3+RCE0qF/mZd/3PbHI0VOSBkeyJDXWcHHMduIyZlodzliuXL/8mfLbmcJ8MZT5tV9l0OGSgiFI/Ngz1fadsf+0Pim4MtREkp4yKRzfDbQqj8iQwzAAcIAxbIQhenVZtaadwBAM8Jawcjs0m2+iWXaiREU1IlRaK1NzGtkDx8gy5PnVgJhtWmhV7/l6a0Sg94shr53bchkuGwH/ugqgq9L+ec1gGKVpSOHhS0W5WjojMU+3K5/HCP/r9V2J2jYUjtzDSbEDFd18rH0qJjNq1hoaVeaW1uJzidSH7f7B6xXxJfUt4e2CiY+2CkR5LUbFx5V+6fNscEAA9u+zGh6Rn9rxciWkFfzKck6Eomoq5G+d+q/ItVagAMSIUELYCOup2+H/KtRNFTBWBqwECsvXZn7WwaZOdMXDfiTnI9eSWxJqaiwFMtC1A+bnKM7DX2qoZoGCNJAzzQ93EuXdxA1w1oYVs7lfh70qLx5OraXtcTUtfrv4tzms35S9JNNnEQyWN7neuPCS0Yh4QIFf4NX7aaYbwFD66uS25Iq2ochJ4oicFd8s+DxnaXc925GYXFVHk7wZWK/mFlGnZTuTbk4ElByqzRUN2sI5r7xYijv9cBcUM/1RqzXI3B/91Ft/kyCaYDrg3W1j79zLo+G5uIHU2/F1AQBIYlI=
template:
- "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository_slug}@%{branch}"
- "by %{author} %{result} in %{elapsed_time}"
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GIT

GIT
remote: https://github.com/rails/rails.git
revision: 16e235126ef0187a93b81ee959a8127097e2f394
revision: 907280ddfd78c53e2eb5af6f12512dc38df38bd8
specs:
actioncable (6.0.0.beta1)
actionpack (= 6.0.0.beta1)
Expand Down Expand Up @@ -63,7 +63,7 @@ GIT
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 1.0)
zeitwerk (~> 1.2)
rails (6.0.0.beta1)
actioncable (= 6.0.0.beta1)
actionmailbox (= 6.0.0.beta1)
Expand Down Expand Up @@ -107,7 +107,7 @@ GIT

GIT
remote: https://github.com/rollbar/rollbar-gem.git
revision: e3a35525d1b14fab587e317548ed4f5c1052240d
revision: ada82d619e848ad6b64a33acd10b03730b4c3d41
specs:
rollbar (2.18.2)
multi_json
Expand Down Expand Up @@ -142,7 +142,7 @@ GEM
io-like (~> 0.3.0)
ast (2.4.0)
aws-eventstream (1.0.1)
aws-partitions (1.138.0)
aws-partitions (1.139.0)
aws-sdk-core (3.46.1)
aws-eventstream (~> 1.0)
aws-partitions (~> 1.0)
Expand Down Expand Up @@ -173,7 +173,7 @@ GEM
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
byebug (10.0.2)
byebug (11.0.0)
capybara (3.13.2)
addressable
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -411,7 +411,7 @@ GEM
wicked_pdf (1.1.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (1.1.0)
zeitwerk (1.2.0)

PLATFORMS
ruby
Expand Down
20 changes: 8 additions & 12 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Vagrant.configure('2') do |config| # rubocop:disable Metrics/BlockLength
end
end

config.vm.define 'ldap', autostart: false do |ldap|
ldap.vm.box = 'omu/debian-stable-server'

ldap.vm.network :forwarded_port, guest: 389, host: 1389

ldap.vm.provision 'shell', path: 'lib/scripts/ldap.sh'
end

config.vm.define 'paas', autostart: false do |paas|
paas.vm.box = 'omu/debian-stable-paas'

Expand All @@ -47,16 +55,4 @@ Vagrant.configure('2') do |config| # rubocop:disable Metrics/BlockLength
trigger.run = { inline: 'bash lib/scripts/paas.sh' }
end
end

config.vm.define 'ldap', autostart: true do |ldap|
ldap.vm.box = 'omu/debian-stable-server'

ldap.vm.network :forwarded_port, guest: 389, host: 1389

ldap.vm.provider :lxc do |lxc|
lxc.customize 'cgroup.memory.limit_in_bytes', '2048M'
end

ldap.vm.provision 'shell', path: 'lib/scripts/ldap.sh'
end
end
4 changes: 2 additions & 2 deletions app/controllers/account/addresses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Account
class AddressesController < ApplicationController
include LastUpdateFromMernis
include UpdateableFromMernis

before_action :set_user
before_action :set_address, only: %i[edit update destroy]
Expand Down Expand Up @@ -58,7 +58,7 @@ def redirect_with(message)
end

def address_params
params.require(:address).permit(:phone_number, :full_address, :district_id)
params.require(:address).permit(:country, :phone_number, :full_address, :district_id)
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class ConfirmationsController < Devise::ConfirmationsController
# GET /resource/confirmation/new
# def new
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/account/identities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Account
class IdentitiesController < ApplicationController
include LastUpdateFromMernis
include UpdateableFromMernis

before_action :set_user
before_action :set_identity, only: %i[edit update destroy]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# You should configure your model like this:
# devise :omniauthable, omniauth_providers: [:twitter]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class PasswordsController < Devise::PasswordsController
layout 'guest'

Expand Down
30 changes: 0 additions & 30 deletions app/controllers/account/profile_controller.rb

This file was deleted.

30 changes: 30 additions & 0 deletions app/controllers/account/profile_settings_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

module Account
class ProfileSettingsController < ApplicationController
# before_action :purge_avatar, only: :update

def edit; end

def update
if current_user.update_without_password(profile_params)
redirect_to profile_path, notice: t('.success')
else
render(:edit)
end
end

private

# def purge_avatar
# current_user.avatar.purge
# end

def profile_params
params.require(:user).permit(
:avatar, :country, :phone_number, :extension_number, :website, :twitter, :linkedin, :skype, :orcid,
:public_photo, :public_studies
)
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class RegistrationsController < Devise::RegistrationsController
layout 'guest', except: %i[edit update]

Expand Down Expand Up @@ -65,6 +65,8 @@ def update
# super(resource)
# end

private

def update_password_change_time
current_user.update!(password_changed_at: Time.zone.now)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class SessionsController < Devise::SessionsController
layout 'guest'
# before_action :configure_sign_in_params, only: [:create]
Expand All @@ -20,7 +20,11 @@ class SessionsController < Devise::SessionsController
# super
# end

# protected
protected

def after_sign_out_path_for(_resource_or_scope)
login_path
end

# If you have extra params to permit, append them to the sanitizer.
# def configure_sign_in_params
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class User
module Account
class UnlocksController < Devise::UnlocksController
# GET /resource/unlock/new
# def new
Expand Down
13 changes: 13 additions & 0 deletions app/controllers/admin/administrative_functions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module Admin
class AdministrativeFunctionsController < ApplicationController
include ReferenceResource

private

def secure_params
params.require(:administrative_function).permit(:name, :code)
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/admin/cities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Admin
class CitiesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_country
before_action :set_city, only: %i[show edit update destroy]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/countries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Admin
class CountriesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_country, only: %i[show edit update destroy]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CalendarManagement
class CalendarEventTypesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_calendar_event_type, only: %i[edit update destroy]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CalendarManagement
class CalendarsController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_calendar, only: %i[show edit update destroy]

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/committee/agenda_types_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Committee
class AgendaTypesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_agenda_type, only: %i[edit update destroy]

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/committee/agendas_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Committee
class AgendasController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_committee
before_action :set_agenda, only: %i[edit update destroy]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/committee/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Committee
class DashboardController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

def index
@committees = pagy_by_search(
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/reference_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module ReferenceResource
extend ActiveSupport::Concern
include PagyBackendWithHelpers
include SearchableModule

# rubocop:disable Metrics/BlockLength
# rubocop:disable Rails/LexicallyScopedActionFilter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module PagyBackendWithHelpers
module SearchableModule
extend ActiveSupport::Concern
include Pagy::Backend

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module LastUpdateFromMernis
module UpdateableFromMernis
extend ActiveSupport::Concern

def elapsed_time(resource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CourseManagement
class AvailableCoursesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_available_course, only: %i[show edit update destroy]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CourseManagement
class CourseGroupTypesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_course_group_type, only: %i[edit update destroy]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CourseManagement
class CourseTypesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_course_type, only: %i[edit update destroy]

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/course_management/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module CourseManagement
class CoursesController < ApplicationController
include PagyBackendWithHelpers
include SearchableModule

before_action :set_course, only: %i[show edit update destroy]

Expand Down
Loading

0 comments on commit 3142c35

Please sign in to comment.