From e5def149e33c2f55855d352044125b4d8b7150f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 18 Mar 2019 15:16:44 +0300 Subject: [PATCH 001/279] Remove old implementation --- plugins/support/doc/codifications.md | 242 ------------------ plugins/support/lib/nokul/support.rb | 1 - .../lib/nokul/support/codifications.rb | 6 - .../lib/nokul/support/codifications/code.rb | 61 ----- .../lib/nokul/support/codifications/coder.rb | 79 ------ .../lib/nokul/support/codifications/memory.rb | 34 --- .../support/codifications/prefixed_coder.rb | 70 ----- .../nokul/support/codifications/refinery.rb | 21 -- .../support/test/codifications/code_test.rb | 38 --- .../support/test/codifications/coder_test.rb | 55 ---- .../support/test/codifications/memory_test.rb | 22 -- .../test/codifications/prefixed_coder_test.rb | 110 -------- .../test/codifications/refinery_test.rb | 23 -- 13 files changed, 762 deletions(-) delete mode 100644 plugins/support/doc/codifications.md delete mode 100644 plugins/support/lib/nokul/support/codifications.rb delete mode 100644 plugins/support/lib/nokul/support/codifications/code.rb delete mode 100644 plugins/support/lib/nokul/support/codifications/coder.rb delete mode 100644 plugins/support/lib/nokul/support/codifications/memory.rb delete mode 100644 plugins/support/lib/nokul/support/codifications/prefixed_coder.rb delete mode 100644 plugins/support/lib/nokul/support/codifications/refinery.rb delete mode 100644 plugins/support/test/codifications/code_test.rb delete mode 100644 plugins/support/test/codifications/coder_test.rb delete mode 100644 plugins/support/test/codifications/memory_test.rb delete mode 100644 plugins/support/test/codifications/prefixed_coder_test.rb delete mode 100644 plugins/support/test/codifications/refinery_test.rb diff --git a/plugins/support/doc/codifications.md b/plugins/support/doc/codifications.md deleted file mode 100644 index 9107ee8f4..000000000 --- a/plugins/support/doc/codifications.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -author: Recai Oktaş ---- - -`Codifications` -=============== - -`Codifications` modülü entitelere kod ataması yapmakta kullanılan sınıflardan -oluşmaktadır. `Codifications::Coder` kod üreten jeneratör sınıfı, -`Codifications::Code` kodu temsil eden tip sınıfı, `Codifications::Memory` ise -tekil kodlar üretmek için gerekli hafızayı modelleyen sınıftır. - -Kod nesneleri -------------- - -Kodlama `Code` nesneleri üzerinden yürütülmektedir. Code nesnelerinin temsil -ettiği "kodu" sadece rakam ve büyük harflerden oluşan bir dizgi olarak -tanımlıyoruz. Kod içeriğinde sadece `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ` -karakterleri olabilir. Temsil edilen kodu `Code` nesnesinden almak için `to_s` -string dönüşümünü kullanıyoruz. - -Bir dizgi ("string") ile ilklendirilen `Code` nesnesi bir aralık içinde sonraki -("succeeding") kodu üretebilen, `Range` nesnelerinde kullanılabilen bir veri -tipini temsil etmektedir. - -```ruby -code = Codifications::Code.new '009' -code.succ.to_s #=> '010' - -Codifications::Code.new '013' < Codifications::Code.new '020' #=> true - -range = Codifications::Code.new('033')..Codifications::Code.new('035') -range.last.to_s #=> '035' -range.to_a(&:to_s) #=> ['033', '034', '035'] -``` - -Örnekte görüldüğü gibi `Code` nesnesi `succ` metoduna cevap vererek bir sonraki -kod nesnesini üretebilmektedir (`succ` daima yeni bir `Code` nesnesi üretir). -Sonraki kodun ne değer alacağı, ön tanımlı davranış olarak, kod nesnesi -ilklendiğinde verilen dizgi argümanıyla belirlenir. - -- Sadece rakamlardan oluşan bir ilk değerde sonraki kod, soldaki sıfırlar - korunmak kaydıyla onlu tabandaki artışa göre belirlenir. - - ```ruby - Codifications::Code.new('009').succ.to_s #=> '010' - ``` - -- İlk değerde `ABCDEF` harflerinden en az birisi görülmüş ve başka bir harf - görülmemişse sonraki kod, soldaki sıfırlar korunmak kaydıyla onaltılı - tabandaki artışa göre belirlenir. - - ```ruby - Codifications::Code.new('00A').succ.to_s #=> '00B' - ``` - -- İlk değerde `ABCDEF` dışındaki diğer harflerinden en az birisi görülmüşse - sonraki kod, soldaki sıfırlar korunmak kaydıyla otuzaltılı tabandaki artışa - göre belirlenir. - - ```ruby - Codifications::Code.new('00G').succ.to_s #=> '00H' - ``` - -Görüldüğü gibi kodlarda değer artışlarında sadece on, onaltı ve otuzaltı -tabanları kullanılmakta ve seçilen taban ilk değere göre otomatik -belirlenmektedir. Otomatik seçim kullanılmadan tabanı açıkça vermek -isteyebilirsiniz. - -```ruby -Codifications::Code.new('0AF', 36).succ.to_s #=> '0AG`, `0B0` değil! -``` - -Kod üretimi ------------ - -Kod üretimi `Code` nesneleriyle iklendirilen `Coder` nesnesiyle yapılır. - -```ruby -coder = Codifications::Coder.new '000' -coder.run #=> '000' -coder.run #=> '001' -``` - -Üretilen kodun bir hanesinde sadece belirli karakterler kullanılmasını -isteyebilirsiniz. - -```ruby -coder = Codifications::Coder.new '000', deny: /0$/ -coder.run #=> '001' -coder.run #=> '002' -``` - -Örnekte görüldüğü gibi `deny` isimlendirilmiş argümanında tanımlayacağımız bir -düzenli ifade ile belirli karakterleri sınırlayabiliyoruz. - -Kod üretiminin başlangıcı ilk argümanla verilirken, isteğe bağlı olarak, bitişi -`ends` argümanıyla belirtilir. - -```ruby -coder = Codifications::Coder.new '000', ends: '003' -coder.run #=> '000' -coder.run #=> '001' -coder.run #=> '002' -coder.run #=> '003' -coder.run #=> Codifications::Coder::Consumed exception -``` - -Görüldüğü gibi sona ulaşıldığında üreteç nesnesi -`Codifications::Coder::Consumed` istisnası üretir. Bu istisnayı yakalayarak -süreci kontrol edebilirsiniz. - -Kod üreteçleri sadece tek kodlar üretmek yerine bir kod havuzu da (dizi) -üretebilir. - - -```ruby -coder = Codifications::Coder.new '000', ends: '003' - -pool = coder.pool #=> ['000', '001', '002', '003'] -``` - -Geçmişe bağlı kod üretimi -------------------------- - -Pek çok kullanım senaryosunda kod üretecinin geçmişte kullanılmayan tekil kodlar -üretmesi istenir. Bu amaçla üretece `memory` isimlendirilmiş argümanıyla -verilen `Codifications::Memory` nesnesinden yararlanacaksınız. Ön tanımlı -davranışta kod üreteci `Codifications::NilMemory` nesnesiyle hafızasız davranır. - -```ruby -class Coder - def initialize(seed, ends: nil, allowed: nil, memory: NilMemory.new) - ... - end -end -``` - -Geçmişi kaydeden basit sözlük türünde bir hafıza kullanabilirsiniz. Bu amaçla -hazır `Codifications::SimpleMemory` nesnesini kullanabilirsiniz. - -```ruby -memory = Codifications::SimpleMemory.new { '002' => true } -coder = Codifications::Coder.new '000', memory: memory -coder.run #=> '000' -coder.run #=> '001' -coder.run #=> '003', '002' hatırlandı -``` - -`SimpleMemory` nesnesinin yeterli gelmediği durumlarda kendi hafıza nesnenizi -yazmak durumundasınız. Hafıza nesneleri sadece iki metoda: `remember` ve -`remember?` cevap veren baist nesnelerdir; `remember` metodu argüman olarak -verilen bir kod dizgisini saklar, `remember?` metodu ise argüman olarak verilen -bir kod dizgisinin hafızada olup olmadığını döner. - -Örneğin tamamen veritabanından çalışan bir hafıza nesnesi oluşturmak isterseniz -aşağıdaki sınıf tanımını yapabilirsiniz. - -```ruby -class DatabaseMemory < Codifications::Memory - def initialize - # Veritabanından ilkle - end - - def remember(string) - # Veritabanını güncelle - end - - def remember?(string) - # Veritabanından sorgula - end -end -``` - -Ön ekli kod üretimi -------------------- - -Kod üretiminin özel bir hali olarak ön ekli kod üretmek için `PrefixedCoder` -sınıfı kullanılır. - -```ruby -coder = PrefixedCoder.new '078', prefix: ['203', '19'] # veya prefix: '20319' -coder.run #=> "20319078" -coder.run #=> "20319079" - -coder.next_sequence #=> "080" (coder çekirdeğini değiştirmez) -coder.initial_sequence #=> "001" -``` - -Örnekte de görüldüğü gibi `PrefixedCoder` üreteci `prefix sequence` -biçiminde kodlar üretir. Ön ekin tanımlandığı `prefix` seçeneği farklı -kaynaklardan gelen ön ekleri vurgulamak amacıyla dizi olarak verilebilir. - -Başlangıç ardışımı argümanı `nil` verilirse ilk ardışım, ön ekler ve üreteç -uzunluğu dikkate alınarak otomatik hesaplanır. Önerilen kullanım şekli de -böyledir. Örneğin veritabanı gibi bir kaynaktan başlangıç ardışımını okurken bu -değeri `nil` olarak ayarlamanız üretecin sıfırlanması için yeterlidir. - -```ruby -coder = PrefixedCoder.new nil, prefix: ['203', '19'] # veya prefix: '20319' -coder.run #=> "20319001" -coder.run #=> "20319002" - -coder.next_sequence #=> "003" -coder.initial_sequence #=> "001" -``` - -Üretilen kod öntanımlı olarak 8 hanedir. Ön eklerin varlığı nedeniyle ardışımın -uzunluğu 8 değerinden çok daha küçüktür (yukarıdaki örnekte 3 hane). Ardışım -için daha fazla sayıda haneye ihtiyacınız varsa `prefix` değerini ihtiyaç -duyulan hane sayısına göre daraltabilirsiniz. - -```ruby -long_coder = PrefixedCoder.new '001', prefix: '203' - -long_coder.run #=> "20300001" -long_coder.run #=> "20300002" - -long_coder.next_sequence #=> "00003" -long_coder.initial_sequence #=> "00001" -``` - -Daha uzun kodlar üretmek için miras alma yoluyla yeni bir sınıf -oluşturabilirsiniz. - - -```ruby -class CustomCoder < PrefixedCoder - self.length = 12 -end -``` - -Üretecin davranışını inşa zamanında vereceğiniz seçeneklerle değiştirerek çok -daha özel bir üreteç de gerçekleyebilirsiniz. Örneğin aşağıdaki üreteç `0` -rakamı içermeyen kodlar üretmektedir. Kullanılabilecek geçerli seçenekler için -`Coder` sınıfını inceleyin. - - -```ruby -never_zero_coder = PrefixedCoder.new nil, prefix: '203', deny: /0/ -never_zero_coder.run #=> "20311111" -``` diff --git a/plugins/support/lib/nokul/support.rb b/plugins/support/lib/nokul/support.rb index ec7ee2b89..787fcfba1 100644 --- a/plugins/support/lib/nokul/support.rb +++ b/plugins/support/lib/nokul/support.rb @@ -10,7 +10,6 @@ require_relative 'support/structure' require_relative 'support/collection' require_relative 'support/uniq_collection' -require_relative 'support/codifications' require_relative 'support/sensitive' require_relative 'support/rest_client' diff --git a/plugins/support/lib/nokul/support/codifications.rb b/plugins/support/lib/nokul/support/codifications.rb deleted file mode 100644 index fc914ca76..000000000 --- a/plugins/support/lib/nokul/support/codifications.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -require_relative 'codifications/code' -require_relative 'codifications/memory' -require_relative 'codifications/coder' -require_relative 'codifications/prefixed_coder' diff --git a/plugins/support/lib/nokul/support/codifications/code.rb b/plugins/support/lib/nokul/support/codifications/code.rb deleted file mode 100644 index 322963a3d..000000000 --- a/plugins/support/lib/nokul/support/codifications/code.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -require_relative 'refinery' - -module Nokul - module Support - module Codifications - class Code - include Comparable - - using Refinery - - attr_reader :base, :length - - def initialize(value_string, base = nil) - @length = value_string.length - @base = base || determine_base_from_value_string(value_string) - @value = value_string.to_number(@base) - end - - def succ - self.class.new(value.succ.to_string(base, length), base) - end - - def <=>(other) - value <=> other.send(:value) - end - - def inspect - value.to_string(base, length) - end - - def to_s - inspect - end - - def ends - value_string = - case base - when 10 then '9' * length - when 16 then 'F' * length - when 36 then 'Z' * length - end - self.class.new value_string, base - end - - protected - - attr_reader :value - - def determine_base_from_value_string(value_string) - case value_string - when /[g-zG-Z]/ then 36 - when /[a-fA-F]/ then 16 - else 10 - end - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codifications/coder.rb b/plugins/support/lib/nokul/support/codifications/coder.rb deleted file mode 100644 index 9b62beeb5..000000000 --- a/plugins/support/lib/nokul/support/codifications/coder.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -require_relative 'refinery' - -module Nokul - module Support - module Codifications - # :reek:TooManyInstanceVariables { max_variables: 5 } - class Coder - using Refinery - - Consumed = Class.new ::StandardError - - def initialize(begins, ends: nil, deny: nil, memory: nil) - @begins = @current = Code.new begins - @ends = ends ? Code.new(ends, @begins.base) : @begins.ends - - @deny = to_pattern(deny) if deny - @memory = memory - end - - def run - code_string = try_run - memory&.remember code_string - code_string - end - - def peek - dup.run - end - - def pool - pool = range.to_a.map(&:to_s) - return pool if no_restriction? # fast code path - - pool.reject { |code_string| notok?(code_string) } - end - - protected - - attr_reader :begins, :ends, :current, :deny, :memory - attr_writer :current - - def range - Range.new begins, ends - end - - def to_pattern(may_string_or_regexp) - case may_string_or_regexp - when Regexp then may_string_or_regexp - when String then Regexp.new may_string_or_regexp - else raise ArgumentError, 'Pattern must be a sting or Regexp object' - end - end - - def try_run - loop do - raise(Consumed, "Coder has been consumed at #{current}") if current > ends - - code_string = current.to_s - self.current = current.succ - return code_string unless notok? code_string - end - end - - def no_restriction? - !deny && !memory - end - - def notok?(code_string) - return true if deny && code_string =~ deny - return true if memory&.remember?(code_string) - - false - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codifications/memory.rb b/plugins/support/lib/nokul/support/codifications/memory.rb deleted file mode 100644 index 72924dd51..000000000 --- a/plugins/support/lib/nokul/support/codifications/memory.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module Nokul - module Support - module Codifications - class Memory - def remember(_string, **) - raise NotImplementedError - end - - def remember?(_string, **) - raise NotImplementedError - end - end - - class SimpleMemory < Memory - attr_reader :store - - def initialize(initial = {}) - @store = initial.dup - end - - def remember(string) - store[string] = true - string - end - - def remember?(string) - store.key? string - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codifications/prefixed_coder.rb b/plugins/support/lib/nokul/support/codifications/prefixed_coder.rb deleted file mode 100644 index 0feaae2ed..000000000 --- a/plugins/support/lib/nokul/support/codifications/prefixed_coder.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -module Nokul - module Support - module Codifications - class PrefixedCoder - Error = Class.new ::StandardError - - MINIMUM_SEQUENCE_LENGTH = 3 - DEFAULT_NUMBER_LENGTH = 8 - - class_attribute :length, default: DEFAULT_NUMBER_LENGTH - - def initialize(starting_sequence, prefix: '', **coder_options) - @starting_sequence = starting_sequence - @prefix = [*prefix].join - @coder = build_coder(**coder_options) - end - - def run - prefix + coder.run - end - - def initial_sequence - '0' * (effective_sequence_length - 1) + '1' - end - - def next_sequence - coder.peek - end - - protected - - attr_reader :starting_sequence, :prefix, :coder - - def build_coder(**coder_options) - sanitize_setup(**coder_options) - Coder.new starting_sequence.presence || initial_sequence, **coder_options - end - - def effective_sequence_length - length - prefix.length - end - - def sanitize_setup(**) - numerator_length_must_be_sane - effective_sequence_length_must_be_sane - starting_sequence_must_be_sane - end - - def numerator_length_must_be_sane - raise Error, 'Coder length undefined' unless length - raise Error, "Coder length is too short: #{length}" if length < MINIMUM_SEQUENCE_LENGTH - end - - def effective_sequence_length_must_be_sane - return if effective_sequence_length >= MINIMUM_SEQUENCE_LENGTH - - raise Error, 'Effective sequence length is too short' - end - - def starting_sequence_must_be_sane - return if starting_sequence.blank? || starting_sequence.length == effective_sequence_length - - raise Error, "Incorrect length for starting sequence: #{starting_sequence}" - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codifications/refinery.rb b/plugins/support/lib/nokul/support/codifications/refinery.rb deleted file mode 100644 index deaacd2c4..000000000 --- a/plugins/support/lib/nokul/support/codifications/refinery.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -module Nokul - module Support - module Codifications - module Refinery - refine String do - def to_number(base) - to_i(base) - end - end - - refine Integer do - def to_string(base, length) - to_s(base).upcase.rjust(length, '0') - end - end - end - end - end -end diff --git a/plugins/support/test/codifications/code_test.rb b/plugins/support/test/codifications/code_test.rb deleted file mode 100644 index f26ea7ddb..000000000 --- a/plugins/support/test/codifications/code_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - class CodificationsCodeTest < ActiveSupport::TestCase - test 'basic use case should just work' do - code = Codifications::Code.new '009' - assert_equal '010', code.succ.to_s - - assert Codifications::Code.new('013') < Codifications::Code.new('020') - - range = Codifications::Code.new('033')..Codifications::Code.new('035') - - assert_equal '035', range.last.to_s - - assert_equal '033-034-035', range.to_a(&:to_s).join('-') - end - - test 'implicit base-10 should work' do - assert_equal '010', Codifications::Code.new('009').succ.to_s - end - - test 'implicit base-16 should work' do - assert_equal '00B', Codifications::Code.new('00A').succ.to_s - end - - test 'implicit base-36 should work' do - assert_equal '00H', Codifications::Code.new('00G').succ.to_s - end - - test 'explicit base setting should work' do - assert_equal '0AG', Codifications::Code.new('0AF', 36).succ.to_s - end - end - end -end diff --git a/plugins/support/test/codifications/coder_test.rb b/plugins/support/test/codifications/coder_test.rb deleted file mode 100644 index a517d4774..000000000 --- a/plugins/support/test/codifications/coder_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - class CodificationsCoderTest < ActiveSupport::TestCase - test 'basic use case should just work' do - coder = Codifications::Coder.new '000' - assert_equal '000', coder.run - assert_equal '001', coder.run - end - - test 'can specify the end of range' do - coder = Codifications::Coder.new '000', ends: '003' - - assert_equal '000', coder.run - assert_equal '001', coder.run - assert_equal '002', coder.run - assert_equal '003', coder.run - - assert_raises(Codifications::Coder::Consumed) { coder.run } - end - - test 'can run pools' do - coder = Codifications::Coder.new '000', ends: '002' - assert(pool = coder.pool).is_a? Array - assert_equal 3, pool.size - assert_equal '000-001-002', pool.join('-') - end - - test 'can deny certain symbols based on a regex pattern' do - # simple case - coder = Codifications::Coder.new '000', deny: /[0]$/ - assert_equal '001', coder.run - assert_equal '002', coder.run - - # complex case - coder = Codifications::Coder.new '000', ends: '999', deny: /(?)\g\g/ - %w[000 111 222 333 444 555 666 777 888 999].each do |denied| - assert_equal false, coder.pool.include?(denied) - end - end - - test 'can work with a simple memory' do - memory = Codifications::SimpleMemory.new '002' => true - coder = Codifications::Coder.new '000', memory: memory - - assert_equal '000', coder.run - assert_equal '001', coder.run - assert_equal '003', coder.run - end - end - end -end diff --git a/plugins/support/test/codifications/memory_test.rb b/plugins/support/test/codifications/memory_test.rb deleted file mode 100644 index c98b77dc4..000000000 --- a/plugins/support/test/codifications/memory_test.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - class CodificationsMemoryTest < ActiveSupport::TestCase - class RefusingMemory < Codifications::Memory - def remember(*); end - - def remember?(*) - true - end - end - - test 'custom memory should work' do - coder = Codifications::Coder.new '000', ends: '002', memory: RefusingMemory.new - assert_raises(Codifications::Coder::Consumed) { coder.run } - end - end - end -end diff --git a/plugins/support/test/codifications/prefixed_coder_test.rb b/plugins/support/test/codifications/prefixed_coder_test.rb deleted file mode 100644 index 7d708ff33..000000000 --- a/plugins/support/test/codifications/prefixed_coder_test.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - class CodificationsPrefixedCoderTest < ActiveSupport::TestCase - test 'basic use case should just work' do - coder = Codifications::PrefixedCoder.new '123', prefix: %w[203 19] - number = coder.run - assert_equal Codifications::PrefixedCoder.length, number.length - assert_equal '20319123', number - assert_equal '124', coder.next_sequence - assert_equal '001', coder.initial_sequence - end - - test 'getting next sequence should not affect coder seed' do - coder = Codifications::PrefixedCoder.new '123', prefix: %w[203 19] - assert_equal '20319123', coder.run - assert_equal '20319124', coder.run - assert_equal '125', coder.next_sequence - assert_equal '20319125', coder.run - end - - test 'getting first sequence should not affect coder seed' do - coder = Codifications::PrefixedCoder.new '123', prefix: %w[203 19] - assert_equal '001', coder.initial_sequence - assert_equal '20319123', coder.run - end - - test 'giving a nil starting sequence should reset coder' do - coder = Codifications::PrefixedCoder.new nil, prefix: %w[203 19] - assert_equal '20319001', coder.run - assert_equal '20319002', coder.run - assert_equal '003', coder.next_sequence - end - - test 'giving a blank starting sequence should also reset coder' do - coder = Codifications::PrefixedCoder.new '', prefix: %w[203 19] - assert_equal '20319001', coder.run - assert_equal '20319002', coder.run - assert_equal '003', coder.next_sequence - end - - test 'lack of a trailing prefix should run long sequences' do - coder = Codifications::PrefixedCoder.new '00123', prefix: '203' - assert_equal '00001', coder.initial_sequence - assert_equal '20300123', coder.run - assert_equal '00124', coder.next_sequence - end - - test 'can pass extra options to the decorated coder' do - coder = Codifications::PrefixedCoder.new nil, prefix: '203', deny: /0/ - assert_equal '00001', coder.initial_sequence - assert_equal '20311111', coder.run - assert_equal '11112', coder.next_sequence - end - - class FlatCoder < Codifications::PrefixedCoder - self.length = 12 - - delegate :run, to: :coder - - def initial_sequence - '0' * (length - 1) + '1' - end - end - - test 'custom coders should work' do - coder = FlatCoder.new nil - assert_equal '000000000001', coder.initial_sequence - assert_equal '000000000001', coder.run - assert_equal '000000000002', coder.run - assert_equal '000000000003', coder.next_sequence - end - - test 'too long starting sequences should raise exception' do - exception = assert_raise(Codifications::PrefixedCoder::Error) do - Codifications::PrefixedCoder.new '1234567', prefix: %w[203 19] - end - assert_equal 'Incorrect length for starting sequence: 1234567', exception.message - end - - test 'too short starting sequences should raise exception' do - exception = assert_raise(Codifications::PrefixedCoder::Error) do - Codifications::PrefixedCoder.new '123', prefix: '203' - end - assert_equal 'Incorrect length for starting sequence: 123', exception.message - end - - class TooShortCoder < Codifications::PrefixedCoder - self.length = 2 - end - - test 'coder length can not set too short' do - exception = assert_raise(Codifications::PrefixedCoder::Error) do - TooShortCoder.new '123', prefix: %w[203 19] - end - assert_equal 'Coder length is too short: 2', exception.message - end - - test 'too long prefixes should raise exception' do - exception = assert_raise(Codifications::PrefixedCoder::Error) do - Codifications::PrefixedCoder.new '123', prefix: %w[12345 19] - end - assert_equal 'Effective sequence length is too short', exception.message - end - end - end -end diff --git a/plugins/support/test/codifications/refinery_test.rb b/plugins/support/test/codifications/refinery_test.rb deleted file mode 100644 index 08a251303..000000000 --- a/plugins/support/test/codifications/refinery_test.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - using Codifications::Refinery - - class CodificationsRefineryTest < ActiveSupport::TestCase - test 'to_number refinement' do - assert_equal 1, '01'.to_number(10) - assert_equal 10, '0A'.to_number(16) - assert_equal 35, '0Z'.to_number(36) - end - - test 'to_string refinement' do - assert_equal '0001', 1.to_string(10, 4) - assert_equal '000A', 10.to_string(16, 4) - assert_equal '000Z', 35.to_string(36, 4) - end - end - end -end From 1c3e8c9f64308b1d6fbff835f9a1a4a9dfe914dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 18 Mar 2019 15:21:09 +0300 Subject: [PATCH 002/279] Rewrite codification [WIP] This refactor^Wrewrite makes all the code generations pluggable, which you can find under the codification/codes directory. Detailed documentation will come later. --- plugins/support/doc/codification.md | 13 ++ plugins/support/doc/core_ext.md | 36 +++++ plugins/support/lib/nokul/support.rb | 1 + .../support/lib/nokul/support/codification.rb | 11 ++ .../lib/nokul/support/codification/code.rb | 95 ++++++++++++ .../lib/nokul/support/codification/coder.rb | 92 +++++++++++ .../lib/nokul/support/codification/codes.rb | 28 ++++ .../codes/alternative_user_names.rb | 55 +++++++ .../codes/sequential_numeric_codes.rb | 53 +++++++ .../codification/codes/suffixed_user_names.rb | 37 +++++ .../lib/nokul/support/codification/errors.rb | 11 ++ .../lib/nokul/support/codification/lists.rb | 33 ++++ .../support/codification/lists/user_names.rb | 72 +++++++++ .../lib/nokul/support/codification/memory.rb | 65 ++++++++ .../nokul/support/codification/processor.rb | 91 +++++++++++ plugins/support/lib/nokul/support/core_ext.rb | 3 + .../lib/nokul/support/core_ext/array.rb | 13 ++ .../lib/nokul/support/core_ext/integer.rb | 7 + .../lib/nokul/support/core_ext/kernel.rb | 19 +++ .../lib/nokul/support/core_ext/object.rb | 72 +++++++++ .../lib/nokul/support/core_ext/string.rb | 146 ++++++++++-------- .../alternative_user_names_test.rb | 84 ++++++++++ .../support/test/codification/code_test.rb | 22 +++ .../support/test/codification/coder_test.rb | 63 ++++++++ .../support/test/codification/lists_test.rb | 81 ++++++++++ .../support/test/codification/memory_test.rb | 38 +++++ .../test/codification/processor_test.rb | 70 +++++++++ .../sequential_numeric_codes_test.rb | 65 ++++++++ .../codification/suffixed_user_names_test.rb | 83 ++++++++++ plugins/support/test/codification_test.rb | 19 +++ plugins/support/test/core_ext/array_test.rb | 13 ++ plugins/support/test/core_ext/integer_test.rb | 9 ++ plugins/support/test/core_ext/kernel_test.rb | 13 ++ plugins/support/test/core_ext/object_test.rb | 18 +++ plugins/support/test/core_ext/string_test.rb | 26 +++- 35 files changed, 1483 insertions(+), 74 deletions(-) create mode 100644 plugins/support/doc/codification.md create mode 100644 plugins/support/doc/core_ext.md create mode 100644 plugins/support/lib/nokul/support/codification.rb create mode 100644 plugins/support/lib/nokul/support/codification/code.rb create mode 100644 plugins/support/lib/nokul/support/codification/coder.rb create mode 100644 plugins/support/lib/nokul/support/codification/codes.rb create mode 100644 plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb create mode 100644 plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb create mode 100644 plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb create mode 100644 plugins/support/lib/nokul/support/codification/errors.rb create mode 100644 plugins/support/lib/nokul/support/codification/lists.rb create mode 100644 plugins/support/lib/nokul/support/codification/lists/user_names.rb create mode 100644 plugins/support/lib/nokul/support/codification/memory.rb create mode 100644 plugins/support/lib/nokul/support/codification/processor.rb create mode 100644 plugins/support/lib/nokul/support/core_ext/array.rb create mode 100644 plugins/support/lib/nokul/support/core_ext/integer.rb create mode 100644 plugins/support/lib/nokul/support/core_ext/kernel.rb create mode 100644 plugins/support/test/codification/alternative_user_names_test.rb create mode 100644 plugins/support/test/codification/code_test.rb create mode 100644 plugins/support/test/codification/coder_test.rb create mode 100644 plugins/support/test/codification/lists_test.rb create mode 100644 plugins/support/test/codification/memory_test.rb create mode 100644 plugins/support/test/codification/processor_test.rb create mode 100644 plugins/support/test/codification/sequential_numeric_codes_test.rb create mode 100644 plugins/support/test/codification/suffixed_user_names_test.rb create mode 100644 plugins/support/test/codification_test.rb create mode 100644 plugins/support/test/core_ext/array_test.rb create mode 100644 plugins/support/test/core_ext/integer_test.rb create mode 100644 plugins/support/test/core_ext/kernel_test.rb create mode 100644 plugins/support/test/core_ext/object_test.rb diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md new file mode 100644 index 000000000..bceb80f76 --- /dev/null +++ b/plugins/support/doc/codification.md @@ -0,0 +1,13 @@ +--- +author: Recai Oktaş +--- + +`Codification` +=============== + +`Codification` modülü entitelere kod ataması yapmakta kullanılan sınıflardan +oluşmaktadır. `Codification::Coder` kod üreten jeneratör sınıfı, +`Codification::Code` kodu temsil eden tip sınıfı, `Codification::Memory` ise +tekil kodlar üretmek için gerekli hafızayı modelleyen sınıftır. + +TODO diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md new file mode 100644 index 000000000..d45d1aa30 --- /dev/null +++ b/plugins/support/doc/core_ext.md @@ -0,0 +1,36 @@ +--- +author: Recai Oktaş +--- + +Çekirdek eklentileri +==================== + +`Object` +-------- + +TODO + +`Kernel` +-------- + +TODO + +`String` +-------- + +TODO + +`Integer` +--------- + +TODO + +`Array` +------- + +TODO + +`Hash` +------ + +TODO diff --git a/plugins/support/lib/nokul/support.rb b/plugins/support/lib/nokul/support.rb index 787fcfba1..0f8757952 100644 --- a/plugins/support/lib/nokul/support.rb +++ b/plugins/support/lib/nokul/support.rb @@ -10,6 +10,7 @@ require_relative 'support/structure' require_relative 'support/collection' require_relative 'support/uniq_collection' +require_relative 'support/codification' require_relative 'support/sensitive' require_relative 'support/rest_client' diff --git a/plugins/support/lib/nokul/support/codification.rb b/plugins/support/lib/nokul/support/codification.rb new file mode 100644 index 000000000..943fa7bbc --- /dev/null +++ b/plugins/support/lib/nokul/support/codification.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require_relative 'codification/errors' +require_relative 'codification/memory' +require_relative 'codification/lists' +require_relative 'codification/processor' + +require_relative 'codification/code' +require_relative 'codification/coder' + +require_relative 'codification/codes' diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb new file mode 100644 index 000000000..d1d318dba --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + class Code + include Comparable + + def initialize(source = nil, **options) + @options = options + @source = sanitize(source) + + setup if defined? setup + + self.kernel = initial_kernel + end + + def <=>(other) + kernel <=> other.kernel + end + + def consumed? + kernel >= last_kernel + end + + def ending + @ending ||= clone.tap { |instance| instance.kernel = last_kernel } + end + + def range + Range.new(self, ending) + end + + def next + clone.tap(&:next!) + end + + alias succ next # so as to become a Range + + def next! + raise Consumed if consumed? + + self.kernel = next_kernel + end + + def to_s + strings.affixed(**options) + end + + protected + + attr_reader :source, :options + attr_accessor :kernel + + def sanitize(source) + source + end + + def initial_kernel + raise NotImplementedError + end + + def next_kernel + raise NotImplementedError + end + + def last_kernel + raise NotImplementedError + end + + def strings + raise NotImplementedError + end + + module List + def initial_kernel + 0 + end + + def next_kernel + kernel.succ + end + + def last_kernel + @last_kernel ||= list.size - 1 + end + + def strings + list[kernel] + end + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb new file mode 100644 index 000000000..d2f4af0d8 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + class Coder + LOOP_GUARD = 1_000 + + class_attribute :default_options, instance_writer: false, default: {} + + def self.inherited(base) + dup = default_options.dup + base.default_options = dup.each { |k, v| dup[k] = v.dup } + super + end + + def self.setup(**options) + default_options.merge!(**options) + end + + def initialize(code, **options) + @code = code.must_be_any_of! Code + @processor = Processor.new @options = default_options.merge(options) + + setup if defined? setup + end + + def run_verbose(amnesic: false) + result, n = nil, 0 # rubocop:disable Style/ParallelAssignment + + loop do + over_loop!(n) + + raise Error, "Too many tries: #{n}" if (n += 1) >= LOOP_GUARD + + attempt = try(amnesic: amnesic, try: n) + + break (result = attempt) if attempt + + code.next! + end + + [result, n] + end + + def run(**flags) + run_verbose(**flags).first + end + + def dry + clone.run(amnesic: true) + end + + DEFAULT_AVAILABLE_MAX = 10 + + def available(number_of_available = DEFAULT_AVAILABLE_MAX) + instance = clone + result = [] + + number_of_available.times do + result << instance.run + rescue Codification::Consumed + break + end + + result + end + + protected + + attr_accessor :code + attr_reader :options, :processor + + def setup; end + + def memory + @memory ||= options[:memory] || SimpleMemory.new + end + + def over_loop!(*); end + + def try(amnesic:, try:) + return unless (result = processor.process(self, code.to_s, try)) + + memory.learn(result, amnesic: amnesic) + rescue Skip + nil + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/codes.rb b/plugins/support/lib/nokul/support/codification/codes.rb new file mode 100644 index 000000000..cce5fcee7 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require_relative 'codes/sequential_numeric_codes' +require_relative 'codes/alternative_user_names' +require_relative 'codes/suffixed_user_names' + +module Nokul + module Support + module Codification + # Create high level API for convenience + + mattr_accessor :codifications, default: [ + SequentialNumericCodes, # sequential_numeric_codes(source, **options) + SuffixedUserNames, # suffixed_user_names(source, **options) + AlternativeUserNames # alternative_user_names(source, **options) + ] + + module_function + + codifications.each do |codification| + method = codification.to_s.demodulize.underscore.downcase + define_method method do |*args, **options, &block| + codification::Coder.new(codification::Code.new(*args, **options), **options, &block) + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb new file mode 100644 index 000000000..66a69ce45 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Generates alternative user names. +# +# Source: ["gabriel", "garcia", "marquez"], alternative: :abbreviated +# +# Output: [ +# "ggmarquez", +# "ggarciam", +# "gabrielgm", +# "ggarciamarquez", +# "gabrielgmarquez", +# "gabrielgarciam", +# ] +# +# Source: ["gabriel", "garcia", "marquez"], alternative: :non_abbreviated +# +# Output: [ +# "gabrielgarciamarquez", +# "gabrielmarquez", +# "garciamarquez", +# ] + +module Nokul + module Support + module Codification + module AlternativeUserNames + class Code < Codification::Code + include List + + protected + + attr_reader :list, :preferred + + def setup + @list = Lists::UserNames.new(source, **options) + @preferred = list.first.affixed(**options) + end + + def sanitize(source) + source.must_be_any_of! Array + end + + def kernel=(index) + @kernel = index > last_kernel ? last_kernel : index + end + end + + class Coder < Codification::Coder + setup builtin_post_process: %i[safe?] + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb new file mode 100644 index 000000000..9f0be8d8a --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Generates sequential numeric codes. +# +# Source: 3, prefix: "203", length: 8 +# +# Output: "20300003", "20300004", ... + +module Nokul + module Support + module Codification + module SequentialNumericCodes + class Code < Codification::Code + DEFAULT_BASE = 10 + DEFAULT_LEN = 4 + + protected + + attr_reader :base, :length + + def setup + @base = options[:base] || DEFAULT_BASE + @length = options[:length] || DEFAULT_LEN + end + + def initial_kernel + source + end + + def next_kernel + kernel.succ + end + + def last_kernel + @last_kernel ||= base**length - 1 + end + + def strings + kernel.to_string(length, base) + end + + private + + def sanitize(source) + source.must_be_any_of! Integer + end + end + + Coder = Codification::Coder + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb new file mode 100644 index 000000000..887d50c41 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Generates random suffixed user names. +# +# Source: ["gabriel", "garcia", "marquez"] +# +# Output: "ggmarquez.123", ... + +module Nokul + module Support + module Codification + module SuffixedUserNames + class Code < Codification::Code + include List + + protected + + attr_reader :list + + def setup + @list = Lists::UserNames.new(source, **options) + end + + private + + def sanitize(source) + source.must_be_any_of! Array + end + end + + class Coder < Codification::Coder + setup builtin_post_process: %i[safe? random_suffix] + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/errors.rb b/plugins/support/lib/nokul/support/codification/errors.rb new file mode 100644 index 000000000..1ab2860df --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/errors.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + Error = Class.new ::StandardError + Consumed = Class.new ::StandardError + Skip = Class.new ::StopIteration + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/lists.rb b/plugins/support/lib/nokul/support/codification/lists.rb new file mode 100644 index 000000000..756f5264b --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/lists.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + module Lists + class List < SimpleDelegator + attr_reader :source + + def initialize(source = [], **options) + source.must_be_any_of! Array + + @source = sanitize(source) + + __setobj__ generate(**options) + end + + protected + + def sanitize(source) + source + end + + def generate(**) + source + end + end + end + end + end +end + +require_relative 'lists/user_names' diff --git a/plugins/support/lib/nokul/support/codification/lists/user_names.rb b/plugins/support/lib/nokul/support/codification/lists/user_names.rb new file mode 100644 index 000000000..68c41b915 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/lists/user_names.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + module Lists + class UserNames < List + module Supported + DEFAULT_ALTERNATIVE = :abbreviated + + def self.supported(alternative = nil) + return DEFAULT_ALTERNATIVE unless alternative + + alternative = alternative.to_sym + return alternative if instance_methods.include? alternative + + raise Error, "Unknown alternative: #{alternative}" + end + + def abbreviated + result = [] + index_combinations_of_source.each do |indexes| + alternative = source.clone + indexes.each { |i| alternative[i] = alternative[i].first } + result << alternative + end + + result + end + + def non_abbreviated + surname = source.last + forenames = source.clip + + result = [] + forenames.size.downto(1).each do |n| + result.concat forenames.combination(n).to_a + end + + result.map { |alternative| [*alternative, surname] }.sort_by(&:length) + end + + private + + def index_combinations_of_source + original = source.map.with_index.map { |*, i| i }.to_a + + indexes = [] + (source.size - 1).downto(1).each do |n| + indexes.concat original.combination(n).to_a + end + + indexes + end + end + + include Supported + + protected + + def sanitize(source) + source.must_be_any_of! [String] + end + + def generate(**options) + send Supported.supported(options[:alternative]) + end + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/memory.rb b/plugins/support/lib/nokul/support/codification/memory.rb new file mode 100644 index 000000000..d9a3418e0 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/memory.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + class Memory + def remember(_string, **) + raise NotImplementedError + end + + def remember?(_string, **) + raise NotImplementedError + end + + def forget(_string, **) + raise NotImplementedError + end + + def learn(string, **options) + return nil if remember?(string, **options) + + remember(string, **options) unless options[:amnesic] + string + end + end + + class AmnesicMemory < Memory + def remember(string, **) + string + end + + def remember?(_string, **) + false + end + + def forget(string, **) + string + end + end + + class SimpleMemory < Memory + def initialize(initial = {}) + @store = initial.clone + end + + def remember(string, **) + store[string] = true + string + end + + def remember?(string, **) + store.key? string + end + + def forget(string, **) + store.delete(string) + end + + protected + + attr_reader :store + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb new file mode 100644 index 000000000..6a4a07773 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +module Nokul + module Support + module Codification + class Processor + class_attribute :processors, instance_writer: false, default: {} + + def self.inherited(base) + dup = processors.dup + base.processors = dup.each { |k, v| dup[k] = v.dup } + super + end + + def self.define(name, &block) + processors[name] = block + end + + define :non_offensive? do |string, *| + !string.inside_offensives? + end + + define :non_reserved? do |string, *| + !string.inside_reserved? + end + + define :safe? do |string, *| + !string.inside_offensives? && !string.inside_reserved? + end + + RANDOM_CEILING = 999 + RANDOM_TRY = RANDOM_CEILING / 100 + + define :random_suffix do |string, *| + @_random_suffix_memory ||= SimpleMemory.new + @_random_ceiling ||= (respond_to?(:options) && options[:random_ceiling]) || RANDOM_CEILING + + RANDOM_TRY.times do + suffix = secure_random_number_extension(@_random_ceiling) + break string + suffix if @_random_suffix_memory.learn suffix + end + end + + def initialize(**options) + @processors = build options.dup.extract!(:builtin_post_process, :post_process).values.flatten + end + + def process(instance, string, *args) + processors.inject(string) { |result, processor| instance.instance_exec(result, *args, &processor) } + end + + def skip(string, expr) + expr ? string : raise(Skip, string) + end + + protected + + attr_reader :processors + + def build(args) + args.map do |arg| + arg.must_be_any_of! Regexp, Proc, Symbol, String + + case arg + when Regexp then processor_regexp(arg) + when Proc then arg + when Symbol, String then processor_builtin(arg.to_s) + end + end + end + + def processor_predicate + processor = self + proc do |string, *args| + processor.skip string, yield(string, *args) + end + end + + def processor_regexp(pattern) + processor_predicate { |string, _| string.match?(pattern) } + end + + def processor_builtin(builtin) + raise Error, "No such processor: #{builtin}" unless (processor = Processor.processors[builtin.to_sym]) + + builtin.end_with?('?') ? processor_predicate(&processor) : processor + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/core_ext.rb b/plugins/support/lib/nokul/support/core_ext.rb index f558739bb..e4f6b1af4 100644 --- a/plugins/support/lib/nokul/support/core_ext.rb +++ b/plugins/support/lib/nokul/support/core_ext.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true require_relative 'core_ext/object' +require_relative 'core_ext/kernel' +require_relative 'core_ext/array' require_relative 'core_ext/hash' require_relative 'core_ext/string' +require_relative 'core_ext/integer' diff --git a/plugins/support/lib/nokul/support/core_ext/array.rb b/plugins/support/lib/nokul/support/core_ext/array.rb new file mode 100644 index 000000000..fde91964a --- /dev/null +++ b/plugins/support/lib/nokul/support/core_ext/array.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class Array + def clip(number_of_last_elements = 1) + take size - number_of_last_elements + end + + def affixed(**options) + raise ArgumentError, 'must be a string array' unless all? { |string| string.is_a? String } + + "#{[*options[:prefix]].join}#{join options[:interfix]}#{[*options[:suffix]].join}" + end +end diff --git a/plugins/support/lib/nokul/support/core_ext/integer.rb b/plugins/support/lib/nokul/support/core_ext/integer.rb new file mode 100644 index 000000000..95a2a1916 --- /dev/null +++ b/plugins/support/lib/nokul/support/core_ext/integer.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class Integer + def to_string(length, base = 10) + to_s(base).upcase.rjust(length, '0') + end +end diff --git a/plugins/support/lib/nokul/support/core_ext/kernel.rb b/plugins/support/lib/nokul/support/core_ext/kernel.rb new file mode 100644 index 000000000..2eb8895d0 --- /dev/null +++ b/plugins/support/lib/nokul/support/core_ext/kernel.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'securerandom' + +module Kernel + module_function + + def secure_random_number(ceiling) + SecureRandom.random_number(ceiling) + end + + def secure_random_number_string(ceiling) + format "%0#{ceiling.to_s.length}d", secure_random_number(ceiling) + end + + def secure_random_number_extension(ceiling, separator: '.') + separator + secure_random_number_string(ceiling) + end +end diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index e4e5dd5a6..a9469ff21 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -8,4 +8,76 @@ def to_yaml_pretty yaml.gsub!(/^( +)-/, '\\1 -') yaml << "\n" end + + module TypeCop + module_function + + def sanitize_arguments(*args) + args.each do |arg| + raise ArgumentError, 'Type information must be a class' unless arg.is_a? Class + end + end + + def type_error(object, type) + "#{type} expected where found: #{object.class}" unless object.is_a? type + end + + def ensure_array(object, type) + sanitize_arguments(sample_type = type.first) + + object.each do |element| + if (error = type_error(element, sample_type)) + return error + end + end + + nil + end + + def ensure_hash(object, type) + sanitize_arguments(*(key_type, value_type = type.first)) + + object.each do |key, value| + if (error = type_error(key, key_type)) + return error + end + + if (error = type_error(value, value_type)) + return error + end + end + + nil + end + + def ensure_scalar(object, type) + type_error(object, type) + end + + def ensure_one(object, type) + case type + when Array then ensure_array(object, type) + when Hash then ensure_hash(object, type) + else ensure_scalar(object, type) + end + end + + def ensure!(object, *args) + return object if args.empty? + return object unless (first = (types = args.dup).shift) + return object unless (error = ensure_one(object, first)) + + raise(TypeError, error) if types.empty? + + return object if types.any? { |type| ensure_one(object, type).nil? } + + raise TypeError, "One of #{args} expected where found: #{object.class}" + end + end + + private_constant :TypeCop + + def must_be_any_of!(*args) + TypeCop.ensure!(self, *args) + end end diff --git a/plugins/support/lib/nokul/support/core_ext/string.rb b/plugins/support/lib/nokul/support/core_ext/string.rb index f1f24a339..d22fa032c 100644 --- a/plugins/support/lib/nokul/support/core_ext/string.rb +++ b/plugins/support/lib/nokul/support/core_ext/string.rb @@ -1,8 +1,7 @@ # frozen_string_literal: true -# rubocop:disable Metrics/ClassLength class String - CHARS = { + TURKISH_CHARS = { 'ı' => 'i', 'ğ' => 'g', 'ü' => 'u', @@ -17,81 +16,23 @@ class String 'Ç' => 'C' }.freeze - RE = Regexp.new '[' + CHARS.keys.join + ']' - def asciified - gsub(RE) { |char| CHARS[char] } + chars.to_a.map { |char| (ascii = TURKISH_CHARS[char]) ? ascii : char }.join + end + + def affixed(**options) + [self].affixed(**options) end def abbreviation split.map(&:first).join.upcase(:turkic) end - TURKISH_ABBREVIATIONS = %w[ - ab - abd - abitur - act - aihm - ales - aselsan - baum - cmk - cmuk - dgs - gata - gce - khk - kktc - kpds - kpss - les - meb - myo - omü - ömss - öss - ösym - ösys - öyp - sat - tbmm - tck - todaie - toefl - trt - tsk - tübitak - uzem - üds - yds - ydus - ygs - yök - yös - ].freeze - - TURKISH_CONJUNCTIONS = %w[ - ama - çünkü - fakat - hele - hem - ile - ise - ki - oysa - oysaki - ve - veya - veyahut - ].freeze - def capitalize_turkish downcase(:turkic).split.map do |word| - if TURKISH_ABBREVIATIONS.include? word + if word.inside_abbreviations? :tr word.upcase(:turkic) - elsif TURKISH_CONJUNCTIONS.include? word + elsif word.inside_conjunctions? :tr word else word.capitalize(:turkic) @@ -118,5 +59,74 @@ def capitalize_turkish_with_paranthesised end end # rubocop:enable Metrics/MethodLength + + module Matchable + require 'yaml' + + class Matcher + attr_reader :data + + def initialize + @data = {} + end + + def run(languages:, category:, word:, **options) + (languages.empty? ? %w[en tr] : languages.uniq).each do |language| + return true if match(language: language, category: category, word: word, **options) + end + + false + end + + def match(language:, category:, word:, **options) + if options[:partial] + # XXX: Note the poor performance + words(language, category).any? { |string| word.include? string } + else + words(language, category).include? word + end + end + + private + + # We should be lazy on all operations involving data access (hence the + # heavy use of or-equals operators). + + def words(language, category) + language_data_for(language)[category.to_s] ||= Set.new [] + end + + def language_data_for(language) + data[language = language.to_s] ||= begin + (file = language_file_for(language)) ? YAML.load_file(file) : {} + end + end + + def language_file_for(language) + @lookup ||= Hash[* + Dir[File.join File.expand_path('../data', __dir__), '*.yml'].map do |file| + name = File.basename(file, '.yml') + [name, file] + end.flatten + ] + @lookup[language] + end + end + + mattr_accessor :matcher, default: Matcher.new + + # Create inside_CATEGORY? wrappers + %w[ + abbreviations + conjunctions + offensives + reserved + ].each do |category| + define_method "inside_#{category}?" do |*languages, **options| + matcher.run(languages: languages, category: category, word: self, **options) + end + end + end + + include Matchable end -# rubocop:enable Metrics/ClassLength diff --git a/plugins/support/test/codification/alternative_user_names_test.rb b/plugins/support/test/codification/alternative_user_names_test.rb new file mode 100644 index 000000000..088561173 --- /dev/null +++ b/plugins/support/test/codification/alternative_user_names_test.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class AlternativeUserNamesTest < ActiveSupport::TestCase + test 'simple use case works' do + coder = Codification.alternative_user_names %w[gabriel garcia marquez] + + assert_equal'ggmarquez', coder.run + assert_equal'ggarciam', coder.run + assert_equal'gabrielgm', coder.run + assert_equal'ggarciamarquez', coder.run + assert_equal'gabrielgmarquez', coder.run + assert_equal'gabrielgarciam', coder.run + + assert_raise(Consumed) { coder.run } + end + + test 'simple use case with memory works' do + memory = SimpleMemory.new + + coder = Codification.alternative_user_names %w[gabriel garcia marquez], memory: memory + + memory.remember 'ggarciam' + + assert_equal'ggmarquez', coder.run + assert_equal'gabrielgm', coder.run + end + + test 'prefix option works' do + coder = Codification.alternative_user_names %w[gabriel garcia marquez], prefix: 'user.' + + assert_equal'user.ggmarquez', coder.run + assert_equal'user.ggarciam', coder.run + end + + test 'regex post process option works' do + coder = Codification.alternative_user_names %w[gabriel garcia marquez], post_process: /.+garcia.+/ + + assert_equal'ggarciam', coder.run + assert_equal'ggarciamarquez', coder.run + assert_equal'gabrielgarciam', coder.run + + assert_raise(Consumed) { coder.run } + end + + test 'proc post process option works' do + coder = Codification.alternative_user_names %w[gabriel garcia marquez], post_process: proc { |s| s.upcase } + + assert_equal'GGMARQUEZ', coder.run + assert_equal'GGARCIAM', coder.run + end + + test 'offensive words should not be seen' do + coder = Codification.alternative_user_names %w[yilmaz ali rak] + + assert_equal 'yalir', coder.run + assert_equal 'yilmazar', coder.run + assert_equal 'yalirak', coder.run + assert_equal 'yilmazarak', coder.run + assert_equal 'yilmazalir', coder.run + + assert_raise(Consumed) { coder.run } + end + + test 'reserved words should not be seen' do + coder = Codification.alternative_user_names %w[william hile] + + assert_equal 'williamh', coder.run + + assert_raise(Consumed) { coder.run } + end + + test 'can produce available names' do + available = Codification.alternative_user_names(%w[suat alak]).available(3) + assert_equal %w[suata], available + end + end + end + end +end diff --git a/plugins/support/test/codification/code_test.rb b/plugins/support/test/codification/code_test.rb new file mode 100644 index 000000000..c2e1743ad --- /dev/null +++ b/plugins/support/test/codification/code_test.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class CodeTest < ActiveSupport::TestCase + test 'concrete code class should implement required methods' do + %i[ + initial_kernel + next_kernel + last_kernel + strings + ].each do |method| + assert_raise(NotImplementedError) { Class.new(Code).new.send method } + end + end + end + end + end +end diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb new file mode 100644 index 000000000..9959b4ed9 --- /dev/null +++ b/plugins/support/test/codification/coder_test.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class CoderTest < ActiveSupport::TestCase + test 'default options should be duplicated' do + class Foo < Coder + setup foo: 13 + end + + class Bar < Foo + setup foo: 19, bar: 23 + end + + assert_equal 13, Foo.default_options[:foo] + assert_nil Foo.default_options[:bar] + assert_equal 19, Bar.default_options[:foo] + assert_equal 23, Bar.default_options[:bar] + end + + test 'only codes should be accepted' do + assert_raise(TypeError) { Coder.new 13 } + end + + test 'loop guard works' do + class Bogus < Code + def initial_kernel + 'a' + end + + def next_kernel + 'a' + end + + def last_kernel + 'z' + end + + def strings + 'a' + end + end + + coder = Coder.new Bogus.new + + coder.run + err = assert_raise(Error) { coder.run } + assert err.message.include? 'many tries' + end + + test 'dry run should work' do + coder = Codification.sequential_numeric_codes 13 + assert_equal '0013', coder.run + assert_equal '0014', coder.dry + assert_equal '0014', coder.run + end + end + end + end +end diff --git a/plugins/support/test/codification/lists_test.rb b/plugins/support/test/codification/lists_test.rb new file mode 100644 index 000000000..507e2c4ac --- /dev/null +++ b/plugins/support/test/codification/lists_test.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class ListsTest < ActiveSupport::TestCase + test 'base class works' do + assert_equal %w[foo bar], Lists::List.new(%w[foo bar]) + end + + class Foo < Lists::List + protected + + def generate + source.first + end + end + + test 'inheritance works' do + assert_equal 'foo', Foo.new(%w[foo bar]) + end + + test 'can work without any source' do + assert_equal [], Lists::List.new + end + + class Bar < Lists::List + protected + + def generate + %w[foo bar] + end + end + + test 'can work with an internal source' do + assert_equal %w[foo bar], Bar.new + end + + class Baz < Lists::List + protected + + def sanitize(source) + raise(Error, 'invalid length') unless source.size == 2 + + source + end + + def generate + %w[foo bar] + end + end + + test 'can sanitize' do + assert_raise(TypeError) { Lists::List.new 'foo' } + assert_raise(Error) { Baz.new %w[foo] } + end + + test 'abbreviated names work' do + assert_equal [ + %w[g g marquez], + %w[g garcia m], + %w[gabriel g m], + %w[g garcia marquez], + %w[gabriel g marquez], + %w[gabriel garcia m] + ], Lists::UserNames.new(%w[gabriel garcia marquez], alternative: :abbreviated) + end + + test 'non_abbreviated names work' do + assert_equal [ + %w[gabriel marquez], + %w[garcia marquez], + %w[gabriel garcia marquez] + ], Lists::UserNames.new(%w[gabriel garcia marquez], alternative: :non_abbreviated) + end + end + end + end +end diff --git a/plugins/support/test/codification/memory_test.rb b/plugins/support/test/codification/memory_test.rb new file mode 100644 index 000000000..fffba8e50 --- /dev/null +++ b/plugins/support/test/codification/memory_test.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class MemoryTest < ActiveSupport::TestCase + test 'sub classing should work as expected' do + class RefusingMemory < Memory + def remember(*); end + + def remember?(*) + true + end + end + + memory = RefusingMemory.new + assert memory.remember? 19 + end + + test 'simple memory should work as expected' do + memory = SimpleMemory.new + + refute memory.remember? 19 + + assert_equal 23, memory.remember(23) + assert memory.remember? 23 + + assert_nil memory.learn(23) + + assert_equal 17, memory.learn(17) + assert memory.remember? 17 + end + end + end + end +end diff --git a/plugins/support/test/codification/processor_test.rb b/plugins/support/test/codification/processor_test.rb new file mode 100644 index 000000000..472dd80fd --- /dev/null +++ b/plugins/support/test/codification/processor_test.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class ProcessorTest < ActiveSupport::TestCase + test 'regexps work' do + assert_raise(Skip) { Processor.new(post_process: /^[0-3]+/).process(Object.new, '456') } + end + + test 'procs work' do + assert_equal 'FOO', Processor.new(post_process: proc { |s| s.upcase }).process(Object.new, 'foo') + end + + test 'builtins work' do + class Dummy + attr_reader :options + def initialize(**options) + @options = options.dup + end + end + + processor = Processor.new post_process: %i[non_offensive? non_reserved? random_suffix] + assert_match(/^foo.\d{6}$/, processor.process(Dummy.new(random_ceiling: 999_999), 'foo')) + assert_raise(Skip) { processor.process(Dummy.new, 'salak') } + assert_raise(Skip) { processor.process(Dummy.new, 'if') } + end + + test 'should accept a builtin_post_process option' do + processor = Processor.new builtin_post_process: :non_offensive?, post_process: %i[non_reserved? random_suffix] + assert_match(/^foo.\d+$/, processor.process(Object.new, 'foo')) + assert_raise(Skip) { processor.process(Object.new, 'salak') } + assert_raise(Skip) { processor.process(Object.new, 'if') } + end + + test 'custom builtins should work' do + class Codification::Processor # rubocop:disable Style/ClassAndModuleChildren + define :xxx do |string| + string + 'xxx' + end + end + + assert_equal 'fooxxx', Processor.new(post_process: :xxx).process(Object.new, 'foo') + end + + test 'custom builtins ending with a question mark should work as a predicator' do + class Codification::Processor # rubocop:disable Style/ClassAndModuleChildren + define :xxx? do |string| + string == 'xxx' + end + end + + assert_raise(Skip) { Processor.new(post_process: :xxx?).process(Object.new, 'foo') } + end + + test 'processes should be able to access instance' do + class Dummy + def internal + 'bar' + end + end + + assert_equal 'barfoo', Processor.new(post_process: proc { |s| internal + s }).process(Dummy.new, 'foo') + end + end + end + end +end diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb new file mode 100644 index 000000000..e48fc2e00 --- /dev/null +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class SequentialNumericCodesTest < ActiveSupport::TestCase + test 'simple use case works' do + coder = Codification.sequential_numeric_codes 1 + assert_equal '0001', coder.run + assert_equal '0002', coder.run + end + + test 'simple use case with memory works' do + memory = SimpleMemory.new + + coder = Codification.sequential_numeric_codes 1, memory: memory + assert_equal '0001', coder.run + assert_equal '0002', coder.run + + other = Codification.sequential_numeric_codes 1, memory: memory + assert_equal '0003', other.run + assert_equal '0004', other.run + + assert_equal '0005', coder.run + end + + test 'prefix option works' do + coder = Codification.sequential_numeric_codes 1, prefix: 'xyz-' + assert_equal 'xyz-0001', coder.run + assert_equal 'xyz-0002', coder.run + end + + test 'length options works' do + coder = Codification.sequential_numeric_codes 1, prefix: 'xyz-', length: 12 + assert_equal 'xyz-000000000001', coder.run + assert_equal 'xyz-000000000002', coder.run + end + + test 'regex post process option works' do + coder = Codification.sequential_numeric_codes 1, post_process: /[^2]$/ + assert_equal '0001', coder.run + assert_equal '0003', coder.run + end + + test 'proc post process option works' do + coder = Codification.sequential_numeric_codes 1, post_process: proc { |string| string + '.a' } + assert_equal '0001.a', coder.run + assert_equal '0002.a', coder.run + end + + test 'builtin post process works' do + coder = Codification.sequential_numeric_codes 1, post_process: :random_suffix + assert_match(/0001[.]\d+/, coder.run) + end + + test 'can produce available numbers' do + coder = Codification.sequential_numeric_codes 2 + assert_equal %w[0002 0003 0004], coder.available(3) + end + end + end + end +end diff --git a/plugins/support/test/codification/suffixed_user_names_test.rb b/plugins/support/test/codification/suffixed_user_names_test.rb new file mode 100644 index 000000000..dd1342b8d --- /dev/null +++ b/plugins/support/test/codification/suffixed_user_names_test.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class SuffixedUserNamesTest < ActiveSupport::TestCase + test 'simple use case works' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez] + + 2.times do + name = coder.run + assert_match(/ggmarquez[.]\d+/, name) + assert name.start_with? 'ggmarquez.' + end + end + + test 'simple use case with memory works' do + memory = SimpleMemory.new + + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], memory: memory + + 2.times do + name = coder.run + assert_match(/ggmarquez[.]\d+/, name) + assert name.start_with? 'ggmarquez.' + end + end + + test 'prefix option works' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], prefix: 'user.' + + 2.times do + name = coder.run + assert_match(/user[.]ggmarquez[.]\d+/, name) + assert name.start_with? 'user.ggmarquez.' + end + end + + test 'regex post process option works' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], post_process: /[^z][.]/ + + 2.times do + name = coder.run + assert_match(/ggarciam[.]\d+/, name) + assert name.start_with? 'ggarciam.' + end + end + + test 'proc post process option works' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], post_process: proc { |name| name + '.a' } + + 2.times do + name = coder.run + assert_match(/ggmarquez[.]\d+[.]a/, name) + assert name.end_with? '.a' + end + end + + test 'offensive words should not be seen' do + coder = Codification.suffixed_user_names %w[suat alak] + + 2.times { assert coder.run.start_with? 'suata.' } # not "salak" + end + + test 'reserved words should not be seen' do + coder = Codification.suffixed_user_names %w[william hile] + + 2.times { assert coder.run.start_with? 'williamh.' } # noit "while" + end + + test 'can produce available names' do + available = Codification.suffixed_user_names(%w[suat alak]).available(3) + assert_equal 3, available.size + assert available.all? do |name| + name.start_with?('suata.') + end + end + end + end + end +end diff --git a/plugins/support/test/codification_test.rb b/plugins/support/test/codification_test.rb new file mode 100644 index 000000000..5dbc35525 --- /dev/null +++ b/plugins/support/test/codification_test.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class CodificationTest < ActiveSupport::TestCase + test 'API works' do + %i[ + sequential_numeric_codes + suffixed_user_names + alternative_user_names + ].all? { |method| assert Codification.respond_to?(method) } + end + end + end + end +end diff --git a/plugins/support/test/core_ext/array_test.rb b/plugins/support/test/core_ext/array_test.rb new file mode 100644 index 000000000..9e72e6176 --- /dev/null +++ b/plugins/support/test/core_ext/array_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'test_helper' + +class ArrayTest < ActiveSupport::TestCase + test 'clip works' do + assert_equal %w[foo bar], %w[foo bar baz quux].clip(2) + end + + test 'affixed works' do + assert_equal 'aaa.foo-bar-baz-quux_zzz', %w[foo bar baz quux].affixed(prefix: 'aaa.', interfix: '-', suffix: '_zzz') + end +end diff --git a/plugins/support/test/core_ext/integer_test.rb b/plugins/support/test/core_ext/integer_test.rb new file mode 100644 index 000000000..73bc547cd --- /dev/null +++ b/plugins/support/test/core_ext/integer_test.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'test_helper' + +class IntegerTest < ActiveSupport::TestCase + test 'to_string works' do + assert_equal '0011', 17.to_string(4, 16) + end +end diff --git a/plugins/support/test/core_ext/kernel_test.rb b/plugins/support/test/core_ext/kernel_test.rb new file mode 100644 index 000000000..5b4383dff --- /dev/null +++ b/plugins/support/test/core_ext/kernel_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'test_helper' + +class KernelTest < ActiveSupport::TestCase + test 'secure_random_number_string works' do + assert_match(/^\d{4}$/, secure_random_number_string(9999)) + end + + test 'secure_random_number_extension works' do + assert_match(/^_\d{4}$/, secure_random_number_extension(9999, separator: '_')) + end +end diff --git a/plugins/support/test/core_ext/object_test.rb b/plugins/support/test/core_ext/object_test.rb new file mode 100644 index 000000000..2b641122d --- /dev/null +++ b/plugins/support/test/core_ext/object_test.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'test_helper' + +class ObjectTest < ActiveSupport::TestCase + test 'must_be_any_of! works' do + assert_equal 13, 13.must_be_any_of!(String, Integer) + assert_equal '13', '13'.must_be_any_of!(Integer, String) + + assert_raise(TypeError) { 13.must_be_any_of!(Symbol, String) } + + assert_equal [13, 19], [13, 19].must_be_any_of!([Integer]) + assert_equal({ x: 13, y: 19 }, { x: 13, y: 19 }.must_be_any_of!(Symbol => Integer)) + + assert_raise(TypeError) { [13, '19'].must_be_any_of!([Integer]) } + assert_raise(TypeError) { { x: 13, y: '19' }.must_be_any_of!(Symbol => Integer) } + end +end diff --git a/plugins/support/test/core_ext/string_test.rb b/plugins/support/test/core_ext/string_test.rb index 34a63a435..e5fcadd90 100644 --- a/plugins/support/test/core_ext/string_test.rb +++ b/plugins/support/test/core_ext/string_test.rb @@ -3,13 +3,27 @@ require 'test_helper' class StringTest < ActiveSupport::TestCase - test 'capitalize_turkish method can capitalize words in Turkish' do - word = 'ışık ılık süt iç' - assert_equal word.capitalize_turkish, 'Işık Ilık Süt İç' + test 'affixed works' do + assert_equal 'aaa.foo bar baz quux_zzz', 'foo bar baz quux'.affixed(prefix: 'aaa.', interfix: '-', suffix: '_zzz') end - test 'abbreviation method can generate abbreviations for words in Turkish' do - word = 'istanbul ışık üniversitesi' - assert_equal word.abbreviation, 'İIÜ' + test 'inside_offensives? works' do + assert 'salak'.inside_offensives? + assert 'manyak'.inside_offensives? + end + + test 'inside_reserved? works' do + assert 'while'.inside_reserved? + assert 'end'.inside_reserved? + end + + test 'inside_abbreviations? works' do + assert 'yök'.inside_abbreviations? + assert 'kktc'.inside_abbreviations? + end + + test 'inside_conjunctions? works' do + assert 've'.inside_conjunctions? + assert 'veya'.inside_conjunctions? end end From 2ec4ebf0ab3859de6f54dc7f70bf1c18e9e6495f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 18 Mar 2019 15:37:28 +0300 Subject: [PATCH 003/279] Restore old string tests --- plugins/support/test/core_ext/string_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/support/test/core_ext/string_test.rb b/plugins/support/test/core_ext/string_test.rb index e5fcadd90..1db4c00f6 100644 --- a/plugins/support/test/core_ext/string_test.rb +++ b/plugins/support/test/core_ext/string_test.rb @@ -3,6 +3,16 @@ require 'test_helper' class StringTest < ActiveSupport::TestCase + test 'capitalize_turkish method can capitalize words in Turkish' do + word = 'ışık ılık süt iç' + assert_equal word.capitalize_turkish, 'Işık Ilık Süt İç' + end + + test 'abbreviation method can generate abbreviations for words in Turkish' do + word = 'istanbul ışık üniversitesi' + assert_equal word.abbreviation, 'İIÜ' + end + test 'affixed works' do assert_equal 'aaa.foo bar baz quux_zzz', 'foo bar baz quux'.affixed(prefix: 'aaa.', interfix: '-', suffix: '_zzz') end From e9c7897c31dd2488a71534a2e6c1b87b61c61b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 18 Mar 2019 15:47:36 +0300 Subject: [PATCH 004/279] Remove old implementation residuals [ci skip] --- plugins/tenant/common/lib/nokul/tenant/units/coder.rb | 2 +- plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb | 3 ++- plugins/tenant/omu/app/lib/students.rb | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/coder.rb b/plugins/tenant/common/lib/nokul/tenant/units/coder.rb index ef09383f8..6e3fd7ee4 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/coder.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/coder.rb @@ -9,7 +9,7 @@ module Nokul module Tenant module Units class Coder - class Memory < Support::Codifications::SimpleMemory + class Memory < Support::Codification::SimpleMemory include Singleton end diff --git a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb index 9ebeebcd9..b88b096ef 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb @@ -17,7 +17,8 @@ class Pool attr_reader :coder def after_initialize - @coder = Support::Codifications::Coder.new(begins, ends: ends, deny: deny, memory: Memory.instance) + # FIXME: handle ends, deny + @coder = Support::Codification.sequential_numeric_codes begins, memory: Memory.instance end def score_of(unit) diff --git a/plugins/tenant/omu/app/lib/students.rb b/plugins/tenant/omu/app/lib/students.rb index 827212d98..fbee6e764 100644 --- a/plugins/tenant/omu/app/lib/students.rb +++ b/plugins/tenant/omu/app/lib/students.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true module Students - NumberGenerator = Support::Codifications::PrefixedCoder # Length is 8 by default - module_function def start_of_active_academic_year @@ -14,10 +12,11 @@ def number_generator(unit) end def short_number_generator(unit_code, starting_sequence) - NumberGenerator.new starting_sequence, prefix: [unit_code, start_of_active_academic_year] + Support::Codification.sequential_numeric_codes starting_sequence, prefix: [unit_code, start_of_active_academic_year] end def long_number_generator(unit_code, starting_sequence) NumberGenerator.new starting_sequence, prefix: unit_code + Support::Codification.sequential_numeric_codes starting_sequence, prefix: unit_code end end From 2bee177ffc983a78759334402afde2865b3230d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:32:22 +0300 Subject: [PATCH 005/279] Add new codification: random_numeric_codes Instead of adding kernel core_ext... --- .../lib/nokul/support/codification/codes.rb | 6 +- .../codes/random_numeric_codes.rb | 40 +++++++++++++ .../lib/nokul/support/core_ext/kernel.rb | 19 ------- .../codification/random_numeric_codes_test.rb | 56 +++++++++++++++++++ plugins/support/test/core_ext/kernel_test.rb | 13 ----- 5 files changed, 100 insertions(+), 34 deletions(-) create mode 100644 plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb delete mode 100644 plugins/support/lib/nokul/support/core_ext/kernel.rb create mode 100644 plugins/support/test/codification/random_numeric_codes_test.rb delete mode 100644 plugins/support/test/core_ext/kernel_test.rb diff --git a/plugins/support/lib/nokul/support/codification/codes.rb b/plugins/support/lib/nokul/support/codification/codes.rb index cce5fcee7..82c3e62c4 100644 --- a/plugins/support/lib/nokul/support/codification/codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require_relative 'codes/sequential_numeric_codes' +require_relative 'codes/random_numeric_codes' require_relative 'codes/alternative_user_names' require_relative 'codes/suffixed_user_names' @@ -11,8 +12,9 @@ module Codification mattr_accessor :codifications, default: [ SequentialNumericCodes, # sequential_numeric_codes(source, **options) - SuffixedUserNames, # suffixed_user_names(source, **options) - AlternativeUserNames # alternative_user_names(source, **options) + RandomNumericCodes, # random_numeric_codes(source, **options) + AlternativeUserNames, # alternative_user_names(source, **options) + SuffixedUserNames # suffixed_user_names(source, **options) ] module_function diff --git a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb new file mode 100644 index 000000000..c820e2607 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Generates random numbers unique in a range. + +module Nokul + module Support + module Codification + module RandomNumericCodes + class Code < Codification::Code + include List + + DEFAULT_BASE = 10 + + protected + + attr_reader :base, :length + + def setup + self.list = source.to_a.shuffle! + + @base = options[:base] || DEFAULT_BASE + @length = options[:length] || Math.log(@list.size - 1, @base).to_i + 1 + end + + def strings + list[kernel].to_string(length, base) + end + + private + + def sanitize(source) + source.must_be_any_of! Range + end + end + + Coder = Codification::Coder + end + end + end +end diff --git a/plugins/support/lib/nokul/support/core_ext/kernel.rb b/plugins/support/lib/nokul/support/core_ext/kernel.rb deleted file mode 100644 index 2eb8895d0..000000000 --- a/plugins/support/lib/nokul/support/core_ext/kernel.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -require 'securerandom' - -module Kernel - module_function - - def secure_random_number(ceiling) - SecureRandom.random_number(ceiling) - end - - def secure_random_number_string(ceiling) - format "%0#{ceiling.to_s.length}d", secure_random_number(ceiling) - end - - def secure_random_number_extension(ceiling, separator: '.') - separator + secure_random_number_string(ceiling) - end -end diff --git a/plugins/support/test/codification/random_numeric_codes_test.rb b/plugins/support/test/codification/random_numeric_codes_test.rb new file mode 100644 index 000000000..0975131e7 --- /dev/null +++ b/plugins/support/test/codification/random_numeric_codes_test.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Support + module Codification + class RandomNumericCodesTest < ActiveSupport::TestCase + test 'simple use case works' do + coder = Codification.random_numeric_codes(5..9) + assert_match(/^[5-9]$/, coder.run) + assert_match(/^[5-9]$/, coder.run) + assert_match(/^[5-9]$/, coder.run) + assert_match(/^[5-9]$/, coder.run) + assert_match(/^[5-9]$/, coder.run) + + assert_raise(Consumed) { coder.run } + end + + test 'memory works' do + memory = SimpleMemory.new + + coder = Codification.random_numeric_codes 0..9, memory: memory + 5.times { coder.run } + + other = Codification.random_numeric_codes 0..9, memory: memory + 5.times { other.run } + + assert_raise(Consumed) { coder.run } + assert_raise(Consumed) { other.run } + end + + test 'prefix and length options work' do + coder = Codification.random_numeric_codes 0..999, prefix: 'xyz-', length: 12 + assert_match(/^xyz-\d{12}$/, coder.run) + end + + test 'regex post process option works' do + coder = Codification.random_numeric_codes 0..999, post_process: /^[1]+$/ + assert_equal '111', coder.run + assert_raise(Consumed) { coder.run } + end + + test 'proc post process option works' do + coder = Codification.random_numeric_codes 0..999, post_process: proc { |string| string + '.a' } + assert_match(/\d{3}[.]a/, coder.run) + end + + test 'can produce available numbers' do + coder = Codification.random_numeric_codes(777..779) + assert_equal %w[777 778 779], coder.available(3).sort + end + end + end + end +end diff --git a/plugins/support/test/core_ext/kernel_test.rb b/plugins/support/test/core_ext/kernel_test.rb deleted file mode 100644 index 5b4383dff..000000000 --- a/plugins/support/test/core_ext/kernel_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class KernelTest < ActiveSupport::TestCase - test 'secure_random_number_string works' do - assert_match(/^\d{4}$/, secure_random_number_string(9999)) - end - - test 'secure_random_number_extension works' do - assert_match(/^_\d{4}$/, secure_random_number_extension(9999, separator: '_')) - end -end From f2c2b0c0bedd11c3a9c9fc5127bea27a9337c696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:34:54 +0300 Subject: [PATCH 006/279] Remove kernel core_ext --- plugins/support/lib/nokul/support/core_ext.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/support/lib/nokul/support/core_ext.rb b/plugins/support/lib/nokul/support/core_ext.rb index e4f6b1af4..2630e921d 100644 --- a/plugins/support/lib/nokul/support/core_ext.rb +++ b/plugins/support/lib/nokul/support/core_ext.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true require_relative 'core_ext/object' -require_relative 'core_ext/kernel' require_relative 'core_ext/array' -require_relative 'core_ext/hash' require_relative 'core_ext/string' require_relative 'core_ext/integer' From c273fe89e13e1f26238be169b2bf54672ea15955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:36:03 +0300 Subject: [PATCH 007/279] Add attr_accessor for list --- plugins/support/lib/nokul/support/codification/code.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb index d1d318dba..7ca893790 100644 --- a/plugins/support/lib/nokul/support/codification/code.rb +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -88,6 +88,10 @@ def last_kernel def strings list[kernel] end + + protected + + attr_accessor :list end end end From c562105e52ab4d73d25e270383614c2341cb98a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:36:40 +0300 Subject: [PATCH 008/279] Pass options to processor correctly --- plugins/support/lib/nokul/support/codification/coder.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index d2f4af0d8..eb794eb18 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -33,7 +33,7 @@ def run_verbose(amnesic: false) raise Error, "Too many tries: #{n}" if (n += 1) >= LOOP_GUARD - attempt = try(amnesic: amnesic, try: n) + attempt = try(amnesic: amnesic) break (result = attempt) if attempt @@ -79,8 +79,8 @@ def memory def over_loop!(*); end - def try(amnesic:, try:) - return unless (result = processor.process(self, code.to_s, try)) + def try(amnesic:) + return unless (result = processor.process(self, code.to_s, **options)) memory.learn(result, amnesic: amnesic) rescue Skip From 53490b090a28ec8f1f8fbbdaa23e487401854aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:37:32 +0300 Subject: [PATCH 009/279] Use random_numeric_codes for suffix generation --- .../nokul/support/codification/processor.rb | 27 +++++++++---------- .../test/codification/processor_test.rb | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index 6a4a07773..e62d9682e 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -16,37 +16,36 @@ def self.define(name, &block) processors[name] = block end - define :non_offensive? do |string, *| + define :non_offensive? do |string| !string.inside_offensives? end - define :non_reserved? do |string, *| + define :non_reserved? do |string| !string.inside_reserved? end - define :safe? do |string, *| + define :safe? do |string| !string.inside_offensives? && !string.inside_reserved? end - RANDOM_CEILING = 999 - RANDOM_TRY = RANDOM_CEILING / 100 + DEFAULT_RANDOM_RANGE = (0..999).freeze + DEFAULT_RANDOM_SEP = '.' - define :random_suffix do |string, *| - @_random_suffix_memory ||= SimpleMemory.new - @_random_ceiling ||= (respond_to?(:options) && options[:random_ceiling]) || RANDOM_CEILING + define :random_suffix do |string, **options| + @_random_coder ||= options[:random] || Codification.random_numeric_codes(DEFAULT_RANDOM_RANGE) + @_random_sep ||= options[:random_sep] || DEFAULT_RANDOM_SEP - RANDOM_TRY.times do - suffix = secure_random_number_extension(@_random_ceiling) - break string + suffix if @_random_suffix_memory.learn suffix - end + string + @_random_sep + @_random_coder.run + rescue Consumed + raise Skip, string end def initialize(**options) @processors = build options.dup.extract!(:builtin_post_process, :post_process).values.flatten end - def process(instance, string, *args) - processors.inject(string) { |result, processor| instance.instance_exec(result, *args, &processor) } + def process(instance, string, **options) + processors.inject(string) { |result, processor| instance.instance_exec(result, **options, &processor) } end def skip(string, expr) diff --git a/plugins/support/test/codification/processor_test.rb b/plugins/support/test/codification/processor_test.rb index 472dd80fd..c6e8e24d0 100644 --- a/plugins/support/test/codification/processor_test.rb +++ b/plugins/support/test/codification/processor_test.rb @@ -23,7 +23,7 @@ def initialize(**options) end processor = Processor.new post_process: %i[non_offensive? non_reserved? random_suffix] - assert_match(/^foo.\d{6}$/, processor.process(Dummy.new(random_ceiling: 999_999), 'foo')) + assert_match(/^foo.\d{3}$/, processor.process(Dummy.new, 'foo')) assert_raise(Skip) { processor.process(Dummy.new, 'salak') } assert_raise(Skip) { processor.process(Dummy.new, 'if') } end From 009b4a2276ec0f52610a55f0f569041b09666409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:38:27 +0300 Subject: [PATCH 010/279] Add API test for random_numeric_codes --- plugins/support/test/codification_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/support/test/codification_test.rb b/plugins/support/test/codification_test.rb index 5dbc35525..86f45d6dc 100644 --- a/plugins/support/test/codification_test.rb +++ b/plugins/support/test/codification_test.rb @@ -8,9 +8,10 @@ module Codification class CodificationTest < ActiveSupport::TestCase test 'API works' do %i[ + alternative_user_names + random_numeric_codes sequential_numeric_codes suffixed_user_names - alternative_user_names ].all? { |method| assert Codification.respond_to?(method) } end end From b3e9828ac3bd2952ea687a49ae01259fcd41ced7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:39:02 +0300 Subject: [PATCH 011/279] Use list accessor --- .../support/codification/codes/alternative_user_names.rb | 5 +---- .../nokul/support/codification/codes/suffixed_user_names.rb | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb index 66a69ce45..6bc111d5b 100644 --- a/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb @@ -30,11 +30,8 @@ class Code < Codification::Code protected - attr_reader :list, :preferred - def setup - @list = Lists::UserNames.new(source, **options) - @preferred = list.first.affixed(**options) + self.list = Lists::UserNames.new(source, **options) end def sanitize(source) diff --git a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb index 887d50c41..628af2038 100644 --- a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb @@ -15,10 +15,8 @@ class Code < Codification::Code protected - attr_reader :list - def setup - @list = Lists::UserNames.new(source, **options) + self.list = Lists::UserNames.new(source, **options) end private From 856bb69b6890314d3366815aebc0378bce3dce0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 00:40:25 +0300 Subject: [PATCH 012/279] Add test for the new situation [ci skip] --- .../codification/suffixed_user_names_test.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plugins/support/test/codification/suffixed_user_names_test.rb b/plugins/support/test/codification/suffixed_user_names_test.rb index dd1342b8d..bd6569715 100644 --- a/plugins/support/test/codification/suffixed_user_names_test.rb +++ b/plugins/support/test/codification/suffixed_user_names_test.rb @@ -16,6 +16,31 @@ class SuffixedUserNamesTest < ActiveSupport::TestCase end end + test 'can consume a common random coder' do + # Common random coder with 10 unique random number + random = Codification.random_numeric_codes(0..9) + + # Consume half of the randoms + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random: random + 5.times do + name = coder.run + assert_match(/ggmarquez[.]\d+/, name) + assert name.start_with? 'ggmarquez.' + end + + # Consume other half of the randoms by another coder + other = Codification.suffixed_user_names %w[gabriel garcia marquez], random: random + 5.times do + name = coder.run + assert_match(/ggmarquez[.]\d+/, name) + assert name.start_with? 'ggmarquez.' + end + + # Now both of the coders should be consumed + assert_raise(Consumed) { coder.run } + assert_raise(Consumed) { other.run } + end + test 'simple use case with memory works' do memory = SimpleMemory.new From 310252260a375433db6a8d8850df1a3a39a54ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 01:21:05 +0300 Subject: [PATCH 013/279] Add words data --- plugins/support/lib/nokul/support/data/en.yml | 375 ++++++++ plugins/support/lib/nokul/support/data/tr.yml | 816 ++++++++++++++++++ 2 files changed, 1191 insertions(+) create mode 100644 plugins/support/lib/nokul/support/data/en.yml create mode 100644 plugins/support/lib/nokul/support/data/tr.yml diff --git a/plugins/support/lib/nokul/support/data/en.yml b/plugins/support/lib/nokul/support/data/en.yml new file mode 100644 index 000000000..5e2fe1e16 --- /dev/null +++ b/plugins/support/lib/nokul/support/data/en.yml @@ -0,0 +1,375 @@ +--- +reserved: +# Assorted "valuable" words + - about + - access + - account + - accounts + - add + - address + - adm + - admin + - administration + - adult + - advertising + - affiliate + - affiliates + - ajax + - analytics + - android + - anon + - anonymous + - api + - app + - apps + - archive + - atom + - auth + - authentication + - avatar + - backup + - banner + - banners + - beta + - billing + - bin + - blog + - blogs + - board + - boot + - bot + - bots + - business + - cache + - cadastro + - calendar + - campaign + - careers + - cgi + - chat + - client + - cliente + - code + - com + - commercial + - compare + - compras + - config + - configuration + - connect + - contact + - contest + - create + - css + - dashboard + - data + - db + - delete + - demo + - design + - designer + - dev + - devel + - dir + - directory + - doc + - docs + - domain + - download + - downloads + - ecommerce + - edit + - editor + - email + - etc + - exe + - faq + - favorite + - feed + - feedback + - file + - files + - flog + - follow + - forum + - forums + - free + - ftp + - gadget + - gadgets + - games + - group + - groups + - guest + - help + - home + - homepage + - host + - hosting + - hostname + - hpg + - html + - http + - httpd + - https + - image + - images + - imap + - img + - index + - indice + - info + - information + - intranet + - invite + - ipad + - iphone + - irc + - java + - javascript + - job + - jobs + - js + - kernel + - knowledgebase + - lib + - list + - lists + - log + - login + - logout + - logs + - mail + - mail1 + - mail2 + - mail3 + - mail4 + - mail5 + - mailer + - mailing + - manager + - marketing + - master + - me + - media + - message + - messenger + - microblog + - microblogs + - mine + - mnt + - mob + - mobile + - movie + - movies + - mp3 + - msg + - msn + - music + - musicas + - mx + - my + - mysql + - name + - named + - net + - network + - new + - news + - newsletter + - nick + - nickname + - notes + - noticias + - ns + - ns1 + - ns10 + - ns2 + - ns3 + - ns4 + - ns5 + - ns6 + - ns7 + - ns8 + - ns9 + - old + - online + - operator + - opt + - option + - order + - orders + - page + - pager + - pages + - panel + - password + - perl + - photo + - photoalbum + - photos + - php + - pic + - pics + - plugin + - plugins + - pop + - pop3 + - post + - postfix + - postmaster + - posts + - proc + - profile + - project + - projects + - promo + - pub + - public + - python + - random + - register + - registration + - root + - rss + - ruby + - run + - sale + - sales + - sample + - samples + - sbin + - script + - scripts + - search + - secure + - security + - send + - server + - service + - setting + - settings + - setup + - shop + - signin + - signup + - site + - sitemap + - sites + - smtp + - soporte + - sql + - srv + - ssh + - stage + - staging + - start + - stat + - static + - stats + - status + - store + - stores + - subdomain + - subscribe + - suporte + - support + - sys + - system + - tablet + - tablets + - talk + - task + - tasks + - tech + - telnet + - temp + - test + - test1 + - test2 + - test3 + - teste + - tests + - theme + - themes + - tmp + - todo + - tools + - tv + - update + - upload + - url + - usage + - user + - username + - usr + - usuario + - var + - vendas + - video + - videos + - visitor + - web + - webmail + - webmaster + - website + - websites + - win + - workshop + - ww + - wws + - www + - www1 + - www2 + - www3 + - www4 + - www5 + - www6 + - www7 + - wwws + - wwww + - xpg + - xxx + - you + - yourdomain + - yourname + - yoursite + - yourusername + +# Ruby keywords + - alias + - and + - begin + - break + - case + - class + - def + - defined? + - do + - else + - elsif + - end + - ensure + - 'false' + - for + - if + - in + - module + - next + - nil + - not + - or + - redo + - rescue + - retry + - return + - self + - super + - then + - 'true' + - undef + - unless + - until + - when + - while + - yield diff --git a/plugins/support/lib/nokul/support/data/tr.yml b/plugins/support/lib/nokul/support/data/tr.yml new file mode 100644 index 000000000..133d7f08e --- /dev/null +++ b/plugins/support/lib/nokul/support/data/tr.yml @@ -0,0 +1,816 @@ +--- +abbreviations: + - ab + - abd + - abitur + - act + - aihm + - ales + - aselsan + - baum + - cmk + - cmuk + - dgs + - gata + - gce + - khk + - kktc + - kpds + - kpss + - les + - meb + - myo + - omü + - ömss + - öss + - ösym + - ösys + - öyp + - sat + - tbmm + - tck + - todaie + - toefl + - trt + - tsk + - tübitak + - uzem + - üds + - yds + - ydus + - ygs + - yök + - yös + +conjunctions: + - ama + - çünkü + - fakat + - hele + - hem + - ile + - ise + - ki + - oysa + - oysaki + - ve + - veya + - veyahut + +# Adapted from: https://github.com/ooguz/turkce-kufur-karaliste +# Copyright (C) Özcan Oğuz, Creative Commons Attribution-ShareAlike 4.0 International +offensives: + - abaza + - abazan + - ag + - ağzına sıçayım + - ahmak + - allah + - allahsız + - am + - amarım + - ambiti + - am biti + - amcığı + - amcığın + - amcığını + - amcığınızı + - amcık + - amcık hoşafı + - amcıklama + - amcıklandı + - amcik + - amck + - amckl + - amcklama + - amcklaryla + - amckta + - amcktan + - amcuk + - amık + - amına + - amınako + - amına koy + - amına koyarım + - amına koyayım + - amınakoyim + - amına koyyim + - amına s + - amına sikem + - amına sokam + - amın feryadı + - amını + - amını s + - amın oglu + - amınoğlu + - amın oğlu + - amısına + - amısını + - amina + - amina g + - amina k + - aminako + - aminakoyarim + - amina koyarim + - amina koyayım + - amina koyayim + - aminakoyim + - aminda + - amindan + - amindayken + - amini + - aminiyarraaniskiim + - aminoglu + - amin oglu + - amiyum + - amk + - amkafa + - amk çocuğu + - amlarnzn + - amlı + - amm + - ammak + - ammna + - amn + - amna + - amnda + - amndaki + - amngtn + - amnn + - amona + - amq + - amsız + - amsiz + - amsz + - amteri + - amugaa + - amuğa + - amuna + - ana + - anaaann + - anal + - analarn + - anam + - anamla + - anan + - anana + - anandan + - ananı + - ananı + - ananın + - ananın am + - ananın amı + - ananın dölü + - ananınki + - ananısikerim + - ananı sikerim + - ananısikeyim + - ananı sikeyim + - ananızın + - ananızın am + - anani + - ananin + - ananisikerim + - anani sikerim + - ananisikeyim + - anani sikeyim + - anann + - ananz + - anas + - anasını + - anasının am + - anası orospu + - anasi + - anasinin + - anay + - anayin + - angut + - anneni + - annenin + - annesiz + - anuna + - aptal + - aq + - a.q + - a.q. + - aq. + - ass + - atkafası + - atmık + - attırdığım + - attrrm + - auzlu + - avrat + - ayklarmalrmsikerim + - azdım + - azdır + - azdırıcı + - babaannesi kaşar + - babanı + - babanın + - babani + - babası pezevenk + - bacağına sıçayım + - bacına + - bacını + - bacının + - bacini + - bacn + - bacndan + - bacy + - bastard + - basur + - beyinsiz + - bızır + - bitch + - biting + - bok + - boka + - bokbok + - bokça + - bokhu + - bokkkumu + - boklar + - boktan + - boku + - bokubokuna + - bokum + - bombok + - boner + - bosalmak + - boşalmak + - cenabet + - cibiliyetsiz + - cibilliyetini + - cibilliyetsiz + - cif + - cikar + - cim + - çük + - dalaksız + - dallama + - daltassak + - dalyarak + - dalyarrak + - dangalak + - dassagi + - diktim + - dildo + - dingil + - dingilini + - dinsiz + - dkerim + - domal + - domalan + - domaldı + - domaldın + - domalık + - domalıyor + - domalmak + - domalmış + - domalsın + - domalt + - domaltarak + - domaltıp + - domaltır + - domaltırım + - domaltip + - domaltmak + - dölü + - dönek + - düdük + - eben + - ebeni + - ebenin + - ebeninki + - ebleh + - ecdadını + - ecdadini + - embesil + - emi + - fahise + - fahişe + - feriştah + - ferre + - fuck + - fucker + - fuckin + - fucking + - gavad + - gavat + - geber + - geberik + - gebermek + - gebermiş + - gebertir + - gerızekalı + - gerizekalı + - gerizekali + - gerzek + - giberim + - giberler + - gibis + - gibiş + - gibmek + - gibtiler + - goddamn + - godoş + - godumun + - gotelek + - gotlalesi + - gotlu + - gotten + - gotundeki + - gotunden + - gotune + - gotunu + - gotveren + - goyiim + - goyum + - goyuyim + - goyyim + - göt + - göt deliği + - götelek + - göt herif + - götlalesi + - götlek + - götoğlanı + - göt oğlanı + - götoş + - götten + - götü + - götün + - götüne + - götünekoyim + - götüne koyim + - götünü + - götveren + - göt veren + - göt verir + - gtelek + - gtn + - gtnde + - gtnden + - gtne + - gtten + - gtveren + - hasiktir + - hassikome + - hassiktir + - has siktir + - hassittir + - haysiyetsiz + - hayvan herif + - hoşafı + - hödük + - hsktr + - huur + - ıbnelık + - ibina + - ibine + - ibinenin + - ibne + - ibnedir + - ibneleri + - ibnelik + - ibnelri + - ibneni + - ibnenin + - ibnerator + - ibnesi + - idiot + - idiyot + - imansz + - ipne + - iserim + - işerim + - itoğlu it + - kafam girsin + - kafasız + - kafasiz + - kahpe + - kahpenin + - kahpenin feryadı + - kaka + - kaltak + - kancık + - kancik + - kappe + - karhane + - kaşar + - kavat + - kavatn + - kaypak + - kayyum + - kerane + - kerhane + - kerhanelerde + - kevase + - kevaşe + - kevvase + - koca göt + - koduğmun + - koduğmunun + - kodumun + - kodumunun + - koduumun + - koyarm + - koyayım + - koyiim + - koyiiym + - koyim + - koyum + - koyyim + - krar + - kukudaym + - laciye boyadım + - lavuk + - liboş + - madafaka + - mal + - malafat + - malak + - manyak + - mcik + - meme + - memelerini + - mezveleli + - minaamcık + - mincikliyim + - mna + - monakkoluyum + - motherfucker + - mudik + - oc + - ocuu + - ocuun + - OÇ + - oç + - o. çocuğu + - oğlan + - oğlancı + - oğlu it + - orosbucocuu + - orospu + - orospucocugu + - orospu cocugu + - orospu çoc + - orospuçocuğu + - orospu çocuğu + - orospu çocuğudur + - orospu çocukları + - orospudur + - orospular + - orospunun + - orospunun evladı + - orospuydu + - orospuyuz + - orostoban + - orostopol + - orrospu + - oruspu + - oruspuçocuğu + - oruspu çocuğu + - osbir + - ossurduum + - ossurmak + - ossuruk + - osur + - osurduu + - osuruk + - osururum + - otuzbir + - öküz + - öşex + - patlak zar + - penis + - pezevek + - pezeven + - pezeveng + - pezevengi + - pezevengin evladı + - pezevenk + - pezo + - pic + - pici + - picler + - piç + - piçin oğlu + - piç kurusu + - piçler + - pipi + - pipiş + - pisliktir + - porno + - pussy + - puşt + - puşttur + - rahminde + - revizyonist + - s1kerim + - s1kerm + - s1krm + - sakso + - saksofon + - salaak + - salak + - saxo + - sekis + - serefsiz + - sevgi koyarım + - sevişelim + - sexs + - sıçarım + - sıçtığım + - sıecem + - sicarsin + - sie + - sik + - sikdi + - sikdiğim + - sike + - sikecem + - sikem + - siken + - sikenin + - siker + - sikerim + - sikerler + - sikersin + - sikertir + - sikertmek + - sikesen + - sikesicenin + - sikey + - sikeydim + - sikeyim + - sikeym + - siki + - sikicem + - sikici + - sikien + - sikienler + - sikiiim + - sikiiimmm + - sikiim + - sikiir + - sikiirken + - sikik + - sikil + - sikildiini + - sikilesice + - sikilmi + - sikilmie + - sikilmis + - sikilmiş + - sikilsin + - sikim + - sikimde + - sikimden + - sikime + - sikimi + - sikimiin + - sikimin + - sikimle + - sikimsonik + - sikimtrak + - sikin + - sikinde + - sikinden + - sikine + - sikini + - sikip + - sikis + - sikisek + - sikisen + - sikish + - sikismis + - sikiş + - sikişen + - sikişme + - sikitiin + - sikiyim + - sikiym + - sikiyorum + - sikkim + - sikko + - sikleri + - sikleriii + - sikli + - sikm + - sikmek + - sikmem + - sikmiler + - sikmisligim + - siksem + - sikseydin + - sikseyidin + - siksin + - siksinbaya + - siksinler + - siksiz + - siksok + - siksz + - sikt + - sikti + - siktigimin + - siktigiminin + - siktiğim + - siktiğimin + - siktiğiminin + - siktii + - siktiim + - siktiimin + - siktiiminin + - siktiler + - siktim + - siktim + - siktimin + - siktiminin + - siktir + - siktir et + - siktirgit + - siktir git + - siktirir + - siktiririm + - siktiriyor + - siktir lan + - siktirolgit + - siktir ol git + - sittimin + - sittir + - skcem + - skecem + - skem + - sker + - skerim + - skerm + - skeyim + - skiim + - skik + - skim + - skime + - skmek + - sksin + - sksn + - sksz + - sktiimin + - sktrr + - skyim + - slaleni + - sokam + - sokarım + - sokarim + - sokarm + - sokarmkoduumun + - sokayım + - sokaym + - sokiim + - soktuğumunun + - sokuk + - sokum + - sokuş + - sokuyum + - soxum + - sulaleni + - sülaleni + - sülalenizi + - sürtük + - şerefsiz + - şıllık + - taaklarn + - taaklarna + - tarrakimin + - tasak + - tassak + - taşak + - taşşak + - tipini s.k + - tipinizi s.keyim + - tiyniyat + - toplarm + - topsun + - totoş + - vajina + - vajinanı + - veled + - veledizina + - veled i zina + - verdiimin + - weled + - weledizina + - whore + - xikeyim + - yaaraaa + - yalama + - yalarım + - yalarun + - yaraaam + - yarak + - yaraksız + - yaraktr + - yaram + - yaraminbasi + - yaramn + - yararmorospunun + - yarra + - yarraaaa + - yarraak + - yarraam + - yarraamı + - yarragi + - yarragimi + - yarragina + - yarragindan + - yarragm + - yarrağ + - yarrağım + - yarrağımı + - yarraimin + - yarrak + - yarram + - yarramin + - yarraminbaşı + - yarramn + - yarran + - yarrana + - yarrrak + - yavak + - yavş + - yavşak + - yavşaktır + - yavuşak + - yılışık + - yilisik + - yogurtlayam + - yoğurtlayam + - yrrak + - zıkkımım + - zibidi + - zigsin + - zikeyim + - zikiiim + - zikiim + - zikik + - zikim + - ziksiiin + - ziksiin + - zulliyetini + - zviyetini + +reserved: + - araştırma + - bulut + - dekan + - doçent + - doktor + - eğitim + - enstitü + - fakülte + - geliştirme + - görevli + - görevlisi + - güvenlik + - hoca + - konservatuvar + - kullanıcı + - merkez + - müdür + - nokul + - okul + - okutman + - öğretim + - öğretmen + - parola + - profesör + - rektör + - sekreter + - servis + - sistem + - şifre + - takvim + - uygulama + - üye + - yönetici + - zaman + + # ASCIIfied + - arastirma + - docent + - egitim + - enstitu + - fakulte + - gelistirme + - gorevli + - gorevlisi + - guvenlik + - kullanici + - mudur + - ogretim + - ogretmen + - profesor + - rektor + - sifre + - uye + - yonetici From bf581abae3f3c3650eba3023632f344e343cd1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 01:28:11 +0300 Subject: [PATCH 014/279] Add all SQL keywords to reserved list --- plugins/support/lib/nokul/support/data/en.yml | 831 +++++++++++++++++- 1 file changed, 829 insertions(+), 2 deletions(-) diff --git a/plugins/support/lib/nokul/support/data/en.yml b/plugins/support/lib/nokul/support/data/en.yml index 5e2fe1e16..7bc0ddc3f 100644 --- a/plugins/support/lib/nokul/support/data/en.yml +++ b/plugins/support/lib/nokul/support/data/en.yml @@ -1,6 +1,6 @@ --- reserved: -# Assorted "valuable" words + # Assorted "valuable" words - about - access - account @@ -336,7 +336,7 @@ reserved: - yoursite - yourusername -# Ruby keywords + # Ruby keywords - alias - and - begin @@ -373,3 +373,830 @@ reserved: - when - while - yield + + # SQL keywords + - a + - abort + - abs + - absolute + - access + - action + - ada + - add + - admin + - after + - aggregate + - alias + - all + - allocate + - also + - alter + - always + - analyse + - analyze + - and + - any + - are + - array + - as + - asc + - asensitive + - assertion + - assignment + - asymmetric + - at + - atomic + - attribute + - attributes + - audit + - authorization + - auto_increment + - avg + - avg_row_length + - backup + - backward + - before + - begin + - bernoulli + - between + - bigint + - binary + - bit + - bit_length + - bitvar + - blob + - bool + - boolean + - both + - breadth + - break + - browse + - bulk + - by + - c + - cache + - call + - called + - cardinality + - cascade + - cascaded + - case + - cast + - catalog + - catalog_name + - ceil + - ceiling + - chain + - change + - char + - char_length + - character + - character_length + - character_set_catalog + - character_set_name + - character_set_schema + - characteristics + - characters + - check + - checked + - checkpoint + - checksum + - class + - class_origin + - clob + - close + - cluster + - clustered + - coalesce + - cobol + - collate + - collation + - collation_catalog + - collation_name + - collation_schema + - collect + - column + - column_name + - columns + - command_function + - command_function_code + - comment + - commit + - committed + - completion + - compress + - compute + - condition + - condition_number + - connect + - connection + - connection_name + - constraint + - constraint_catalog + - constraint_name + - constraint_schema + - constraints + - constructor + - contains + - containstable + - continue + - conversion + - convert + - copy + - corr + - corresponding + - count + - covar_pop + - covar_samp + - create + - createdb + - createrole + - createuser + - cross + - csv + - cube + - cume_dist + - current + - current_date + - current_default_transform_group + - current_path + - current_role + - current_time + - current_timestamp + - current_transform_group_for_type + - current_user + - cursor + - cursor_name + - cycle + - data + - database + - databases + - date + - datetime + - datetime_interval_code + - datetime_interval_precision + - day + - day_hour + - day_microsecond + - day_minute + - day_second + - dayofmonth + - dayofweek + - dayofyear + - dbcc + - deallocate + - dec + - decimal + - declare + - default + - defaults + - deferrable + - deferred + - defined + - definer + - degree + - delay_key_write + - delayed + - delete + - delimiter + - delimiters + - dense_rank + - deny + - depth + - deref + - derived + - desc + - describe + - descriptor + - destroy + - destructor + - deterministic + - diagnostics + - dictionary + - disable + - disconnect + - disk + - dispatch + - distinct + - distinctrow + - distributed + - div + - do + - domain + - double + - drop + - dual + - dummy + - dump + - dynamic + - dynamic_function + - dynamic_function_code + - each + - element + - else + - elseif + - enable + - enclosed + - encoding + - encrypted + - end + - end-exec + - enum + - equals + - errlvl + - escape + - escaped + - every + - except + - exception + - exclude + - excluding + - exclusive + - exec + - execute + - existing + - exists + - exit + - exp + - explain + - external + - extract + - false + - fetch + - fields + - file + - fillfactor + - filter + - final + - first + - float + - float4 + - float8 + - floor + - flush + - following + - for + - force + - foreign + - fortran + - forward + - found + - free + - freetext + - freetexttable + - freeze + - from + - full + - fulltext + - function + - fusion + - g + - general + - generated + - get + - global + - go + - goto + - grant + - granted + - grants + - greatest + - group + - grouping + - handler + - having + - header + - heap + - hierarchy + - high_priority + - hold + - holdlock + - host + - hosts + - hour + - hour_microsecond + - hour_minute + - hour_second + - identified + - identity + - identity_insert + - identitycol + - if + - ignore + - ilike + - immediate + - immutable + - implementation + - implicit + - in + - include + - including + - increment + - index + - indicator + - infile + - infix + - inherit + - inherits + - initial + - initialize + - initially + - inner + - inout + - input + - insensitive + - insert + - insert_id + - instance + - instantiable + - instead + - int + - int1 + - int2 + - int3 + - int4 + - int8 + - integer + - intersect + - intersection + - interval + - into + - invoker + - is + - isam + - isnull + - isolation + - iterate + - join + - k + - key + - key_member + - key_type + - keys + - kill + - lancompiler + - language + - large + - last + - last_insert_id + - lateral + - leading + - least + - leave + - left + - length + - less + - level + - like + - limit + - lineno + - lines + - listen + - ln + - load + - local + - localtime + - localtimestamp + - location + - locator + - lock + - login + - logs + - long + - longblob + - longtext + - loop + - low_priority + - lower + - m + - map + - match + - matched + - max + - max_rows + - maxextents + - maxvalue + - mediumblob + - mediumint + - mediumtext + - member + - merge + - message_length + - message_octet_length + - message_text + - method + - middleint + - min + - min_rows + - minus + - minute + - minute_microsecond + - minute_second + - minvalue + - mlslabel + - mod + - mode + - modifies + - modify + - module + - month + - monthname + - more + - move + - multiset + - mumps + - myisam + - name + - names + - national + - natural + - nchar + - nclob + - nesting + - new + - next + - 'no' + - no_write_to_binlog + - noaudit + - nocheck + - nocompress + - nocreatedb + - nocreaterole + - nocreateuser + - noinherit + - nologin + - nonclustered + - none + - normalize + - normalized + - nosuperuser + - not + - nothing + - notify + - notnull + - nowait + - null + - nullable + - nullif + - nulls + - number + - numeric + - object + - octet_length + - octets + - of + - 'off' + - offline + - offset + - offsets + - oids + - old + - 'on' + - online + - only + - open + - opendatasource + - openquery + - openrowset + - openxml + - operation + - operator + - optimize + - option + - optionally + - options + - or + - order + - ordering + - ordinality + - others + - out + - outer + - outfile + - output + - over + - overlaps + - overlay + - overriding + - owner + - pack_keys + - pad + - parameter + - parameter_mode + - parameter_name + - parameter_ordinal_position + - parameter_specific_catalog + - parameter_specific_name + - parameter_specific_schema + - parameters + - partial + - partition + - pascal + - password + - path + - pctfree + - percent + - percent_rank + - percentile_cont + - percentile_disc + - placing + - plan + - pli + - position + - postfix + - power + - preceding + - precision + - prefix + - preorder + - prepare + - prepared + - preserve + - primary + - print + - prior + - privileges + - proc + - procedural + - procedure + - process + - processlist + - public + - purge + - quote + - raid0 + - raiserror + - range + - rank + - raw + - read + - reads + - readtext + - real + - recheck + - reconfigure + - recursive + - ref + - references + - referencing + - regexp + - regr_avgx + - regr_avgy + - regr_count + - regr_intercept + - regr_r2 + - regr_slope + - regr_sxx + - regr_sxy + - regr_syy + - reindex + - relative + - release + - reload + - rename + - repeat + - repeatable + - replace + - replication + - require + - reset + - resignal + - resource + - restart + - restore + - restrict + - result + - return + - returned_cardinality + - returned_length + - returned_octet_length + - returned_sqlstate + - returns + - revoke + - right + - rlike + - role + - rollback + - rollup + - routine + - routine_catalog + - routine_name + - routine_schema + - row + - row_count + - row_number + - rowcount + - rowguidcol + - rowid + - rownum + - rows + - rule + - save + - savepoint + - scale + - schema + - schema_name + - schemas + - scope + - scope_catalog + - scope_name + - scope_schema + - scroll + - search + - second + - second_microsecond + - section + - security + - select + - self + - sensitive + - separator + - sequence + - serializable + - server_name + - session + - session_user + - set + - setof + - sets + - setuser + - share + - show + - shutdown + - signal + - similar + - simple + - size + - smallint + - some + - soname + - source + - space + - spatial + - specific + - specific_name + - specifictype + - sql + - sql_big_result + - sql_big_selects + - sql_big_tables + - sql_calc_found_rows + - sql_log_off + - sql_log_update + - sql_low_priority_updates + - sql_select_limit + - sql_small_result + - sql_warnings + - sqlca + - sqlcode + - sqlerror + - sqlexception + - sqlstate + - sqlwarning + - sqrt + - ssl + - stable + - start + - starting + - state + - statement + - static + - statistics + - status + - stddev_pop + - stddev_samp + - stdin + - stdout + - storage + - straight_join + - strict + - string + - structure + - style + - subclass_origin + - sublist + - submultiset + - substring + - successful + - sum + - superuser + - symmetric + - synonym + - sysdate + - sysid + - system + - system_user + - table + - table_name + - tables + - tablesample + - tablespace + - temp + - template + - temporary + - terminate + - terminated + - text + - textsize + - than + - then + - ties + - time + - timestamp + - timezone_hour + - timezone_minute + - tinyblob + - tinyint + - tinytext + - to + - toast + - top + - top_level_count + - trailing + - tran + - transaction + - transaction_active + - transactions_committed + - transactions_rolled_back + - transform + - transforms + - translate + - translation + - treat + - trigger + - trigger_catalog + - trigger_name + - trigger_schema + - trim + - true + - truncate + - trusted + - tsequal + - type + - uescape + - uid + - unbounded + - uncommitted + - under + - undo + - unencrypted + - union + - unique + - unknown + - unlisten + - unlock + - unnamed + - unnest + - unsigned + - until + - update + - updatetext + - upper + - usage + - use + - user + - user_defined_type_catalog + - user_defined_type_code + - user_defined_type_name + - user_defined_type_schema + - using + - utc_date + - utc_time + - utc_timestamp + - vacuum + - valid + - validate + - validator + - value + - values + - var_pop + - var_samp + - varbinary + - varchar + - varchar2 + - varcharacter + - variable + - variables + - varying + - verbose + - view + - volatile + - waitfor + - when + - whenever + - where + - while + - width_bucket + - window + - with + - within + - without + - work + - write + - writetext + - x509 + - xor + - year + - year_month + - zerofill + - zone From ee826a7df30d01d1b7f9603c551bcb9d39e2308a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 01:30:12 +0300 Subject: [PATCH 015/279] Add source for the SQL keywords --- plugins/support/lib/nokul/support/data/en.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/support/lib/nokul/support/data/en.yml b/plugins/support/lib/nokul/support/data/en.yml index 7bc0ddc3f..5c25a553d 100644 --- a/plugins/support/lib/nokul/support/data/en.yml +++ b/plugins/support/lib/nokul/support/data/en.yml @@ -375,6 +375,7 @@ reserved: - yield # SQL keywords + # https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserved-words - a - abort - abs From ab0e23b120825701f17f4158147c58265b57f041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 19 Mar 2019 02:52:09 +0300 Subject: [PATCH 016/279] Last item in list should always be the source itself --- .../lib/nokul/support/codification/lists/user_names.rb | 2 +- .../test/codification/alternative_user_names_test.rb | 6 +++++- plugins/support/test/codification/lists_test.rb | 10 +++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/lists/user_names.rb b/plugins/support/lib/nokul/support/codification/lists/user_names.rb index 68c41b915..b9f994614 100644 --- a/plugins/support/lib/nokul/support/codification/lists/user_names.rb +++ b/plugins/support/lib/nokul/support/codification/lists/user_names.rb @@ -63,7 +63,7 @@ def sanitize(source) end def generate(**options) - send Supported.supported(options[:alternative]) + [*send(Supported.supported(options[:alternative])), source].uniq end end end diff --git a/plugins/support/test/codification/alternative_user_names_test.rb b/plugins/support/test/codification/alternative_user_names_test.rb index 088561173..826b9d7bc 100644 --- a/plugins/support/test/codification/alternative_user_names_test.rb +++ b/plugins/support/test/codification/alternative_user_names_test.rb @@ -15,6 +15,7 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase assert_equal'ggarciamarquez', coder.run assert_equal'gabrielgmarquez', coder.run assert_equal'gabrielgarciam', coder.run + assert_equal'gabrielgarciamarquez', coder.run assert_raise(Consumed) { coder.run } end @@ -43,6 +44,7 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase assert_equal'ggarciam', coder.run assert_equal'ggarciamarquez', coder.run assert_equal'gabrielgarciam', coder.run + assert_equal'gabrielgarciamarquez', coder.run assert_raise(Consumed) { coder.run } end @@ -62,6 +64,7 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase assert_equal 'yalirak', coder.run assert_equal 'yilmazarak', coder.run assert_equal 'yilmazalir', coder.run + assert_equal 'yilmazalirak', coder.run assert_raise(Consumed) { coder.run } end @@ -70,13 +73,14 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase coder = Codification.alternative_user_names %w[william hile] assert_equal 'williamh', coder.run + assert_equal 'williamhile', coder.run assert_raise(Consumed) { coder.run } end test 'can produce available names' do available = Codification.alternative_user_names(%w[suat alak]).available(3) - assert_equal %w[suata], available + assert_equal %w[suata suatalak], available end end end diff --git a/plugins/support/test/codification/lists_test.rb b/plugins/support/test/codification/lists_test.rb index 507e2c4ac..f5908cf54 100644 --- a/plugins/support/test/codification/lists_test.rb +++ b/plugins/support/test/codification/lists_test.rb @@ -57,6 +57,13 @@ def generate assert_raise(Error) { Baz.new %w[foo] } end + test 'last item should always be the source itself' do + source = %w[gabriel garcia marquez] + %i[abbreviated non_abbreviated].each do |alternative| + assert_equal source, Lists::UserNames.new(source, alternative: alternative).last + end + end + test 'abbreviated names work' do assert_equal [ %w[g g marquez], @@ -64,7 +71,8 @@ def generate %w[gabriel g m], %w[g garcia marquez], %w[gabriel g marquez], - %w[gabriel garcia m] + %w[gabriel garcia m], + %w[gabriel garcia marquez] ], Lists::UserNames.new(%w[gabriel garcia marquez], alternative: :abbreviated) end From c1596e6b013c7f4536e1b66c3864b157f812d0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 21 Mar 2019 15:41:21 +0300 Subject: [PATCH 017/279] Use enumerator class as the underlying code [ci skip] --- .../support/lib/nokul/support/codification.rb | 1 - .../lib/nokul/support/codification/code.rb | 85 +++--------------- .../lib/nokul/support/codification/coder.rb | 21 ++--- .../lib/nokul/support/codification/codes.rb | 4 +- .../codes/alternative_user_names.rb | 52 ----------- .../codes/random_numeric_codes.rb | 25 +----- .../codes/sequential_numeric_codes.rb | 39 ++++---- .../codification/codes/suffixed_user_names.rb | 20 +---- .../codes/unsuffixed_user_names.rb | 86 ++++++++++++++++++ .../lib/nokul/support/codification/lists.rb | 33 ------- .../support/codification/lists/user_names.rb | 72 --------------- .../nokul/support/codification/processor.rb | 21 ++--- .../lib/nokul/support/core_ext/object.rb | 12 +++ .../support/test/codification/code_test.rb | 5 +- .../support/test/codification/coder_test.rb | 20 +---- .../support/test/codification/lists_test.rb | 89 ------------------- .../codification/random_numeric_codes_test.rb | 22 ++--- .../sequential_numeric_codes_test.rb | 18 ++-- .../codification/suffixed_user_names_test.rb | 6 +- ..._test.rb => unsuffixed_user_names_test.rb} | 26 +++--- plugins/support/test/codification_test.rb | 4 +- 21 files changed, 197 insertions(+), 464 deletions(-) delete mode 100644 plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb create mode 100644 plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb delete mode 100644 plugins/support/lib/nokul/support/codification/lists.rb delete mode 100644 plugins/support/lib/nokul/support/codification/lists/user_names.rb delete mode 100644 plugins/support/test/codification/lists_test.rb rename plugins/support/test/codification/{alternative_user_names_test.rb => unsuffixed_user_names_test.rb} (66%) diff --git a/plugins/support/lib/nokul/support/codification.rb b/plugins/support/lib/nokul/support/codification.rb index 943fa7bbc..e528a68fe 100644 --- a/plugins/support/lib/nokul/support/codification.rb +++ b/plugins/support/lib/nokul/support/codification.rb @@ -2,7 +2,6 @@ require_relative 'codification/errors' require_relative 'codification/memory' -require_relative 'codification/lists' require_relative 'codification/processor' require_relative 'codification/code' diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb index 7ca893790..84cd6a9e4 100644 --- a/plugins/support/lib/nokul/support/codification/code.rb +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -1,46 +1,22 @@ # frozen_string_literal: true +require 'forwardable' + module Nokul module Support module Codification class Code - include Comparable - - def initialize(source = nil, **options) - @options = options - @source = sanitize(source) - - setup if defined? setup - - self.kernel = initial_kernel - end + extend Forwardable - def <=>(other) - kernel <=> other.kernel - end + delegate %i[cycle next peek rewind +] => :@kernel - def consumed? - kernel >= last_kernel - end - - def ending - @ending ||= clone.tap { |instance| instance.kernel = last_kernel } - end - - def range - Range.new(self, ending) - end - - def next - clone.tap(&:next!) + def initialize(source, **options) + @options = options + @kernel = setup(source).to_enum end - alias succ next # so as to become a Range - - def next! - raise Consumed if consumed? - - self.kernel = next_kernel + def strings + raise NotImplementedError end def to_s @@ -49,50 +25,11 @@ def to_s protected - attr_reader :source, :options - attr_accessor :kernel + attr_reader :kernel, :options - def sanitize(source) + def setup(source) source end - - def initial_kernel - raise NotImplementedError - end - - def next_kernel - raise NotImplementedError - end - - def last_kernel - raise NotImplementedError - end - - def strings - raise NotImplementedError - end - - module List - def initial_kernel - 0 - end - - def next_kernel - kernel.succ - end - - def last_kernel - @last_kernel ||= list.size - 1 - end - - def strings - list[kernel] - end - - protected - - attr_accessor :list - end end end end diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index eb794eb18..3d728e7ab 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -26,21 +26,19 @@ def initialize(code, **options) end def run_verbose(amnesic: false) - result, n = nil, 0 # rubocop:disable Style/ParallelAssignment + n = 0 - loop do + while (n += 1) < LOOP_GUARD over_loop!(n) - raise Error, "Too many tries: #{n}" if (n += 1) >= LOOP_GUARD - attempt = try(amnesic: amnesic) - break (result = attempt) if attempt + return [attempt, n] if attempt - code.next! + code.next end - [result, n] + raise Error, "Too many tries: #{n}" end def run(**flags) @@ -51,6 +49,10 @@ def dry clone.run(amnesic: true) end + def reset + code.rewind + end + DEFAULT_AVAILABLE_MAX = 10 def available(number_of_available = DEFAULT_AVAILABLE_MAX) @@ -59,7 +61,7 @@ def available(number_of_available = DEFAULT_AVAILABLE_MAX) number_of_available.times do result << instance.run - rescue Codification::Consumed + rescue StopIteration break end @@ -68,8 +70,7 @@ def available(number_of_available = DEFAULT_AVAILABLE_MAX) protected - attr_accessor :code - attr_reader :options, :processor + attr_reader :code, :options, :processor def setup; end diff --git a/plugins/support/lib/nokul/support/codification/codes.rb b/plugins/support/lib/nokul/support/codification/codes.rb index 82c3e62c4..bb91327bd 100644 --- a/plugins/support/lib/nokul/support/codification/codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes.rb @@ -2,7 +2,7 @@ require_relative 'codes/sequential_numeric_codes' require_relative 'codes/random_numeric_codes' -require_relative 'codes/alternative_user_names' +require_relative 'codes/unsuffixed_user_names' require_relative 'codes/suffixed_user_names' module Nokul @@ -13,7 +13,7 @@ module Codification mattr_accessor :codifications, default: [ SequentialNumericCodes, # sequential_numeric_codes(source, **options) RandomNumericCodes, # random_numeric_codes(source, **options) - AlternativeUserNames, # alternative_user_names(source, **options) + UnsuffixedUserNames, # unsuffixed_user_names(source, **options) SuffixedUserNames # suffixed_user_names(source, **options) ] diff --git a/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb deleted file mode 100644 index 6bc111d5b..000000000 --- a/plugins/support/lib/nokul/support/codification/codes/alternative_user_names.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Generates alternative user names. -# -# Source: ["gabriel", "garcia", "marquez"], alternative: :abbreviated -# -# Output: [ -# "ggmarquez", -# "ggarciam", -# "gabrielgm", -# "ggarciamarquez", -# "gabrielgmarquez", -# "gabrielgarciam", -# ] -# -# Source: ["gabriel", "garcia", "marquez"], alternative: :non_abbreviated -# -# Output: [ -# "gabrielgarciamarquez", -# "gabrielmarquez", -# "garciamarquez", -# ] - -module Nokul - module Support - module Codification - module AlternativeUserNames - class Code < Codification::Code - include List - - protected - - def setup - self.list = Lists::UserNames.new(source, **options) - end - - def sanitize(source) - source.must_be_any_of! Array - end - - def kernel=(index) - @kernel = index > last_kernel ? last_kernel : index - end - end - - class Coder < Codification::Coder - setup builtin_post_process: %i[safe?] - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb index c820e2607..8777d8acc 100644 --- a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb @@ -6,30 +6,11 @@ module Nokul module Support module Codification module RandomNumericCodes - class Code < Codification::Code - include List - - DEFAULT_BASE = 10 - + class Code < SequentialNumericCodes::Code protected - attr_reader :base, :length - - def setup - self.list = source.to_a.shuffle! - - @base = options[:base] || DEFAULT_BASE - @length = options[:length] || Math.log(@list.size - 1, @base).to_i + 1 - end - - def strings - list[kernel].to_string(length, base) - end - - private - - def sanitize(source) - source.must_be_any_of! Range + def setup(source) + super.to_a.shuffle! end end diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index 9f0be8d8a..6bf708e13 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -2,7 +2,7 @@ # Generates sequential numeric codes. # -# Source: 3, prefix: "203", length: 8 +# Source: "00003", prefix: "203" # # Output: "20300003", "20300004", ... @@ -11,38 +11,33 @@ module Support module Codification module SequentialNumericCodes class Code < Codification::Code - DEFAULT_BASE = 10 - DEFAULT_LEN = 4 + def strings + [peek].map { |number| number.to_string(length, base) } + end protected - attr_reader :base, :length - - def setup - @base = options[:base] || DEFAULT_BASE - @length = options[:length] || DEFAULT_LEN - end + def setup(source) + source.must_be_any_of! String..String - def initial_kernel - source - end + starting, ending = source.first, source.last # rubocop:disable Style/ParallelAssignment - def next_kernel - kernel.succ - end + self.base = options[:base] || base_from_string(ending) + self.length = options[:length] || ending.length - def last_kernel - @last_kernel ||= base**length - 1 + (starting.to_i(base)..ending.to_i(base)) end - def strings - kernel.to_string(length, base) - end + attr_accessor :base, :length private - def sanitize(source) - source.must_be_any_of! Integer + def base_from_string(string) + case string + when /[g-zG-Z]/ then 36 + when /[a-fA-F]/ then 16 + else 10 + end end end diff --git a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb index 628af2038..d69835bb9 100644 --- a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb @@ -10,24 +10,10 @@ module Nokul module Support module Codification module SuffixedUserNames - class Code < Codification::Code - include List + Code = UnsuffixedUserNames::Code - protected - - def setup - self.list = Lists::UserNames.new(source, **options) - end - - private - - def sanitize(source) - source.must_be_any_of! Array - end - end - - class Coder < Codification::Coder - setup builtin_post_process: %i[safe? random_suffix] + class Coder < UnsuffixedUserNames::Coder + setup builtin_post_process: superclass.default_options[:builtin_post_process] + %i[random_suffix] end end end diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb new file mode 100644 index 000000000..5f87d41d6 --- /dev/null +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Generates random suffixed user names. +# +# Source: ["gabriel", "garcia", "marquez"] +# +# Output: "ggmarquez", ... + +module Nokul + module Support + module Codification + module UnsuffixedUserNames + SUPPORTED_ALTERNATIVES = Set.new %i[abbreviated non_abbreviated] + + module Alternatives + refine Array do + def abbreviated + result = [] + index_combinations_of_source.each do |indexes| + alternative = clone + indexes.each { |i| alternative[i] = alternative[i].first } + result << alternative + end + + result + end + + def non_abbreviated + surname = last + forenames = clip + + result = [] + forenames.size.downto(1).each do |n| + result.concat forenames.combination(n).to_a + end + + result.map { |alternative| [*alternative, surname] }.sort_by(&:length) + end + + private + + def index_combinations_of_source + original = map.with_index.map { |*, i| i }.to_a + + indexes = [] + (size - 1).downto(1).each do |n| + indexes.concat original.combination(n).to_a + end + + indexes + end + end + end + + class Code < Codification::Code + using Alternatives + + def strings + peek + end + + protected + + def setup(source) + source.must_be_any_of! [String] + + [*source.send(alternative), source].uniq + end + + private + + def alternative + return SUPPORTED_ALTERNATIVES.first unless (alternative = options[:alternative]) + return alternative if SUPPORTED_ALTERNATIVES.include?(alternative) + + raise Error, "Unsupported alternative: #{alternative}" + end + end + + class Coder < Codification::Coder + setup builtin_post_process: %i[safe?] + end + end + end + end +end diff --git a/plugins/support/lib/nokul/support/codification/lists.rb b/plugins/support/lib/nokul/support/codification/lists.rb deleted file mode 100644 index 756f5264b..000000000 --- a/plugins/support/lib/nokul/support/codification/lists.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Nokul - module Support - module Codification - module Lists - class List < SimpleDelegator - attr_reader :source - - def initialize(source = [], **options) - source.must_be_any_of! Array - - @source = sanitize(source) - - __setobj__ generate(**options) - end - - protected - - def sanitize(source) - source - end - - def generate(**) - source - end - end - end - end - end -end - -require_relative 'lists/user_names' diff --git a/plugins/support/lib/nokul/support/codification/lists/user_names.rb b/plugins/support/lib/nokul/support/codification/lists/user_names.rb deleted file mode 100644 index b9f994614..000000000 --- a/plugins/support/lib/nokul/support/codification/lists/user_names.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -module Nokul - module Support - module Codification - module Lists - class UserNames < List - module Supported - DEFAULT_ALTERNATIVE = :abbreviated - - def self.supported(alternative = nil) - return DEFAULT_ALTERNATIVE unless alternative - - alternative = alternative.to_sym - return alternative if instance_methods.include? alternative - - raise Error, "Unknown alternative: #{alternative}" - end - - def abbreviated - result = [] - index_combinations_of_source.each do |indexes| - alternative = source.clone - indexes.each { |i| alternative[i] = alternative[i].first } - result << alternative - end - - result - end - - def non_abbreviated - surname = source.last - forenames = source.clip - - result = [] - forenames.size.downto(1).each do |n| - result.concat forenames.combination(n).to_a - end - - result.map { |alternative| [*alternative, surname] }.sort_by(&:length) - end - - private - - def index_combinations_of_source - original = source.map.with_index.map { |*, i| i }.to_a - - indexes = [] - (source.size - 1).downto(1).each do |n| - indexes.concat original.combination(n).to_a - end - - indexes - end - end - - include Supported - - protected - - def sanitize(source) - source.must_be_any_of! [String] - end - - def generate(**options) - [*send(Supported.supported(options[:alternative])), source].uniq - end - end - end - end - end -end diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index e62d9682e..992b87d18 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -12,6 +12,10 @@ def self.inherited(base) super end + def self.skip(string, expr = false) + expr ? string : raise(Skip, string) + end + def self.define(name, &block) processors[name] = block end @@ -28,16 +32,16 @@ def self.define(name, &block) !string.inside_offensives? && !string.inside_reserved? end - DEFAULT_RANDOM_RANGE = (0..999).freeze + DEFAULT_RANDOM_RANGE = ('000'..'999').freeze DEFAULT_RANDOM_SEP = '.' define :random_suffix do |string, **options| - @_random_coder ||= options[:random] || Codification.random_numeric_codes(DEFAULT_RANDOM_RANGE) + @_random_coder ||= options[:random] || Codification.random_numeric_codes(DEFAULT_RANDOM_RANGE) @_random_sep ||= options[:random_sep] || DEFAULT_RANDOM_SEP string + @_random_sep + @_random_coder.run - rescue Consumed - raise Skip, string + rescue StopIteration + Processor.skip string end def initialize(**options) @@ -48,10 +52,6 @@ def process(instance, string, **options) processors.inject(string) { |result, processor| instance.instance_exec(result, **options, &processor) } end - def skip(string, expr) - expr ? string : raise(Skip, string) - end - protected attr_reader :processors @@ -69,10 +69,7 @@ def build(args) end def processor_predicate - processor = self - proc do |string, *args| - processor.skip string, yield(string, *args) - end + proc { |string, *args| Processor.skip string, yield(string, *args) } end def processor_regexp(pattern) diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index a9469ff21..3cf86a1f0 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -50,6 +50,17 @@ def ensure_hash(object, type) nil end + def ensure_range(object, type) + sanitize_arguments(starting_type = type.first) + sanitize_arguments(ending_type = type.first) + + if (error = type_error(object.first, starting_type)) + return error + end + + type_error(object.last, ending_type) + end + def ensure_scalar(object, type) type_error(object, type) end @@ -58,6 +69,7 @@ def ensure_one(object, type) case type when Array then ensure_array(object, type) when Hash then ensure_hash(object, type) + when Range then ensure_range(object, type) else ensure_scalar(object, type) end end diff --git a/plugins/support/test/codification/code_test.rb b/plugins/support/test/codification/code_test.rb index c2e1743ad..e21bea2e8 100644 --- a/plugins/support/test/codification/code_test.rb +++ b/plugins/support/test/codification/code_test.rb @@ -8,12 +8,9 @@ module Codification class CodeTest < ActiveSupport::TestCase test 'concrete code class should implement required methods' do %i[ - initial_kernel - next_kernel - last_kernel strings ].each do |method| - assert_raise(NotImplementedError) { Class.new(Code).new.send method } + assert_raise(NotImplementedError) { Class.new(Code).new(nil).send method } end end end diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index 9959b4ed9..97d5e4a1a 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -27,24 +27,12 @@ class Bar < Foo test 'loop guard works' do class Bogus < Code - def initial_kernel - 'a' - end - - def next_kernel - 'a' - end - - def last_kernel - 'z' - end - - def strings - 'a' + def to_s + 'same' end end - coder = Coder.new Bogus.new + coder = Coder.new Bogus.new(0..Float::INFINITY) coder.run err = assert_raise(Error) { coder.run } @@ -52,7 +40,7 @@ def strings end test 'dry run should work' do - coder = Codification.sequential_numeric_codes 13 + coder = Codification.sequential_numeric_codes '0013'..'9999' assert_equal '0013', coder.run assert_equal '0014', coder.dry assert_equal '0014', coder.run diff --git a/plugins/support/test/codification/lists_test.rb b/plugins/support/test/codification/lists_test.rb deleted file mode 100644 index f5908cf54..000000000 --- a/plugins/support/test/codification/lists_test.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Nokul - module Support - module Codification - class ListsTest < ActiveSupport::TestCase - test 'base class works' do - assert_equal %w[foo bar], Lists::List.new(%w[foo bar]) - end - - class Foo < Lists::List - protected - - def generate - source.first - end - end - - test 'inheritance works' do - assert_equal 'foo', Foo.new(%w[foo bar]) - end - - test 'can work without any source' do - assert_equal [], Lists::List.new - end - - class Bar < Lists::List - protected - - def generate - %w[foo bar] - end - end - - test 'can work with an internal source' do - assert_equal %w[foo bar], Bar.new - end - - class Baz < Lists::List - protected - - def sanitize(source) - raise(Error, 'invalid length') unless source.size == 2 - - source - end - - def generate - %w[foo bar] - end - end - - test 'can sanitize' do - assert_raise(TypeError) { Lists::List.new 'foo' } - assert_raise(Error) { Baz.new %w[foo] } - end - - test 'last item should always be the source itself' do - source = %w[gabriel garcia marquez] - %i[abbreviated non_abbreviated].each do |alternative| - assert_equal source, Lists::UserNames.new(source, alternative: alternative).last - end - end - - test 'abbreviated names work' do - assert_equal [ - %w[g g marquez], - %w[g garcia m], - %w[gabriel g m], - %w[g garcia marquez], - %w[gabriel g marquez], - %w[gabriel garcia m], - %w[gabriel garcia marquez] - ], Lists::UserNames.new(%w[gabriel garcia marquez], alternative: :abbreviated) - end - - test 'non_abbreviated names work' do - assert_equal [ - %w[gabriel marquez], - %w[garcia marquez], - %w[gabriel garcia marquez] - ], Lists::UserNames.new(%w[gabriel garcia marquez], alternative: :non_abbreviated) - end - end - end - end -end diff --git a/plugins/support/test/codification/random_numeric_codes_test.rb b/plugins/support/test/codification/random_numeric_codes_test.rb index 0975131e7..027941cc9 100644 --- a/plugins/support/test/codification/random_numeric_codes_test.rb +++ b/plugins/support/test/codification/random_numeric_codes_test.rb @@ -7,47 +7,47 @@ module Support module Codification class RandomNumericCodesTest < ActiveSupport::TestCase test 'simple use case works' do - coder = Codification.random_numeric_codes(5..9) + coder = Codification.random_numeric_codes('5'..'9') assert_match(/^[5-9]$/, coder.run) assert_match(/^[5-9]$/, coder.run) assert_match(/^[5-9]$/, coder.run) assert_match(/^[5-9]$/, coder.run) assert_match(/^[5-9]$/, coder.run) - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'memory works' do memory = SimpleMemory.new - coder = Codification.random_numeric_codes 0..9, memory: memory + coder = Codification.random_numeric_codes '0'..'9', memory: memory 5.times { coder.run } - other = Codification.random_numeric_codes 0..9, memory: memory + other = Codification.random_numeric_codes '0'..'9', memory: memory 5.times { other.run } - assert_raise(Consumed) { coder.run } - assert_raise(Consumed) { other.run } + assert_raise(StopIteration) { coder.run } + assert_raise(StopIteration) { other.run } end test 'prefix and length options work' do - coder = Codification.random_numeric_codes 0..999, prefix: 'xyz-', length: 12 + coder = Codification.random_numeric_codes '0'..'999', prefix: 'xyz-', length: 12 assert_match(/^xyz-\d{12}$/, coder.run) end test 'regex post process option works' do - coder = Codification.random_numeric_codes 0..999, post_process: /^[1]+$/ + coder = Codification.random_numeric_codes '0'..'999', post_process: /^[1]+$/ assert_equal '111', coder.run - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'proc post process option works' do - coder = Codification.random_numeric_codes 0..999, post_process: proc { |string| string + '.a' } + coder = Codification.random_numeric_codes '0'..'999', post_process: proc { |string| string + '.a' } assert_match(/\d{3}[.]a/, coder.run) end test 'can produce available numbers' do - coder = Codification.random_numeric_codes(777..779) + coder = Codification.random_numeric_codes('777'..'779') assert_equal %w[777 778 779], coder.available(3).sort end end diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb index e48fc2e00..563e6a57b 100644 --- a/plugins/support/test/codification/sequential_numeric_codes_test.rb +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -7,7 +7,7 @@ module Support module Codification class SequentialNumericCodesTest < ActiveSupport::TestCase test 'simple use case works' do - coder = Codification.sequential_numeric_codes 1 + coder = Codification.sequential_numeric_codes '0001'..'9999' assert_equal '0001', coder.run assert_equal '0002', coder.run end @@ -15,11 +15,11 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase test 'simple use case with memory works' do memory = SimpleMemory.new - coder = Codification.sequential_numeric_codes 1, memory: memory + coder = Codification.sequential_numeric_codes '0001'..'9999', memory: memory assert_equal '0001', coder.run assert_equal '0002', coder.run - other = Codification.sequential_numeric_codes 1, memory: memory + other = Codification.sequential_numeric_codes '0001'..'9999', memory: memory assert_equal '0003', other.run assert_equal '0004', other.run @@ -27,36 +27,36 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase end test 'prefix option works' do - coder = Codification.sequential_numeric_codes 1, prefix: 'xyz-' + coder = Codification.sequential_numeric_codes '0001'..'9999', prefix: 'xyz-' assert_equal 'xyz-0001', coder.run assert_equal 'xyz-0002', coder.run end test 'length options works' do - coder = Codification.sequential_numeric_codes 1, prefix: 'xyz-', length: 12 + coder = Codification.sequential_numeric_codes '0001'..'9999', prefix: 'xyz-', length: 12 assert_equal 'xyz-000000000001', coder.run assert_equal 'xyz-000000000002', coder.run end test 'regex post process option works' do - coder = Codification.sequential_numeric_codes 1, post_process: /[^2]$/ + coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: /[^2]$/ assert_equal '0001', coder.run assert_equal '0003', coder.run end test 'proc post process option works' do - coder = Codification.sequential_numeric_codes 1, post_process: proc { |string| string + '.a' } + coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: proc { |string| string + '.a' } assert_equal '0001.a', coder.run assert_equal '0002.a', coder.run end test 'builtin post process works' do - coder = Codification.sequential_numeric_codes 1, post_process: :random_suffix + coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: :random_suffix assert_match(/0001[.]\d+/, coder.run) end test 'can produce available numbers' do - coder = Codification.sequential_numeric_codes 2 + coder = Codification.sequential_numeric_codes '0002'..'9999' assert_equal %w[0002 0003 0004], coder.available(3) end end diff --git a/plugins/support/test/codification/suffixed_user_names_test.rb b/plugins/support/test/codification/suffixed_user_names_test.rb index bd6569715..3611c32cc 100644 --- a/plugins/support/test/codification/suffixed_user_names_test.rb +++ b/plugins/support/test/codification/suffixed_user_names_test.rb @@ -18,7 +18,7 @@ class SuffixedUserNamesTest < ActiveSupport::TestCase test 'can consume a common random coder' do # Common random coder with 10 unique random number - random = Codification.random_numeric_codes(0..9) + random = Codification.random_numeric_codes('0'..'9') # Consume half of the randoms coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random: random @@ -37,8 +37,8 @@ class SuffixedUserNamesTest < ActiveSupport::TestCase end # Now both of the coders should be consumed - assert_raise(Consumed) { coder.run } - assert_raise(Consumed) { other.run } + assert_raise(StopIteration) { coder.run } + assert_raise(StopIteration) { other.run } end test 'simple use case with memory works' do diff --git a/plugins/support/test/codification/alternative_user_names_test.rb b/plugins/support/test/codification/unsuffixed_user_names_test.rb similarity index 66% rename from plugins/support/test/codification/alternative_user_names_test.rb rename to plugins/support/test/codification/unsuffixed_user_names_test.rb index 826b9d7bc..8dde9c53b 100644 --- a/plugins/support/test/codification/alternative_user_names_test.rb +++ b/plugins/support/test/codification/unsuffixed_user_names_test.rb @@ -5,9 +5,9 @@ module Nokul module Support module Codification - class AlternativeUserNamesTest < ActiveSupport::TestCase + class UnsuffixedUserNamesTest < ActiveSupport::TestCase test 'simple use case works' do - coder = Codification.alternative_user_names %w[gabriel garcia marquez] + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez] assert_equal'ggmarquez', coder.run assert_equal'ggarciam', coder.run @@ -17,13 +17,13 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase assert_equal'gabrielgarciam', coder.run assert_equal'gabrielgarciamarquez', coder.run - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'simple use case with memory works' do memory = SimpleMemory.new - coder = Codification.alternative_user_names %w[gabriel garcia marquez], memory: memory + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], memory: memory memory.remember 'ggarciam' @@ -32,32 +32,32 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase end test 'prefix option works' do - coder = Codification.alternative_user_names %w[gabriel garcia marquez], prefix: 'user.' + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], prefix: 'user.' assert_equal'user.ggmarquez', coder.run assert_equal'user.ggarciam', coder.run end test 'regex post process option works' do - coder = Codification.alternative_user_names %w[gabriel garcia marquez], post_process: /.+garcia.+/ + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], post_process: /.+garcia.+/ assert_equal'ggarciam', coder.run assert_equal'ggarciamarquez', coder.run assert_equal'gabrielgarciam', coder.run assert_equal'gabrielgarciamarquez', coder.run - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'proc post process option works' do - coder = Codification.alternative_user_names %w[gabriel garcia marquez], post_process: proc { |s| s.upcase } + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], post_process: proc { |s| s.upcase } assert_equal'GGMARQUEZ', coder.run assert_equal'GGARCIAM', coder.run end test 'offensive words should not be seen' do - coder = Codification.alternative_user_names %w[yilmaz ali rak] + coder = Codification.unsuffixed_user_names %w[yilmaz ali rak] assert_equal 'yalir', coder.run assert_equal 'yilmazar', coder.run @@ -66,20 +66,20 @@ class AlternativeUserNamesTest < ActiveSupport::TestCase assert_equal 'yilmazalir', coder.run assert_equal 'yilmazalirak', coder.run - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'reserved words should not be seen' do - coder = Codification.alternative_user_names %w[william hile] + coder = Codification.unsuffixed_user_names %w[william hile] assert_equal 'williamh', coder.run assert_equal 'williamhile', coder.run - assert_raise(Consumed) { coder.run } + assert_raise(StopIteration) { coder.run } end test 'can produce available names' do - available = Codification.alternative_user_names(%w[suat alak]).available(3) + available = Codification.unsuffixed_user_names(%w[suat alak]).available(3) assert_equal %w[suata suatalak], available end end diff --git a/plugins/support/test/codification_test.rb b/plugins/support/test/codification_test.rb index 86f45d6dc..d1f17ee67 100644 --- a/plugins/support/test/codification_test.rb +++ b/plugins/support/test/codification_test.rb @@ -8,9 +8,9 @@ module Codification class CodificationTest < ActiveSupport::TestCase test 'API works' do %i[ - alternative_user_names - random_numeric_codes sequential_numeric_codes + random_numeric_codes + unsuffixed_user_names suffixed_user_names ].all? { |method| assert Codification.respond_to?(method) } end From d9911a393bd52a17a8c97851389aa3f1179c2479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 21 Mar 2019 15:46:13 +0300 Subject: [PATCH 018/279] Remove leftover error code --- plugins/support/lib/nokul/support/codification/errors.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/errors.rb b/plugins/support/lib/nokul/support/codification/errors.rb index 1ab2860df..29d262cd6 100644 --- a/plugins/support/lib/nokul/support/codification/errors.rb +++ b/plugins/support/lib/nokul/support/codification/errors.rb @@ -3,9 +3,8 @@ module Nokul module Support module Codification - Error = Class.new ::StandardError - Consumed = Class.new ::StandardError - Skip = Class.new ::StopIteration + Error = Class.new ::StandardError + Skip = Class.new ::StandardError end end end From a6504baff6f0cfba1f986f751ee82ac330f48e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 21 Mar 2019 16:01:31 +0300 Subject: [PATCH 019/279] Fix comments [ci skip] --- .../support/codification/codes/random_numeric_codes.rb | 6 +++++- .../support/codification/codes/sequential_numeric_codes.rb | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb index 8777d8acc..5286c02ed 100644 --- a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true -# Generates random numbers unique in a range. +# Generates unique random numbers in a range. +# +# Source: "00003..00099", prefix: "203" +# +# Output: "20300023", "20300089", ... (random) module Nokul module Support diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index 6bf708e13..83847f70f 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -2,9 +2,9 @@ # Generates sequential numeric codes. # -# Source: "00003", prefix: "203" +# Source: "00003..00099", prefix: "203" # -# Output: "20300003", "20300004", ... +# Output: "20300003", "20300004", ..., "20300099" module Nokul module Support From 4fe339aaced8091d652b32c0ea132a4cbc509234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 10:10:12 +0300 Subject: [PATCH 020/279] Better naming for Code API methods --- .../lib/nokul/support/codification/code.rb | 30 ++++++++++++------- .../codes/random_numeric_codes.rb | 2 +- .../codes/sequential_numeric_codes.rb | 4 +-- .../codes/unsuffixed_user_names.rb | 4 +-- .../support/test/codification/code_test.rb | 5 ++-- .../support/test/codification/coder_test.rb | 10 +++++-- 6 files changed, 35 insertions(+), 20 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb index 84cd6a9e4..2c47b081a 100644 --- a/plugins/support/lib/nokul/support/codification/code.rb +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -8,27 +8,37 @@ module Codification class Code extend Forwardable - delegate %i[cycle next peek rewind +] => :@kernel + delegate %i[cycle next peek rewind +] => :@enum def initialize(source, **options) @options = options - @kernel = setup(source).to_enum - end - - def strings - raise NotImplementedError + @enum = convert(source).to_enum end def to_s - strings.affixed(**options) + emit.affixed(**options) end protected - attr_reader :kernel, :options + attr_reader :enum, :options + + def convert(_source) + raise NotImplementedError + end + + def emit + raise NotImplementedError + end + end + + class SimpleCode < Code + def convert(source) + source.must_be_any_of! [String] + end - def setup(source) - source + def emit + peek end end end diff --git a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb index 5286c02ed..6f632aaac 100644 --- a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb @@ -13,7 +13,7 @@ module RandomNumericCodes class Code < SequentialNumericCodes::Code protected - def setup(source) + def convert(source) super.to_a.shuffle! end end diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index 83847f70f..01705ccaa 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -11,13 +11,13 @@ module Support module Codification module SequentialNumericCodes class Code < Codification::Code - def strings + def emit [peek].map { |number| number.to_string(length, base) } end protected - def setup(source) + def convert(source) source.must_be_any_of! String..String starting, ending = source.first, source.last # rubocop:disable Style/ParallelAssignment diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index 5f87d41d6..49676530c 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -55,13 +55,13 @@ def index_combinations_of_source class Code < Codification::Code using Alternatives - def strings + def emit peek end protected - def setup(source) + def convert(source) source.must_be_any_of! [String] [*source.send(alternative), source].uniq diff --git a/plugins/support/test/codification/code_test.rb b/plugins/support/test/codification/code_test.rb index e21bea2e8..94df23982 100644 --- a/plugins/support/test/codification/code_test.rb +++ b/plugins/support/test/codification/code_test.rb @@ -8,9 +8,10 @@ module Codification class CodeTest < ActiveSupport::TestCase test 'concrete code class should implement required methods' do %i[ - strings + convert + emit ].each do |method| - assert_raise(NotImplementedError) { Class.new(Code).new(nil).send method } + assert_raise(NotImplementedError) { Class.new(Code).new([]).send method } end end end diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index 97d5e4a1a..550d967db 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -16,7 +16,7 @@ class Bar < Foo end assert_equal 13, Foo.default_options[:foo] - assert_nil Foo.default_options[:bar] + assert_nil Foo.default_options[:bar] assert_equal 19, Bar.default_options[:foo] assert_equal 23, Bar.default_options[:bar] end @@ -27,8 +27,12 @@ class Bar < Foo test 'loop guard works' do class Bogus < Code - def to_s - 'same' + def emit + %w[same] + end + + def convert(source) + source end end From f47513b33379370342523fa53452464058c4c268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 10:10:40 +0300 Subject: [PATCH 021/279] Add core_ext methods for Class to convey class attributes to child class --- .../lib/nokul/support/codification/coder.rb | 6 +---- .../nokul/support/codification/processor.rb | 6 +---- plugins/support/lib/nokul/support/core_ext.rb | 1 + .../lib/nokul/support/core_ext/class.rb | 23 +++++++++++++++++++ 4 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 plugins/support/lib/nokul/support/core_ext/class.rb diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index 3d728e7ab..7c9d31b98 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -8,11 +8,7 @@ class Coder class_attribute :default_options, instance_writer: false, default: {} - def self.inherited(base) - dup = default_options.dup - base.default_options = dup.each { |k, v| dup[k] = v.dup } - super - end + convey_to_child_on_inheritance :default_options def self.setup(**options) default_options.merge!(**options) diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index 992b87d18..bfb406cd9 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -6,11 +6,7 @@ module Codification class Processor class_attribute :processors, instance_writer: false, default: {} - def self.inherited(base) - dup = processors.dup - base.processors = dup.each { |k, v| dup[k] = v.dup } - super - end + convey_to_child_on_inheritance :processors def self.skip(string, expr = false) expr ? string : raise(Skip, string) diff --git a/plugins/support/lib/nokul/support/core_ext.rb b/plugins/support/lib/nokul/support/core_ext.rb index 2630e921d..aab1555d1 100644 --- a/plugins/support/lib/nokul/support/core_ext.rb +++ b/plugins/support/lib/nokul/support/core_ext.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require_relative 'core_ext/object' +require_relative 'core_ext/class' require_relative 'core_ext/array' require_relative 'core_ext/string' require_relative 'core_ext/integer' diff --git a/plugins/support/lib/nokul/support/core_ext/class.rb b/plugins/support/lib/nokul/support/core_ext/class.rb new file mode 100644 index 000000000..dd00d3b65 --- /dev/null +++ b/plugins/support/lib/nokul/support/core_ext/class.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class Class + # Extracted from Rails code base + def convey_attributes_to_child(child, *attributes) + attributes.each do |attribute| + dup = send(attribute).dup + value = case attribute + when Hash then dup.each { |k, v| dup[k] = v.dup } + when Array then dup.each_with_index { |v, i| dup[i] = v.dup } + else dup + end + child.send "#{attribute}=", value + end + end + + def convey_to_child_on_inheritance(*attributes) + define_singleton_method :inherited do |child| + convey_attributes_to_child(child, *attributes) + super(child) + end + end +end From d009b0b741757fb5aea7e7a3cd4c031cef32406b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:00:33 +0300 Subject: [PATCH 022/279] Better naming for core_ext --- plugins/support/lib/nokul/support/core_ext/class.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/core_ext/class.rb b/plugins/support/lib/nokul/support/core_ext/class.rb index dd00d3b65..ae701c318 100644 --- a/plugins/support/lib/nokul/support/core_ext/class.rb +++ b/plugins/support/lib/nokul/support/core_ext/class.rb @@ -14,10 +14,11 @@ def convey_attributes_to_child(child, *attributes) end end - def convey_to_child_on_inheritance(*attributes) + def inherited_by_conveying_attributes(*attributes, &block) define_singleton_method :inherited do |child| convey_attributes_to_child(child, *attributes) super(child) + block&.call(child) end end end From f202d3f2582ac92dd2fd399a481e10138c417250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:01:11 +0300 Subject: [PATCH 023/279] Add tests for Class core_ext --- plugins/support/test/core_ext/class_test.rb | 63 +++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 plugins/support/test/core_ext/class_test.rb diff --git a/plugins/support/test/core_ext/class_test.rb b/plugins/support/test/core_ext/class_test.rb new file mode 100644 index 000000000..83c146003 --- /dev/null +++ b/plugins/support/test/core_ext/class_test.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +require 'test_helper' + +class ClassTest < ActiveSupport::TestCase + module TestOne + class NonConveyedBase + class_attribute :array_attr, default: %w[foo bar] + class_attribute :hash_attr, default: { x: 'foo', y: 'bar' } + end + + class ConveyedBase + class_attribute :array_attr, default: %w[foo bar] + class_attribute :hash_attr, default: { x: 'foo', y: 'bar' } + + inherited_by_conveying_attributes :array_attr, :hash_attr + end + + class ChildFromNonConveyedBase < NonConveyedBase + array_attr << 'child_addition' + hash_attr.merge! z: 'child_addition' + end + + class ChildFromConveyedBase < ConveyedBase + array_attr << 'child_addition' + hash_attr.merge! z: 'child_addition' + end + end + + test 'inherited_by_conveying_attributes works' do + assert_equal %w[foo bar child_addition], TestOne::NonConveyedBase.array_attr + assert_equal %w[foo bar], TestOne::ConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestOne::ChildFromNonConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestOne::ChildFromConveyedBase.array_attr + + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::NonConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar'], TestOne::ConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::ChildFromNonConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::ChildFromConveyedBase.hash_attr + end + + module TestTwo + class ConveyedBase + class_attribute :array_attr, default: %w[foo bar] + + inherited_by_conveying_attributes :array_attr do |child| + child.class_attribute :other, default: 'ok' + end + end + + class ChildFromConveyedBase < ConveyedBase + array_attr << 'child_addition' + end + end + + test 'inherited_by_conveying_attributes with block works' do + assert_equal %w[foo bar], TestTwo::ConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestTwo::ChildFromConveyedBase.array_attr + + refute TestTwo::ConveyedBase.respond_to? :other + assert_equal 'ok', TestTwo::ChildFromConveyedBase.other + end +end From 9792917ad9bfe775533072dc420be2e9d002691f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:07:54 +0300 Subject: [PATCH 024/279] Better naming for core_ext --- .../lib/nokul/support/core_ext/object.rb | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index 3cf86a1f0..ec56657d7 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -9,7 +9,7 @@ def to_yaml_pretty yaml << "\n" end - module TypeCop + module Type__ # rubocop:disable Naming/ClassAndModuleCamelCase module_function def sanitize_arguments(*args) @@ -22,7 +22,7 @@ def type_error(object, type) "#{type} expected where found: #{object.class}" unless object.is_a? type end - def ensure_array(object, type) + def must_be_array(object, type) sanitize_arguments(sample_type = type.first) object.each do |element| @@ -34,7 +34,7 @@ def ensure_array(object, type) nil end - def ensure_hash(object, type) + def must_be_hash(object, type) sanitize_arguments(*(key_type, value_type = type.first)) object.each do |key, value| @@ -50,7 +50,7 @@ def ensure_hash(object, type) nil end - def ensure_range(object, type) + def must_be_range(object, type) sanitize_arguments(starting_type = type.first) sanitize_arguments(ending_type = type.first) @@ -61,35 +61,35 @@ def ensure_range(object, type) type_error(object.last, ending_type) end - def ensure_scalar(object, type) + def must_be_other(object, type) type_error(object, type) end - def ensure_one(object, type) + def must_be(object, type) case type - when Array then ensure_array(object, type) - when Hash then ensure_hash(object, type) - when Range then ensure_range(object, type) - else ensure_scalar(object, type) + when Array then must_be_array(object, type) + when Hash then must_be_hash(object, type) + when Range then must_be_range(object, type) + else must_be_other(object, type) end end - def ensure!(object, *args) + def must_be_any_of(object, *args) return object if args.empty? return object unless (first = (types = args.dup).shift) - return object unless (error = ensure_one(object, first)) + return object unless (error = must_be(object, first)) raise(TypeError, error) if types.empty? - return object if types.any? { |type| ensure_one(object, type).nil? } + return object if types.any? { |type| must_be(object, type).nil? } raise TypeError, "One of #{args} expected where found: #{object.class}" end end - private_constant :TypeCop + private_constant :Type__ def must_be_any_of!(*args) - TypeCop.ensure!(self, *args) + Type__.must_be_any_of(self, *args) end end From 314c3300b0aa17b99bf7e769927ebcac94569656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:25:20 +0300 Subject: [PATCH 025/279] Mini steps for documentation --- plugins/support/doc/codification.md | 21 +++++++++++++++++---- plugins/support/doc/core_ext.md | 4 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index bceb80f76..8ec9a284f 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -3,11 +3,24 @@ author: Recai Oktaş --- `Codification` -=============== +============== `Codification` modülü entitelere kod ataması yapmakta kullanılan sınıflardan -oluşmaktadır. `Codification::Coder` kod üreten jeneratör sınıfı, -`Codification::Code` kodu temsil eden tip sınıfı, `Codification::Memory` ise -tekil kodlar üretmek için gerekli hafızayı modelleyen sınıftır. +oluşmaktadır. + +Temelde bir [`Enumerator`](https://ruby-doc.org/core-2.6.2/Enumerator.html) +nesnesi olan `Code` verilen bir "kaynağı" bir `Enumerator"e çevirir ("convert") +ve her ardışımda bir String dizisi yayımlar ("emit"). Yayımlanan String dizisi +seçenek olarak verilen ön ek, son ek ve ara ekler dikkate alınarak nihai "kod" +olan String'e çevrilir. + +Üretilen kodun tekilliğine ve uygunluğuna (ör. ofensif olup olmaması) `Coder` +nesnesi karar verir. Tekillik denetimi `Memory` nesnesi üzerinden, uygunluk +denetimi ve son işleme (ör. rastgele son ek ekle) `Processor` nesnesi üzerinden +gerçekleşir. + +Tüm kodlama gerçeklemeleri `codes` dizini altında basit bir eklenti düzeninde +tutulur. Bu düzen içinde her kodlama türü aslında `Code` ve/veya `Coder` +nesnelerini özelleştirilmesinden ibarettir. TODO diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index d45d1aa30..b001ae277 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -10,8 +10,8 @@ author: Recai Oktaş TODO -`Kernel` --------- +`Class` +------- TODO From d0ec04cb42c19782f4c683def88bfa656c5f0d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:38:54 +0300 Subject: [PATCH 026/279] Mini steps for documentation --- plugins/support/doc/core_ext.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index b001ae277..ea165030b 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -8,29 +8,52 @@ author: Recai Oktaş `Object` -------- +`to_yaml_pretty` + +`must_be_any_of!(*type_specifications)` + TODO `Class` ------- +`inherited_by_conveying_attributes(*attributes, &block)` + TODO `String` -------- +`asciified` + +`abbreviation` + +`capitalize_turkish` + +`capitalize_turkish_with_parenthesized` + +`inside_offensives?` + +`inside_reserved?` + +`inside_abbreviations?` + +`inside_conjunctions?` + TODO `Integer` --------- +`to_string(length, base = 10)` + TODO `Array` ------- -TODO +`clip(number_of_last_elements = 1)` -`Hash` ------- +`affixed(**options) TODO From 34ed3aff1b4887f1851c37b2989dd221e6a896ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:39:51 +0300 Subject: [PATCH 027/279] Fix spelling error --- plugins/support/lib/nokul/support/core_ext/string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/core_ext/string.rb b/plugins/support/lib/nokul/support/core_ext/string.rb index d22fa032c..0d75bdb00 100644 --- a/plugins/support/lib/nokul/support/core_ext/string.rb +++ b/plugins/support/lib/nokul/support/core_ext/string.rb @@ -41,7 +41,7 @@ def capitalize_turkish end # rubocop:disable Metrics/MethodLength - def capitalize_turkish_with_paranthesised + def capitalize_turkish_with_parenthesized # Regex stolen from https://stackoverflow.com/a/6331667 re = / (? From 20a799453ddcb7849d0e277fa8900894e3d402c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 13:40:22 +0300 Subject: [PATCH 028/279] s/paranthesised/parenthesized/g [ci skip] --- .../common/lib/nokul/tenant/units/concerns/raw_many.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb index f566361e9..6fc32f06c 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb @@ -49,7 +49,7 @@ module Refinery refine String do def capitalize_and_fix - capitalized = capitalize_turkish_with_dashed_and_paranthesised + capitalized = capitalize_turkish_with_dashed_and_parenthesized FIX_AFTER_CAPITALIZE.each do |find, replace| capitalized.gsub!(/(? Date: Fri, 22 Mar 2019 13:50:57 +0300 Subject: [PATCH 029/279] Namespace all test classes [ci skip] --- .../support/test/codification/coder_test.rb | 20 +++++++++++-------- .../support/test/codification/memory_test.rb | 6 ++++-- .../test/codification/processor_test.rb | 17 ++++++++++------ 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index 550d967db..531a16ee7 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -4,9 +4,9 @@ module Nokul module Support - module Codification + module Codification class CoderTest < ActiveSupport::TestCase - test 'default options should be duplicated' do + module TestOne class Foo < Coder setup foo: 13 end @@ -14,18 +14,20 @@ class Foo < Coder class Bar < Foo setup foo: 19, bar: 23 end + end - assert_equal 13, Foo.default_options[:foo] - assert_nil Foo.default_options[:bar] - assert_equal 19, Bar.default_options[:foo] - assert_equal 23, Bar.default_options[:bar] + test 'default options should be duplicated' do + assert_equal 13, TestOne::Foo.default_options[:foo] + assert_nil TestOne::Foo.default_options[:bar] + assert_equal 19, TestOne::Bar.default_options[:foo] + assert_equal 23, TestOne::Bar.default_options[:bar] end test 'only codes should be accepted' do assert_raise(TypeError) { Coder.new 13 } end - test 'loop guard works' do + module TestTwo class Bogus < Code def emit %w[same] @@ -35,8 +37,10 @@ def convert(source) source end end + end - coder = Coder.new Bogus.new(0..Float::INFINITY) + test 'loop guard works' do + coder = Coder.new TestTwo::Bogus.new(0..Float::INFINITY) coder.run err = assert_raise(Error) { coder.run } diff --git a/plugins/support/test/codification/memory_test.rb b/plugins/support/test/codification/memory_test.rb index fffba8e50..54962847d 100644 --- a/plugins/support/test/codification/memory_test.rb +++ b/plugins/support/test/codification/memory_test.rb @@ -6,7 +6,7 @@ module Nokul module Support module Codification class MemoryTest < ActiveSupport::TestCase - test 'sub classing should work as expected' do + module TestOne class RefusingMemory < Memory def remember(*); end @@ -14,8 +14,10 @@ def remember?(*) true end end + end - memory = RefusingMemory.new + test 'sub classing should work as expected' do + memory = TestOne::RefusingMemory.new assert memory.remember? 19 end diff --git a/plugins/support/test/codification/processor_test.rb b/plugins/support/test/codification/processor_test.rb index c6e8e24d0..08c5da5d6 100644 --- a/plugins/support/test/codification/processor_test.rb +++ b/plugins/support/test/codification/processor_test.rb @@ -14,18 +14,20 @@ class ProcessorTest < ActiveSupport::TestCase assert_equal 'FOO', Processor.new(post_process: proc { |s| s.upcase }).process(Object.new, 'foo') end - test 'builtins work' do + module TestOne class Dummy attr_reader :options def initialize(**options) @options = options.dup end end + end + test 'builtins work' do processor = Processor.new post_process: %i[non_offensive? non_reserved? random_suffix] - assert_match(/^foo.\d{3}$/, processor.process(Dummy.new, 'foo')) - assert_raise(Skip) { processor.process(Dummy.new, 'salak') } - assert_raise(Skip) { processor.process(Dummy.new, 'if') } + assert_match(/^foo.\d{3}$/, processor.process(TestOne::Dummy.new, 'foo')) + assert_raise(Skip) { processor.process(TestOne::Dummy.new, 'salak') } + assert_raise(Skip) { processor.process(TestOne::Dummy.new, 'if') } end test 'should accept a builtin_post_process option' do @@ -55,14 +57,17 @@ class Codification::Processor # rubocop:disable Style/ClassAndModuleChildren assert_raise(Skip) { Processor.new(post_process: :xxx?).process(Object.new, 'foo') } end - test 'processes should be able to access instance' do + module TestTwo class Dummy def internal 'bar' end end + end - assert_equal 'barfoo', Processor.new(post_process: proc { |s| internal + s }).process(Dummy.new, 'foo') + test 'processes should be able to access instance' do + assert_equal 'barfoo', Processor.new(post_process: proc { |s| internal + s }).process(TestTwo::Dummy.new, + 'foo') end end end From b076457ba12a69288c2710bd711161ce697db5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 16:15:29 +0300 Subject: [PATCH 030/279] Eat your own dog food --- plugins/support/lib/nokul/support/core_ext/array.rb | 2 +- plugins/support/lib/nokul/support/core_ext/object.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/support/lib/nokul/support/core_ext/array.rb b/plugins/support/lib/nokul/support/core_ext/array.rb index fde91964a..f91c84161 100644 --- a/plugins/support/lib/nokul/support/core_ext/array.rb +++ b/plugins/support/lib/nokul/support/core_ext/array.rb @@ -6,7 +6,7 @@ def clip(number_of_last_elements = 1) end def affixed(**options) - raise ArgumentError, 'must be a string array' unless all? { |string| string.is_a? String } + must_be_any_of! [String] "#{[*options[:prefix]].join}#{join options[:interfix]}#{[*options[:suffix]].join}" end diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index ec56657d7..463f8285b 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -9,7 +9,7 @@ def to_yaml_pretty yaml << "\n" end - module Type__ # rubocop:disable Naming/ClassAndModuleCamelCase + module Type_ # rubocop:disable Naming/ClassAndModuleCamelCase module_function def sanitize_arguments(*args) @@ -89,7 +89,7 @@ def must_be_any_of(object, *args) private_constant :Type__ - def must_be_any_of!(*args) - Type__.must_be_any_of(self, *args) + def must_be_any_of!(*type_specifications) + Type_.must_be_any_of(self, *type_specifications) end end From 4e4e2079304047471970e88ac6f6cd65944cec1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 16:38:11 +0300 Subject: [PATCH 031/279] Start integration --- .../common/lib/nokul/tenant/units/coder/pool.rb | 7 ++++--- plugins/tenant/omu/app/lib/students.rb | 13 ++++++++++--- plugins/tenant/omu/db/units/config.yml | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb index b88b096ef..4120bd4b4 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb @@ -10,15 +10,16 @@ class Pool ends owner weight - deny + pattern reserved ].freeze attr_reader :coder def after_initialize - # FIXME: handle ends, deny - @coder = Support::Codification.sequential_numeric_codes begins, memory: Memory.instance + @coder = Support::Codification.sequential_numeric_codes Range.new(begins.to_s, ends.to_s), + memory: Memory.instance, + post_process: Regexp.new(pattern) end def score_of(unit) diff --git a/plugins/tenant/omu/app/lib/students.rb b/plugins/tenant/omu/app/lib/students.rb index fbee6e764..ea27beac9 100644 --- a/plugins/tenant/omu/app/lib/students.rb +++ b/plugins/tenant/omu/app/lib/students.rb @@ -3,6 +3,8 @@ module Students module_function + NUMBER_LENGTH = 8 + def start_of_active_academic_year Date.current.strftime '%y' # TODO: placeholder end @@ -12,11 +14,16 @@ def number_generator(unit) end def short_number_generator(unit_code, starting_sequence) - Support::Codification.sequential_numeric_codes starting_sequence, prefix: [unit_code, start_of_active_academic_year] + prefix, length = [unit_code, start_of_active_academic_year], 3 # rubocop:disable ParallelAssignment + raise 'Bad number length' unless [*prefix, starting_sequence].join.length == NUMBER_LENGTH + + Support::Codification.sequential_numeric_codes starting_sequence, prefix: prefix, length: length, base: 10 end def long_number_generator(unit_code, starting_sequence) - NumberGenerator.new starting_sequence, prefix: unit_code - Support::Codification.sequential_numeric_codes starting_sequence, prefix: unit_code + prefix, length = [unit_code], 5 # rubocop:disable ParallelAssignment + raise 'Bad number length' unless [*prefix, starting_sequence].join.length == NUMBER_LENGTH + + Support::Codification.sequential_numeric_codes starting_sequence, prefix: prefix, length: length, base: 10 end end diff --git a/plugins/tenant/omu/db/units/config.yml b/plugins/tenant/omu/db/units/config.yml index e2b33eb9b..370da29aa 100644 --- a/plugins/tenant/omu/db/units/config.yml +++ b/plugins/tenant/omu/db/units/config.yml @@ -35,13 +35,13 @@ coding: ends: 'HZZ' weight: 200 # skip problematic characters - deny: '[ILOQWX]' + pattern: '[^ILOQWX]' - owner: special begins: 'Z00' ends: 'ZZZ' weight: 100 # skip problematic characters - deny: '[ILOQWX]' + pattern: '[^ILOQWX]' reservations: # Bilgisayar - key: yoksis_id From fa91caaf91c5ce7ac2d59efbe5efdbd6f61fa3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 16:42:40 +0300 Subject: [PATCH 032/279] Oops --- plugins/support/lib/nokul/support/core_ext/object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index 463f8285b..a8a0898b9 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -87,7 +87,7 @@ def must_be_any_of(object, *args) end end - private_constant :Type__ + private_constant :Type_ def must_be_any_of!(*type_specifications) Type_.must_be_any_of(self, *type_specifications) From cf43e6c83d861c9143c4e4d1e4ffb49443e29bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Fri, 22 Mar 2019 16:58:15 +0300 Subject: [PATCH 033/279] Support non-range argument --- .../codes/sequential_numeric_codes.rb | 32 ++++++++++++++---- .../sequential_numeric_codes_test.rb | 33 ++++++++++++++----- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index 01705ccaa..cf198c5bc 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -18,14 +18,9 @@ def emit protected def convert(source) - source.must_be_any_of! String..String + source.must_be_any_of! String..String, String - starting, ending = source.first, source.last # rubocop:disable Style/ParallelAssignment - - self.base = options[:base] || base_from_string(ending) - self.length = options[:length] || ending.length - - (starting.to_i(base)..ending.to_i(base)) + source.is_a?(String) ? convert_from_string(source) : convert_from_range(source) end attr_accessor :base, :length @@ -39,6 +34,29 @@ def base_from_string(string) else 10 end end + + def convert_from_range(source) + starting, ending = source.first, source.last # rubocop:disable Style/ParallelAssignment + + self.base, self.length = base_and_length_from_sample(ending) + + (starting.to_i(base)..ending.to_i(base)) + end + + def convert_from_string(source) + self.base, self.length = base_and_length_from_sample(source) + + starting, ending = source, (base**length - 1).to_s # rubocop:disable Style/ParallelAssignment + + (starting.to_i(base)..ending.to_i(base)) + end + + def base_and_length_from_sample(sample) + [ + options[:base] || base_from_string(sample), + options[:length] || sample.length + ] + end end Coder = Codification::Coder diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb index 563e6a57b..8edb67bfd 100644 --- a/plugins/support/test/codification/sequential_numeric_codes_test.rb +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -6,20 +6,35 @@ module Nokul module Support module Codification class SequentialNumericCodesTest < ActiveSupport::TestCase - test 'simple use case works' do - coder = Codification.sequential_numeric_codes '0001'..'9999' + test 'simple use case works with starting string' do + coder = Codification.sequential_numeric_codes '0001' assert_equal '0001', coder.run assert_equal '0002', coder.run + + coder = Codification.sequential_numeric_codes '9998' + assert_equal '9998', coder.run + assert_equal '9999', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'simple use case works with ranges' do + coder = Codification.sequential_numeric_codes '0001'..'0003' + assert_equal '0001', coder.run + assert_equal '0002', coder.run + assert_equal '0003', coder.run + + assert_raise(StopIteration) { coder.run } end test 'simple use case with memory works' do memory = SimpleMemory.new - coder = Codification.sequential_numeric_codes '0001'..'9999', memory: memory + coder = Codification.sequential_numeric_codes '0001', memory: memory assert_equal '0001', coder.run assert_equal '0002', coder.run - other = Codification.sequential_numeric_codes '0001'..'9999', memory: memory + other = Codification.sequential_numeric_codes '0001', memory: memory assert_equal '0003', other.run assert_equal '0004', other.run @@ -27,31 +42,31 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase end test 'prefix option works' do - coder = Codification.sequential_numeric_codes '0001'..'9999', prefix: 'xyz-' + coder = Codification.sequential_numeric_codes '0001', prefix: 'xyz-' assert_equal 'xyz-0001', coder.run assert_equal 'xyz-0002', coder.run end test 'length options works' do - coder = Codification.sequential_numeric_codes '0001'..'9999', prefix: 'xyz-', length: 12 + coder = Codification.sequential_numeric_codes '0001', prefix: 'xyz-', length: 12 assert_equal 'xyz-000000000001', coder.run assert_equal 'xyz-000000000002', coder.run end test 'regex post process option works' do - coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: /[^2]$/ + coder = Codification.sequential_numeric_codes '0001', post_process: /[^2]$/ assert_equal '0001', coder.run assert_equal '0003', coder.run end test 'proc post process option works' do - coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: proc { |string| string + '.a' } + coder = Codification.sequential_numeric_codes '0001', post_process: proc { |string| string + '.a' } assert_equal '0001.a', coder.run assert_equal '0002.a', coder.run end test 'builtin post process works' do - coder = Codification.sequential_numeric_codes '0001'..'9999', post_process: :random_suffix + coder = Codification.sequential_numeric_codes '0001', post_process: :random_suffix assert_match(/0001[.]\d+/, coder.run) end From 4558c40ed191d3eebdc825e797f46e64ec466bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 10:56:44 +0300 Subject: [PATCH 034/279] Update for core_ext API change --- plugins/support/lib/nokul/support/codification/coder.rb | 2 +- plugins/support/lib/nokul/support/codification/processor.rb | 2 +- plugins/support/lib/nokul/support/core_ext.rb | 1 + plugins/tenant/common/Gemfile.lock | 2 +- plugins/tenant/omu/Gemfile.lock | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index 7c9d31b98..fc4953ee3 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -8,7 +8,7 @@ class Coder class_attribute :default_options, instance_writer: false, default: {} - convey_to_child_on_inheritance :default_options + inherited_by_conveying_attributes :default_options def self.setup(**options) default_options.merge!(**options) diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index bfb406cd9..e5d30b079 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -6,7 +6,7 @@ module Codification class Processor class_attribute :processors, instance_writer: false, default: {} - convey_to_child_on_inheritance :processors + inherited_by_conveying_attributes :processors def self.skip(string, expr = false) expr ? string : raise(Skip, string) diff --git a/plugins/support/lib/nokul/support/core_ext.rb b/plugins/support/lib/nokul/support/core_ext.rb index aab1555d1..8c5dce1fb 100644 --- a/plugins/support/lib/nokul/support/core_ext.rb +++ b/plugins/support/lib/nokul/support/core_ext.rb @@ -3,5 +3,6 @@ require_relative 'core_ext/object' require_relative 'core_ext/class' require_relative 'core_ext/array' +require_relative 'core_ext/hash' require_relative 'core_ext/string' require_relative 'core_ext/integer' diff --git a/plugins/tenant/common/Gemfile.lock b/plugins/tenant/common/Gemfile.lock index 67c5cc374..0e90c6e42 100644 --- a/plugins/tenant/common/Gemfile.lock +++ b/plugins/tenant/common/Gemfile.lock @@ -85,7 +85,7 @@ PATH nokul-support PATH - remote: /home/msdundar/projects/nokul/plugins/support + remote: /vagrant/plugins/support specs: nokul-support (0.1.0) activesupport (~> 6.0.0.beta1) diff --git a/plugins/tenant/omu/Gemfile.lock b/plugins/tenant/omu/Gemfile.lock index 85fdcd45f..a0f86dee0 100644 --- a/plugins/tenant/omu/Gemfile.lock +++ b/plugins/tenant/omu/Gemfile.lock @@ -6,13 +6,13 @@ PATH rails (~> 6.0.0.beta1) PATH - remote: /home/msdundar/projects/nokul/plugins/support + remote: /vagrant/plugins/support specs: nokul-support (0.1.0) activesupport (~> 6.0.0.beta1) PATH - remote: /home/msdundar/projects/nokul/plugins/tenant/common + remote: /vagrant/plugins/tenant/common specs: nokul-tenant (0.1.0) nokul-support From 836b841d317e437c7d9c93c06f1394a227734ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:02:36 +0300 Subject: [PATCH 035/279] PLUGINS_DIR must be relative --- plugins/support/Gemfile | 2 +- plugins/support/Gemfile.lock | 2 +- plugins/tenant/common/Gemfile | 2 +- plugins/tenant/common/Gemfile.lock | 14 +++++++------- plugins/tenant/omu/Gemfile | 2 +- plugins/tenant/omu/Gemfile.lock | 18 +++++++++--------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/support/Gemfile b/plugins/support/Gemfile index 77d72e997..f9c59839e 100644 --- a/plugins/support/Gemfile +++ b/plugins/support/Gemfile @@ -2,7 +2,7 @@ require 'pathname' -PLUGINS_DIR = Pathname.new File.expand_path('..', __dir__) +PLUGINS_DIR = Pathname.new '..' source 'https://rubygems.org' ruby File.read('.ruby-version') diff --git a/plugins/support/Gemfile.lock b/plugins/support/Gemfile.lock index bc1a79011..d05d58b78 100644 --- a/plugins/support/Gemfile.lock +++ b/plugins/support/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/rails/rails.git - revision: efb706daad0e2e1039c6abb4879c837ef8bf4d10 + revision: 5851ac69e11fadcd3b4bf052f1d963a5803a2449 specs: actioncable (6.0.0.beta3) actionpack (= 6.0.0.beta3) diff --git a/plugins/tenant/common/Gemfile b/plugins/tenant/common/Gemfile index 844ce8cfa..6e8731edf 100644 --- a/plugins/tenant/common/Gemfile +++ b/plugins/tenant/common/Gemfile @@ -2,7 +2,7 @@ require 'pathname' -PLUGINS_DIR = Pathname.new File.expand_path('../..', __dir__) +PLUGINS_DIR = Pathname.new '../..' source 'https://rubygems.org' ruby File.read('.ruby-version') diff --git a/plugins/tenant/common/Gemfile.lock b/plugins/tenant/common/Gemfile.lock index 0e90c6e42..4125af420 100644 --- a/plugins/tenant/common/Gemfile.lock +++ b/plugins/tenant/common/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/rails/rails.git - revision: efb706daad0e2e1039c6abb4879c837ef8bf4d10 + revision: 5851ac69e11fadcd3b4bf052f1d963a5803a2449 specs: actioncable (6.0.0.beta3) actionpack (= 6.0.0.beta3) @@ -79,16 +79,16 @@ GIT thor (>= 0.20.3, < 2.0) PATH - remote: . + remote: ../../support specs: - nokul-tenant (0.1.0) - nokul-support + nokul-support (0.1.0) + activesupport (~> 6.0.0.beta1) PATH - remote: /vagrant/plugins/support + remote: . specs: - nokul-support (0.1.0) - activesupport (~> 6.0.0.beta1) + nokul-tenant (0.1.0) + nokul-support GEM remote: https://rubygems.org/ diff --git a/plugins/tenant/omu/Gemfile b/plugins/tenant/omu/Gemfile index 159e0b37b..23eb68c51 100644 --- a/plugins/tenant/omu/Gemfile +++ b/plugins/tenant/omu/Gemfile @@ -2,7 +2,7 @@ require 'pathname' -PLUGINS_DIR = Pathname.new File.expand_path('../..', __dir__) +PLUGINS_DIR = Pathname.new '../..' source 'https://rubygems.org' ruby File.read('.ruby-version') diff --git a/plugins/tenant/omu/Gemfile.lock b/plugins/tenant/omu/Gemfile.lock index a0f86dee0..0305f9796 100644 --- a/plugins/tenant/omu/Gemfile.lock +++ b/plugins/tenant/omu/Gemfile.lock @@ -1,22 +1,22 @@ PATH - remote: . - specs: - nokul-tenant-omu (0.1.0) - nokul-tenant - rails (~> 6.0.0.beta1) - -PATH - remote: /vagrant/plugins/support + remote: ../../support specs: nokul-support (0.1.0) activesupport (~> 6.0.0.beta1) PATH - remote: /vagrant/plugins/tenant/common + remote: ../common specs: nokul-tenant (0.1.0) nokul-support +PATH + remote: . + specs: + nokul-tenant-omu (0.1.0) + nokul-tenant + rails (~> 6.0.0.beta1) + GEM remote: https://rubygems.org/ specs: From af7b606d41db55d51e0111dd20d244ed93c87fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:38:06 +0300 Subject: [PATCH 036/279] Fix pattern against codification changes --- plugins/tenant/omu/db/units/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/tenant/omu/db/units/config.yml b/plugins/tenant/omu/db/units/config.yml index 370da29aa..338fefea0 100644 --- a/plugins/tenant/omu/db/units/config.yml +++ b/plugins/tenant/omu/db/units/config.yml @@ -1,3 +1,4 @@ +--- fetching: yok: root_id: '121946' @@ -35,13 +36,13 @@ coding: ends: 'HZZ' weight: 200 # skip problematic characters - pattern: '[^ILOQWX]' + pattern: '^[^ILOQWX]+$' - owner: special begins: 'Z00' ends: 'ZZZ' weight: 100 # skip problematic characters - pattern: '[^ILOQWX]' + pattern: '^[^ILOQWX]+$' reservations: # Bilgisayar - key: yoksis_id From b410fca472240857d0e021cea249c80adb4da746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:38:56 +0300 Subject: [PATCH 037/279] Tolerate nil values --- plugins/support/lib/nokul/support/codification/processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index e5d30b079..72af7cb5f 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -41,7 +41,7 @@ def self.define(name, &block) end def initialize(**options) - @processors = build options.dup.extract!(:builtin_post_process, :post_process).values.flatten + @processors = build options.dup.extract!(:builtin_post_process, :post_process).values.flatten.compact end def process(instance, string, **options) From 3307d4fea6c80b01da9a946a1667092b98d9b9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:39:46 +0300 Subject: [PATCH 038/279] Handle absence of pattern --- plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb index 4120bd4b4..a6780e99c 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb @@ -17,9 +17,10 @@ class Pool attr_reader :coder def after_initialize + post_process = Regexp.new(pattern) if pattern @coder = Support::Codification.sequential_numeric_codes Range.new(begins.to_s, ends.to_s), memory: Memory.instance, - post_process: Regexp.new(pattern) + post_process: post_process end def score_of(unit) From f290cb03a98449cc3546b7ca68dec68eda531f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:53:36 +0300 Subject: [PATCH 039/279] Add missing test for Hash core_ext --- plugins/support/test/core_ext/hash_test.rb | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/support/test/core_ext/hash_test.rb diff --git a/plugins/support/test/core_ext/hash_test.rb b/plugins/support/test/core_ext/hash_test.rb new file mode 100644 index 000000000..2c5f01c69 --- /dev/null +++ b/plugins/support/test/core_ext/hash_test.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'test_helper' + +require 'ostruct' + +class HashTest < ActiveSupport::TestCase + test 'to_deep_ostruct works' do + hash = { + first_level: { + second_level: { + second: 2 + }, + first: 1 + }, + top: 0 + } + + ostruct = hash.to_deep_ostruct + + assert ostruct.is_a? OpenStruct + assert_equal 0, ostruct.top + assert ostruct.first_level.is_a? OpenStruct + assert_equal 1, ostruct.first_level.first + assert ostruct.first_level.second_level.is_a? OpenStruct + assert_equal 2, ostruct.first_level.second_level.second + end +end From eae8af6e390b1895beaeedb0e32d83f738f62325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 11:59:49 +0300 Subject: [PATCH 040/279] Add stub for Hash core_ext documentation --- plugins/support/doc/core_ext.md | 37 +++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index ea165030b..b8bddb9e1 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -21,6 +21,27 @@ TODO TODO +`Array` +------- + +`clip(number_of_last_elements = 1)` + +`affixed(**options)` + +TODO + +`Hash` +------ + +`to_deep_ostruct` + +`Integer` +--------- + +`to_string(length, base = 10)` + +TODO + `String` -------- @@ -41,19 +62,3 @@ TODO `inside_conjunctions?` TODO - -`Integer` ---------- - -`to_string(length, base = 10)` - -TODO - -`Array` -------- - -`clip(number_of_last_elements = 1)` - -`affixed(**options) - -TODO From 955f741f167e82966a0e3071f4b5f7a0c2929fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 16:07:14 +0300 Subject: [PATCH 041/279] Fix codebeat issues --- .../codes/sequential_numeric_codes.rb | 7 +-- .../codes/unsuffixed_user_names.rb | 29 ++++-------- .../lib/nokul/support/core_ext/class.rb | 21 +++++---- .../lib/nokul/support/core_ext/object.rb | 21 ++------- .../lib/nokul/support/core_ext/string.rb | 46 ++++++++----------- .../nokul/tenant/units/concerns/raw_many.rb | 15 +++--- 6 files changed, 54 insertions(+), 85 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index cf198c5bc..9c3b4ccc0 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -44,11 +44,8 @@ def convert_from_range(source) end def convert_from_string(source) - self.base, self.length = base_and_length_from_sample(source) - - starting, ending = source, (base**length - 1).to_s # rubocop:disable Style/ParallelAssignment - - (starting.to_i(base)..ending.to_i(base)) + base, length = base_and_length_from_sample(source) + convert_from_range(source..(base**length - 1).to_s) end def base_and_length_from_sample(sample) diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index 49676530c..3f8934aa9 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -15,39 +15,26 @@ module UnsuffixedUserNames module Alternatives refine Array do def abbreviated - result = [] - index_combinations_of_source.each do |indexes| + index_combinations_of_source.map do |indexes| alternative = clone indexes.each { |i| alternative[i] = alternative[i].first } - result << alternative + alternative end - - result end def non_abbreviated - surname = last - forenames = clip - - result = [] - forenames.size.downto(1).each do |n| - result.concat forenames.combination(n).to_a - end + surname, forenames = last, clip # rubocop:disable ParallelAssignment - result.map { |alternative| [*alternative, surname] }.sort_by(&:length) + forenames.send(:index_combinations_of_source).map do |alternative| + [*alternative, surname] + end.sort_by(&:length) end private def index_combinations_of_source - original = map.with_index.map { |*, i| i }.to_a - - indexes = [] - (size - 1).downto(1).each do |n| - indexes.concat original.combination(n).to_a - end - - indexes + original = each_index.to_a + [].concat(*(size - 1).downto(1).map { |n| original.combination(n).to_a }) end end end diff --git a/plugins/support/lib/nokul/support/core_ext/class.rb b/plugins/support/lib/nokul/support/core_ext/class.rb index ae701c318..5c9018115 100644 --- a/plugins/support/lib/nokul/support/core_ext/class.rb +++ b/plugins/support/lib/nokul/support/core_ext/class.rb @@ -3,15 +3,7 @@ class Class # Extracted from Rails code base def convey_attributes_to_child(child, *attributes) - attributes.each do |attribute| - dup = send(attribute).dup - value = case attribute - when Hash then dup.each { |k, v| dup[k] = v.dup } - when Array then dup.each_with_index { |v, i| dup[i] = v.dup } - else dup - end - child.send "#{attribute}=", value - end + attributes.each { |attribute| child.send "#{attribute}=", duplicated_attribute(attribute) } end def inherited_by_conveying_attributes(*attributes, &block) @@ -21,4 +13,15 @@ def inherited_by_conveying_attributes(*attributes, &block) block&.call(child) end end + + private + + def duplicated_attribute(attribute) + dup = send(attribute).dup + case attribute + when Hash then dup.each { |k, v| dup[k] = v.dup } + when Array then dup.each_with_index { |v, i| dup[i] = v.dup } + else dup + end + end end diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index a8a0898b9..c1e8e780a 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -26,9 +26,7 @@ def must_be_array(object, type) sanitize_arguments(sample_type = type.first) object.each do |element| - if (error = type_error(element, sample_type)) - return error - end + (error = type_error(element, sample_type)) && (return error) end nil @@ -38,13 +36,8 @@ def must_be_hash(object, type) sanitize_arguments(*(key_type, value_type = type.first)) object.each do |key, value| - if (error = type_error(key, key_type)) - return error - end - - if (error = type_error(value, value_type)) - return error - end + (error = type_error(key, key_type)) && (return error) + (error = type_error(value, value_type)) && (return error) end nil @@ -54,9 +47,7 @@ def must_be_range(object, type) sanitize_arguments(starting_type = type.first) sanitize_arguments(ending_type = type.first) - if (error = type_error(object.first, starting_type)) - return error - end + (error = type_error(object.first, starting_type)) && (return error) type_error(object.last, ending_type) end @@ -75,9 +66,7 @@ def must_be(object, type) end def must_be_any_of(object, *args) - return object if args.empty? - return object unless (first = (types = args.dup).shift) - return object unless (error = must_be(object, first)) + return object unless (error = must_be(object, (types = args.dup).shift)) raise(TypeError, error) if types.empty? diff --git a/plugins/support/lib/nokul/support/core_ext/string.rb b/plugins/support/lib/nokul/support/core_ext/string.rb index 0d75bdb00..8c88734fd 100644 --- a/plugins/support/lib/nokul/support/core_ext/string.rb +++ b/plugins/support/lib/nokul/support/core_ext/string.rb @@ -40,25 +40,24 @@ def capitalize_turkish end.join(' ') end - # rubocop:disable Metrics/MethodLength + # Regex stolen from https://stackoverflow.com/a/6331667 + RE_PARANTHESIZED = / + (? + \( + (?: + (?> [^()]+ ) + | + \g + )* + \) + ) + /x.freeze + def capitalize_turkish_with_parenthesized - # Regex stolen from https://stackoverflow.com/a/6331667 - re = / - (? - \( - (?: - (?> [^()]+ ) - | - \g - )* - \) - ) - /x - capitalize_turkish.gsub re do |match| + capitalize_turkish.gsub RE_PARANTHESIZED do |match| '(' + match[1..-2].capitalize_turkish + ')' end end - # rubocop:enable Metrics/MethodLength module Matchable require 'yaml' @@ -70,21 +69,16 @@ def initialize @data = {} end - def run(languages:, category:, word:, **options) + def run(languages:, category:, word:) (languages.empty? ? %w[en tr] : languages.uniq).each do |language| - return true if match(language: language, category: category, word: word, **options) + return true if match(language: language, category: category, word: word) end false end - def match(language:, category:, word:, **options) - if options[:partial] - # XXX: Note the poor performance - words(language, category).any? { |string| word.include? string } - else - words(language, category).include? word - end + def match(language:, category:, word:) + words(language, category).include? word end private @@ -122,8 +116,8 @@ def language_file_for(language) offensives reserved ].each do |category| - define_method "inside_#{category}?" do |*languages, **options| - matcher.run(languages: languages, category: category, word: self, **options) + define_method "inside_#{category}?" do |*languages| + matcher.run(languages: languages, category: category, word: self) end end end diff --git a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb index 6fc32f06c..bcde78be9 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb @@ -56,18 +56,17 @@ def capitalize_and_fix capitalized end - # FIXME: This will eventually be replaced with a better implementation def capitalize_turkish_with_dashed_and_parenthesized capitalize_turkish_with_parenthesized.split.map do |word| - next word unless word =~ /-/ - - word.split('-').map do |dashed| - next dashed unless dashed.size > 1 - - dashed.capitalize_turkish - end.join '-' + word.include?('-') ? word.capitalize_dashed_words : word end.join ' ' end + + def capitalize_dashed_words + split('-').map do |word| + word.size > 1 ? word.capitalize_turkish : word + end.join '-' + end end end end From bbbf9eb762ea89445772cf14a38a098f2c717ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 16:11:36 +0300 Subject: [PATCH 042/279] codebeat: Truncate 10 odd ABC size to 10 effectively Rationale: 10 odd ABC offenses, i.e. 10.63, are rarely worth to fix. --- .codebeatsettings | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .codebeatsettings diff --git a/.codebeatsettings b/.codebeatsettings new file mode 100644 index 000000000..2caff03ec --- /dev/null +++ b/.codebeatsettings @@ -0,0 +1,5 @@ +{ + "RUBY": { + "ABC": [11, 20, 40, 60] + } +} From 801d7c666b8a96c8465249b88b07a00d9cfb590c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 21:35:59 +0300 Subject: [PATCH 043/279] Add with_status and with_status_and_notification --- .../lib/nokul/support/utils/file_utils.rb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/plugins/support/lib/nokul/support/utils/file_utils.rb b/plugins/support/lib/nokul/support/utils/file_utils.rb index 2ddd751b2..645f0d5bf 100644 --- a/plugins/support/lib/nokul/support/utils/file_utils.rb +++ b/plugins/support/lib/nokul/support/utils/file_utils.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'digest/md5' + module Nokul module Support module_function @@ -29,5 +31,27 @@ def with_backup_and_notification(new_file, &block) warn "\nCompare with #{old_file}." if old_file_exist end + + def with_status(new_file) + raise ArgumentError, 'Block required' unless block_given? + + old_checksum = Digest::MD5.hexdigest(File.read(new_file)) if File.exist? new_file + yield new_file + new_checksum = Digest::MD5.hexdigest(File.read(new_file)) if File.exist? new_file + + old_checksum != new_checksum + end + + def with_status_and_notification(new_file, &block) + new_file_exist_before = File.exist? new_file + + if (status = with_status(new_file, &block)) + warn new_file_exist_before ? "#{new_file} updated due to the changes." : "#{new_file} created." + else + warn 'No change.' + end + + status + end end end From f8c7c70f33298a2300932c2b11e27b09dfc65d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 21:36:40 +0300 Subject: [PATCH 044/279] s/with_backup_and_notification/with_status_and_notification --- plugins/support/lib/nokul/support/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/collection.rb b/plugins/support/lib/nokul/support/collection.rb index 2e9ba263c..a61244be3 100644 --- a/plugins/support/lib/nokul/support/collection.rb +++ b/plugins/support/lib/nokul/support/collection.rb @@ -56,7 +56,7 @@ def self.to_yaml_pretty(instance) def self.write_to_yaml_file(file, instance, comment: nil) yaml = comment ? comment.gsub(/^/m, '# ') : '' yaml += to_yaml_pretty(instance) - Support.with_backup_and_notification(file) { File.write file, yaml } + Support.with_status_and_notification(file) { File.write file, yaml } end def get(by) From 09b463bffb696f96a8e23ed910f7cb30dd574cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 23:24:00 +0300 Subject: [PATCH 045/279] Add test to catch state inconsistency in unit source files --- .../support/lib/nokul/support/collection.rb | 5 +-- .../lib/nokul/support/utils/file_utils.rb | 13 ++++---- .../tenant/common/lib/nokul/tenant/units.rb | 33 +++++++++++++++++++ .../lib/nokul/tenant/units/tasks/produce.rake | 23 ------------- .../nokul/tenant/units/tasks/reproduce.rake | 10 ++++++ .../lib/nokul/tenant/units/tests/src/all.rb | 11 +++++++ 6 files changed, 63 insertions(+), 32 deletions(-) delete mode 100644 plugins/tenant/common/lib/nokul/tenant/units/tasks/produce.rake create mode 100644 plugins/tenant/common/lib/nokul/tenant/units/tasks/reproduce.rake diff --git a/plugins/support/lib/nokul/support/collection.rb b/plugins/support/lib/nokul/support/collection.rb index a61244be3..ba69fa4f7 100644 --- a/plugins/support/lib/nokul/support/collection.rb +++ b/plugins/support/lib/nokul/support/collection.rb @@ -53,10 +53,11 @@ def self.to_yaml_pretty(instance) instance.map { |item| item.to_h.stringify_keys }.to_yaml_pretty end - def self.write_to_yaml_file(file, instance, comment: nil) + def self.write_to_yaml_file(file, instance, **options) + comment = options[:comment] yaml = comment ? comment.gsub(/^/m, '# ') : '' yaml += to_yaml_pretty(instance) - Support.with_status_and_notification(file) { File.write file, yaml } + Support.with_status_and_notification(file, **options) { File.write file, yaml } end def get(by) diff --git a/plugins/support/lib/nokul/support/utils/file_utils.rb b/plugins/support/lib/nokul/support/utils/file_utils.rb index 645f0d5bf..ce0ea164e 100644 --- a/plugins/support/lib/nokul/support/utils/file_utils.rb +++ b/plugins/support/lib/nokul/support/utils/file_utils.rb @@ -19,17 +19,14 @@ def with_backup(new_file) FileUtils.mv(old_file, new_file) unless success end - def with_backup_and_notification(new_file, &block) + def with_backup_and_notification(new_file, **options, &block) new_file_exist_before = File.exist? new_file - return unless with_backup(new_file, &block) + return if !with_backup(new_file, &block) || options[:quiet] old_file_exist = File.exist? old_file = "#{new_file}.old" - return warn 'No change.' if old_file_exist && FileUtils.identical?(new_file, old_file) warn new_file_exist_before ? "#{new_file} updated due to the changes." : "#{new_file} created." - - warn "\nCompare with #{old_file}." if old_file_exist end def with_status(new_file) @@ -42,10 +39,12 @@ def with_status(new_file) old_checksum != new_checksum end - def with_status_and_notification(new_file, &block) + def with_status_and_notification(new_file, **options, &block) new_file_exist_before = File.exist? new_file - if (status = with_status(new_file, &block)) + return (status = with_status(new_file, &block)) if options[:quiet] + + if status warn new_file_exist_before ? "#{new_file} updated due to the changes." : "#{new_file} created." else warn 'No change.' diff --git a/plugins/tenant/common/lib/nokul/tenant/units.rb b/plugins/tenant/common/lib/nokul/tenant/units.rb index bc7cb8ce5..83e53bce0 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units.rb @@ -34,6 +34,39 @@ def self.method_missing(method, resource, *args) def self.respond_to_missing?(method, include_private: false) super end + + def self.reproduce_src(quiet: false) + states = [] + + states += %w[raw/yok raw/det].map do |resource| + warn "Getting changes of #{resource}" unless quiet + update(resource).store quiet: quiet, comment: <<~COMMENT + REFER DOCUMENTATION TO EDIT THIS FILE. PLEASE NOTE THAT: + + - EXISTING RAW ATTRIBUTES WILL NORMALLY BE OVERWRITTEN ON NEXT UPDATE. + - COMMENTS AND EXTRA BLANK LINES WILL NOT BE PRESERVED. + COMMENT + end + + states.any? { |state| state } # signal any change + end + + def self.reproduce_all(quiet: false) + states = [] + + states.append reproduce_src quiet: quiet + + warn 'Updating src/all' unless quiet + states.append produce('src/all').store quiet: quiet, comment: <<~COMMENT + AUTOGENERATED FROM SOURCES. DO NOT EDIT! + COMMENT + + states.any? { |state| state } # signal any change + end + + class << self + alias reproduce reproduce_all + end end end end diff --git a/plugins/tenant/common/lib/nokul/tenant/units/tasks/produce.rake b/plugins/tenant/common/lib/nokul/tenant/units/tasks/produce.rake deleted file mode 100644 index 58e07551f..000000000 --- a/plugins/tenant/common/lib/nokul/tenant/units/tasks/produce.rake +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -namespace :tenant do - namespace :units do - desc 'Produce unit sources' - task :produce do - %w[raw/yok raw/det].each do |resource| - puts "Getting changes of #{resource}" - Nokul::Tenant::Units.update(resource).store comment: <<~COMMENT - REFER DOCUMENTATION TO EDIT THIS FILE. PLEASE NOTE THAT: - - - EXISTING RAW ATTRIBUTES WILL NORMALLY BE OVERWRITTEN ON NEXT UPDATE. - - COMMENTS AND EXTRA BLANK LINES WILL NOT BE PRESERVED. - COMMENT - end - - puts 'Updating src/all' - Nokul::Tenant::Units.produce('src/all').store comment: <<~COMMENT - AUTOGENERATED FROM SOURCES. DO NOT EDIT! - COMMENT - end - end -end diff --git a/plugins/tenant/common/lib/nokul/tenant/units/tasks/reproduce.rake b/plugins/tenant/common/lib/nokul/tenant/units/tasks/reproduce.rake new file mode 100644 index 000000000..50d6edaec --- /dev/null +++ b/plugins/tenant/common/lib/nokul/tenant/units/tasks/reproduce.rake @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +namespace :tenant do + namespace :units do + desc 'Reproduce unit sources' + task :reproduce do + Nokul::Tenant::Units.reproduce + end + end +end diff --git a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb index eaceb0dff..b5e93a15a 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb @@ -31,6 +31,17 @@ def setup end assert_empty offensive_units end + + test 'all source files must be in clean state' do + assert Tenant::Units.reproduce(quiet: true), <<~MSG + + Modified source files encountered when reproducing source files. + This means that you have edited some file but forgotten to + reproduce and commit. + + Please run "bin/rails tenant:units:reproduce" and commit changes. + MSG + end end end end From 3859b3d83a00259982279237927a485c74aac31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 23:27:05 +0300 Subject: [PATCH 046/279] Fix assertion --- plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb index b5e93a15a..b511b8059 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb @@ -33,7 +33,7 @@ def setup end test 'all source files must be in clean state' do - assert Tenant::Units.reproduce(quiet: true), <<~MSG + refute Tenant::Units.reproduce(quiet: true), <<~MSG Modified source files encountered when reproducing source files. This means that you have edited some file but forgotten to From 79951d7db7a15d28829c6d669cb448a79c86aae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Sat, 23 Mar 2019 23:28:43 +0300 Subject: [PATCH 047/279] s/produce/reproduce/ --- plugins/tenant/common/doc/units.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tenant/common/doc/units.md b/plugins/tenant/common/doc/units.md index 1ac56e4d3..0c4255e9f 100644 --- a/plugins/tenant/common/doc/units.md +++ b/plugins/tenant/common/doc/units.md @@ -110,6 +110,6 @@ izlenmelidir. ```sh $ cd plugins/tenant/omu $ bundle install # henüz yapılmamışsa -$ bin/rails tenant:units:produce +$ bin/rails tenant:units:reproduce $ bin/rails test ``` From 8e9f7637620e4d38b79851c8a0b386bf6b0977fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:26:25 +0300 Subject: [PATCH 048/279] Add SecureRandom core_ext: random_number_string --- .../lib/nokul/support/core_ext/securerandom.rb | 11 +++++++++++ plugins/support/test/core_ext/securerandom_test.rb | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 plugins/support/lib/nokul/support/core_ext/securerandom.rb create mode 100644 plugins/support/test/core_ext/securerandom_test.rb diff --git a/plugins/support/lib/nokul/support/core_ext/securerandom.rb b/plugins/support/lib/nokul/support/core_ext/securerandom.rb new file mode 100644 index 000000000..07dfe658c --- /dev/null +++ b/plugins/support/lib/nokul/support/core_ext/securerandom.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'securerandom' + +module SecureRandom + module_function + + def random_number_string(length) + random_number(10**length).to_string(length, 10) + end +end diff --git a/plugins/support/test/core_ext/securerandom_test.rb b/plugins/support/test/core_ext/securerandom_test.rb new file mode 100644 index 000000000..02042bf90 --- /dev/null +++ b/plugins/support/test/core_ext/securerandom_test.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'test_helper' + +class SecureRandomTest < ActiveSupport::TestCase + test 'random_number_string works' do + assert_match(/^\d{4}$/, SecureRandom.random_number_string(4)) + end +end From 841eaadc8e4bc4e8b14d60733cee133f59f030bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:28:48 +0300 Subject: [PATCH 049/279] Use SecureRandom core_ext for random suffix --- .../lib/nokul/support/codification/processor.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/processor.rb b/plugins/support/lib/nokul/support/codification/processor.rb index 72af7cb5f..49c780bfd 100644 --- a/plugins/support/lib/nokul/support/codification/processor.rb +++ b/plugins/support/lib/nokul/support/codification/processor.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'securerandom' + module Nokul module Support module Codification @@ -28,14 +30,13 @@ def self.define(name, &block) !string.inside_offensives? && !string.inside_reserved? end - DEFAULT_RANDOM_RANGE = ('000'..'999').freeze - DEFAULT_RANDOM_SEP = '.' + DEFAULT_RANDOM_SEP = '.' + DEFAULT_RANDOM_LEN = 3 define :random_suffix do |string, **options| - @_random_coder ||= options[:random] || Codification.random_numeric_codes(DEFAULT_RANDOM_RANGE) - @_random_sep ||= options[:random_sep] || DEFAULT_RANDOM_SEP + random_suffix = SecureRandom.random_number_string options.fetch(:random_suffix_length, DEFAULT_RANDOM_LEN) - string + @_random_sep + @_random_coder.run + string + options.fetch(:random_suffix_separator, DEFAULT_RANDOM_SEP) + random_suffix rescue StopIteration Processor.skip string end From 69b8f3becfd6c699d9ae312b980ebd8eab026f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:29:46 +0300 Subject: [PATCH 050/279] Update for SecureRandom core_ext --- plugins/support/doc/core_ext.md | 7 +++++++ plugins/support/lib/nokul/support/core_ext.rb | 1 + 2 files changed, 8 insertions(+) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index b8bddb9e1..15bf7ea79 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -62,3 +62,10 @@ TODO `inside_conjunctions?` TODO + +`SecureRandom` +-------------- + +`random_number_string(length)` + +TODO diff --git a/plugins/support/lib/nokul/support/core_ext.rb b/plugins/support/lib/nokul/support/core_ext.rb index 8c5dce1fb..3a03ca9bf 100644 --- a/plugins/support/lib/nokul/support/core_ext.rb +++ b/plugins/support/lib/nokul/support/core_ext.rb @@ -6,3 +6,4 @@ require_relative 'core_ext/hash' require_relative 'core_ext/string' require_relative 'core_ext/integer' +require_relative 'core_ext/securerandom' From 43e105ea98f3dacbd7bb875d254edb7ae75d94a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:31:14 +0300 Subject: [PATCH 051/279] Pre condition given names --- .../support/codification/codes/unsuffixed_user_names.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index 3f8934aa9..bc7d5f314 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -51,7 +51,11 @@ def emit def convert(source) source.must_be_any_of! [String] - [*source.send(alternative), source].uniq + names = source.map(&:split).flatten.map do |name| + name.downcase(:turkic).asciified.gsub(/[^a-zA-Z]/, '') + end + + [*names.send(alternative), names].uniq end private From a86e492ce9a68d7d2b8453fcf10a3ec82bbcfe09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:31:56 +0300 Subject: [PATCH 052/279] Enhance Codification API with singular method names --- .../support/lib/nokul/support/codification/codes.rb | 12 ++++++++++-- plugins/support/test/codification_test.rb | 7 +++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes.rb b/plugins/support/lib/nokul/support/codification/codes.rb index bb91327bd..ad9e6627c 100644 --- a/plugins/support/lib/nokul/support/codification/codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes.rb @@ -20,10 +20,18 @@ module Codification module_function codifications.each do |codification| - method = codification.to_s.demodulize.underscore.downcase - define_method method do |*args, **options, &block| + name = codification.to_s.demodulize.underscore + + plural_method = name.pluralize + singular_method = name.singularize + + define_method plural_method do |*args, **options, &block| codification::Coder.new(codification::Code.new(*args, **options), **options, &block) end + + define_method singular_method do |*args, **options, &block| + send(plural_method, *args, **options, &block).run + end end end end diff --git a/plugins/support/test/codification_test.rb b/plugins/support/test/codification_test.rb index d1f17ee67..ebff80f9e 100644 --- a/plugins/support/test/codification_test.rb +++ b/plugins/support/test/codification_test.rb @@ -7,12 +7,15 @@ module Support module Codification class CodificationTest < ActiveSupport::TestCase test 'API works' do - %i[ + %w[ sequential_numeric_codes random_numeric_codes unsuffixed_user_names suffixed_user_names - ].all? { |method| assert Codification.respond_to?(method) } + ].all? do |method| + assert Codification.respond_to?(method.pluralize) + assert Codification.respond_to?(method.singularize) + end end end end From 6fb2750338db004bbe4d7a6e2a52d223d054feed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:33:35 +0300 Subject: [PATCH 053/279] Update all tests against latest changes --- .../codification/random_numeric_codes_test.rb | 4 ++ .../sequential_numeric_codes_test.rb | 4 ++ .../codification/suffixed_user_names_test.rb | 44 ++++++++++--------- .../unsuffixed_user_names_test.rb | 4 ++ 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/plugins/support/test/codification/random_numeric_codes_test.rb b/plugins/support/test/codification/random_numeric_codes_test.rb index 027941cc9..2a8ca4f7d 100644 --- a/plugins/support/test/codification/random_numeric_codes_test.rb +++ b/plugins/support/test/codification/random_numeric_codes_test.rb @@ -17,6 +17,10 @@ class RandomNumericCodesTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end + test 'API with singular name works' do + assert_match(/^[5-9]$/, Codification.random_numeric_code('5'..'9')) + end + test 'memory works' do memory = SimpleMemory.new diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb index 8edb67bfd..2a70d7f5e 100644 --- a/plugins/support/test/codification/sequential_numeric_codes_test.rb +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -27,6 +27,10 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end + test 'API with singular name works' do + assert_equal '0001', Codification.sequential_numeric_code('0001') + end + test 'simple use case with memory works' do memory = SimpleMemory.new diff --git a/plugins/support/test/codification/suffixed_user_names_test.rb b/plugins/support/test/codification/suffixed_user_names_test.rb index 3611c32cc..401319b54 100644 --- a/plugins/support/test/codification/suffixed_user_names_test.rb +++ b/plugins/support/test/codification/suffixed_user_names_test.rb @@ -16,29 +16,33 @@ class SuffixedUserNamesTest < ActiveSupport::TestCase end end - test 'can consume a common random coder' do - # Common random coder with 10 unique random number - random = Codification.random_numeric_codes('0'..'9') + test 'API with singular name works' do + name = Codification.suffixed_user_name %w[gabriel garcia marquez] - # Consume half of the randoms - coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random: random - 5.times do - name = coder.run - assert_match(/ggmarquez[.]\d+/, name) - assert name.start_with? 'ggmarquez.' - end + assert_match(/ggmarquez[.]\d+/, name) + assert name.start_with? 'ggmarquez.' + end - # Consume other half of the randoms by another coder - other = Codification.suffixed_user_names %w[gabriel garcia marquez], random: random - 5.times do - name = coder.run - assert_match(/ggmarquez[.]\d+/, name) - assert name.start_with? 'ggmarquez.' - end + test 'can specify random suffix length' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random_suffix_length: 1 + + name = coder.run + assert_match(/ggmarquez[.]\d{1}$/, name) + assert name.start_with? 'ggmarquez.' + + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random_suffix_length: 5 + + name = coder.run + assert_match(/ggmarquez[.]\d{5}$/, name) + assert name.start_with? 'ggmarquez.' + end + + test 'can specify random suffix separator' do + coder = Codification.suffixed_user_names %w[gabriel garcia marquez], random_suffix_separator: '-' - # Now both of the coders should be consumed - assert_raise(StopIteration) { coder.run } - assert_raise(StopIteration) { other.run } + name = coder.run + assert_match(/ggmarquez[-]\d+$/, name) + assert name.start_with? 'ggmarquez-' end test 'simple use case with memory works' do diff --git a/plugins/support/test/codification/unsuffixed_user_names_test.rb b/plugins/support/test/codification/unsuffixed_user_names_test.rb index 8dde9c53b..6272a33fe 100644 --- a/plugins/support/test/codification/unsuffixed_user_names_test.rb +++ b/plugins/support/test/codification/unsuffixed_user_names_test.rb @@ -20,6 +20,10 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end + test 'API with singular name works' do + assert_equal 'ggmarquez', Codification.unsuffixed_user_name(%w[gabriel garcia marquez]) + end + test 'simple use case with memory works' do memory = SimpleMemory.new From a6c761a9696a38a7cf970412b998960d3f6d3df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:34:31 +0300 Subject: [PATCH 054/279] Clean up older API --- plugins/tenant/omu/app/lib/students.rb | 29 -------------------------- 1 file changed, 29 deletions(-) delete mode 100644 plugins/tenant/omu/app/lib/students.rb diff --git a/plugins/tenant/omu/app/lib/students.rb b/plugins/tenant/omu/app/lib/students.rb deleted file mode 100644 index ea27beac9..000000000 --- a/plugins/tenant/omu/app/lib/students.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module Students - module_function - - NUMBER_LENGTH = 8 - - def start_of_active_academic_year - Date.current.strftime '%y' # TODO: placeholder - end - - def number_generator(unit) - # TODO: dispatch short or long number generator by looking into to the unit - end - - def short_number_generator(unit_code, starting_sequence) - prefix, length = [unit_code, start_of_active_academic_year], 3 # rubocop:disable ParallelAssignment - raise 'Bad number length' unless [*prefix, starting_sequence].join.length == NUMBER_LENGTH - - Support::Codification.sequential_numeric_codes starting_sequence, prefix: prefix, length: length, base: 10 - end - - def long_number_generator(unit_code, starting_sequence) - prefix, length = [unit_code], 5 # rubocop:disable ParallelAssignment - raise 'Bad number length' unless [*prefix, starting_sequence].join.length == NUMBER_LENGTH - - Support::Codification.sequential_numeric_codes starting_sequence, prefix: prefix, length: length, base: 10 - end -end From 99f9d0114a4ef023e448803a00e3aa5275434ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:36:08 +0300 Subject: [PATCH 055/279] Add new high level API for Codification --- plugins/tenant/common/doc/codification.md | 8 +++ .../common/lib/nokul/tenant/codification.rb | 5 ++ .../lib/nokul/tenant/codification/student.rb | 66 +++++++++++++++++++ .../lib/nokul/tenant/codification/unit.rb | 25 +++++++ .../lib/nokul/tenant/codification/user.rb | 26 ++++++++ .../common/test/codification/student_test.rb | 55 ++++++++++++++++ .../common/test/codification/unit_test.rb | 55 ++++++++++++++++ .../common/test/codification/user_test.rb | 39 +++++++++++ 8 files changed, 279 insertions(+) create mode 100644 plugins/tenant/common/doc/codification.md create mode 100644 plugins/tenant/common/lib/nokul/tenant/codification.rb create mode 100644 plugins/tenant/common/lib/nokul/tenant/codification/student.rb create mode 100644 plugins/tenant/common/lib/nokul/tenant/codification/unit.rb create mode 100644 plugins/tenant/common/lib/nokul/tenant/codification/user.rb create mode 100644 plugins/tenant/common/test/codification/student_test.rb create mode 100644 plugins/tenant/common/test/codification/unit_test.rb create mode 100644 plugins/tenant/common/test/codification/user_test.rb diff --git a/plugins/tenant/common/doc/codification.md b/plugins/tenant/common/doc/codification.md new file mode 100644 index 000000000..f47a71bc5 --- /dev/null +++ b/plugins/tenant/common/doc/codification.md @@ -0,0 +1,8 @@ +--- +author: Recai Oktaş +--- + +`Nokul::Tenant::Codification` +============================= + +TODO diff --git a/plugins/tenant/common/lib/nokul/tenant/codification.rb b/plugins/tenant/common/lib/nokul/tenant/codification.rb new file mode 100644 index 000000000..0f8598adf --- /dev/null +++ b/plugins/tenant/common/lib/nokul/tenant/codification.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +require_relative 'codification/user' +require_relative 'codification/unit' +require_relative 'codification/student' diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/student.rb b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb new file mode 100644 index 000000000..1b62ce1c1 --- /dev/null +++ b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +module Nokul + module Tenant + module Codification + module Student + mattr_accessor :const, default: ActiveSupport::InheritableOptions.new(gross_length: 8, + year_length: 2) + + module_function + + def start_of_active_academic_year + Date.current.strftime '%y' # TODO: placeholder + end + + def short_number_generator(unit_code:, year: nil, starting:) + unit_code = Sanitized.unit_code(unit_code) + year = Sanitized.year(year) + starting = Sanitized.starting(starting, *(prefix = [unit_code, year])) + net_length = Sanitized.net_length(*prefix) + + Support::Codification.sequential_numeric_codes starting, prefix: prefix, length: net_length, base: 10 + end + + def long_number_generator(unit_code:, starting:) + unit_code = Sanitized.unit_code(unit_code) + starting = Sanitized.starting(starting, *(prefix = [unit_code])) + net_length = Sanitized.net_length(*prefix) + + Support::Codification.sequential_numeric_codes starting, prefix: prefix, length: net_length, base: 10 + end + + module Sanitized + module_function + + def unit_code(unit_code) + unit_code.length == Unit.const.gross_length || + raise(ArgumentError, "Unit code length must be #{Unit.const.gross_length}: #{unit_code}") + unit_code + end + + def year(year) + year ||= start_of_active_academic_year + year.length == Student.const.year_length || + raise(ArgumentError, "Academic year length must be #{Student.const.year_length}: #{year}") + year + end + + def net_length(*prefix) + Student.const.gross_length - prefix.map(&:length).sum + end + + def starting(starting, *prefix) + net_length = net_length(*prefix) + starting = 1.to_string(net_length, 10) if starting.blank? || starting.match?(/^0+$/) + return starting if starting.length == net_length + + raise ArgumentError, "Starting sequence length must be #{net_length}: #{starting}" + end + end + + private_constant :Sanitized + end + end + end +end diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb b/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb new file mode 100644 index 000000000..e3a4f5b44 --- /dev/null +++ b/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Nokul + module Tenant + module Codification + module Unit + mattr_accessor :const, default: ActiveSupport::InheritableOptions.new(gross_length: 3) + + module_function + + def code_generator(starting:, ending:, pattern: nil, memory:) + [starting = starting.to_s, ending = ending.to_s].each do |code| + code.length == const.gross_length || + raise("Code length must be #{const.gross_length}: #{code}") + end + + range = Range.new(starting.to_s, ending.to_s) + post_process = Regexp.new(pattern) if pattern + + Support::Codification.sequential_numeric_codes range, memory: memory, post_process: post_process + end + end + end + end +end diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/user.rb b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb new file mode 100644 index 000000000..ffb64d8df --- /dev/null +++ b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Nokul + module Tenant + module Codification + module User + mattr_accessor :const, default: ActiveSupport::InheritableOptions.new(random_suffix_length: 3, + random_suffix_separator: '.') + + module_function + + def name_generate(first_name:, last_name:, memory:) + Support::Codification.suffixed_user_name [first_name, last_name], + memory: memory, + random_suffix_separator: const.random_suffix_separator, + random_suffix_length: const.random_suffix_length + end + + def name_suggest(first_name:, last_name:, memory:) + Support::Codification.unsuffixed_user_names([first_name, last_name], + memory: memory).available + end + end + end + end +end diff --git a/plugins/tenant/common/test/codification/student_test.rb b/plugins/tenant/common/test/codification/student_test.rb new file mode 100644 index 000000000..15a795e0e --- /dev/null +++ b/plugins/tenant/common/test/codification/student_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Tenant + module Codification + class StudentTest < ActiveSupport::TestCase + test 'student_short_number_generator works' do + coder = Student.short_number_generator(unit_code: '203', year: '19', starting: '023') + assert_equal '20319023', coder.run + assert_equal '20319024', coder.run + end + + test 'student_short_number_generator unit_code sanitization works' do + assert_raise(ArgumentError) do + Student.short_number_generator(unit_code: '20', year: '19', starting: '023') + end + end + + test 'student_short_number_generator year sanitization works' do + assert_raise(ArgumentError) do + Student.short_number_generator(unit_code: '203', year: '2019', starting: '023') + end + end + + test 'student_short_number_generator starting sanitization works' do + assert_raise(ArgumentError) do + Student.short_number_generator(unit_code: '203', year: '19', starting: '23') + end + end + + test 'student_short_number_generator can handle a blank or zero starting' do + coder = Student.short_number_generator(unit_code: '203', year: '19', starting: nil) + assert_equal '20319001', coder.run + + coder = Student.short_number_generator(unit_code: '203', year: '19', starting: '000') + assert_equal '20319001', coder.run + end + + test 'student_long_number_generator works' do + coder = Student.long_number_generator(unit_code: '203', starting: '00023') + assert_equal '20300023', coder.run + assert_equal '20300024', coder.run + end + + test 'student_long_number_generator starting sanitization works' do + assert_raise(ArgumentError) do + Student.long_number_generator(unit_code: '203', starting: '023') + end + end + end + end + end +end diff --git a/plugins/tenant/common/test/codification/unit_test.rb b/plugins/tenant/common/test/codification/unit_test.rb new file mode 100644 index 000000000..f4ca8c92b --- /dev/null +++ b/plugins/tenant/common/test/codification/unit_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Tenant + module Codification + class UnitTest < ActiveSupport::TestCase + test 'unit_code_generator works' do + coder = Unit.code_generator(starting: '023', ending: '025', memory: nil) + assert_equal '023', coder.run + assert_equal '024', coder.run + assert_equal '025', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'unit_code_generator works as hexadecimal sequences automagically' do + coder = Unit.code_generator(starting: '009', ending: '00C', memory: nil) + assert_equal '009', coder.run + assert_equal '00A', coder.run + assert_equal '00B', coder.run + assert_equal '00C', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'unit_code_generator works as alphabetical sequences automagically' do + coder = Unit.code_generator(starting: '009', ending: '00H', memory: nil) + assert_equal '009', coder.run + assert_equal '00A', coder.run + assert_equal '00B', coder.run + assert_equal '00C', coder.run + assert_equal '00D', coder.run + assert_equal '00E', coder.run + assert_equal '00F', coder.run + assert_equal '00G', coder.run + assert_equal '00H', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'unit_code_generator works with patterns' do + coder = Unit.code_generator(starting: '001', ending: '009', pattern: '^[^3-7]+$', memory: nil) + assert_equal '001', coder.run + assert_equal '002', coder.run + assert_equal '008', coder.run + assert_equal '009', coder.run + + assert_raise(StopIteration) { coder.run } + end + end + end + end +end diff --git a/plugins/tenant/common/test/codification/user_test.rb b/plugins/tenant/common/test/codification/user_test.rb new file mode 100644 index 000000000..37d58adad --- /dev/null +++ b/plugins/tenant/common/test/codification/user_test.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Nokul + module Tenant + module Codification + class UserTest < ActiveSupport::TestCase + test 'user_name_generate works' do + user_name = User.name_generate(first_name: 'Mustafa Kemal', + last_name: 'Atatürk', + memory: Support::Codification::SimpleMemory.new) + + sep = Regexp.escape(Codification::User.const.random_suffix_separator) + len = Codification::User.const.random_suffix_length + assert_match(/^mkataturk#{sep}\d{#{len}}$/, user_name) + end + + test 'user_name_suggest works' do + actual = User.name_suggest(first_name: 'Mustafa Kemal', + last_name: 'Atatürk', + memory: Support::Codification::SimpleMemory.new) + + expected = %w[ + mkataturk + mkemala + mustafaka + mkemalataturk + mustafakataturk + mustafakemala + mustafakemalataturk + ] + + assert_equal expected, actual + end + end + end + end +end From 2a09a4cf5f3280e043408fa609c663c25b01166b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:38:30 +0300 Subject: [PATCH 056/279] Add codification API to tenant --- plugins/tenant/common/lib/nokul/tenant.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/tenant/common/lib/nokul/tenant.rb b/plugins/tenant/common/lib/nokul/tenant.rb index e82d1bcc5..ebef36b2b 100644 --- a/plugins/tenant/common/lib/nokul/tenant.rb +++ b/plugins/tenant/common/lib/nokul/tenant.rb @@ -5,6 +5,7 @@ require_relative 'tenant/version' require_relative 'tenant/errors' require_relative 'tenant/units' +require_relative 'tenant/codification' require_relative 'tenant/api' require_relative 'tenant/engine' From 02d8a988ba1054707ce840a8b7a83fd485fb6428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:39:30 +0300 Subject: [PATCH 057/279] Adapt latest changes --- .../lib/nokul/tenant/units/coder/pool.rb | 12 ++++---- plugins/tenant/omu/db/units/config.yml | 28 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb index a6780e99c..9cf6d4522 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/coder/pool.rb @@ -6,8 +6,8 @@ module Units class Coder class Pool include Support::Structure.of %i[ - begins - ends + starting + ending owner weight pattern @@ -17,10 +17,10 @@ class Pool attr_reader :coder def after_initialize - post_process = Regexp.new(pattern) if pattern - @coder = Support::Codification.sequential_numeric_codes Range.new(begins.to_s, ends.to_s), - memory: Memory.instance, - post_process: post_process + @coder = Codification::Unit.code_generator(starting: starting, + ending: ending, + pattern: pattern, + memory: Memory.instance) end def score_of(unit) diff --git a/plugins/tenant/omu/db/units/config.yml b/plugins/tenant/omu/db/units/config.yml index 338fefea0..5370922e2 100644 --- a/plugins/tenant/omu/db/units/config.yml +++ b/plugins/tenant/omu/db/units/config.yml @@ -9,37 +9,37 @@ coding: pools: - owner: distance_education_program # skip '000-009' - begins: '010' - ends: '099' + starting: '010' + ending: '099' weight: 600 - owner: undergraduate_program - begins: '100' - ends: '199' + starting: '100' + ending: '199' weight: 500 reserved: true - owner: undergraduate_program # skip '200' - begins: '201' - ends: '599' + starting: '201' + ending: '599' weight: 500 - owner: graduate_program # skip '600' - begins: '601' - ends: '999' + starting: '601' + ending: '999' weight: 400 - owner: academic - begins: 'A00' - ends: 'FF0' + starting: 'A00' + ending: 'FF0' weight: 300 - owner: administrative - begins: 'G00' - ends: 'HZZ' + starting: 'G00' + ending: 'HZZ' weight: 200 # skip problematic characters pattern: '^[^ILOQWX]+$' - owner: special - begins: 'Z00' - ends: 'ZZZ' + starting: 'Z00' + ending: 'ZZZ' weight: 100 # skip problematic characters pattern: '^[^ILOQWX]+$' From 168db80cb07c3e622231749216d3ca405f87254d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:42:16 +0300 Subject: [PATCH 058/279] Diverge from defaults at Layout/AlignHash --- plugins/tenant/common/.rubocop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/tenant/common/.rubocop.yml b/plugins/tenant/common/.rubocop.yml index c719fbf3c..51d00d6fc 100644 --- a/plugins/tenant/common/.rubocop.yml +++ b/plugins/tenant/common/.rubocop.yml @@ -1,3 +1,4 @@ +--- Style/AsciiComments: Enabled: false Style/Lambda: @@ -6,6 +7,9 @@ Documentation: Enabled: false Metrics/LineLength: Max: 120 +Layout/AlignHash: + EnforcedHashRocketStyle: table + EnforcedColonStyle: table Naming/FileName: Exclude: - lib/nokul-tenant.rb From 96250cce10626c1f0b70593e029e146bee0c2cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 03:42:25 +0300 Subject: [PATCH 059/279] Rubocop fixes --- .../tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb | 2 +- .../tenant/common/lib/nokul/tenant/units/concerns/src_one.rb | 4 ++-- plugins/tenant/common/lib/nokul/tenant/units/raw/yok_many.rb | 3 --- plugins/tenant/common/lib/nokul/xokul.rb | 4 ++-- plugins/tenant/common/nokul-tenant.gemspec | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb index bcde78be9..8fc23c3b4 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/concerns/raw_many.rb @@ -43,7 +43,7 @@ def raw_to_unit_hash(raw) module Refinery FIX_AFTER_CAPITALIZE = { 'Hast.' => 'Hastalıkları', - 'Pr.' => 'Programı', + 'Pr.' => 'Programı', 'Üniv.' => 'Üniversitesi' }.freeze diff --git a/plugins/tenant/common/lib/nokul/tenant/units/concerns/src_one.rb b/plugins/tenant/common/lib/nokul/tenant/units/concerns/src_one.rb index 93ba8bea9..dfdb99e49 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/concerns/src_one.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/concerns/src_one.rb @@ -54,9 +54,9 @@ def parent_id end ANSI_COLOR_CODE = { - cyan: 14, + cyan: 14, orange: 214, - red: 197, + red: 197, yellow: 11 }.freeze diff --git a/plugins/tenant/common/lib/nokul/tenant/units/raw/yok_many.rb b/plugins/tenant/common/lib/nokul/tenant/units/raw/yok_many.rb index 4dd1207b9..df59a204f 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/raw/yok_many.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/raw/yok_many.rb @@ -14,8 +14,6 @@ class YOKMany < Support::UniqCollection collection.label = 'YÖKSİS ham birimler' collection.collects = YOKOne collection.produces = Src::YOKMany - - # rubocop:disable Layout/AlignHash class_attribute :mapping, default: { name: proc { |raw| raw.long_name.split('/').last&.capitalize_and_fix }, @@ -30,7 +28,6 @@ class YOKMany < Support::UniqCollection unit_instruction_type_id: proc { |raw| raw.instruction_type_name&.capitalize_and_fix }, duration: proc { |raw| raw.period_of_study } }.freeze - # rubocop:enable Layout/AlignHash END_POINT = 'https://api.omu.sh/yoksis/units/%s' diff --git a/plugins/tenant/common/lib/nokul/xokul.rb b/plugins/tenant/common/lib/nokul/xokul.rb index 7c03c64e7..a83ff3612 100644 --- a/plugins/tenant/common/lib/nokul/xokul.rb +++ b/plugins/tenant/common/lib/nokul/xokul.rb @@ -12,9 +12,9 @@ module Xokul def request(endpoint, params = {}) response = Support::RestClient.get( endpoint, - header: { + header: { 'Authorization': "Bearer #{BEARER_TOKEN}", - 'Content-Type': 'application/json' + 'Content-Type': 'application/json' }, payload: params.to_json, use_ssl: true diff --git a/plugins/tenant/common/nokul-tenant.gemspec b/plugins/tenant/common/nokul-tenant.gemspec index d119834eb..5588400cd 100644 --- a/plugins/tenant/common/nokul-tenant.gemspec +++ b/plugins/tenant/common/nokul-tenant.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.homepage = 'https://nokul.omu.sh' spec.metadata = { 'source_code_uri' => 'https://github.com/omu/nokul/tree/master/plugins/tenant/common', - 'changelog_uri' => 'https://github.com/omu/nokul/tree/master/plugins/tenant/common/CHANGELOG.md' + 'changelog_uri' => 'https://github.com/omu/nokul/tree/master/plugins/tenant/common/CHANGELOG.md' } spec.add_dependency 'nokul-support' From 63b7b02451cd0b3f571eee072e85e1e0e94c93d4 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 09:33:30 +0300 Subject: [PATCH 060/279] Add activation fields to user --- .../20190325051222_add_activated_to_user.rb | 10 + db/structure.sql | 523 +++++++++--------- 2 files changed, 280 insertions(+), 253 deletions(-) create mode 100644 db/migrate/20190325051222_add_activated_to_user.rb diff --git a/db/migrate/20190325051222_add_activated_to_user.rb b/db/migrate/20190325051222_add_activated_to_user.rb new file mode 100644 index 000000000..dd612b34f --- /dev/null +++ b/db/migrate/20190325051222_add_activated_to_user.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddActivatedToUser < ActiveRecord::Migration[6.0] + def change + add_column :users, :activated, :boolean, default: false + add_column :users, :activated_at, :datetime + + add_null_constraint :users, :activated + end +end diff --git a/db/structure.sql b/db/structure.sql index 85aefcbb5..c340076ab 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1,6 +1,5 @@ SET statement_timeout = 0; SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); @@ -8,6 +7,20 @@ SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + + SET default_tablespace = ''; SET default_with_oids = false; @@ -171,8 +184,8 @@ CREATE TABLE public.addresses ( full_address character varying, district_id bigint NOT NULL, user_id bigint NOT NULL, - updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, - created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, + updated_at timestamp without time zone DEFAULT now(), + created_at timestamp without time zone DEFAULT now(), CONSTRAINT addresses_created_at_null CHECK ((created_at IS NOT NULL)), CONSTRAINT addresses_full_address_length CHECK ((length((full_address)::text) <= 255)), CONSTRAINT addresses_full_address_presence CHECK (((full_address IS NOT NULL) AND ((full_address)::text !~ '^\s*$'::text))), @@ -1669,8 +1682,8 @@ CREATE TABLE public.identities ( registered_to character varying, user_id bigint NOT NULL, student_id bigint, - created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, - updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, + created_at timestamp without time zone DEFAULT now(), + updated_at timestamp without time zone DEFAULT now(), CONSTRAINT identities_created_at_null CHECK ((created_at IS NOT NULL)), CONSTRAINT identities_date_of_birth_null CHECK ((date_of_birth IS NOT NULL)), CONSTRAINT identities_fathers_name_length CHECK ((length((fathers_name)::text) <= 255)), @@ -2685,7 +2698,7 @@ CREATE TABLE public.users ( last_sign_in_at timestamp without time zone, current_sign_in_ip inet, last_sign_in_ip inet, - password_changed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, + password_changed_at timestamp without time zone DEFAULT now(), failed_attempts integer DEFAULT 0, unlock_token character varying, locked_at timestamp without time zone, @@ -2696,6 +2709,9 @@ CREATE TABLE public.users ( profile_preferences jsonb, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, + activated boolean DEFAULT false, + activated_at timestamp without time zone, + CONSTRAINT users_activated_null CHECK ((activated IS NOT NULL)), CONSTRAINT users_articles_count_null CHECK ((articles_count IS NOT NULL)), CONSTRAINT users_articles_count_numericality CHECK ((articles_count >= 0)), CONSTRAINT users_created_at_null CHECK ((created_at IS NOT NULL)), @@ -2739,476 +2755,476 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; -- --- Name: academic_terms id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.academic_terms ALTER COLUMN id SET DEFAULT nextval('public.academic_terms_id_seq'::regclass); -- --- Name: action_text_rich_texts id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.action_text_rich_texts ALTER COLUMN id SET DEFAULT nextval('public.action_text_rich_texts_id_seq'::regclass); -- --- Name: active_storage_attachments id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('public.active_storage_attachments_id_seq'::regclass); -- --- Name: active_storage_blobs id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass); -- --- Name: addresses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses ALTER COLUMN id SET DEFAULT nextval('public.addresses_id_seq'::regclass); -- --- Name: administrative_functions id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions ALTER COLUMN id SET DEFAULT nextval('public.administrative_functions_id_seq'::regclass); -- --- Name: agenda_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agenda_types ALTER COLUMN id SET DEFAULT nextval('public.agenda_types_id_seq'::regclass); -- --- Name: agendas id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas ALTER COLUMN id SET DEFAULT nextval('public.agendas_id_seq'::regclass); -- --- Name: articles id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles ALTER COLUMN id SET DEFAULT nextval('public.articles_id_seq'::regclass); -- --- Name: assessment_methods id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods ALTER COLUMN id SET DEFAULT nextval('public.assessment_methods_id_seq'::regclass); -- --- Name: available_course_groups id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups ALTER COLUMN id SET DEFAULT nextval('public.available_course_groups_id_seq'::regclass); -- --- Name: available_course_lecturers id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers ALTER COLUMN id SET DEFAULT nextval('public.available_course_lecturers_id_seq'::regclass); -- --- Name: available_courses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses ALTER COLUMN id SET DEFAULT nextval('public.available_courses_id_seq'::regclass); -- --- Name: calendar_committee_decisions id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions ALTER COLUMN id SET DEFAULT nextval('public.calendar_committee_decisions_id_seq'::regclass); -- --- Name: calendar_event_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types ALTER COLUMN id SET DEFAULT nextval('public.calendar_event_types_id_seq'::regclass); -- --- Name: calendar_events id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events ALTER COLUMN id SET DEFAULT nextval('public.calendar_events_id_seq'::regclass); -- --- Name: calendars id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars ALTER COLUMN id SET DEFAULT nextval('public.calendars_id_seq'::regclass); -- --- Name: certifications id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications ALTER COLUMN id SET DEFAULT nextval('public.certifications_id_seq'::regclass); -- --- Name: cities id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities ALTER COLUMN id SET DEFAULT nextval('public.cities_id_seq'::regclass); -- --- Name: committee_decisions id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions ALTER COLUMN id SET DEFAULT nextval('public.committee_decisions_id_seq'::regclass); -- --- Name: committee_meetings id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings ALTER COLUMN id SET DEFAULT nextval('public.committee_meetings_id_seq'::regclass); -- --- Name: countries id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries ALTER COLUMN id SET DEFAULT nextval('public.countries_id_seq'::regclass); -- --- Name: course_assessment_methods id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods ALTER COLUMN id SET DEFAULT nextval('public.course_assessment_methods_id_seq'::regclass); -- --- Name: course_evaluation_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types ALTER COLUMN id SET DEFAULT nextval('public.course_evaluation_types_id_seq'::regclass); -- --- Name: course_group_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_group_types ALTER COLUMN id SET DEFAULT nextval('public.course_group_types_id_seq'::regclass); -- --- Name: course_groups id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups ALTER COLUMN id SET DEFAULT nextval('public.course_groups_id_seq'::regclass); -- --- Name: course_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_types ALTER COLUMN id SET DEFAULT nextval('public.course_types_id_seq'::regclass); -- --- Name: courses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses ALTER COLUMN id SET DEFAULT nextval('public.courses_id_seq'::regclass); -- --- Name: curriculum_course_groups id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups ALTER COLUMN id SET DEFAULT nextval('public.curriculum_course_groups_id_seq'::regclass); -- --- Name: curriculum_courses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses ALTER COLUMN id SET DEFAULT nextval('public.curriculum_courses_id_seq'::regclass); -- --- Name: curriculum_programs id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs ALTER COLUMN id SET DEFAULT nextval('public.curriculum_programs_id_seq'::regclass); -- --- Name: curriculum_semesters id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters ALTER COLUMN id SET DEFAULT nextval('public.curriculum_semesters_id_seq'::regclass); -- --- Name: curriculums id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums ALTER COLUMN id SET DEFAULT nextval('public.curriculums_id_seq'::regclass); -- --- Name: districts id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts ALTER COLUMN id SET DEFAULT nextval('public.districts_id_seq'::regclass); -- --- Name: document_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.document_types ALTER COLUMN id SET DEFAULT nextval('public.document_types_id_seq'::regclass); -- --- Name: duties id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties ALTER COLUMN id SET DEFAULT nextval('public.duties_id_seq'::regclass); -- --- Name: employees id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees ALTER COLUMN id SET DEFAULT nextval('public.employees_id_seq'::regclass); -- --- Name: evaluation_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types ALTER COLUMN id SET DEFAULT nextval('public.evaluation_types_id_seq'::regclass); -- --- Name: friendly_id_slugs id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendly_id_slugs ALTER COLUMN id SET DEFAULT nextval('public.friendly_id_slugs_id_seq'::regclass); -- --- Name: group_courses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses ALTER COLUMN id SET DEFAULT nextval('public.group_courses_id_seq'::regclass); -- --- Name: high_school_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.high_school_types ALTER COLUMN id SET DEFAULT nextval('public.high_school_types_id_seq'::regclass); -- --- Name: identities id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities ALTER COLUMN id SET DEFAULT nextval('public.identities_id_seq'::regclass); -- --- Name: languages id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages ALTER COLUMN id SET DEFAULT nextval('public.languages_id_seq'::regclass); -- --- Name: meeting_agendas id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas ALTER COLUMN id SET DEFAULT nextval('public.meeting_agendas_id_seq'::regclass); -- --- Name: positions id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions ALTER COLUMN id SET DEFAULT nextval('public.positions_id_seq'::regclass); -- --- Name: projects id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.projects_id_seq'::regclass); -- --- Name: prospective_students id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students ALTER COLUMN id SET DEFAULT nextval('public.prospective_students_id_seq'::regclass); -- --- Name: registration_documents id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents ALTER COLUMN id SET DEFAULT nextval('public.registration_documents_id_seq'::regclass); -- --- Name: student_disability_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types ALTER COLUMN id SET DEFAULT nextval('public.student_disability_types_id_seq'::regclass); -- --- Name: student_drop_out_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types ALTER COLUMN id SET DEFAULT nextval('public.student_drop_out_types_id_seq'::regclass); -- --- Name: student_education_levels id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels ALTER COLUMN id SET DEFAULT nextval('public.student_education_levels_id_seq'::regclass); -- --- Name: student_entrance_point_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types ALTER COLUMN id SET DEFAULT nextval('public.student_entrance_point_types_id_seq'::regclass); -- --- Name: student_entrance_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types ALTER COLUMN id SET DEFAULT nextval('public.student_entrance_types_id_seq'::regclass); -- --- Name: student_grades id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades ALTER COLUMN id SET DEFAULT nextval('public.student_grades_id_seq'::regclass); -- --- Name: student_grading_systems id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems ALTER COLUMN id SET DEFAULT nextval('public.student_grading_systems_id_seq'::regclass); -- --- Name: student_punishment_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types ALTER COLUMN id SET DEFAULT nextval('public.student_punishment_types_id_seq'::regclass); -- --- Name: student_studentship_statuses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses ALTER COLUMN id SET DEFAULT nextval('public.student_studentship_statuses_id_seq'::regclass); -- --- Name: students id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students ALTER COLUMN id SET DEFAULT nextval('public.students_id_seq'::regclass); -- --- Name: titles id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.titles ALTER COLUMN id SET DEFAULT nextval('public.titles_id_seq'::regclass); -- --- Name: unit_calendars id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars ALTER COLUMN id SET DEFAULT nextval('public.unit_calendars_id_seq'::regclass); -- --- Name: unit_instruction_languages id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages ALTER COLUMN id SET DEFAULT nextval('public.unit_instruction_languages_id_seq'::regclass); -- --- Name: unit_instruction_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types ALTER COLUMN id SET DEFAULT nextval('public.unit_instruction_types_id_seq'::regclass); -- --- Name: unit_statuses id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses ALTER COLUMN id SET DEFAULT nextval('public.unit_statuses_id_seq'::regclass); -- --- Name: unit_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types ALTER COLUMN id SET DEFAULT nextval('public.unit_types_id_seq'::regclass); -- --- Name: units id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units ALTER COLUMN id SET DEFAULT nextval('public.units_id_seq'::regclass); -- --- Name: university_types id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.university_types ALTER COLUMN id SET DEFAULT nextval('public.university_types_id_seq'::regclass); -- --- Name: users id; Type: DEFAULT; Schema: public; Owner: - +-- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); -- --- Name: academic_terms academic_terms_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: academic_terms_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.academic_terms @@ -3216,7 +3232,7 @@ ALTER TABLE ONLY public.academic_terms -- --- Name: action_text_rich_texts action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.action_text_rich_texts @@ -3224,7 +3240,7 @@ ALTER TABLE ONLY public.action_text_rich_texts -- --- Name: active_storage_attachments active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_attachments @@ -3232,7 +3248,7 @@ ALTER TABLE ONLY public.active_storage_attachments -- --- Name: active_storage_blobs active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_blobs @@ -3240,7 +3256,7 @@ ALTER TABLE ONLY public.active_storage_blobs -- --- Name: addresses addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -3248,7 +3264,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: administrative_functions administrative_functions_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3256,7 +3272,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: administrative_functions administrative_functions_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3264,7 +3280,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: administrative_functions administrative_functions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3272,7 +3288,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: agenda_types agenda_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: agenda_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agenda_types @@ -3280,7 +3296,7 @@ ALTER TABLE ONLY public.agenda_types -- --- Name: agendas agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -3288,7 +3304,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.ar_internal_metadata @@ -3296,7 +3312,7 @@ ALTER TABLE ONLY public.ar_internal_metadata -- --- Name: articles articles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: articles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles @@ -3304,7 +3320,7 @@ ALTER TABLE ONLY public.articles -- --- Name: assessment_methods assessment_methods_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: assessment_methods_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods @@ -3312,7 +3328,7 @@ ALTER TABLE ONLY public.assessment_methods -- --- Name: assessment_methods assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods @@ -3320,7 +3336,7 @@ ALTER TABLE ONLY public.assessment_methods -- --- Name: available_course_groups available_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups @@ -3328,7 +3344,7 @@ ALTER TABLE ONLY public.available_course_groups -- --- Name: available_course_lecturers available_course_lecturers_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_lecturers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -3336,7 +3352,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: available_courses available_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -3344,7 +3360,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: calendar_committee_decisions calendar_committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -3352,7 +3368,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: calendar_event_types calendar_event_types_identifier_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types_identifier_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3360,7 +3376,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_event_types calendar_event_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3368,7 +3384,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_event_types calendar_event_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3376,7 +3392,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_events calendar_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -3384,7 +3400,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: calendars calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars @@ -3392,7 +3408,7 @@ ALTER TABLE ONLY public.calendars -- --- Name: certifications certifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: certifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications @@ -3400,7 +3416,7 @@ ALTER TABLE ONLY public.certifications -- --- Name: cities cities_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: cities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities @@ -3408,7 +3424,7 @@ ALTER TABLE ONLY public.cities -- --- Name: committee_decisions committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions @@ -3416,7 +3432,7 @@ ALTER TABLE ONLY public.committee_decisions -- --- Name: committee_meetings committee_meetings_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: committee_meetings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings @@ -3424,7 +3440,7 @@ ALTER TABLE ONLY public.committee_meetings -- --- Name: countries countries_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: countries_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries @@ -3432,7 +3448,7 @@ ALTER TABLE ONLY public.countries -- --- Name: countries countries_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: countries_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries @@ -3440,7 +3456,7 @@ ALTER TABLE ONLY public.countries -- --- Name: course_assessment_methods course_assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -3448,7 +3464,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: course_evaluation_types course_evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -3456,7 +3472,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: course_group_types course_group_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_group_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_group_types @@ -3464,7 +3480,7 @@ ALTER TABLE ONLY public.course_group_types -- --- Name: course_groups course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -3472,7 +3488,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: course_types course_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_types @@ -3480,7 +3496,7 @@ ALTER TABLE ONLY public.course_types -- --- Name: courses courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -3488,7 +3504,7 @@ ALTER TABLE ONLY public.courses -- --- Name: curriculum_course_groups curriculum_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -3496,7 +3512,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: curriculum_courses curriculum_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -3504,7 +3520,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: curriculum_programs curriculum_programs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_programs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -3512,7 +3528,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: curriculum_semesters curriculum_semesters_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_semesters_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters @@ -3520,7 +3536,7 @@ ALTER TABLE ONLY public.curriculum_semesters -- --- Name: curriculums curriculums_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculums_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums @@ -3528,7 +3544,7 @@ ALTER TABLE ONLY public.curriculums -- --- Name: districts districts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: districts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts @@ -3536,7 +3552,7 @@ ALTER TABLE ONLY public.districts -- --- Name: document_types document_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: document_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.document_types @@ -3544,7 +3560,7 @@ ALTER TABLE ONLY public.document_types -- --- Name: duties duties_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: duties_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -3552,7 +3568,7 @@ ALTER TABLE ONLY public.duties -- --- Name: employees employees_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: employees_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -3560,7 +3576,7 @@ ALTER TABLE ONLY public.employees -- --- Name: evaluation_types evaluation_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: evaluation_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types @@ -3568,7 +3584,7 @@ ALTER TABLE ONLY public.evaluation_types -- --- Name: evaluation_types evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types @@ -3576,7 +3592,7 @@ ALTER TABLE ONLY public.evaluation_types -- --- Name: friendly_id_slugs friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendly_id_slugs @@ -3584,7 +3600,7 @@ ALTER TABLE ONLY public.friendly_id_slugs -- --- Name: group_courses group_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -3592,7 +3608,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: high_school_types high_school_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: high_school_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.high_school_types @@ -3600,7 +3616,7 @@ ALTER TABLE ONLY public.high_school_types -- --- Name: identities identities_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: identities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -3608,7 +3624,7 @@ ALTER TABLE ONLY public.identities -- --- Name: languages languages_iso_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages_iso_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3616,7 +3632,7 @@ ALTER TABLE ONLY public.languages -- --- Name: languages languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3624,7 +3640,7 @@ ALTER TABLE ONLY public.languages -- --- Name: languages languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3632,7 +3648,7 @@ ALTER TABLE ONLY public.languages -- --- Name: meeting_agendas meeting_agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: meeting_agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -3640,7 +3656,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: positions positions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: positions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -3648,7 +3664,7 @@ ALTER TABLE ONLY public.positions -- --- Name: projects projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects @@ -3656,7 +3672,7 @@ ALTER TABLE ONLY public.projects -- --- Name: prospective_students prospective_students_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -3664,7 +3680,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: registration_documents registration_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: registration_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -3672,7 +3688,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.schema_migrations @@ -3680,7 +3696,7 @@ ALTER TABLE ONLY public.schema_migrations -- --- Name: student_disability_types student_disability_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3688,7 +3704,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_disability_types student_disability_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3696,7 +3712,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_disability_types student_disability_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3704,7 +3720,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_drop_out_types student_drop_out_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3712,7 +3728,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_drop_out_types student_drop_out_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3720,7 +3736,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_drop_out_types student_drop_out_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3728,7 +3744,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_education_levels student_education_levels_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3736,7 +3752,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_education_levels student_education_levels_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3744,7 +3760,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_education_levels student_education_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3752,7 +3768,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_entrance_point_types student_entrance_point_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3760,7 +3776,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_point_types student_entrance_point_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3768,7 +3784,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_point_types student_entrance_point_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3776,7 +3792,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_types student_entrance_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3784,7 +3800,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_entrance_types student_entrance_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3792,7 +3808,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_entrance_types student_entrance_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3800,7 +3816,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_grades student_grades_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3808,7 +3824,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grades student_grades_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3816,7 +3832,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grades student_grades_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3824,7 +3840,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grading_systems student_grading_systems_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3832,7 +3848,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_grading_systems student_grading_systems_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3840,7 +3856,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_grading_systems student_grading_systems_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3848,7 +3864,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_punishment_types student_punishment_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3856,7 +3872,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_punishment_types student_punishment_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3864,7 +3880,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_punishment_types student_punishment_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3872,7 +3888,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_studentship_statuses student_studentship_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3880,7 +3896,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: student_studentship_statuses student_studentship_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3888,7 +3904,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: student_studentship_statuses student_studentship_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3896,7 +3912,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: students students_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: students_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -3904,7 +3920,7 @@ ALTER TABLE ONLY public.students -- --- Name: titles titles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: titles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.titles @@ -3912,7 +3928,7 @@ ALTER TABLE ONLY public.titles -- --- Name: unit_calendars unit_calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars @@ -3920,7 +3936,7 @@ ALTER TABLE ONLY public.unit_calendars -- --- Name: unit_instruction_languages unit_instruction_languages_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3928,7 +3944,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_languages unit_instruction_languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3936,7 +3952,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_languages unit_instruction_languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3944,7 +3960,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_types unit_instruction_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3952,7 +3968,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_instruction_types unit_instruction_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3960,7 +3976,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_instruction_types unit_instruction_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3968,7 +3984,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_statuses unit_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -3976,7 +3992,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_statuses unit_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -3984,7 +4000,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_statuses unit_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -3992,7 +4008,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_types unit_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4000,7 +4016,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: unit_types unit_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4008,7 +4024,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: unit_types unit_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4016,7 +4032,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: units units_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: units_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4024,7 +4040,7 @@ ALTER TABLE ONLY public.units -- --- Name: university_types university_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: university_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.university_types @@ -4032,7 +4048,7 @@ ALTER TABLE ONLY public.university_types -- --- Name: users users_email_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users_email_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4040,7 +4056,7 @@ ALTER TABLE ONLY public.users -- --- Name: users users_id_number_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users_id_number_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4048,7 +4064,7 @@ ALTER TABLE ONLY public.users -- --- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4644,7 +4660,7 @@ CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING bt -- --- Name: calendar_events fk_rails_0011c39cc3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_0011c39cc3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -4652,7 +4668,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: calendars fk_rails_02803298e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_02803298e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars @@ -4660,7 +4676,7 @@ ALTER TABLE ONLY public.calendars -- --- Name: courses fk_rails_051656b790; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_051656b790; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -4668,7 +4684,7 @@ ALTER TABLE ONLY public.courses -- --- Name: meeting_agendas fk_rails_05369f2b5b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_05369f2b5b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -4676,7 +4692,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: curriculum_courses fk_rails_085e487ff3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_085e487ff3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -4684,7 +4700,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: agendas fk_rails_11f2fa1aba; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_11f2fa1aba; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -4692,7 +4708,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: students fk_rails_148c9e88f4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_148c9e88f4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -4700,7 +4716,7 @@ ALTER TABLE ONLY public.students -- --- Name: duties fk_rails_1b35a03564; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_1b35a03564; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -4708,7 +4724,7 @@ ALTER TABLE ONLY public.duties -- --- Name: addresses fk_rails_1b98d66e19; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_1b98d66e19; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -4716,7 +4732,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: registration_documents fk_rails_2f3d74d701; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_2f3d74d701; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -4724,7 +4740,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: students fk_rails_3154ddd827; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3154ddd827; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -4732,7 +4748,7 @@ ALTER TABLE ONLY public.students -- --- Name: curriculum_semesters fk_rails_32e14f7893; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_32e14f7893; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters @@ -4740,7 +4756,7 @@ ALTER TABLE ONLY public.curriculum_semesters -- --- Name: curriculum_programs fk_rails_33195b0adb; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_33195b0adb; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -4748,7 +4764,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: course_assessment_methods fk_rails_3351011c48; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3351011c48; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -4756,7 +4772,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: available_courses fk_rails_356137da91; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_356137da91; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -4764,7 +4780,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: group_courses fk_rails_3b3edaa11b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3b3edaa11b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -4772,7 +4788,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: curriculums fk_rails_3befe032e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3befe032e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums @@ -4780,7 +4796,7 @@ ALTER TABLE ONLY public.curriculums -- --- Name: articles fk_rails_3d31dad1cc; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3d31dad1cc; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles @@ -4788,7 +4804,7 @@ ALTER TABLE ONLY public.articles -- --- Name: duties fk_rails_3f1a2d48dd; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_3f1a2d48dd; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -4796,7 +4812,7 @@ ALTER TABLE ONLY public.duties -- --- Name: course_groups fk_rails_40d03200ff; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_40d03200ff; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -4804,7 +4820,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: units fk_rails_410eb899ca; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_410eb899ca; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4812,7 +4828,7 @@ ALTER TABLE ONLY public.units -- --- Name: employees fk_rails_4126944f82; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_4126944f82; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -4820,7 +4836,7 @@ ALTER TABLE ONLY public.employees -- --- Name: curriculum_courses fk_rails_4181a1584a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_4181a1584a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -4828,7 +4844,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: committee_decisions fk_rails_44d9592deb; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_44d9592deb; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions @@ -4836,7 +4852,7 @@ ALTER TABLE ONLY public.committee_decisions -- --- Name: available_courses fk_rails_4783d78ac5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_4783d78ac5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -4844,7 +4860,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: unit_calendars fk_rails_47a7d8ee6a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_47a7d8ee6a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars @@ -4852,7 +4868,7 @@ ALTER TABLE ONLY public.unit_calendars -- --- Name: addresses fk_rails_48c9e0c5a2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_48c9e0c5a2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -4860,7 +4876,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: course_groups fk_rails_4af2ef6ebe; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_4af2ef6ebe; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -4868,7 +4884,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: calendar_committee_decisions fk_rails_4f3eb3da94; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_4f3eb3da94; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -4876,7 +4892,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: identities fk_rails_5373344100; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_5373344100; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -4884,7 +4900,7 @@ ALTER TABLE ONLY public.identities -- --- Name: prospective_students fk_rails_54b90f3e1c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_54b90f3e1c; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -4892,7 +4908,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: curriculum_programs fk_rails_5503b9bced; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_5503b9bced; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -4900,7 +4916,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: units fk_rails_5951990ba9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_5951990ba9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4908,7 +4924,7 @@ ALTER TABLE ONLY public.units -- --- Name: calendar_committee_decisions fk_rails_5d6264c4f2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_5d6264c4f2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -4916,7 +4932,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: calendar_events fk_rails_64d7b22524; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_64d7b22524; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -4924,7 +4940,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: meeting_agendas fk_rails_694b3fc610; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_694b3fc610; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -4932,7 +4948,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: group_courses fk_rails_728bb39a67; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_728bb39a67; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -4940,7 +4956,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: positions fk_rails_78999e7b17; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_78999e7b17; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -4948,7 +4964,7 @@ ALTER TABLE ONLY public.positions -- --- Name: units fk_rails_83a021318e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_83a021318e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4956,7 +4972,7 @@ ALTER TABLE ONLY public.units -- --- Name: identities fk_rails_8540afbff7; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_8540afbff7; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -4964,7 +4980,7 @@ ALTER TABLE ONLY public.identities -- --- Name: available_course_lecturers fk_rails_86397e28ff; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_86397e28ff; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -4972,7 +4988,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: curriculum_course_groups fk_rails_89bfbfdd76; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_89bfbfdd76; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -4980,7 +4996,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: units fk_rails_8ab0da65e4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_8ab0da65e4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4988,7 +5004,7 @@ ALTER TABLE ONLY public.units -- --- Name: positions fk_rails_8d264a5cbc; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_8d264a5cbc; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -4996,7 +5012,7 @@ ALTER TABLE ONLY public.positions -- --- Name: available_course_lecturers fk_rails_917e7d3603; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_917e7d3603; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -5004,7 +5020,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: districts fk_rails_92c48f7cf2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_92c48f7cf2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts @@ -5012,7 +5028,7 @@ ALTER TABLE ONLY public.districts -- --- Name: prospective_students fk_rails_93498b6370; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_93498b6370; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5020,7 +5036,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: cities fk_rails_996e05be41; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_996e05be41; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities @@ -5028,7 +5044,7 @@ ALTER TABLE ONLY public.cities -- --- Name: certifications fk_rails_99ad041748; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_99ad041748; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications @@ -5036,7 +5052,7 @@ ALTER TABLE ONLY public.certifications -- --- Name: prospective_students fk_rails_a6111d55a4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_a6111d55a4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5044,7 +5060,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: courses fk_rails_a72394c071; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_a72394c071; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -5052,7 +5068,7 @@ ALTER TABLE ONLY public.courses -- --- Name: registration_documents fk_rails_a7647dd384; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_a7647dd384; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -5060,7 +5076,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: available_courses fk_rails_a9099f01f5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_a9099f01f5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5068,7 +5084,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: prospective_students fk_rails_b1c146f76e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_b1c146f76e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5076,7 +5092,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: course_evaluation_types fk_rails_b25d062eb5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_b25d062eb5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -5084,7 +5100,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: projects fk_rails_b872a6760a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_b872a6760a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects @@ -5092,7 +5108,7 @@ ALTER TABLE ONLY public.projects -- --- Name: agendas fk_rails_b92b5eaf98; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_b92b5eaf98; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -5100,7 +5116,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: course_evaluation_types fk_rails_bb4be290e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_bb4be290e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -5108,7 +5124,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: available_courses fk_rails_c4a7c8b06e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_c4a7c8b06e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5116,7 +5132,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: courses fk_rails_cb5582d97e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_cb5582d97e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -5124,7 +5140,7 @@ ALTER TABLE ONLY public.courses -- --- Name: registration_documents fk_rails_cb709e42ad; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_cb709e42ad; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -5132,7 +5148,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: prospective_students fk_rails_d94afad69b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_d94afad69b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5140,7 +5156,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: units fk_rails_db99877142; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_db99877142; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -5148,7 +5164,7 @@ ALTER TABLE ONLY public.units -- --- Name: employees fk_rails_dcfd3d4fc3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_dcfd3d4fc3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -5156,7 +5172,7 @@ ALTER TABLE ONLY public.employees -- --- Name: curriculum_courses fk_rails_e756d4597e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_e756d4597e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -5164,7 +5180,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: units fk_rails_ea494f8318; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_ea494f8318; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -5172,7 +5188,7 @@ ALTER TABLE ONLY public.units -- --- Name: prospective_students fk_rails_ea9bbc92e2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_ea9bbc92e2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5180,7 +5196,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: available_course_groups fk_rails_edbeba9693; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_edbeba9693; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups @@ -5188,7 +5204,7 @@ ALTER TABLE ONLY public.available_course_groups -- --- Name: curriculum_course_groups fk_rails_f0035661f5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_f0035661f5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -5196,7 +5212,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: course_assessment_methods fk_rails_f2b5f80e2c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_f2b5f80e2c; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -5204,7 +5220,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: available_courses fk_rails_f75b60bc6a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_f75b60bc6a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5212,7 +5228,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: committee_meetings fk_rails_f85b219ea4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_f85b219ea4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings @@ -5220,7 +5236,7 @@ ALTER TABLE ONLY public.committee_meetings -- --- Name: unit_calendars fk_rails_faff5aa83d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: fk_rails_faff5aa83d; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars @@ -5305,6 +5321,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20190304052823'), ('20190321163816'), ('20190321213030'), -('20190321213059'); +('20190321213059'), +('20190325051222'); From 7b63c7501de38cee69d5509023cb9e5ebbe78213 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 09:51:26 +0300 Subject: [PATCH 061/279] Create activation service --- .../activatable/activation_service.rb | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 app/services/activatable/activation_service.rb diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb new file mode 100644 index 000000000..de485a236 --- /dev/null +++ b/app/services/activatable/activation_service.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +module Activatable + class ActivationService + include ActiveModel::Validations + + attr_accessor :id_number, :first_name, :last_name, :date_of_birth, + :serial, :serial_no, :document_no, :mobile_phone, + :prospective, :user, :country + + validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } + validates :first_name, presence: true + validates :last_name, presence: true + validates :date_of_birth, presence: true + validates :document_no, allow_blank: true, length: { is: 9 } + validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } + validate :must_be_prospective + validate :check_identity, if: :prospective? + + def initialize(attributes = {}) + attributes.each do |name, value| + send("#{name}=", value) + end + end + + # rubocop:disable Metrics/MethodLength + def verified_identity? + Xokul::Kps::Verification.id_card( + id_number: @id_number, + first_name: @first_name, + last_name: @last_name, + day_of_birth: Date.strptime(@date_of_birth).day, + month_of_birth: Date.strptime(@date_of_birth).month, + year_of_birth: Date.strptime(@date_of_birth).year, + serial: @serial, + number: @serial_no, + document_number: @document_no + ) + end + # rubocop:enable Metrics/MethodLength + + # TODO: prospective_employee için geliştirme yapılmalı. + def prospective? + ProspectiveStudent.not_archived.registered.find_by(id_number: @id_number).present? + end + + def must_be_prospective + return if errors.any? + + errors.add(:base, I18n.t('.account.activations.record_not_found')) unless prospective? + end + + def check_identity + if verified_identity? + find_prospective + else + return if errors.any? + + errors.add(:base, I18n.t('.account.activations.identity_not_verified')) + end + end + + # TODO: prospective_employee için geliştirme yapılmalı. + def find_prospective + @prospective = ProspectiveStudent.not_archived.registered.find_by(id_number: @id_number) + @user = User.find_by(id_number: @id_number) + end + end +end From 86807aa6248bef1a1ace5cb93bb9222c59d04780 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 09:55:21 +0300 Subject: [PATCH 062/279] Create activation controller and views --- app/assets/javascripts/guest.js | 5 + app/assets/stylesheets/guest.scss | 3 + .../account/activations_controller.rb | 28 ++++++ app/models/prospective_student.rb | 1 + app/views/account/activations/_js.html.erb | 45 +++++++++ app/views/account/activations/new.html.erb | 98 +++++++++++++++++++ app/views/account/sessions/new.html.erb | 18 +--- app/views/layouts/guest.html.erb | 2 +- .../controllers/account/activations.en.yml | 22 +++++ .../controllers/account/activations.tr.yml | 22 +++++ .../controllers/account/sessions.en.yml | 1 + .../controllers/account/sessions.tr.yml | 1 + config/routes/account.rb | 2 + 13 files changed, 234 insertions(+), 14 deletions(-) create mode 100644 app/controllers/account/activations_controller.rb create mode 100644 app/views/account/activations/_js.html.erb create mode 100644 app/views/account/activations/new.html.erb create mode 100644 config/locales/controllers/account/activations.en.yml create mode 100644 config/locales/controllers/account/activations.tr.yml diff --git a/app/assets/javascripts/guest.js b/app/assets/javascripts/guest.js index a3e26d110..f4ac1adf5 100644 --- a/app/assets/javascripts/guest.js +++ b/app/assets/javascripts/guest.js @@ -1,5 +1,10 @@ // Manifest file for guest template. +//= require rails-ujs +//= require coreui //= require jquery/dist/jquery.min //= require toastr/build/toastr.min //= require shared/toastr_config +//= require select2/dist/js/select2.min +//= require flatpickr/dist/flatpickr.min +//= require flatpickr/dist/l10n/tr diff --git a/app/assets/stylesheets/guest.scss b/app/assets/stylesheets/guest.scss index f20019c83..fb26d886f 100644 --- a/app/assets/stylesheets/guest.scss +++ b/app/assets/stylesheets/guest.scss @@ -5,4 +5,7 @@ *= require toastr/build/toastr.min *= require custom/guest_background *= require custom/guest_footer + *= require select2/dist/css/select2.min + *= require flatpickr/dist/flatpickr.min + *= require flatpickr/dist/themes/material_red */ diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb new file mode 100644 index 000000000..4002e5fe7 --- /dev/null +++ b/app/controllers/account/activations_controller.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Account + class ActivationsController < ApplicationController + before_action :check_user_login + skip_before_action :authenticate_user! + layout 'guest' + + def new + @activation = Activatable::ActivationService.new + end + + def update + @activation = Activatable::ActivationService.new(params[:activation]) + if @activation.valid? + @activation.prospective.update(archived: true) + @activation.user.update(activated: true, activated_at: Time.zone.now) + redirect_to login_path, notice: 'Hesabınız aktifleştirildi.' + else + render :new + end + end + + def check_user_login + redirect_to root_path if user_signed_in? + end + end +end diff --git a/app/models/prospective_student.rb b/app/models/prospective_student.rb index 5e8ad45ad..11a5c3f97 100644 --- a/app/models/prospective_student.rb +++ b/app/models/prospective_student.rb @@ -75,6 +75,7 @@ class ProspectiveStudent < ApplicationRecord # scopes scope :archived, -> { where(archived: true) } scope :not_archived, -> { where(archived: false) } + scope :registered, -> { where(registered: true) } # custom methods def can_permanently_register? diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb new file mode 100644 index 000000000..88820f413 --- /dev/null +++ b/app/views/account/activations/_js.html.erb @@ -0,0 +1,45 @@ + diff --git a/app/views/account/activations/new.html.erb b/app/views/account/activations/new.html.erb new file mode 100644 index 000000000..a4969138c --- /dev/null +++ b/app/views/account/activations/new.html.erb @@ -0,0 +1,98 @@ +
+
+
+

<%= t('.activation') %>

+

<%= t('.account_activation') %>

+ <%= simple_form_for(:activation, url: activation_path, html: { method: 'patch' }) do |f| %> + <%= f.error_notification %> + <% if @activation.errors.any? %> +
    + <% @activation.errors.full_messages.each do |message| %> +
  • + <%= message %> +
  • + <% end %> +
+ <% end %> +
+ <%= t('.identity_verification') %> +
+ +
+ <%= f.input :id_number, required: true, label: false, autofocus: true, wrapper: false, input_html: { class: @activation.errors[:id_number].any? ? 'is-invalid' : '' } %> +
+ <%= @activation.errors[:id_number].first %> +
+
+
+
+ +
+ <%= f.input :first_name, required: true, label: false, wrapper: false %> +
+
+
+ +
+ <%= f.input :last_name, required: true, label: false, wrapper: false %> +
+
+
+ +
+ <%= f.input :date_of_birth, as: :date_time_picker, required: true, label: false, wrapper: false %> +
+
+
+ +
+ <%= f.input :serial, required: false, label: false, wrapper: false %> + <%= t('.for_old_id_cards') %> +
+ +
+ <%= f.input :serial_no, required: false, label: false, wrapper: false %> + <%= t('.for_old_id_cards') %> +
+
+
+ +
+ <%= f.input :document_no, required: false, label: false, wrapper: false, input_html: { class: @activation.errors[:document_no].any? ? 'is-invalid' : '' } %> +
+ <%= @activation.errors[:document_no].first %> +
+
+
+
+
+ <%= t('.phone_verification') %> +
+ +
+ <%= f.input :mobile_phone, label: false, wrapper: false, input_html: { class: @activation.errors[:mobile_phone].any? ? 'is-invalid' : '' } %> + <%= number_to_phone(1_235_551_234, area_code: true) %> +
+
+
+ +
+ <%= f.input :country, collection: Country.all, value_method: :alpha_2_code, label: false, wrapper: false %> +
+
+
+
+ <%= f.button :submit, t('.verify'), class: 'btn btn-block btn-success' %> + <% end %> +
+ +
+
+ +<%= render 'js' %> diff --git a/app/views/account/sessions/new.html.erb b/app/views/account/sessions/new.html.erb index 98f7dabfc..dafe926c5 100644 --- a/app/views/account/sessions/new.html.erb +++ b/app/views/account/sessions/new.html.erb @@ -1,4 +1,4 @@ -
+
@@ -26,24 +26,16 @@
-
+
<%= f.button :submit, t('.login'), class: 'btn btn-primary px-4' %>
-
- <%= link_to t('.did_you_forget'), recover_path, class: 'btn btn-link px-4', role: 'button' %> +
+ <%= link_to t('.account_activation'), activation_path %> + <%= link_to t('.did_you_forget'), recover_path %>
<% end %>
-
-
-
-

<%= t('.register') %>

-

<%= t('.registration_description') %>

- <%= link_to t('.create_account'), register_path, class: 'btn btn-primary active mt-3', role: 'button' %> -
-
-
diff --git a/app/views/layouts/guest.html.erb b/app/views/layouts/guest.html.erb index 492eec659..3af6088b4 100644 --- a/app/views/layouts/guest.html.erb +++ b/app/views/layouts/guest.html.erb @@ -3,6 +3,7 @@ <%= render 'layouts/shared/meta' %> <%= stylesheet_link_tag 'guest', media: 'all' %> + <%= javascript_include_tag 'guest' %>
@@ -12,7 +13,6 @@
- <%= javascript_include_tag 'guest' %> <%= render 'layouts/shared/toastr' %> <%= render 'layouts/shared/footer' %> diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml new file mode 100644 index 000000000..1cb2ca881 --- /dev/null +++ b/config/locales/controllers/account/activations.en.yml @@ -0,0 +1,22 @@ +en: + account: + activations: + identity_not_verified: Your identity not verified. Make sure that the data you entered is correct. + record_not_found: There is no record in the system to activate your account. + new: + activation: Activation + account_activation: Activate your account + country: Country + date_of_birth: Date of Birth + document_no: Document No + first_name: First Name + for_old_id_cards: For old identity cards + identity_verification: Identity Verification + id_number: Identity Number + last_name: Last Name + login: Login + mobile_phone: Mobile Phone + phone_verification: Phone Verification + serial: Serial + serial_no: Serial No + verify: Verify diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml new file mode 100644 index 000000000..c32c51638 --- /dev/null +++ b/config/locales/controllers/account/activations.tr.yml @@ -0,0 +1,22 @@ +tr: + account: + activations: + identity_not_verified: Kimlik bilgileriniz doğrulanamadı. Girmiş olduğunuz verilerin doğruluğundan emin olunuz. + record_not_found: Sistemde hesabınızı aktifleştirecek bir kayıt bulunamamıştır. + new: + activation: Aktivasyon + account_activation: Hesabınızı aktifleştirin + country: Ülke + date_of_birth: Doğum Tarihi + document_no: Doküman No + first_name: Ad + for_old_id_cards: Eski kimlik kartları için + identity_verification: Kimlik Doğrulama + id_number: TC/YU Numarası + last_name: Soyad + login: Giriş Yap + mobile_phone: Cep Telefonu + phone_verification: Telefon Doğrulama + serial: Seri + serial_no: Seri No + verify: Onayla diff --git a/config/locales/controllers/account/sessions.en.yml b/config/locales/controllers/account/sessions.en.yml index 178c34f27..bbb9452d6 100644 --- a/config/locales/controllers/account/sessions.en.yml +++ b/config/locales/controllers/account/sessions.en.yml @@ -7,6 +7,7 @@ en: account: sessions: new: + account_activation: Account Activation (First Registration) create_account: Create Account did_you_forget: Forgot your password? login: Login diff --git a/config/locales/controllers/account/sessions.tr.yml b/config/locales/controllers/account/sessions.tr.yml index 2f0b5dc66..d2d0a0dac 100644 --- a/config/locales/controllers/account/sessions.tr.yml +++ b/config/locales/controllers/account/sessions.tr.yml @@ -7,6 +7,7 @@ tr: account: sessions: new: + account_activation: Hesap Aktifleştirme (İlk Giriş) create_account: Hesap Oluştur did_you_forget: Parolanı mı Unuttun? login: Giriş Yap diff --git a/config/routes/account.rb b/config/routes/account.rb index d16d7e18c..9442b1a0c 100644 --- a/config/routes/account.rb +++ b/config/routes/account.rb @@ -16,6 +16,8 @@ end scope module: :account do + get 'activation', to: 'activations#new' + patch 'activation', to: 'activations#update' get '/profile', to: 'profile_settings#edit' patch '/profile', to: 'profile_settings#update' end From 2a7072a862f6e74afbf4bcfa8782689e8522d409 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 09:57:34 +0300 Subject: [PATCH 063/279] Do not archive when users are registered --- .../first_registration/prospective_students_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/first_registration/prospective_students_controller.rb b/app/controllers/first_registration/prospective_students_controller.rb index fb5a2717f..3f8eb55ba 100644 --- a/app/controllers/first_registration/prospective_students_controller.rb +++ b/app/controllers/first_registration/prospective_students_controller.rb @@ -40,7 +40,7 @@ def register prospective_student = FirstRegistration::ProspectiveStudentService.new(@prospective_student) if prospective_student.register - @prospective_student.update(registered: true, archived: true) + @prospective_student.update(registered: true) redirect_to(:prospective_students, notice: t('.success')) else redirect_to(:prospective_students, alert: t('.warning')) From 1450d9e1ef014015807a56cd4f9e5b2058ea04a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 10:03:26 +0300 Subject: [PATCH 064/279] Use consistent lingo --- .../codification/codes/sequential_numeric_codes.rb | 14 +++++++------- .../test/codification/random_numeric_codes_test.rb | 2 +- .../codification/sequential_numeric_codes_test.rb | 4 ++-- .../lib/nokul/tenant/codification/student.rb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index 9c3b4ccc0..af6e92b60 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -12,7 +12,7 @@ module Codification module SequentialNumericCodes class Code < Codification::Code def emit - [peek].map { |number| number.to_string(length, base) } + [peek].map { |number| number.to_string(net_length, base) } end protected @@ -23,7 +23,7 @@ def convert(source) source.is_a?(String) ? convert_from_string(source) : convert_from_range(source) end - attr_accessor :base, :length + attr_accessor :base, :net_length private @@ -38,20 +38,20 @@ def base_from_string(string) def convert_from_range(source) starting, ending = source.first, source.last # rubocop:disable Style/ParallelAssignment - self.base, self.length = base_and_length_from_sample(ending) + self.base, self.net_length = base_and_length_from_sample(ending) (starting.to_i(base)..ending.to_i(base)) end def convert_from_string(source) - base, length = base_and_length_from_sample(source) - convert_from_range(source..(base**length - 1).to_s) + base, net_length = base_and_length_from_sample(source) + convert_from_range(source..(base**net_length - 1).to_s) end def base_and_length_from_sample(sample) [ - options[:base] || base_from_string(sample), - options[:length] || sample.length + options[:base] || base_from_string(sample), + options[:net_length] || sample.length ] end end diff --git a/plugins/support/test/codification/random_numeric_codes_test.rb b/plugins/support/test/codification/random_numeric_codes_test.rb index 2a8ca4f7d..60e0af59b 100644 --- a/plugins/support/test/codification/random_numeric_codes_test.rb +++ b/plugins/support/test/codification/random_numeric_codes_test.rb @@ -35,7 +35,7 @@ class RandomNumericCodesTest < ActiveSupport::TestCase end test 'prefix and length options work' do - coder = Codification.random_numeric_codes '0'..'999', prefix: 'xyz-', length: 12 + coder = Codification.random_numeric_codes '0'..'999', prefix: 'xyz-', net_length: 12 assert_match(/^xyz-\d{12}$/, coder.run) end diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb index 2a70d7f5e..fd4239a9a 100644 --- a/plugins/support/test/codification/sequential_numeric_codes_test.rb +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -51,8 +51,8 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase assert_equal 'xyz-0002', coder.run end - test 'length options works' do - coder = Codification.sequential_numeric_codes '0001', prefix: 'xyz-', length: 12 + test 'net_length option works' do + coder = Codification.sequential_numeric_codes '0001', prefix: 'xyz-', net_length: 12 assert_equal 'xyz-000000000001', coder.run assert_equal 'xyz-000000000002', coder.run end diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/student.rb b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb index 1b62ce1c1..ea04c52dd 100644 --- a/plugins/tenant/common/lib/nokul/tenant/codification/student.rb +++ b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb @@ -19,7 +19,7 @@ def short_number_generator(unit_code:, year: nil, starting:) starting = Sanitized.starting(starting, *(prefix = [unit_code, year])) net_length = Sanitized.net_length(*prefix) - Support::Codification.sequential_numeric_codes starting, prefix: prefix, length: net_length, base: 10 + Support::Codification.sequential_numeric_codes starting, prefix: prefix, net_length: net_length, base: 10 end def long_number_generator(unit_code:, starting:) @@ -27,7 +27,7 @@ def long_number_generator(unit_code:, starting:) starting = Sanitized.starting(starting, *(prefix = [unit_code])) net_length = Sanitized.net_length(*prefix) - Support::Codification.sequential_numeric_codes starting, prefix: prefix, length: net_length, base: 10 + Support::Codification.sequential_numeric_codes starting, prefix: prefix, net_length: net_length, base: 10 end module Sanitized From d2b5caa2824fa9e0fc79cea90d9a843c380f5eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 10:06:03 +0300 Subject: [PATCH 065/279] Minor --- .../common/test/codification/student_test.rb | 14 +++++++------- .../tenant/common/test/codification/unit_test.rb | 8 ++++---- .../tenant/common/test/codification/user_test.rb | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/tenant/common/test/codification/student_test.rb b/plugins/tenant/common/test/codification/student_test.rb index 15a795e0e..6074351d3 100644 --- a/plugins/tenant/common/test/codification/student_test.rb +++ b/plugins/tenant/common/test/codification/student_test.rb @@ -6,31 +6,31 @@ module Nokul module Tenant module Codification class StudentTest < ActiveSupport::TestCase - test 'student_short_number_generator works' do + test 'short_number_generator works' do coder = Student.short_number_generator(unit_code: '203', year: '19', starting: '023') assert_equal '20319023', coder.run assert_equal '20319024', coder.run end - test 'student_short_number_generator unit_code sanitization works' do + test 'short_number_generator unit_code sanitization works' do assert_raise(ArgumentError) do Student.short_number_generator(unit_code: '20', year: '19', starting: '023') end end - test 'student_short_number_generator year sanitization works' do + test 'short_number_generator year sanitization works' do assert_raise(ArgumentError) do Student.short_number_generator(unit_code: '203', year: '2019', starting: '023') end end - test 'student_short_number_generator starting sanitization works' do + test 'short_number_generator starting sanitization works' do assert_raise(ArgumentError) do Student.short_number_generator(unit_code: '203', year: '19', starting: '23') end end - test 'student_short_number_generator can handle a blank or zero starting' do + test 'short_number_generator can handle a blank or zero starting' do coder = Student.short_number_generator(unit_code: '203', year: '19', starting: nil) assert_equal '20319001', coder.run @@ -38,13 +38,13 @@ class StudentTest < ActiveSupport::TestCase assert_equal '20319001', coder.run end - test 'student_long_number_generator works' do + test 'long_number_generator works' do coder = Student.long_number_generator(unit_code: '203', starting: '00023') assert_equal '20300023', coder.run assert_equal '20300024', coder.run end - test 'student_long_number_generator starting sanitization works' do + test 'long_number_generator starting sanitization works' do assert_raise(ArgumentError) do Student.long_number_generator(unit_code: '203', starting: '023') end diff --git a/plugins/tenant/common/test/codification/unit_test.rb b/plugins/tenant/common/test/codification/unit_test.rb index f4ca8c92b..a34b77a1f 100644 --- a/plugins/tenant/common/test/codification/unit_test.rb +++ b/plugins/tenant/common/test/codification/unit_test.rb @@ -6,7 +6,7 @@ module Nokul module Tenant module Codification class UnitTest < ActiveSupport::TestCase - test 'unit_code_generator works' do + test 'code_generator works' do coder = Unit.code_generator(starting: '023', ending: '025', memory: nil) assert_equal '023', coder.run assert_equal '024', coder.run @@ -15,7 +15,7 @@ class UnitTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end - test 'unit_code_generator works as hexadecimal sequences automagically' do + test 'code_generator works as hexadecimal sequences automagically' do coder = Unit.code_generator(starting: '009', ending: '00C', memory: nil) assert_equal '009', coder.run assert_equal '00A', coder.run @@ -25,7 +25,7 @@ class UnitTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end - test 'unit_code_generator works as alphabetical sequences automagically' do + test 'code_generator works as alphabetical sequences automagically' do coder = Unit.code_generator(starting: '009', ending: '00H', memory: nil) assert_equal '009', coder.run assert_equal '00A', coder.run @@ -40,7 +40,7 @@ class UnitTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end - test 'unit_code_generator works with patterns' do + test 'code_generator works with patterns' do coder = Unit.code_generator(starting: '001', ending: '009', pattern: '^[^3-7]+$', memory: nil) assert_equal '001', coder.run assert_equal '002', coder.run diff --git a/plugins/tenant/common/test/codification/user_test.rb b/plugins/tenant/common/test/codification/user_test.rb index 37d58adad..d9e5bec62 100644 --- a/plugins/tenant/common/test/codification/user_test.rb +++ b/plugins/tenant/common/test/codification/user_test.rb @@ -6,7 +6,7 @@ module Nokul module Tenant module Codification class UserTest < ActiveSupport::TestCase - test 'user_name_generate works' do + test 'name_generate works' do user_name = User.name_generate(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: Support::Codification::SimpleMemory.new) @@ -16,7 +16,7 @@ class UserTest < ActiveSupport::TestCase assert_match(/^mkataturk#{sep}\d{#{len}}$/, user_name) end - test 'user_name_suggest works' do + test 'name_suggest works' do actual = User.name_suggest(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: Support::Codification::SimpleMemory.new) From 38f6588ded6dd4999e6ef6cc7cf986d3e98a94c0 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 10:18:38 +0300 Subject: [PATCH 066/279] Fix system test error --- config/locales/controllers/account/sessions.en.yml | 1 - config/locales/controllers/account/sessions.tr.yml | 1 - test/system/login_page_flow_test.rb | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config/locales/controllers/account/sessions.en.yml b/config/locales/controllers/account/sessions.en.yml index bbb9452d6..5cd21efc2 100644 --- a/config/locales/controllers/account/sessions.en.yml +++ b/config/locales/controllers/account/sessions.en.yml @@ -8,7 +8,6 @@ en: sessions: new: account_activation: Account Activation (First Registration) - create_account: Create Account did_you_forget: Forgot your password? login: Login login_to_your_account: Login to your account diff --git a/config/locales/controllers/account/sessions.tr.yml b/config/locales/controllers/account/sessions.tr.yml index d2d0a0dac..4b40111d5 100644 --- a/config/locales/controllers/account/sessions.tr.yml +++ b/config/locales/controllers/account/sessions.tr.yml @@ -8,7 +8,6 @@ tr: sessions: new: account_activation: Hesap Aktifleştirme (İlk Giriş) - create_account: Hesap Oluştur did_you_forget: Parolanı mı Unuttun? login: Giriş Yap login_to_your_account: Hesabınıza giriş yapın diff --git a/test/system/login_page_flow_test.rb b/test/system/login_page_flow_test.rb index f1b2dc702..ca5769b9b 100644 --- a/test/system/login_page_flow_test.rb +++ b/test/system/login_page_flow_test.rb @@ -9,8 +9,8 @@ class LoginPageFlowTest < ApplicationSystemTestCase page.driver.browser.manage.window.resize_to(resolution[0], resolution[1]) visit('/') assert find_button(t('account.sessions.new.login'), visible: true).visible? + assert find_link(t('account.sessions.new.account_activation'), visible: true).visible? assert find_link(t('account.sessions.new.did_you_forget'), visible: true).visible? - assert find_link(t('account.sessions.new.create_account'), visible: true).visible? fill_in('user[id_number]', with: users(:serhat).id_number) fill_in('user[password]', with: 'd61c16acabedeab84f1ad062d7ad948ef3') check(t('account.sessions.new.remember_login')) From a85c9cc95a7a3281f1384cf1e9af74b1f8bb0bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 13:35:10 +0300 Subject: [PATCH 067/279] Add core_ext documentation --- plugins/support/doc/core_ext.md | 176 ++++++++++++++++++++++++++++---- 1 file changed, 154 insertions(+), 22 deletions(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index 15bf7ea79..f6a6195f8 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -8,64 +8,196 @@ author: Recai Oktaş `Object` -------- -`to_yaml_pretty` +### `to_yaml_pretty` -`must_be_any_of!(*type_specifications)` +Nesnenin (göreceli olarak daha) güzel biçimli YAML temsilini üretir. -TODO +```bash +$ ruby -e 'puts %w[foo bar baz].to_yaml' +--- +- foo +- bar +- baz +$ ruby -e 'puts %w[foo bar baz].to_yaml_pretty' +--- + +- foo + +- bar + +- baz + +``` + +### `must_be_any_of!(*type_specifications)` + +Nesnenin tipinin verilen argümanlardan en az bir tanesiyle uyumluluğunu +denetleyerek nesnenin yine kendisi döner; eşleştirme yoksa `TypeError` +istisnası üretir. + +```ruby +@attr = %w[foo bar].must_be_any_of! [String], String #=> ['foo', 'bar'] +@attr = 'foo'.must_be_any_of! [String], String #=> 'foo' +@attr = 'foo'.must_be_any_of! Integer #=> TypeError +@attr = { x: 13 }.must_be_any_of! { Symbol => Integer}, { String => Integer } #=> { x: 13 } +``` `Class` ------- -`inherited_by_conveying_attributes(*attributes, &block)` +### `inherited_by_conveying_attributes(*attributes, &block)` + +Miras alma sırasında ata sınıf niteliklerinin çocuk sınıfa kopyalanarak +aktarılmasını sağlar. İsteğe bağlı olarak verilen bloğu da `inherited` hook'ta +çalıştırır. -TODO +```ruby +class Parent + class_attribute :options, default: {} + + inherited_by_conveying_attributes :options +end + +class Child < Parent + options[:length] = 13 +end + +Parent.options[:length] #=> nil +Child.options[:length] #=> 13 +``` `Array` ------- -`clip(number_of_last_elements = 1)` +### `clip(number_of_last_elements = 1)` + +Diziyi sondan `number_of_last_elements` sayıda elemanı çıkarılmış olarak döner. + +```ruby +a = %w[foo bar baz] -`affixed(**options)` +a.clip #=> ['foo', 'bar'] +a #=> ['foo', 'bar', 'baz'] +``` -TODO +### `affixed(**options)` + +Dizgi dizisindeki her elemanı (varsa) `options[:interfix]` ile birleştirerek +başına ve sonuna (varsa) `options[:prefix]` ve `options[:suffix]` ekleyerek +döner. + +```ruby +%w[foo bar baz].affixed prefix: 'aaa-', interfix: '-', 'suffix: -zzz' #=> 'aaa-foo-bar-baz-zzz' +%w[foo bar baz].affixed prefix: 'aaa-' #=> 'aaa-foobarbaz' +``` `Hash` ------ -`to_deep_ostruct` +### `to_deep_ostruct` + +Hash'ten derin `OpenStruct` nesnesi döner. + +```ruby +config = { x: 13, other: { y: 19 } }.to_deep_ostruct +config.x #=> 13 +config.other.y #=> 19 +``` `Integer` --------- -`to_string(length, base = 10)` +### `to_string(length, base = 10)` -TODO +Tamsayıdan soldan gerektiği kadar sıfırla doldurarak verilen uzunlukta bir dizgi +döner. + +```ruby +13.to_string 5 #=> '00013' +13.to_string 3, 16 #=> '00D' +``` `String` -------- -`asciified` +### `asciified` + +Türkçe karakterleri ASCII yakınlarıyla değiştirir. + +```ruby +'ışğüöçİ'.asciified #=> 'isguocI' +``` + +### `abbreviation` + +Dizgiden kısaltma üretir. + +```ruby +'fener bahçe'.abbreviation #=> 'FB' +``` + +### `capitalize_turkish` + +Türkçe kurallarına uygun olarak ilk harfleri büyütür. + +```ruby +'fener bahçe istanbul'.capitalize_turkish #=> 'Fener Bahçe İstanbul' -`abbreviation` +``` -`capitalize_turkish` +### `capitalize_turkish_with_parenthesized` -`capitalize_turkish_with_parenthesized` +Türkçe kurallarına uygun olarak, parantez içini de dikkate alarak ilk harfleri büyütür. -`inside_offensives?` +```ruby +'fener bahçe (istanbul)'.capitalize_turkish_with_parenthesized #=> 'Fener Bahçe (İstanbul)' +``` -`inside_reserved?` +### `inside_offensives?` -`inside_abbreviations?` +Dizginin nahoş olup olmadığını döner. (Kelime listesi için `data` dizinine bakın.) -`inside_conjunctions?` +```ruby +'salak'.inside_offensives? #=> true +``` -TODO +### `inside_reserved?` + +Dizginin rezerve edilmiş bir kelime olup olmadığını döner. (Kelime listesi için +`data` dizinine bakın.) + +```ruby +'day'.inside_reserved? #=> true +``` + +### `inside_abbreviations?` + +Dizginin bir kısaltma olup olmadığını döner. (Kelime listesi için `data` +dizinine bakın.) + +```ruby +'KKTC'.inside_abbreviations? #=> true +``` + +### `inside_conjunctions?` + +Dizginin bir bağlaç olup olmadığını döner. (Kelime listesi için `data` dizinine +bakın.) + +```ruby +'veya'.inside_conjunctions? #=> true +``` `SecureRandom` -------------- -`random_number_string(length)` +### `random_number_string(length, base = 10)` + +Verilen uzunluğa karşı düşen sayı aralığında rastgele bir tamsayı üretip aynı +uzunlukta bir dizgi döner. (Üretilen tamsayı `0 <= rastgele < base**length` +koşulunu sağlar.) -TODO +```ruby +SecureRandom.random_number_string(5) #=> 00023 +SecureRandom.random_number_string(5) #=> 99123 +``` From 7ab62b05d35e2a334bbeb8b33a6d1c1ed4a2b058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 13:37:59 +0300 Subject: [PATCH 068/279] Add optional base argument to SecureRandom.random_number_string --- plugins/support/lib/nokul/support/core_ext/securerandom.rb | 4 ++-- plugins/support/test/core_ext/securerandom_test.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/support/lib/nokul/support/core_ext/securerandom.rb b/plugins/support/lib/nokul/support/core_ext/securerandom.rb index 07dfe658c..8a94a7697 100644 --- a/plugins/support/lib/nokul/support/core_ext/securerandom.rb +++ b/plugins/support/lib/nokul/support/core_ext/securerandom.rb @@ -5,7 +5,7 @@ module SecureRandom module_function - def random_number_string(length) - random_number(10**length).to_string(length, 10) + def random_number_string(length, base = 10) + random_number(base**length).to_string(length, base) end end diff --git a/plugins/support/test/core_ext/securerandom_test.rb b/plugins/support/test/core_ext/securerandom_test.rb index 02042bf90..f0a0a00ae 100644 --- a/plugins/support/test/core_ext/securerandom_test.rb +++ b/plugins/support/test/core_ext/securerandom_test.rb @@ -5,5 +5,6 @@ class SecureRandomTest < ActiveSupport::TestCase test 'random_number_string works' do assert_match(/^\d{4}$/, SecureRandom.random_number_string(4)) + assert_match(/^[0-9ABCDEF]{4}$/, SecureRandom.random_number_string(4, 16)) end end From 77fd9a8d800d3e60c7f8d42fca3b07792f465dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 13:41:32 +0300 Subject: [PATCH 069/279] Cosmetic --- plugins/support/doc/core_ext.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index f6a6195f8..91fef5ecd 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -8,7 +8,7 @@ author: Recai Oktaş `Object` -------- -### `to_yaml_pretty` +**`to_yaml_pretty`** Nesnenin (göreceli olarak daha) güzel biçimli YAML temsilini üretir. @@ -29,7 +29,7 @@ $ ruby -e 'puts %w[foo bar baz].to_yaml_pretty' ``` -### `must_be_any_of!(*type_specifications)` +**`must_be_any_of!(*type_specifications)`** Nesnenin tipinin verilen argümanlardan en az bir tanesiyle uyumluluğunu denetleyerek nesnenin yine kendisi döner; eşleştirme yoksa `TypeError` @@ -45,7 +45,7 @@ istisnası üretir. `Class` ------- -### `inherited_by_conveying_attributes(*attributes, &block)` +**`inherited_by_conveying_attributes(*attributes, &block)`** Miras alma sırasında ata sınıf niteliklerinin çocuk sınıfa kopyalanarak aktarılmasını sağlar. İsteğe bağlı olarak verilen bloğu da `inherited` hook'ta @@ -69,7 +69,7 @@ Child.options[:length] #=> 13 `Array` ------- -### `clip(number_of_last_elements = 1)` +**`clip(number_of_last_elements = 1)`** Diziyi sondan `number_of_last_elements` sayıda elemanı çıkarılmış olarak döner. @@ -80,7 +80,7 @@ a.clip #=> ['foo', 'bar'] a #=> ['foo', 'bar', 'baz'] ``` -### `affixed(**options)` +**`affixed(**options)`** Dizgi dizisindeki her elemanı (varsa) `options[:interfix]` ile birleştirerek başına ve sonuna (varsa) `options[:prefix]` ve `options[:suffix]` ekleyerek @@ -94,7 +94,7 @@ döner. `Hash` ------ -### `to_deep_ostruct` +**`to_deep_ostruct`** Hash'ten derin `OpenStruct` nesnesi döner. @@ -107,7 +107,7 @@ config.other.y #=> 19 `Integer` --------- -### `to_string(length, base = 10)` +**`to_string(length, base = 10)`** Tamsayıdan soldan gerektiği kadar sıfırla doldurarak verilen uzunlukta bir dizgi döner. @@ -120,7 +120,7 @@ döner. `String` -------- -### `asciified` +**`asciified`** Türkçe karakterleri ASCII yakınlarıyla değiştirir. @@ -128,7 +128,7 @@ Türkçe karakterleri ASCII yakınlarıyla değiştirir. 'ışğüöçİ'.asciified #=> 'isguocI' ``` -### `abbreviation` +**`abbreviation`** Dizgiden kısaltma üretir. @@ -136,7 +136,7 @@ Dizgiden kısaltma üretir. 'fener bahçe'.abbreviation #=> 'FB' ``` -### `capitalize_turkish` +**`capitalize_turkish`** Türkçe kurallarına uygun olarak ilk harfleri büyütür. @@ -145,7 +145,7 @@ Türkçe kurallarına uygun olarak ilk harfleri büyütür. ``` -### `capitalize_turkish_with_parenthesized` +**`capitalize_turkish_with_parenthesized`** Türkçe kurallarına uygun olarak, parantez içini de dikkate alarak ilk harfleri büyütür. @@ -153,7 +153,7 @@ Türkçe kurallarına uygun olarak, parantez içini de dikkate alarak ilk harfle 'fener bahçe (istanbul)'.capitalize_turkish_with_parenthesized #=> 'Fener Bahçe (İstanbul)' ``` -### `inside_offensives?` +**`inside_offensives?`** Dizginin nahoş olup olmadığını döner. (Kelime listesi için `data` dizinine bakın.) @@ -161,7 +161,7 @@ Dizginin nahoş olup olmadığını döner. (Kelime listesi için `data` dizinin 'salak'.inside_offensives? #=> true ``` -### `inside_reserved?` +**`inside_reserved?`** Dizginin rezerve edilmiş bir kelime olup olmadığını döner. (Kelime listesi için `data` dizinine bakın.) @@ -170,7 +170,7 @@ Dizginin rezerve edilmiş bir kelime olup olmadığını döner. (Kelime listesi 'day'.inside_reserved? #=> true ``` -### `inside_abbreviations?` +**`inside_abbreviations?`** Dizginin bir kısaltma olup olmadığını döner. (Kelime listesi için `data` dizinine bakın.) @@ -179,7 +179,7 @@ dizinine bakın.) 'KKTC'.inside_abbreviations? #=> true ``` -### `inside_conjunctions?` +**`inside_conjunctions?`** Dizginin bir bağlaç olup olmadığını döner. (Kelime listesi için `data` dizinine bakın.) @@ -191,7 +191,7 @@ bakın.) `SecureRandom` -------------- -### `random_number_string(length, base = 10)` +**`random_number_string(length, base = 10)`** Verilen uzunluğa karşı düşen sayı aralığında rastgele bir tamsayı üretip aynı uzunlukta bir dizgi döner. (Üretilen tamsayı `0 <= rastgele < base**length` From f5749aaa1503260de99de494f4cd018f1fd0fe6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 13:42:58 +0300 Subject: [PATCH 070/279] Improve example --- plugins/support/doc/core_ext.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index 91fef5ecd..c06fd20e0 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -199,5 +199,5 @@ koşulunu sağlar.) ```ruby SecureRandom.random_number_string(5) #=> 00023 -SecureRandom.random_number_string(5) #=> 99123 +SecureRandom.random_number_string(5, 16) #=> 0AB1F ``` From 813c63f2969f9968780850d0e969ffc11e234b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Mon, 25 Mar 2019 13:51:56 +0300 Subject: [PATCH 071/279] Array#affixed should be Array#join_affixed --- plugins/support/doc/core_ext.md | 6 +++--- plugins/support/lib/nokul/support/codification/code.rb | 2 +- plugins/support/lib/nokul/support/core_ext/array.rb | 2 +- plugins/support/lib/nokul/support/core_ext/string.rb | 2 +- plugins/support/test/core_ext/array_test.rb | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/support/doc/core_ext.md b/plugins/support/doc/core_ext.md index c06fd20e0..2d19591c4 100644 --- a/plugins/support/doc/core_ext.md +++ b/plugins/support/doc/core_ext.md @@ -80,15 +80,15 @@ a.clip #=> ['foo', 'bar'] a #=> ['foo', 'bar', 'baz'] ``` -**`affixed(**options)`** +**`join_affixed(**options)`** Dizgi dizisindeki her elemanı (varsa) `options[:interfix]` ile birleştirerek başına ve sonuna (varsa) `options[:prefix]` ve `options[:suffix]` ekleyerek döner. ```ruby -%w[foo bar baz].affixed prefix: 'aaa-', interfix: '-', 'suffix: -zzz' #=> 'aaa-foo-bar-baz-zzz' -%w[foo bar baz].affixed prefix: 'aaa-' #=> 'aaa-foobarbaz' +%w[foo bar baz].join_affixed prefix: 'aaa-', interfix: '-', 'suffix: -zzz' #=> 'aaa-foo-bar-baz-zzz' +%w[foo bar baz].join_affixed prefix: 'aaa-' #=> 'aaa-foobarbaz' ``` `Hash` diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb index 2c47b081a..88803c7eb 100644 --- a/plugins/support/lib/nokul/support/codification/code.rb +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -16,7 +16,7 @@ def initialize(source, **options) end def to_s - emit.affixed(**options) + emit.join_affixed(**options) end protected diff --git a/plugins/support/lib/nokul/support/core_ext/array.rb b/plugins/support/lib/nokul/support/core_ext/array.rb index f91c84161..81f37ab71 100644 --- a/plugins/support/lib/nokul/support/core_ext/array.rb +++ b/plugins/support/lib/nokul/support/core_ext/array.rb @@ -5,7 +5,7 @@ def clip(number_of_last_elements = 1) take size - number_of_last_elements end - def affixed(**options) + def join_affixed(**options) must_be_any_of! [String] "#{[*options[:prefix]].join}#{join options[:interfix]}#{[*options[:suffix]].join}" diff --git a/plugins/support/lib/nokul/support/core_ext/string.rb b/plugins/support/lib/nokul/support/core_ext/string.rb index 8c88734fd..d1c552924 100644 --- a/plugins/support/lib/nokul/support/core_ext/string.rb +++ b/plugins/support/lib/nokul/support/core_ext/string.rb @@ -21,7 +21,7 @@ def asciified end def affixed(**options) - [self].affixed(**options) + [self].join_affixed(**options) end def abbreviation diff --git a/plugins/support/test/core_ext/array_test.rb b/plugins/support/test/core_ext/array_test.rb index 9e72e6176..9da03e7e9 100644 --- a/plugins/support/test/core_ext/array_test.rb +++ b/plugins/support/test/core_ext/array_test.rb @@ -7,7 +7,8 @@ class ArrayTest < ActiveSupport::TestCase assert_equal %w[foo bar], %w[foo bar baz quux].clip(2) end - test 'affixed works' do - assert_equal 'aaa.foo-bar-baz-quux_zzz', %w[foo bar baz quux].affixed(prefix: 'aaa.', interfix: '-', suffix: '_zzz') + test 'join_affixed works' do + assert_equal 'aaa.foo-bar-baz-quux_zzz', + %w[foo bar baz quux].join_affixed(prefix: 'aaa.', interfix: '-', suffix: '_zzz') end end From 7d6170e3107d631a956b4e8edc380f798b152224 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 25 Mar 2019 15:20:51 +0300 Subject: [PATCH 072/279] Add missing attribute localizations --- .../controllers/account/activations.en.yml | 22 +++++++++++-------- .../controllers/account/activations.tr.yml | 22 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index 1cb2ca881..9765c852f 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -1,22 +1,26 @@ en: + activemodel: + attributes: + activatable/activation_service: &activation_attributes + country: Country + date_of_birth: Date of Birth + document_no: Document No + first_name: First Name + id_number: Identity Number + last_name: Last Name + mobile_phone: Mobile Phone + serial: Serial + serial_no: Serial No account: activations: identity_not_verified: Your identity not verified. Make sure that the data you entered is correct. record_not_found: There is no record in the system to activate your account. new: + <<: *activation_attributes activation: Activation account_activation: Activate your account - country: Country - date_of_birth: Date of Birth - document_no: Document No - first_name: First Name for_old_id_cards: For old identity cards identity_verification: Identity Verification - id_number: Identity Number - last_name: Last Name login: Login - mobile_phone: Mobile Phone phone_verification: Phone Verification - serial: Serial - serial_no: Serial No verify: Verify diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index c32c51638..666ef5ace 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -1,22 +1,26 @@ tr: + activemodel: + attributes: + activatable/activation_service: &activation_attributes + country: Ülke + date_of_birth: Doğum Tarihi + document_no: Doküman No + first_name: Ad + id_number: TC/YU Numarası + last_name: Soyad + mobile_phone: Cep Telefonu + serial: Seri + serial_no: Seri No account: activations: identity_not_verified: Kimlik bilgileriniz doğrulanamadı. Girmiş olduğunuz verilerin doğruluğundan emin olunuz. record_not_found: Sistemde hesabınızı aktifleştirecek bir kayıt bulunamamıştır. new: + <<: *activation_attributes activation: Aktivasyon account_activation: Hesabınızı aktifleştirin - country: Ülke - date_of_birth: Doğum Tarihi - document_no: Doküman No - first_name: Ad for_old_id_cards: Eski kimlik kartları için identity_verification: Kimlik Doğrulama - id_number: TC/YU Numarası - last_name: Soyad login: Giriş Yap - mobile_phone: Cep Telefonu phone_verification: Telefon Doğrulama - serial: Seri - serial_no: Seri No verify: Onayla From 233b63a4c29e3e964eefbe68c1caa04a3df453b7 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Tue, 26 Mar 2019 08:55:13 +0300 Subject: [PATCH 073/279] Add new validations Minor changes --- app/services/activatable/activation_service.rb | 9 +++++---- app/views/account/activations/new.html.erb | 5 ++++- config/locales/controllers/account/activations.en.yml | 2 ++ config/locales/controllers/account/activations.tr.yml | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index de485a236..6d7cb6e41 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -4,14 +4,15 @@ module Activatable class ActivationService include ActiveModel::Validations - attr_accessor :id_number, :first_name, :last_name, :date_of_birth, - :serial, :serial_no, :document_no, :mobile_phone, + attr_accessor :id_number, :first_name, :last_name, :date_of_birth, :serial, :serial_no, :document_no, :mobile_phone, :prospective, :user, :country validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } validates :first_name, presence: true validates :last_name, presence: true validates :date_of_birth, presence: true + validates :serial, allow_blank: true, length: { is: 3 } + validates :serial_no, allow_blank: true, numericality: { only_integer: true }, length: { is: 6 } validates :document_no, allow_blank: true, length: { is: 9 } validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validate :must_be_prospective @@ -51,11 +52,11 @@ def must_be_prospective end def check_identity + return if errors.any? + if verified_identity? find_prospective else - return if errors.any? - errors.add(:base, I18n.t('.account.activations.identity_not_verified')) end end diff --git a/app/views/account/activations/new.html.erb b/app/views/account/activations/new.html.erb index a4969138c..658f8387d 100644 --- a/app/views/account/activations/new.html.erb +++ b/app/views/account/activations/new.html.erb @@ -40,7 +40,7 @@
- <%= f.input :date_of_birth, as: :date_time_picker, required: true, label: false, wrapper: false %> + <%= f.input :date_of_birth, as: :date_time_picker, label: false, wrapper: false, input_html: { required: true } %>
@@ -71,6 +71,9 @@
<%= f.input :mobile_phone, label: false, wrapper: false, input_html: { class: @activation.errors[:mobile_phone].any? ? 'is-invalid' : '' } %> +
+ <%= @activation.errors[:mobile_phone].first %> +
<%= number_to_phone(1_235_551_234, area_code: true) %>
diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index 9765c852f..5cb670bee 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -24,3 +24,5 @@ en: login: Login phone_verification: Phone Verification verify: Verify + update: + success: Your account has been activated. diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index 666ef5ace..30de55bcf 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -24,3 +24,5 @@ tr: login: Giriş Yap phone_verification: Telefon Doğrulama verify: Onayla + update: + success: Hesabınız aktifleştirildi. From b063cf37ea662d0d62d6cfa68dcd758169826a5a Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Tue, 26 Mar 2019 10:27:25 +0300 Subject: [PATCH 074/279] Create activation service validator --- .../account/activations_controller.rb | 1 + .../activatable/activation_service.rb | 1 + .../activation_service_validator.rb | 29 +++++++++++++++++++ config/locales/validators/en.yml | 2 ++ config/locales/validators/tr.yml | 2 ++ 5 files changed, 35 insertions(+) create mode 100644 app/validators/activation_service_validator.rb diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 4002e5fe7..38c4189e1 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -12,6 +12,7 @@ def new def update @activation = Activatable::ActivationService.new(params[:activation]) + if @activation.valid? @activation.prospective.update(archived: true) @activation.user.update(activated: true, activated_at: Time.zone.now) diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index 6d7cb6e41..a2e17b2c5 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -15,6 +15,7 @@ class ActivationService validates :serial_no, allow_blank: true, numericality: { only_integer: true }, length: { is: 6 } validates :document_no, allow_blank: true, length: { is: 9 } validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } + validates_with ActivationServiceValidator validate :must_be_prospective validate :check_identity, if: :prospective? diff --git a/app/validators/activation_service_validator.rb b/app/validators/activation_service_validator.rb new file mode 100644 index 000000000..51f4d375f --- /dev/null +++ b/app/validators/activation_service_validator.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class ActivationServiceValidator < ActiveModel::Validator + def validate(record) + @record = record + + check_all_identity_serial_numbers + end + + def check_all_identity_serial_numbers + if blank_all_identity_serial_numbers? + @record.errors[:base] << I18n.t('.cannot_be_blank', scope: %i[validators activation_service]) + elsif @record.document_no.blank? + check_old_identity_serial_numbers? + end + end + + def blank_all_identity_serial_numbers? + @record.serial.blank? && @record.serial_no.blank? && @record.document_no.blank? + end + + def check_old_identity_serial_numbers? + if @record.serial.present? && @record.serial_no.blank? + @record.errors.add(:serial_no, :blank) + elsif @record.serial.blank? && @record.serial_no.present? + @record.errors.add(:serial, :blank) + end + end +end diff --git a/config/locales/validators/en.yml b/config/locales/validators/en.yml index 0d701d291..aeab80a09 100644 --- a/config/locales/validators/en.yml +++ b/config/locales/validators/en.yml @@ -2,6 +2,8 @@ en: validators: academic_term: active_check: One of the academic terms must be active. + activation_service: + cannot_be_blank: If you have the old identity card, you must fill in the 'Serial' and 'Serial No' fields, the 'Document Number' field if you have a chip identity card. address: max_formal: You can have up to %{limit} formal addresses maximum. max_informal: You can add up to %{limit} addresses maximum. diff --git a/config/locales/validators/tr.yml b/config/locales/validators/tr.yml index 589d9eb37..c28abd8fb 100644 --- a/config/locales/validators/tr.yml +++ b/config/locales/validators/tr.yml @@ -2,6 +2,8 @@ tr: validators: academic_term: active_check: Akademik dönemlerden birinin aktif olması zorunludur. + activation_service: + cannot_be_blank: Eski kimliğe sahipseniz 'Seri' ve 'Seri No' alanlarını, çipli kimliğe sahipseniz 'Doküman No' alanını doldurmalısınız. address: max_formal: En fazla %{limit} tane ikamet adresi ekleyebilirsiniz. max_informal: En fazla %{limit} tane adres ekleyebilirsiniz. From 84f2d1543241d3c01c76bb6d474d600c89bf2e9a Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Tue, 26 Mar 2019 10:33:35 +0300 Subject: [PATCH 075/279] Add missing translation --- app/controllers/account/activations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 38c4189e1..8103d8d03 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -16,7 +16,7 @@ def update if @activation.valid? @activation.prospective.update(archived: true) @activation.user.update(activated: true, activated_at: Time.zone.now) - redirect_to login_path, notice: 'Hesabınız aktifleştirildi.' + redirect_to login_path, notice: t('.success') else render :new end From d80b5e83b64bcfee3f973cbe6e69e95de994567e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 26 Mar 2019 17:21:14 +0300 Subject: [PATCH 076/279] Populate Codification document --- plugins/support/doc/codification.md | 294 +++++++++++++++++++++++++++- 1 file changed, 288 insertions(+), 6 deletions(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index 8ec9a284f..868ca510a 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -6,11 +6,10 @@ author: Recai Oktaş ============== `Codification` modülü entitelere kod ataması yapmakta kullanılan sınıflardan -oluşmaktadır. - -Temelde bir [`Enumerator`](https://ruby-doc.org/core-2.6.2/Enumerator.html) -nesnesi olan `Code` verilen bir "kaynağı" bir `Enumerator"e çevirir ("convert") -ve her ardışımda bir String dizisi yayımlar ("emit"). Yayımlanan String dizisi +oluşmaktadır. Temelde bir +[`Enumerator`](https://ruby-doc.org/core-2.6.2/Enumerator.html) nesnesi olan +`Code` verilen bir "kaynağı" bir `Enumerator"e çevirir ("take_in") ve her +ardışımda bir String dizisi yayımlar ("take_out"). Yayımlanan String dizisi seçenek olarak verilen ön ek, son ek ve ara ekler dikkate alınarak nihai "kod" olan String'e çevrilir. @@ -23,4 +22,287 @@ Tüm kodlama gerçeklemeleri `codes` dizini altında basit bir eklenti düzenind tutulur. Bu düzen içinde her kodlama türü aslında `Code` ve/veya `Coder` nesnelerini özelleştirilmesinden ibarettir. -TODO +`Code` +------ + +Kodlama `Code` nesneleri üzerinden yürütülür. Öncelikle soyut bir sınıf olan +`Code` sınıfından miras alma yoluyla somut bir sınıf oluşturulur. Somut +sınıflar `take_in` ve `take_out` metodlarını gerçeklemelidir. + +- `take_in` inşa zamanında verilen bir kaynağı (`to_enum` yoluyla) `Enumerator` + yapılabilir bir forma dönüştürür. + +- `take_out` dizgi temsili alınırken içteki `Enumerator` nesnesinden (`next` + veya `peek` yoluyla gelen) değeri dönüştürür. + +Aşağıda görülen `SimpleCode` bir dizgi dizisinden kod üretmeye yarayan somut bir +sınıf örneğidir. + +```ruby +class SimpleCode < Code + protected + + def take_in(value) + value.must_be_any_of! [String] + end + + def take_out(value) + value + end +end + +``` + +Bu sınıf üzerinden örnekleme yapalım. + +```ruby +code = Codification::SimpleCode.new %w[foo bar baz] +``` + +Gerçeklemede bir `Enumerator` barındıran bu Code nesnesi aşağıdaki davranışları +sergiler. + +- Bir sonraki kod nesnesini `next` ile üretir. + + ```ruby + code.next #=> 'bar' + ``` + +- Bir sonraki kod nesnesinin ne olacağını (herhangi bir durum değişikliğine + uğramadan) `peek` ile döner. + + ```ruby + code.peek #=> 'baz' + ``` + +- Başlangıç durumuna `rewind` ile geri döner. + + ```ruby + code.rewind + code.next #=> 'foo' + ``` + +`Coder` +------- + +Kodlama, inşa zamanında bir `Code` nesnesi alan `Coder` nesneleriyle yürütülür. +Kodlama sürecinde üretilen kodun her seferinde tekillik ve uygunluk denetimi +yapılır. + +```ruby +memory = SimpleMemory.new +memory.remember 'bar' + +coder = Codification::Coder.new SimpleCode.new(%w[foo bar baz]), memory: memory +coder.run #=> 'foo' +coder.run #=> 'baz' -- 'bar' bellekte +coder.run #=> StopIteration +``` + +`Code` nesnesi ardışımlar tükendiğinde `StopIteration` istisnası ürettiğinden +yukarıda örneklenen işlemi `loop` döngüsüyle de gerçekleyebilirsiniz + +```ruby +memory = SimpleMemory.new +memory.remember 'bar' + +coder = Codification::Coder.new SimpleCode.new(%w[foo bar baz]), memory: memory + +produced = [] +loop do + produced << coder.run +end + +produced #=> ['foo', 'baz'] +``` + +`Processor` +----------- + +`Coder` nesnesi üretilen kodları filtrelemek veya dönüştürmek için +`post_process` isimli bir seçenek kabul eder. Bu seçenek içteki `Processor` +nesnesinin inşa edilmesinde kullanılmaktadır. + +```ruby +memory = SimpleMemory.new +memory.remember 'bar' + +custom_process = proc do |string| + Processor.skip string, string != 'baz' +end + +coder = Coder.new SimpleCode.new(%w[foo bar baz]), memory: memory, post_process: custom_process + +produced = [] +loop do + produced << coder.run +end + +produced #=> ['foo'] +``` + +Bu örnekte `bar` değeri tekil olmadığından, `baz` değeri ise son işlemede +filtrelendiğinden atlanmış ve sadece `foo` değeri üretilmiştir. Örnekte olduğu +gibi son işlemede kodu reddetmek için `Processor.skip` metodu kullanılır. +İkinci argümanda verilen ifade (`string != 'baz') doğru ise kod kabul edilmekte +aksi halde reddedilmektedir. + +Son işlemede tanımlanan `Proc` bloğunun ürettiği değer üretilen kod olarak kabul +edilmekte ve sonrasında tekillik denetimi yapılmaktadır. Bu sayede sadece kod +kabulü değil kodun metinsel değişime uğratılması işlemi de gerçekleştirilebilir. + +```ruby +memory = SimpleMemory.new +memory.remember 'bar.xxx' + +custom_process = proc { |string| string + '.xxx' } + +coder = Coder.new SimpleCode.new(%w[foo bar baz]), memory: memory, post_process: custom_process + +produced = [] +loop do + produced << coder.run +end + +produced #=> ['foo.xxx', 'baz.xxx'] +``` + +Son işleme seçeneğinde özel `Proc` blokları yerine iki farklı forma daha izin +verilir. + +- Seçenekte herhangi bir değer sembol tipindeyse `Processor` sınıfında + tanımlanan yerleşik işleyicilerden birisiyle eşleştirilir. + + ```ruby + coder = Coder.new SimpleCode.new(%w[foo salak baz]), post_process: :safe? + + produced = [] + loop do + produced << coder.run + end + + produced #=> ['foo', 'baz'] + ``` + + Yerleşik işleyiciler için `Processor` sınıfını inceleyin. + +- Seçenekte herhangi bir değer düzenli ifade tipindeyse, düzenli ifade kod + uygunluğu için koşul kabul edilir. + + ```ruby + coder = Coder.new SimpleCode.new(%w[foo bar baz]), post_process: /^b/ + + produced = [] + loop do + produced << coder.run + end + + produced #=> ['bar', 'baz'] + ``` + +Son olarak son işleme seçeneğinde dizi de kullanılabileceğini belirtelim. +Seçenek dizi olarak tanımlanırsa son işleme dizideki sırayla gerçekleşir. + +```ruby +coder = Coder.new SimpleCode.new(%w[foo bar baz]), post_process: [ + /^b/, + proc { |string| string + '.xxx' } +] + +produced = [] +loop do + produced << coder.run +end + +produced #=> ['bar.xxx', 'baz.xxx'] +``` + +`Memory` +-------- + +Kodun tekilliğinin denetlenmesinde `Memory` nesneleri kullanılır. `Memory` +soyut sınıfından miras alan somut `Memory` nesnelerinde aşağıdaki metodlar +gerçeklenmiş olmalıdır. + +- `remember(string, **options)?`: Verilen dizginin bellekte bulunup + bulunmadığını döner. + +- `remember(string, **options)`: Verilen dizgiyi belleğe kaydeder. + +- `forget(string, **options)`: Verilen dizgiyi bellekten siler. + +Bu metodlara ilave olarak tüm metodlarda bulunan ve gerçeklenmesi gerekmeyen +yardımcı bir metod daha bulunmaktadır: `learn(string, **options)`. Bu metod: + +- Verilen dizgi bellekteyse nil döner. + +- Bellekte değilse belleğe kaydeder ve dizgiyi geri döner. + +Yerleşik kodlamalar +------------------- + +Özel bir kodlama hazırlamak yerine `codes` altında tanımlı yerleşik kodlama +modüllerini kullanabilirsiniz. + +- `random_numeric_codes`: Verilen aralıkta rastgele numerik kodlar üretir. + + ```ruby + coder = Codification.random_numeric_codes '00003'..'00099', prefix: '203' + coder.run #=> '20300023' (ilgili aralıkta rastgele) + ``` + +- `sequential_numeric_codes`: Verilen aralıkta ardışık numerik kodlar üretir. + + ```ruby + coder = Codification.sequential_numeric_codes '00003'..'00099', prefix: '203' + coder.run #=> '20300003' + coder.run #=> '20300004' + ``` + +- `suffixed_user_names`: Verilen isimlerden rastgele son ekli ve güvenli + kullanıcı adları üretir. + + ```ruby + coder = Codification.suffixed_user_names %w[mustafa kemal atatürk] + coder.run #=> 'mkataturk.123' (son ek rastgele) + ``` + +- `unsuffixed_user_names`: Verilen isimlerden son eksiz ve güvenli kullanıcı + adları üretir. + + ```ruby + coder = Codification.unsuffixed_user_names %w[mustafa kemal atatürk] + coder.run #=> 'mkataturk' + coder.run #=> 'mkemala' + coder.run #=> 'mustafaka' + coder.run #=> 'mkemalataturk' + coder.run #=> 'mustafakataturk' + coder.run #=> 'mustafakemala' + coder.run #=> 'mustafakemalataturk' + ``` + +Yeni bir yerleşik kodlama hazırlamak isterseniz `codes` dizini altında uygun +şekilde isimlendirilmiş bir modül oluşturun. Örneğin `SimpleCodes` isimli bir +modülü ele alalım. `codes/simple_codes.rb` dosyasını aşağıdaki şablonda +oluşturun ve modül adını (`SimpleCodes`) `codes.rb`'de kaydedin. + +```ruby +module Nokul + module Support + module Codification + module SimpleCodes + class Code < Codification::Code + # custom code + end + + class Coder < Codifiaction::Coder + # custom coder + end + end + end + end +end +``` + +Bu noktadan sonra kodlamayı jeneratör olarak (çoğul formda) `simple_codes` +adıyla, tek üretim için (tekil formda) `simple_code` adıyla kullanabilirsiniz. From 10859dd07f7b7e6c724696362048748ba0a1f539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 26 Mar 2019 17:22:12 +0300 Subject: [PATCH 077/279] Polish API in accordance with the documentation --- .../lib/nokul/support/codification/code.rb | 32 +++++++++---------- .../lib/nokul/support/codification/coder.rb | 2 +- .../codes/random_numeric_codes.rb | 2 +- .../codes/sequential_numeric_codes.rb | 10 +++--- .../codes/unsuffixed_user_names.rb | 10 +++--- .../lib/nokul/support/core_ext/object.rb | 6 ++++ 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/code.rb b/plugins/support/lib/nokul/support/codification/code.rb index 88803c7eb..dd359be97 100644 --- a/plugins/support/lib/nokul/support/codification/code.rb +++ b/plugins/support/lib/nokul/support/codification/code.rb @@ -1,44 +1,42 @@ # frozen_string_literal: true -require 'forwardable' - module Nokul module Support module Codification class Code - extend Forwardable - - delegate %i[cycle next peek rewind +] => :@enum - def initialize(source, **options) @options = options - @enum = convert(source).to_enum + @enum = take_in(source).to_enum + end + + def next + emit { take_out enum.next } end - def to_s - emit.join_affixed(**options) + def rewind + tap { enum.rewind } + end + + def peek + emit { take_out enum.peek } end protected attr_reader :enum, :options - def convert(_source) + def take_in(_source) raise NotImplementedError end - def emit + def take_out(_value) raise NotImplementedError end - end - class SimpleCode < Code - def convert(source) - source.must_be_any_of! [String] - end + private def emit - peek + [*yield].join_affixed(**options) end end end diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index fc4953ee3..38e1f9882 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -77,7 +77,7 @@ def memory def over_loop!(*); end def try(amnesic:) - return unless (result = processor.process(self, code.to_s, **options)) + return unless (result = processor.process(self, code.peek, **options)) memory.learn(result, amnesic: amnesic) rescue Skip diff --git a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb index 6f632aaac..8a609a400 100644 --- a/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/random_numeric_codes.rb @@ -13,7 +13,7 @@ module RandomNumericCodes class Code < SequentialNumericCodes::Code protected - def convert(source) + def take_in(source) super.to_a.shuffle! end end diff --git a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb index af6e92b60..cfbfbaf3a 100644 --- a/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes/sequential_numeric_codes.rb @@ -11,18 +11,18 @@ module Support module Codification module SequentialNumericCodes class Code < Codification::Code - def emit - [peek].map { |number| number.to_string(net_length, base) } - end - protected - def convert(source) + def take_in(source) source.must_be_any_of! String..String, String source.is_a?(String) ? convert_from_string(source) : convert_from_range(source) end + def take_out(value) + value.to_string(net_length, base) + end + attr_accessor :base, :net_length private diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index bc7d5f314..85031c2dc 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -42,13 +42,9 @@ def index_combinations_of_source class Code < Codification::Code using Alternatives - def emit - peek - end - protected - def convert(source) + def take_in(source) source.must_be_any_of! [String] names = source.map(&:split).flatten.map do |name| @@ -58,6 +54,10 @@ def convert(source) [*names.send(alternative), names].uniq end + def take_out(value) + value + end + private def alternative diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index c1e8e780a..54a32a286 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -23,6 +23,8 @@ def type_error(object, type) end def must_be_array(object, type) + (error = type_error(object, Array)) && (return error) + sanitize_arguments(sample_type = type.first) object.each do |element| @@ -33,6 +35,8 @@ def must_be_array(object, type) end def must_be_hash(object, type) + (error = type_error(object, Hash)) && (return error) + sanitize_arguments(*(key_type, value_type = type.first)) object.each do |key, value| @@ -44,6 +48,8 @@ def must_be_hash(object, type) end def must_be_range(object, type) + (error = type_error(object, Range)) && (return error) + sanitize_arguments(starting_type = type.first) sanitize_arguments(ending_type = type.first) From 9a0c9c9e7194d9594ee316fab5b78d1535828e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 26 Mar 2019 17:25:13 +0300 Subject: [PATCH 078/279] Update all tests against the latest changes --- .../support/test/codification/code_test.rb | 38 ++++- .../support/test/codification/coder_test.rb | 141 ++++++++++++++++-- .../support/test/codification/memory_test.rb | 4 +- .../test/codification/processor_test.rb | 8 +- plugins/support/test/core_ext/class_test.rb | 30 ++-- plugins/support/test/core_ext/object_test.rb | 2 + 6 files changed, 188 insertions(+), 35 deletions(-) diff --git a/plugins/support/test/codification/code_test.rb b/plugins/support/test/codification/code_test.rb index 94df23982..ba76d1eda 100644 --- a/plugins/support/test/codification/code_test.rb +++ b/plugins/support/test/codification/code_test.rb @@ -8,12 +8,46 @@ module Codification class CodeTest < ActiveSupport::TestCase test 'concrete code class should implement required methods' do %i[ - convert - emit + take_in + take_out ].each do |method| assert_raise(NotImplementedError) { Class.new(Code).new([]).send method } end end + + module TestSimpleCode + class SimpleCode < Code + protected + + def take_in(value) + value.must_be_any_of! [String] + end + + def take_out(value) + value + end + end + end + + test 'subclassing should work' do + code = TestSimpleCode::SimpleCode.new %w[foo bar baz] + + assert_equal 'foo', code.next + assert_equal 'bar', code.next + assert_equal 'baz', code.peek + assert_equal 'baz', code.next + + assert_raise(StopIteration) { code.peek } + assert_raise(StopIteration) { code.next } + + code.rewind + assert_equal 'foo', code.next + end + + test 'should behave well at the edge cases' do + code = TestSimpleCode::SimpleCode.new [] + assert_raise(StopIteration) { code.peek } + end end end end diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index 531a16ee7..e6ec71bba 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -5,8 +5,123 @@ module Nokul module Support module Codification - class CoderTest < ActiveSupport::TestCase - module TestOne + class CoderTest < ActiveSupport::TestCase # rubocop:disable Metrics/ClassLength + module TestSimpleCode + class SimpleCode < Code + protected + + def take_in(value) + value.must_be_any_of! [String] + end + + def take_out(value) + value + end + end + end + + test 'simple case should work' do + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]) + assert_equal 'foo', coder.run + assert_equal 'bar', coder.run + assert_equal 'baz', coder.run + assert_raise(StopIteration) { coder.run } + end + + test 'simple case with memory should work' do + memory = SimpleMemory.new + memory.remember 'bar' + + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), memory: memory + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[foo baz], produced + assert_raise(StopIteration) { coder.run } + end + + test 'post processes should work as predicator' do + memory = SimpleMemory.new + memory.remember 'bar' + + custom_process = proc do |string| + Processor.skip string, string != 'baz' + end + + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), + memory: memory, + post_process: custom_process + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[foo], produced + assert_raise(StopIteration) { coder.run } + end + + test 'post processes should work as transformer' do + memory = SimpleMemory.new + memory.remember 'bar.xxx' + + custom_process = proc do |string| + string + '.xxx' + end + + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), + memory: memory, + post_process: custom_process + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[foo.xxx baz.xxx], produced + assert_raise(StopIteration) { coder.run } + end + + test 'regexp post process should work' do + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), post_process: /^b/ + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[bar baz], produced + end + + test 'builtin post process should work' do + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo salak baz]), post_process: :safe? + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[foo baz], produced + end + + test 'post process array should work' do + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), post_process: [ + /^b/, + proc { |string| string + '.xxx' } + ] + + produced = [] + loop do + produced << coder.run + end + + assert_equal %w[bar.xxx baz.xxx], produced + end + + module TestDummy class Foo < Coder setup foo: 13 end @@ -17,30 +132,32 @@ class Bar < Foo end test 'default options should be duplicated' do - assert_equal 13, TestOne::Foo.default_options[:foo] - assert_nil TestOne::Foo.default_options[:bar] - assert_equal 19, TestOne::Bar.default_options[:foo] - assert_equal 23, TestOne::Bar.default_options[:bar] + assert_equal 13, TestDummy::Foo.default_options[:foo] + assert_nil TestDummy::Foo.default_options[:bar] + assert_equal 19, TestDummy::Bar.default_options[:foo] + assert_equal 23, TestDummy::Bar.default_options[:bar] end test 'only codes should be accepted' do assert_raise(TypeError) { Coder.new 13 } end - module TestTwo + module TestBogus class Bogus < Code - def emit - %w[same] - end + protected - def convert(source) + def take_in(source) source end + + def take_out(*) + 'same' + end end end test 'loop guard works' do - coder = Coder.new TestTwo::Bogus.new(0..Float::INFINITY) + coder = Coder.new TestBogus::Bogus.new(0..Float::INFINITY) coder.run err = assert_raise(Error) { coder.run } diff --git a/plugins/support/test/codification/memory_test.rb b/plugins/support/test/codification/memory_test.rb index 54962847d..a0932bcc6 100644 --- a/plugins/support/test/codification/memory_test.rb +++ b/plugins/support/test/codification/memory_test.rb @@ -6,7 +6,7 @@ module Nokul module Support module Codification class MemoryTest < ActiveSupport::TestCase - module TestOne + module TestRefusingMemory class RefusingMemory < Memory def remember(*); end @@ -17,7 +17,7 @@ def remember?(*) end test 'sub classing should work as expected' do - memory = TestOne::RefusingMemory.new + memory = TestRefusingMemory::RefusingMemory.new assert memory.remember? 19 end diff --git a/plugins/support/test/codification/processor_test.rb b/plugins/support/test/codification/processor_test.rb index 08c5da5d6..ff8d01ec9 100644 --- a/plugins/support/test/codification/processor_test.rb +++ b/plugins/support/test/codification/processor_test.rb @@ -14,7 +14,7 @@ class ProcessorTest < ActiveSupport::TestCase assert_equal 'FOO', Processor.new(post_process: proc { |s| s.upcase }).process(Object.new, 'foo') end - module TestOne + module TestDummy class Dummy attr_reader :options def initialize(**options) @@ -25,9 +25,9 @@ def initialize(**options) test 'builtins work' do processor = Processor.new post_process: %i[non_offensive? non_reserved? random_suffix] - assert_match(/^foo.\d{3}$/, processor.process(TestOne::Dummy.new, 'foo')) - assert_raise(Skip) { processor.process(TestOne::Dummy.new, 'salak') } - assert_raise(Skip) { processor.process(TestOne::Dummy.new, 'if') } + assert_match(/^foo.\d{3}$/, processor.process(TestDummy::Dummy.new, 'foo')) + assert_raise(Skip) { processor.process(TestDummy::Dummy.new, 'salak') } + assert_raise(Skip) { processor.process(TestDummy::Dummy.new, 'if') } end test 'should accept a builtin_post_process option' do diff --git a/plugins/support/test/core_ext/class_test.rb b/plugins/support/test/core_ext/class_test.rb index 83c146003..f788b11d5 100644 --- a/plugins/support/test/core_ext/class_test.rb +++ b/plugins/support/test/core_ext/class_test.rb @@ -3,7 +3,7 @@ require 'test_helper' class ClassTest < ActiveSupport::TestCase - module TestOne + module TestClassesOne class NonConveyedBase class_attribute :array_attr, default: %w[foo bar] class_attribute :hash_attr, default: { x: 'foo', y: 'bar' } @@ -28,18 +28,18 @@ class ChildFromConveyedBase < ConveyedBase end test 'inherited_by_conveying_attributes works' do - assert_equal %w[foo bar child_addition], TestOne::NonConveyedBase.array_attr - assert_equal %w[foo bar], TestOne::ConveyedBase.array_attr - assert_equal %w[foo bar child_addition], TestOne::ChildFromNonConveyedBase.array_attr - assert_equal %w[foo bar child_addition], TestOne::ChildFromConveyedBase.array_attr - - assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::NonConveyedBase.hash_attr - assert_equal Hash[x: 'foo', y: 'bar'], TestOne::ConveyedBase.hash_attr - assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::ChildFromNonConveyedBase.hash_attr - assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestOne::ChildFromConveyedBase.hash_attr + assert_equal %w[foo bar child_addition], TestClassesOne::NonConveyedBase.array_attr + assert_equal %w[foo bar], TestClassesOne::ConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestClassesOne::ChildFromNonConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestClassesOne::ChildFromConveyedBase.array_attr + + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestClassesOne::NonConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar'], TestClassesOne::ConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestClassesOne::ChildFromNonConveyedBase.hash_attr + assert_equal Hash[x: 'foo', y: 'bar', z: 'child_addition'], TestClassesOne::ChildFromConveyedBase.hash_attr end - module TestTwo + module TestClassesTwo class ConveyedBase class_attribute :array_attr, default: %w[foo bar] @@ -54,10 +54,10 @@ class ChildFromConveyedBase < ConveyedBase end test 'inherited_by_conveying_attributes with block works' do - assert_equal %w[foo bar], TestTwo::ConveyedBase.array_attr - assert_equal %w[foo bar child_addition], TestTwo::ChildFromConveyedBase.array_attr + assert_equal %w[foo bar], TestClassesTwo::ConveyedBase.array_attr + assert_equal %w[foo bar child_addition], TestClassesTwo::ChildFromConveyedBase.array_attr - refute TestTwo::ConveyedBase.respond_to? :other - assert_equal 'ok', TestTwo::ChildFromConveyedBase.other + refute TestClassesTwo::ConveyedBase.respond_to? :other + assert_equal 'ok', TestClassesTwo::ChildFromConveyedBase.other end end diff --git a/plugins/support/test/core_ext/object_test.rb b/plugins/support/test/core_ext/object_test.rb index 2b641122d..f68735861 100644 --- a/plugins/support/test/core_ext/object_test.rb +++ b/plugins/support/test/core_ext/object_test.rb @@ -12,7 +12,9 @@ class ObjectTest < ActiveSupport::TestCase assert_equal [13, 19], [13, 19].must_be_any_of!([Integer]) assert_equal({ x: 13, y: 19 }, { x: 13, y: 19 }.must_be_any_of!(Symbol => Integer)) + assert_raise(TypeError) { 13.must_be_any_of!([Integer]) } assert_raise(TypeError) { [13, '19'].must_be_any_of!([Integer]) } + assert_raise(TypeError) { 13.must_be_any_of!(Symbol => Integer) } assert_raise(TypeError) { { x: 13, y: '19' }.must_be_any_of!(Symbol => Integer) } end end From 37e03b73e9a858c0b7cff35b2270c4d15855dc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 26 Mar 2019 20:03:33 +0300 Subject: [PATCH 079/279] Fix typo --- plugins/support/doc/codification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index 868ca510a..ab4167289 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -295,7 +295,7 @@ module Nokul # custom code end - class Coder < Codifiaction::Coder + class Coder < Codification::Coder # custom coder end end From 02aef7ecb006104bf98fb7b2ae18390316ad8bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 26 Mar 2019 23:30:01 +0300 Subject: [PATCH 080/279] Reorganize Tenant documents --- .../doc/{ => development}/codification.md | 0 .../common/doc/{ => development}/tenant.md | 0 .../common/doc/{ => development}/units.md | 8 +- .../doc/specification}/student-numbers.md | 16 ++-- .../doc/specification}/unit-abbreviations.md | 2 + .../doc/specification}/unit-codes.md | 0 .../common/doc/specification/user-names.md | 82 +++++++++++++++++++ plugins/tenant/omu/doc/user-names.md | 63 -------------- 8 files changed, 96 insertions(+), 75 deletions(-) rename plugins/tenant/common/doc/{ => development}/codification.md (100%) rename plugins/tenant/common/doc/{ => development}/tenant.md (100%) rename plugins/tenant/common/doc/{ => development}/units.md (96%) rename plugins/tenant/{omu/doc => common/doc/specification}/student-numbers.md (87%) rename plugins/tenant/{omu/doc => common/doc/specification}/unit-abbreviations.md (99%) rename plugins/tenant/{omu/doc => common/doc/specification}/unit-codes.md (100%) create mode 100644 plugins/tenant/common/doc/specification/user-names.md delete mode 100644 plugins/tenant/omu/doc/user-names.md diff --git a/plugins/tenant/common/doc/codification.md b/plugins/tenant/common/doc/development/codification.md similarity index 100% rename from plugins/tenant/common/doc/codification.md rename to plugins/tenant/common/doc/development/codification.md diff --git a/plugins/tenant/common/doc/tenant.md b/plugins/tenant/common/doc/development/tenant.md similarity index 100% rename from plugins/tenant/common/doc/tenant.md rename to plugins/tenant/common/doc/development/tenant.md diff --git a/plugins/tenant/common/doc/units.md b/plugins/tenant/common/doc/development/units.md similarity index 96% rename from plugins/tenant/common/doc/units.md rename to plugins/tenant/common/doc/development/units.md index 0c4255e9f..5a1a4deaa 100644 --- a/plugins/tenant/common/doc/units.md +++ b/plugins/tenant/common/doc/development/units.md @@ -108,8 +108,8 @@ yeniden üretmeniz ve sonucu test etmeniz gerekir. Bu amaçla aşağıdaki yol izlenmelidir. ```sh -$ cd plugins/tenant/omu -$ bundle install # henüz yapılmamışsa -$ bin/rails tenant:units:reproduce -$ bin/rails test +cd plugins/tenant/omu +bundle install # henüz yapılmamışsa +bin/rails tenant:units:reproduce +bin/rails test ``` diff --git a/plugins/tenant/omu/doc/student-numbers.md b/plugins/tenant/common/doc/specification/student-numbers.md similarity index 87% rename from plugins/tenant/omu/doc/student-numbers.md rename to plugins/tenant/common/doc/specification/student-numbers.md index 874ea5a09..0e4b77e70 100644 --- a/plugins/tenant/omu/doc/student-numbers.md +++ b/plugins/tenant/common/doc/specification/student-numbers.md @@ -8,7 +8,7 @@ author: Recai Oktaş Kısaca USN (University Student Number) adı verilen öğrenci numaraları aşağıdaki biçimde yazılan **8 haneli** numaralardır. -- Form 1: +- Kısa sıra no: |-- Birim Kodu --|-- Yıl --| Sıra --| 3 hane 2 hane 3 hane @@ -18,8 +18,7 @@ biçimde yazılan **8 haneli** numaralardır. | | | | | | | | | +-----+-----+-----+-----+-----+-----+-----+-----+ - -- Form 2: +- Uzun sıra no: |-- Birim Kodu --|-- Sıra --| 3 hane 5 hane @@ -36,7 +35,8 @@ kurallara göre oluşturulur. 2. Eski kayıtlanmalara bakıldığında programa bir eğitim/öğretimi dönemi içinde kayıtlanan öğrenci sayısının 999'a yaklaşmadığı programlarda USN için sıra - numarasının iki haneli eğitim/öğretim yılıyla başladığı Form 1 kullanılır. + numarasının iki haneli eğitim/öğretim yılıyla başladığı "Kısa sıra no" biçimi + kullanılır. Ör. Yıl içinde en fazla 150 yeni öğrencinin kayıtlandığı görülen 203 birim numaralı Bilgisayar Mühendisliği Lisans programına 2020-2021 eğitim/öğretim @@ -45,7 +45,7 @@ kurallara göre oluşturulur. 20320042 3. Yeni öğrenci sayısının 999'u geçtiği **yeni** programlarda sıra numarasında - yılın olmadığı Form 2 kullanılır. + yılın olmadığı "Uzun sıra no" biçimi kullanılır. Ör. Kayıtlanma döneminde toplamda 1800 yeni öğrencinin kayıtlandığı **yeni açılmış** 021 birim numaralı İlahiyat Uzaktan Eğitim programına 1234'ncü @@ -53,7 +53,7 @@ kurallara göre oluşturulur. 02101234 -4. Geçmişte Form 1'in kullanıldığı **yeni olmayan** programlarda (çakışma +4. Geçmişte kısa biçimin kullanıldığı **yeni olmayan** programlarda (çakışma çıkarabilecek eski öğrenci numaraları var) sıra numarası elverişli numara havuzundaki rakamların en düşüğüyle başlar ve kullanılan rakamlar atlanmak şartıyla doğrusal olarak arttırılır. @@ -66,8 +66,8 @@ kurallara göre oluşturulur. 20301234 -5. Öğrenci numaralarında Form 2'ye geçiş yapıldığında (öğrenci sayısının - azalması dikkate alınarak) tekrar Form 1'e dönüş yapılamaz. +5. Öğrenci numaralarında uzun biçime geçiş yapıldığında (öğrenci sayısının + azalması dikkate alınarak) tekrar kısa biçime dönüş yapılamaz. Öğrenci numaralarının daima korunması tercih edilmekle birlikte numara havuzlarının tükenmesi halinde zorunlu olarak sıfırlanabilir. Ör. (Teorik) 100 diff --git a/plugins/tenant/omu/doc/unit-abbreviations.md b/plugins/tenant/common/doc/specification/unit-abbreviations.md similarity index 99% rename from plugins/tenant/omu/doc/unit-abbreviations.md rename to plugins/tenant/common/doc/specification/unit-abbreviations.md index 6a8669851..30232f64e 100644 --- a/plugins/tenant/omu/doc/unit-abbreviations.md +++ b/plugins/tenant/common/doc/specification/unit-abbreviations.md @@ -14,8 +14,10 @@ oluşan bir kelime öbeğidir. Ör. Kısaltmalarda izin verilen karakter aralığı: - Başta: `ABCÇDEFGHIİJKLMNOÖPRSŞTUÜVYZ` (Türkçe harfler) + - Ortada: `ABCÇDEFGHIİJKLMNOÖPRSŞTUÜVYZ0123456789-` (Türkçe harfler + rakamlar + tire) + - Sonda: `ABCÇDEFGHIİJKLMNOÖPRSŞTUÜVYZ0123456789` (Türkçe harfler + rakamlar) (Özel olarak tire dışında `.,;:_` gibi noktalama işaretlerine izin verilmediğine diff --git a/plugins/tenant/omu/doc/unit-codes.md b/plugins/tenant/common/doc/specification/unit-codes.md similarity index 100% rename from plugins/tenant/omu/doc/unit-codes.md rename to plugins/tenant/common/doc/specification/unit-codes.md diff --git a/plugins/tenant/common/doc/specification/user-names.md b/plugins/tenant/common/doc/specification/user-names.md new file mode 100644 index 000000000..a6badeadb --- /dev/null +++ b/plugins/tenant/common/doc/specification/user-names.md @@ -0,0 +1,82 @@ +--- +author: Recai Oktaş +--- + +Kullanıcıların İsimlendirilmesi +=============================== + +Kullanıcı ismi **tercihen** tam adın ilk harfleri ve soyadın tamamının rastgele +üretilen 3 haneli bir son ekle birleştirilmesiyle oluşturulur. + + «İsimlerin ilk harfleri»«Soyad».«3 haneli rastgele sayı» + +İsim şu koşulları sağlar: + +1. Hepsi küçük harf +2. Türkçe karakterler ASCII eşdeğerleriyle değiştirilmiş +3. Eposta alanında (`@omu.edu.tr`) tekil +4. Uygun: son eksiz haliyle nahoş veya rezerve edilmiş bir kelime değil + +Örnek: + +| Ad | Soyad | Kullanıcı adı | +|--------------|-------------|---------------| +| Su | Er | ser.819 | +| Ahmet Fuat | Yılmaz | afyilmaz.058 | +| Merve | Sağlam | msaglam.140 | + +Tek ilk ad ve soyad durumunda tercihen edilen biçimde üretilen bir isim 4 +numaralı koşulu sağlamıyorsa aşağıdaki biçimde tekrar üretilerek koşullara +uygunluğu denetlenir. + + «İlk ad»«Soyadın ilk harfi».«3 haneli rastgele sayı» + +Örnek: + +| Ad | Soyad | Uygunsuz ad | Uygun ad | +|--------------|-------------|---------------|--------------| +| Suat | Alak | salak.123 | suata.123 | +| Dilek | Ay | day.378 | dileka.378 | + +İsim bu haliyle de uygun değilse kısaltılmadan yazılır. + +Birden fazla ilk ad ve soyad durumunda, "Mustafa Kemal Atatürk" ile +örneklenecek olursa tercih sırasıyla aşağıdaki isimler denenir. + + mkataturk + mkemala + mustafaka + mkemalataturk + mustafakataturk + mustafakemala + mustafakemalataturk + +Politika +-------- + +- Öğrenci ve personel isimleri arasında ayrım yapılmaz. Tüm isimler + `@omu.edu.tr` alanında tekil olacak şekilde aynı biçimde üretilir. + (`@omu.edu.tr` alanında sadece gerçek kullanıcı adlarının değil tüzel kişi, + grup adı vb isimlerin de bulunduğunu unutmayın. Bazı isimler aktif şekilde + kullanılmasa bile rezerve edilmiş olabilir.) + +- Geçmişte kullanılan bir isim her ne nedenle olursa olsun asla tekrar + kullanılmaz. + +- Öğrencilere ait kullanıcı adlarında değişiklik talep edilemez. + +- Personel kullanıcı adında değişiklik talep edebilir. + +İsim değişiklikleri +------------------- + +İsim değişiklikleri olabildiğince self servis yoluyla karşılanır. Bu serviste +aşağıdaki ilkelere uyulmalıdır. + +- Yeni isim önerisini kullanıcı serbest halde giremez; kendisine sunulan + seçenekler arasında bir seçim yapar. + +- Otomatik isim önerileriyle karşılanamayan durumlarda talepler BAUM'a + iletilerek sistem yöneticileri tarafından karşılanır. + +- İsim değişikliği gerçekleştiğinde eski isimler daima "alias" olarak korunur. diff --git a/plugins/tenant/omu/doc/user-names.md b/plugins/tenant/omu/doc/user-names.md deleted file mode 100644 index 43a27a5dc..000000000 --- a/plugins/tenant/omu/doc/user-names.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -author: Recai Oktaş ---- - -Kullanıcıların İsimlendirilmesi -=============================== - -Kullanıcı ismi tam adın ilk harfleri ve soyadın tamamının kişinin TC kimlik -numarasından türetilen ve nokta ile başlayan 4 haneli bir son ekle -birleştirilmesiyle oluşturulur. TC kimlikten türetiminde numaranın `10_000` -modu kullanılır ve bu şekilde elde edilen sayı 4 haneyi bulacak şekilde soldan -sıfırlarla doldurulur. - - «İsimlerin ilk harfleri»«Soyad».«TC kimlik no % 10_000» - -İsim şu koşulları sağlar: - -- Eposta alanında (`@omu.edu.tr`) tekil -- Hepsi küçük harf -- Türkçe karakterler ASCII eşdeğerleriyle değiştirilmiş - -Örnek: - -| Ad | Soyad | TC kimlik | Kullanıcı adı | -|--------------|-------------|-------------|---------------| -| Su | Ay | 10570898198 | say.8198 | -| Ahmet Fuat | Yılmaz | 20047578058 | afyilmaz.8058 | -| Merve | Sağlam | 30097240140 | msaglam.0140 | - -İsim çakışmaları TC kimlik numarasından türetilen son ekin tekillik sağlanıncaya -kadar arttırılmasıyla çözülür. Örneğin bir kullanıcı için üretilen -`msaglam.0140` ismi geçmişte kullanılmışsa son ek arttırılarak `msaglam.0141` -ismi denenir ve arttırma çakışma olmayıncaya kadar devam eder. - -Politika --------- - -- Öğrenci ve personel isimleri arasında ayrım yapılmaz. Tüm isimler - `@omu.edu.tr` alanında tekil olacak şekilde aynı biçimde üretilir. - (`@omu.edu.tr` alanında sadece gerçek kullanıcı adlarının değil tüzel kişi, - grup adı vb isimlerin de bulunduğunu unutmayın. Bazı isimler aktif şekilde - kullanılmasa bile rezerve edilmiş olabilir.) - -- Geçmişte kullanılan bir isim her ne nedenle olursa olsun asla tekrar - kullanılmaz. - -- Öğrencilere ait kullanıcı adlarında değişiklik talep edilemez. - -- Personel kullanıcı adında değişiklik talep edebilir. - -İsim değişiklikleri -------------------- - -İsim değişiklikleri olabildiğince self servis yoluyla karşılanır. Bu serviste -aşağıdaki ilkelere uyulmalıdır. - -- Yeni isim önerisini kullanıcı serbest halde giremez; kendisine sunulan - seçenekler arasında bir seçim yapar. - -- Otomatik isim önerileriyle karşılanamayan durumlarda talepler BAUM'a - iletilerek sistem yöneticileri tarafından karşılanır. - -- İsim değişikliği gerçekleştiğinde eski isimler daima "alias" olarak korunur. From 90b6e9269e925bb60fadf9f09cd902942b66e3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 27 Mar 2019 10:31:05 +0300 Subject: [PATCH 081/279] Populate high level Codification API document --- .../common/doc/development/codification.md | 104 +++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/plugins/tenant/common/doc/development/codification.md b/plugins/tenant/common/doc/development/codification.md index f47a71bc5..73863effd 100644 --- a/plugins/tenant/common/doc/development/codification.md +++ b/plugins/tenant/common/doc/development/codification.md @@ -5,4 +5,106 @@ author: Recai Oktaş `Nokul::Tenant::Codification` ============================= -TODO +Nokul'da kiracılar arasında ortak olarak kullanılabilecek kodifikasyon lojiğini +barındıran en üst katmandaki API. Bu API alt seviyede `Support::Codification` +kitaplığını kullanır. API'de `Unit`, `User`, `Student` ve `Employee` +modellerine ilişkin kodifikasyon lojiği bulunmaktadır. + +`Unit` +------ + +*`code_generator(starting:, ending:, pattern: nil, memory:)`* + +Birim kodları üreteci. + +```ruby +generator = Nokul::Tenant::Codification::Unit.code_generator(starting: '001', ending: '999', memory: nil) +generator.run #=> '001' +generator.run #=> '002' +``` + +`User` +------ + +*`name_generate(first_name:, last_name:, memory:)`* + +Rastgele son ekli kullanıcı adı üreteci. + +```ruby +generator = Nokul::Tenant::Codification::User.name_generate(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: nil) +generator.run #=> 'mkataturk.123' rastgele son ek +``` + +*`name_suggest(first_name:, last_name:, memory:)`* + +Son eksiz kullanıcı adı önerileri. + +```ruby +suggestions = Nokul::Tenant::Codification::User.name_suggest(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: nil) +suggestions #=> ['mkataturk', 'mkemala', 'mustafaka', 'mkemalataturk', 'mustafakataturk', 'mustafakemala', 'mustafakemalataturk'] +``` + +`Student` +--------- + +*`short_number_generator(unit_code:, year: nil, starting:)`* + +Kısa biçimli öğrenci numarası üreteci. + +```ruby +generator = Nokul::Tenant::Codification::Student.short_number_generator(unit_code: '203', year: '20', starting: '001') +generator.run #=> '20320001' +generator.run #=> '20320002' +``` + +*`long_number_generator(unit_code:, starting:)`* + +Uzun biçimli öğrenci numarası üreteci. + +```ruby +generator = Nokul::Tenant::Codification::Student.long_number_generator(unit_code: '203', starting: '001') +generator.run #=> '20300001' +generator.run #=> '20300002' +``` + +`Employee` +---------- + +Henüz gerçeklenmedi. + +Özelleştirme +------------ + +Kodifikasyon lojiğini olduğu gibi kullanmak istiyorsanız +`plugins/tenant/KİRACI/app/lib/codification.rb` dosyasını aşağıdaki içerikle +oluşturmanız yeterli. + +```ruby +Codification = Tenant::Codification +``` + +Belirli bir metodu özelleştirmek istiyorsanız özelleştireceğiniz metodun +bulunduğu modülü `extend` ederek aynı dosyada aşağıdakine benzer bir düzenleme +yapmanız gerekiyor. + +```ruby +module Codification + # Ortak lojiği olduğu gibi al + include Tenant::Codification + + # Sadece öğrenci numarası üretecini değiştireceğiz + module Student + extend Tenant::Codification::Student + + module_function + + def short_number_generator(**args) + Support::Codification.sequential_numeric_codes args[:starting], prefix: args[:year], net_length: 6, base: 10 + end + end +end +``` + +Örneği basit tutmak için sanitizasyon yapılmamıştır. Bu özelleştirmede sadece +öğrenci numarası üreteci özelleştirilmiştir. Diğer tüm metodlar değişiklik +olmadan kullanılabilir. From 4c815951bdadbd1fca902e44f34e168794131597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 27 Mar 2019 10:31:30 +0300 Subject: [PATCH 082/279] Final API touches --- plugins/tenant/common/lib/nokul/tenant/codification/student.rb | 2 -- plugins/tenant/omu/app/lib/codification.rb | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 plugins/tenant/omu/app/lib/codification.rb diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/student.rb b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb index ea04c52dd..7c9378f3e 100644 --- a/plugins/tenant/common/lib/nokul/tenant/codification/student.rb +++ b/plugins/tenant/common/lib/nokul/tenant/codification/student.rb @@ -58,8 +58,6 @@ def starting(starting, *prefix) raise ArgumentError, "Starting sequence length must be #{net_length}: #{starting}" end end - - private_constant :Sanitized end end end diff --git a/plugins/tenant/omu/app/lib/codification.rb b/plugins/tenant/omu/app/lib/codification.rb new file mode 100644 index 000000000..36210b4d5 --- /dev/null +++ b/plugins/tenant/omu/app/lib/codification.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +Codification = Tenant::Codification From 0e4b8b5257093b8c13dd72c9d99ef0f44982ce24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 27 Mar 2019 14:19:27 +0300 Subject: [PATCH 083/279] Ensure that the Codification API exists at the top level --- test/lib/codification_test.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/lib/codification_test.rb diff --git a/test/lib/codification_test.rb b/test/lib/codification_test.rb new file mode 100644 index 000000000..b8f147136 --- /dev/null +++ b/test/lib/codification_test.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'test_helper' + +class CodificationTest < ActiveSupport::TestCase + test 'Codification API exists' do + assert defined? Codification + assert(%i[Unit User Student].all? { |mod| Codification.const_defined?(mod) }) + end + + test 'Codification API has proper methods' do + assert_respond_to Codification::User, :name_generate + assert_respond_to Codification::User, :name_suggest + + assert_respond_to Codification::Student, :short_number_generator + assert_respond_to Codification::Student, :long_number_generator + + assert_respond_to Codification::Unit, :code_generator + end +end From c03896d1db4f81869a607ff0b40c535309cbf24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 27 Mar 2019 14:22:35 +0300 Subject: [PATCH 084/279] =?UTF-8?q?Min=C3=B6r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/support/doc/codification.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index ab4167289..f58812a49 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -263,7 +263,7 @@ modüllerini kullanabilirsiniz. kullanıcı adları üretir. ```ruby - coder = Codification.suffixed_user_names %w[mustafa kemal atatürk] + coder = Codification.suffixed_user_names %w[Mustafa Kemal Atatürk] coder.run #=> 'mkataturk.123' (son ek rastgele) ``` @@ -271,7 +271,7 @@ modüllerini kullanabilirsiniz. adları üretir. ```ruby - coder = Codification.unsuffixed_user_names %w[mustafa kemal atatürk] + coder = Codification.unsuffixed_user_names %w[Mustafa Kemal Atatürk] coder.run #=> 'mkataturk' coder.run #=> 'mkemala' coder.run #=> 'mustafaka' @@ -304,5 +304,5 @@ module Nokul end ``` -Bu noktadan sonra kodlamayı jeneratör olarak (çoğul formda) `simple_codes` +Bu noktadan sonra kodlamayı üreteç olarak (çoğul formda) `simple_codes` adıyla, tek üretim için (tekil formda) `simple_code` adıyla kullanabilirsiniz. From a39456053feeb38eb33c2e1977d30e86a321d742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 27 Mar 2019 18:54:18 +0300 Subject: [PATCH 085/279] Remove redundant to_s --- plugins/tenant/common/lib/nokul/tenant/codification/unit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb b/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb index e3a4f5b44..3c1303b35 100644 --- a/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb +++ b/plugins/tenant/common/lib/nokul/tenant/codification/unit.rb @@ -14,7 +14,7 @@ def code_generator(starting:, ending:, pattern: nil, memory:) raise("Code length must be #{const.gross_length}: #{code}") end - range = Range.new(starting.to_s, ending.to_s) + range = Range.new(starting, ending) post_process = Regexp.new(pattern) if pattern Support::Codification.sequential_numeric_codes range, memory: memory, post_process: post_process From d1cfffc84e1ddbb1677262793d3a1d188c0ac09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 09:26:27 +0300 Subject: [PATCH 086/279] Add academia related words --- plugins/support/lib/nokul/support/data/en.yml | 69 ++++++++- plugins/support/lib/nokul/support/data/tr.yml | 138 +++++++++++++++--- 2 files changed, 184 insertions(+), 23 deletions(-) diff --git a/plugins/support/lib/nokul/support/data/en.yml b/plugins/support/lib/nokul/support/data/en.yml index 5c25a553d..640d2b1d8 100644 --- a/plugins/support/lib/nokul/support/data/en.yml +++ b/plugins/support/lib/nokul/support/data/en.yml @@ -336,7 +336,71 @@ reserved: - yoursite - yourusername - # Ruby keywords + # Academic + - academe + - academia + - academic + - academician + - admission + - alumni + - assessment + - assignment + - bsc + - campus + - classroom + - college + - colleges + - conservatory + - diplomas + - doctorate + - donnish + - education + - educational + - employee + - faculty + - graduate + - institute + - institution + - instructional + - intellectual + - lab + - laboratory + - learning + - msc + - office + - pedagogic + - pedagogical + - pedantic + - phd + - postgraduate + - professor + - professors + - pupil + - research + - scholar + - scholarly + - scholars + - scholarship + - scholastic + - school + - schooling + - schools + - science + - scientific + - student + - syllabus + - teacher + - teachers + - teaching + - theoretical + - theory + - tuition + - undergraduate + - universities + - university + - vocational + + # Ruby - alias - and - begin @@ -374,8 +438,7 @@ reserved: - while - yield - # SQL keywords - # https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserved-words + # SQL https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserved-words - a - abort - abs diff --git a/plugins/support/lib/nokul/support/data/tr.yml b/plugins/support/lib/nokul/support/data/tr.yml index 133d7f08e..23efee24d 100644 --- a/plugins/support/lib/nokul/support/data/tr.yml +++ b/plugins/support/lib/nokul/support/data/tr.yml @@ -760,57 +760,155 @@ offensives: - zviyetini reserved: + # Akademik + - akademi + - akademik + - akademisyen + - alim + - ana + - arastirma - araştırma + - atama + - baskan + - başkan + - bilgin + - bilim + - bilimsel + - bolum + - bölüm - bulut + - burs + - calisan + - çalışan + - daire + - dal + - deger + - degerlendirme + - değerlendirme - dekan + - dekanlık + - ders + - dersler + - diploma + - diplomalar + - docent - doçent - doktor + - doktora + - egitici + - egitim + - eğitici - eğitim + - enstitu - enstitü + - entellektuel + - entellektüel + - etik + - fakulte - fakülte + - gelistirme - geliştirme + - gorevli + - gorevlisi - görevli - görevlisi + - guvenlik - güvenlik - hoca + - ilim + - imtihan + - isci + - işçi + - kabul + - kampus + - kampüs + - karar + - kolej + - kolejler + - komisyon + - komite - konservatuvar - kullanıcı + - kullanici + - kurul + - kurum + - laboratuvar + - lisans + - memur - merkez + - merkezi + - meslek + - mesleki + - mezun + - mezunlar + - mudur + - mudurluk + - mufredat - müdür + - müdürlük + - müfredat - nokul + - odev + - odevler + - ofis + - ogrenci + - ogretim + - ogretmen + - ogretmenler - okul + - okullar - okutman + - ödev + - ögrenme + - öğrenci + - öğrenme - öğretim - öğretmen + - öğretmenler - parola + - pedagojik + - pratik + - profesor + - profesorler - profesör + - profesörler + - proje + - rektor - rektör + - rektörlük + - sanat + - secim + - seçim - sekreter + - sekreterlik - servis + - sınav + - sınıf + - sifre + - sinav + - sinif - sistem + - skolastik + - sube - şifre + - şube - takvim + - teori + - teorik + - tez + - tezler + - universite + - universiteler + - uye - uygulama + - üniversite + - üniversiteler - üye + - yardımcı + - yardimci + - yonetici - yönetici + - yuksek + - yüksek + - yüksekokul - zaman - - # ASCIIfied - - arastirma - - docent - - egitim - - enstitu - - fakulte - - gelistirme - - gorevli - - gorevlisi - - guvenlik - - kullanici - - mudur - - ogretim - - ogretmen - - profesor - - rektor - - sifre - - uye - - yonetici From cc821e19340475e7dc0395d03596e29c6236dc6c Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Thu, 28 Mar 2019 10:02:25 +0300 Subject: [PATCH 087/279] Add new validation to activation service Move update operations from controller to activation service --- .../account/activations_controller.rb | 4 +- app/models/user.rb | 3 + .../activatable/activation_service.rb | 84 +++++++++++++------ .../controllers/account/activations.en.yml | 2 + .../controllers/account/activations.tr.yml | 4 +- 5 files changed, 66 insertions(+), 31 deletions(-) diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 8103d8d03..54704293f 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -13,9 +13,7 @@ def new def update @activation = Activatable::ActivationService.new(params[:activation]) - if @activation.valid? - @activation.prospective.update(archived: true) - @activation.user.update(activated: true, activated_at: Time.zone.now) + if @activation.active redirect_to login_path, notice: t('.success') else render :new diff --git a/app/models/user.rb b/app/models/user.rb index 7ce055fb6..a7110d24d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -54,6 +54,9 @@ class User < ApplicationRecord after_create_commit :build_address_information, if: proc { addresses.formal.empty? } after_create_commit :build_identity_information, if: proc { identities.formal.empty? } + # scopes + scope :activated, -> { where(activated: true) } + # store accessors store :profile_preferences, accessors: %i[ extension_number diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index a2e17b2c5..74a0906fb 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -4,20 +4,28 @@ module Activatable class ActivationService include ActiveModel::Validations - attr_accessor :id_number, :first_name, :last_name, :date_of_birth, :serial, :serial_no, :document_no, :mobile_phone, - :prospective, :user, :country + attr_accessor :id_number, + :first_name, + :last_name, + :date_of_birth, + :serial, + :serial_no, + :document_no, + :mobile_phone, + :country validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } validates :first_name, presence: true validates :last_name, presence: true validates :date_of_birth, presence: true validates :serial, allow_blank: true, length: { is: 3 } - validates :serial_no, allow_blank: true, numericality: { only_integer: true }, length: { is: 6 } + validates :serial_no, allow_blank: true, numericality: { only_integer: true } validates :document_no, allow_blank: true, length: { is: 9 } validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validates_with ActivationServiceValidator - validate :must_be_prospective - validate :check_identity, if: :prospective? + validate :must_be_not_activated + validate :must_be_prospective, unless: :activated? + validate :must_be_verified_identity, if: :prospective? def initialize(attributes = {}) attributes.each do |name, value| @@ -27,45 +35,67 @@ def initialize(attributes = {}) # rubocop:disable Metrics/MethodLength def verified_identity? + birth_date = Date.strptime(date_of_birth) + Xokul::Kps::Verification.id_card( - id_number: @id_number, - first_name: @first_name, - last_name: @last_name, - day_of_birth: Date.strptime(@date_of_birth).day, - month_of_birth: Date.strptime(@date_of_birth).month, - year_of_birth: Date.strptime(@date_of_birth).year, - serial: @serial, - number: @serial_no, - document_number: @document_no + id_number: id_number, + first_name: first_name, + last_name: last_name, + day_of_birth: birth_date.day, + month_of_birth: birth_date.month, + year_of_birth: birth_date.year, + serial: serial, + number: serial_no, + document_number: document_no ) end # rubocop:enable Metrics/MethodLength + def activated? + User.activated.exists?(id_number: id_number) + end + # TODO: prospective_employee için geliştirme yapılmalı. def prospective? - ProspectiveStudent.not_archived.registered.find_by(id_number: @id_number).present? + ProspectiveStudent.not_archived.registered.exists?(id_number: id_number) end - def must_be_prospective + def active + return unless valid? + + process + rescue StandardError + errors.add(:base, T18n.t('.account.activations.system_error')) && false + end + + private + + def process + prospective = ProspectiveStudent.find_by(id_number: id_number) + user = User.find_by(id_number: id_number) + + ProspectiveStudent.transaction do + prospective.update(archived: true) + user.update(activated: true, activated_at: Time.zone.now) + end + end + + def must_be_not_activated return if errors.any? - errors.add(:base, I18n.t('.account.activations.record_not_found')) unless prospective? + errors.add(:base, I18n.t('.account.activations.already_activated')) if activated? end - def check_identity + def must_be_prospective return if errors.any? - if verified_identity? - find_prospective - else - errors.add(:base, I18n.t('.account.activations.identity_not_verified')) - end + errors.add(:base, I18n.t('.account.activations.record_not_found')) unless prospective? end - # TODO: prospective_employee için geliştirme yapılmalı. - def find_prospective - @prospective = ProspectiveStudent.not_archived.registered.find_by(id_number: @id_number) - @user = User.find_by(id_number: @id_number) + def must_be_verified_identity + return if errors.any? + + errors.add(:base, I18n.t('.account.activations.identity_not_verified')) unless verified_identity? end end end diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index 5cb670bee..ab3e36953 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -13,8 +13,10 @@ en: serial_no: Serial No account: activations: + already_activated: Your account is already activated. identity_not_verified: Your identity not verified. Make sure that the data you entered is correct. record_not_found: There is no record in the system to activate your account. + system_error: The system error has occurred. Please try later. new: <<: *activation_attributes activation: Activation diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index 30de55bcf..a13b9f295 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -6,15 +6,17 @@ tr: date_of_birth: Doğum Tarihi document_no: Doküman No first_name: Ad - id_number: TC/YU Numarası + id_number: TC Numarası last_name: Soyad mobile_phone: Cep Telefonu serial: Seri serial_no: Seri No account: activations: + already_activated: Hesabınız zaten aktif durumda. identity_not_verified: Kimlik bilgileriniz doğrulanamadı. Girmiş olduğunuz verilerin doğruluğundan emin olunuz. record_not_found: Sistemde hesabınızı aktifleştirecek bir kayıt bulunamamıştır. + system_error: Sistemsel bir hata oluştu. Lütfen daha sonra tekrar deneyin. new: <<: *activation_attributes activation: Aktivasyon From 0801ad113f0d87c414389dbf749f47fbc5629582 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Thu, 28 Mar 2019 10:02:45 +0300 Subject: [PATCH 088/279] Add activation controller test --- .../accounts/activation_controller_test.rb | 39 +++++++++++++++++++ test/fixtures/prospective_students.yml | 14 +++++++ test/fixtures/users.yml | 7 ++++ 3 files changed, 60 insertions(+) create mode 100644 test/controllers/accounts/activation_controller_test.rb diff --git a/test/controllers/accounts/activation_controller_test.rb b/test/controllers/accounts/activation_controller_test.rb new file mode 100644 index 000000000..274d64304 --- /dev/null +++ b/test/controllers/accounts/activation_controller_test.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Accounts + class ActivationControllerTest < ActionDispatch::IntegrationTest + setup do + @prospective = prospective_students(:mine) + @form_params = %w[id_number first_name last_name date_of_birth serial serial_no document_no mobile_phone country] + end + + test 'should get new' do + get activation_path + assert_equal 'new', @controller.action_name + assert_response :success + assert_select '.simple_form' do + @form_params.each do |param| + assert_select "#activation_#{param}" + end + end + end + + test 'should update activation' do + parameters = { + id_number: '56593662552', + first_name: 'Mine', + last_name: 'Uraslı', + date_of_birth: '1984-11-16', + serial: 'J10', + serial_no: '94646', + mobile_phone: '5551111111', + country: 'TR' + } + + patch activation_path, params: { activation: parameters } + assert_redirected_to login_path(locale: I18n.locale) + end + end +end diff --git a/test/fixtures/prospective_students.yml b/test/fixtures/prospective_students.yml index 502fc275a..066694756 100644 --- a/test/fixtures/prospective_students.yml +++ b/test/fixtures/prospective_students.yml @@ -33,3 +33,17 @@ jane: meb_status: true academic_term: fall_2018_2019 expiry_date: 2019-01-15 08:00:00 +mine: + email: mineurasli@gmail.com + first_name: Mine + last_name: Uraslı + unit: bilgisayar_muhendisligi + student_entrance_type: osys + id_number: 56593662552 # Sample ID number provided by KPS + gender: female + military_status: true + obs_status: true + meb_status: true + registered: true + academic_term: fall_2018_2019 + expiry_date: 2019-05-15 08:00:00 diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 18418fa71..7b5b02273 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -4,7 +4,14 @@ serhat: email: msdundars@gmail.com id_number: 10570898198 # Sample ID number provided by KPS encrypted_password: $2a$11$C/GxMBY.clyScJElgoplBuIJALvy3kYlOFAPAVfARUuiJfTEpMv2q # d61c16acabedeab84f1ad062d7ad948ef3 + activated: true john: email: john@gmail.com id_number: 99001255472 # Sample ID number provided by KPS encrypted_password: $2a$11$C/GxMBY.clyScJElgoplBuIJALvy3kYlOFAPAVfARUuiJfTEpMv2q # d61c16acabedeab84f1ad062d7ad948ef3 + activated: true +mine: + email: mineurasli@gmail.com + id_number: 56593662552 # Sample ID number provided by KPS + encrypted_password: $2a$11$C/GxMBY.clyScJElgoplBuIJALvy3kYlOFAPAVfARUuiJfTEpMv2q # d61c16acabedeab84f1ad062d7ad948ef3 + activated: false From c0bd66b439cb5aa62f80a7974d8ee43df1299600 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Thu, 28 Mar 2019 10:58:04 +0300 Subject: [PATCH 089/279] Add agreements links --- app/views/account/activations/new.html.erb | 7 +++++++ config/locales/controllers/account/activations.en.yml | 3 +++ config/locales/controllers/account/activations.tr.yml | 3 +++ 3 files changed, 13 insertions(+) diff --git a/app/views/account/activations/new.html.erb b/app/views/account/activations/new.html.erb index 658f8387d..8ab5fb7ec 100644 --- a/app/views/account/activations/new.html.erb +++ b/app/views/account/activations/new.html.erb @@ -85,6 +85,13 @@
+
+

+ + <%= t('.agreements', user_agreements_link: link_to(t('.user_agreement'), '#'), privacy_policies_link: link_to(t('.privacy_policy'), '#')).html_safe %> + +

+
<%= f.button :submit, t('.verify'), class: 'btn btn-block btn-success' %> <% end %> diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index ab3e36953..2e2d8de0e 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -21,10 +21,13 @@ en: <<: *activation_attributes activation: Activation account_activation: Activate your account + agreements: By activating your account, you agree to our %{user_agreements_link} and %{privacy_policies_link}. for_old_id_cards: For old identity cards identity_verification: Identity Verification login: Login phone_verification: Phone Verification + privacy_policy: Privacy Policy + user_agreement: User Agreement verify: Verify update: success: Your account has been activated. diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index a13b9f295..81397e522 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -21,10 +21,13 @@ tr: <<: *activation_attributes activation: Aktivasyon account_activation: Hesabınızı aktifleştirin + agreements: Hesabınızı aktifleştirerek, %{user_agreements_link} ve %{privacy_policies_link} kabul etmiş olursunuz. for_old_id_cards: Eski kimlik kartları için identity_verification: Kimlik Doğrulama login: Giriş Yap phone_verification: Telefon Doğrulama + privacy_policy: Gizlilik Politikalarımızı + user_agreement: Kurallarımızı verify: Onayla update: success: Hesabınız aktifleştirildi. From 207ddf14d4566c81a316106cae4413b068b00bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Can=20Y=C4=B1lmaz?= Date: Thu, 28 Mar 2019 11:09:19 +0300 Subject: [PATCH 090/279] Update plugins/support/doc/codification.md Co-Authored-By: roktas --- plugins/support/doc/codification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index f58812a49..97056ff98 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -8,7 +8,7 @@ author: Recai Oktaş `Codification` modülü entitelere kod ataması yapmakta kullanılan sınıflardan oluşmaktadır. Temelde bir [`Enumerator`](https://ruby-doc.org/core-2.6.2/Enumerator.html) nesnesi olan -`Code` verilen bir "kaynağı" bir `Enumerator"e çevirir ("take_in") ve her +`Code` verilen bir "kaynağı" bir `Enumerator`e çevirir ("take_in") ve her ardışımda bir String dizisi yayımlar ("take_out"). Yayımlanan String dizisi seçenek olarak verilen ön ek, son ek ve ara ekler dikkate alınarak nihai "kod" olan String'e çevrilir. From 3f40cae4af8803f3abefeea11bf4905b5f5f4d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Can=20Y=C4=B1lmaz?= Date: Thu, 28 Mar 2019 11:09:28 +0300 Subject: [PATCH 091/279] Update plugins/support/doc/codification.md Co-Authored-By: roktas --- plugins/support/doc/codification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index 97056ff98..c825ea6c6 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -100,7 +100,7 @@ coder.run #=> StopIteration ``` `Code` nesnesi ardışımlar tükendiğinde `StopIteration` istisnası ürettiğinden -yukarıda örneklenen işlemi `loop` döngüsüyle de gerçekleyebilirsiniz +yukarıda örneklenen işlemi `loop` döngüsüyle de gerçekleyebilirsiniz. ```ruby memory = SimpleMemory.new From 9d64cce3b1a4e1be0d10117853ba0f450e2aa219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Can=20Y=C4=B1lmaz?= Date: Thu, 28 Mar 2019 11:09:38 +0300 Subject: [PATCH 092/279] Update plugins/support/doc/codification.md Co-Authored-By: roktas --- plugins/support/doc/codification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index c825ea6c6..00061c277 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -144,7 +144,7 @@ produced #=> ['foo'] Bu örnekte `bar` değeri tekil olmadığından, `baz` değeri ise son işlemede filtrelendiğinden atlanmış ve sadece `foo` değeri üretilmiştir. Örnekte olduğu gibi son işlemede kodu reddetmek için `Processor.skip` metodu kullanılır. -İkinci argümanda verilen ifade (`string != 'baz') doğru ise kod kabul edilmekte +İkinci argümanda verilen ifade (`string != 'baz'`) doğru ise kod kabul edilmekte aksi halde reddedilmektedir. Son işlemede tanımlanan `Proc` bloğunun ürettiği değer üretilen kod olarak kabul From 746fa0e358ae7f9855417eaf68eb278e7289e5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beg=C3=BCm=20Topy=C4=B1ld=C4=B1z?= Date: Thu, 28 Mar 2019 11:26:51 +0300 Subject: [PATCH 093/279] Add abbreviations --- plugins/support/lib/nokul/support/data/tr.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/support/lib/nokul/support/data/tr.yml b/plugins/support/lib/nokul/support/data/tr.yml index 23efee24d..dbcb938e7 100644 --- a/plugins/support/lib/nokul/support/data/tr.yml +++ b/plugins/support/lib/nokul/support/data/tr.yml @@ -6,17 +6,24 @@ abbreviations: - act - aihm - ales + - aöf - aselsan - baum + - bd + - btk - cmk - cmuk - dgs + - doç + - dr + - fak - gata - gce - khk - kktc - kpds - kpss + - hz - les - meb - myo @@ -26,11 +33,15 @@ abbreviations: - ösym - ösys - öyp + - prof - sat - tbmm + - tc - tck + - tl - todaie - toefl + - tömer - trt - tsk - tübitak @@ -40,7 +51,9 @@ abbreviations: - ydus - ygs - yök + - yökdil - yös + - yurtkur conjunctions: - ama @@ -51,6 +64,7 @@ conjunctions: - ile - ise - ki + - lakin - oysa - oysaki - ve @@ -442,6 +456,7 @@ offensives: - monakkoluyum - motherfucker - mudik + - nazi - oc - ocuu - ocuun From aa9c25342f235a6d7f9dd8311f08ab5a5d84f254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:16:10 +0300 Subject: [PATCH 094/279] Remove setup method from Coder as it presents a redundant conveniency --- plugins/support/lib/nokul/support/codification/coder.rb | 4 ---- plugins/support/test/codification/coder_test.rb | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index 38e1f9882..d95c13407 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -10,10 +10,6 @@ class Coder inherited_by_conveying_attributes :default_options - def self.setup(**options) - default_options.merge!(**options) - end - def initialize(code, **options) @code = code.must_be_any_of! Code @processor = Processor.new @options = default_options.merge(options) diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index e6ec71bba..fa584b83a 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -123,11 +123,12 @@ def take_out(value) module TestDummy class Foo < Coder - setup foo: 13 + default_options[:foo] = 13 end class Bar < Foo - setup foo: 19, bar: 23 + default_options[:foo] = 19 + default_options[:bar] = 23 end end From a1169f6f4040f2ea27e86366ef9131f166a40236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:18:47 +0300 Subject: [PATCH 095/279] Introduce (optional) module level default_options to codes --- .../support/lib/nokul/support/codification/codes.rb | 4 +++- .../support/codification/codes/suffixed_user_names.rb | 11 +++++++---- .../codification/codes/unsuffixed_user_names.rb | 10 +++++++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes.rb b/plugins/support/lib/nokul/support/codification/codes.rb index ad9e6627c..39ae51e0e 100644 --- a/plugins/support/lib/nokul/support/codification/codes.rb +++ b/plugins/support/lib/nokul/support/codification/codes.rb @@ -26,11 +26,13 @@ module Codification singular_method = name.singularize define_method plural_method do |*args, **options, &block| + options = codification.default_options.merge options if codification.respond_to? :default_options codification::Coder.new(codification::Code.new(*args, **options), **options, &block) end define_method singular_method do |*args, **options, &block| - send(plural_method, *args, **options, &block).run + options = codification.default_options.merge options if codification.respond_to? :default_options + codification::Coder.new(codification::Code.new(*args, **options), **options, &block).run end end end diff --git a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb index d69835bb9..25e78eb59 100644 --- a/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/suffixed_user_names.rb @@ -10,11 +10,14 @@ module Nokul module Support module Codification module SuffixedUserNames - Code = UnsuffixedUserNames::Code + mattr_reader :default_options, default: { + alternative: :abbreviated, + interfix: '', + builtin_post_process: %i[safe? random_suffix] + } - class Coder < UnsuffixedUserNames::Coder - setup builtin_post_process: superclass.default_options[:builtin_post_process] + %i[random_suffix] - end + Code = UnsuffixedUserNames::Code + Coder = Codification::Coder end end end diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index 85031c2dc..24e3baa96 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -10,6 +10,12 @@ module Nokul module Support module Codification module UnsuffixedUserNames + mattr_reader :default_options, default: { + alternative: :non_abbreviated, + interfix: '.', + builtin_post_process: %i[safe?] + } + SUPPORTED_ALTERNATIVES = Set.new %i[abbreviated non_abbreviated] module Alternatives @@ -68,9 +74,7 @@ def alternative end end - class Coder < Codification::Coder - setup builtin_post_process: %i[safe?] - end + Coder = Codification::Coder end end end From 1dcd9e001c6c4ba32d5abac32572cd1b01c575d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:19:49 +0300 Subject: [PATCH 096/279] Fix non abbreviated name generation logic --- .../nokul/support/codification/codes/unsuffixed_user_names.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb index 24e3baa96..ed4b0c3aa 100644 --- a/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb +++ b/plugins/support/lib/nokul/support/codification/codes/unsuffixed_user_names.rb @@ -31,8 +31,8 @@ def abbreviated def non_abbreviated surname, forenames = last, clip # rubocop:disable ParallelAssignment - forenames.send(:index_combinations_of_source).map do |alternative| - [*alternative, surname] + forenames.send(:index_combinations_of_source).map do |indexes| + [*forenames.values_at(*indexes), surname] end.sort_by(&:length) end From 0910fdd095daf1b8b16f61174f2fa3bd7636b88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:20:24 +0300 Subject: [PATCH 097/279] Show object itself on must_be_any_of! errors --- plugins/support/lib/nokul/support/core_ext/object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/core_ext/object.rb b/plugins/support/lib/nokul/support/core_ext/object.rb index 54a32a286..95ff4fef9 100644 --- a/plugins/support/lib/nokul/support/core_ext/object.rb +++ b/plugins/support/lib/nokul/support/core_ext/object.rb @@ -19,7 +19,7 @@ def sanitize_arguments(*args) end def type_error(object, type) - "#{type} expected where found: #{object.class}" unless object.is_a? type + "#{type} expected where found: #{object}" unless object.is_a? type end def must_be_array(object, type) From 61fccf67f4efcd56c0e0a85bb20dd8579626b11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:21:18 +0300 Subject: [PATCH 098/279] Update codification library tests against latest changes --- .../unsuffixed_user_names_test.rb | 78 +++++++++++++------ 1 file changed, 54 insertions(+), 24 deletions(-) diff --git a/plugins/support/test/codification/unsuffixed_user_names_test.rb b/plugins/support/test/codification/unsuffixed_user_names_test.rb index 6272a33fe..afdf80093 100644 --- a/plugins/support/test/codification/unsuffixed_user_names_test.rb +++ b/plugins/support/test/codification/unsuffixed_user_names_test.rb @@ -6,22 +6,44 @@ module Nokul module Support module Codification class UnsuffixedUserNamesTest < ActiveSupport::TestCase - test 'simple use case works' do + test 'simple use case with default works' do coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez] - assert_equal'ggmarquez', coder.run - assert_equal'ggarciam', coder.run - assert_equal'gabrielgm', coder.run - assert_equal'ggarciamarquez', coder.run - assert_equal'gabrielgmarquez', coder.run - assert_equal'gabrielgarciam', coder.run - assert_equal'gabrielgarciamarquez', coder.run + assert_equal 'gabriel.marquez', coder.run + assert_equal 'garcia.marquez', coder.run + assert_equal 'gabriel.garcia.marquez', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'simple use case with non abbreviated options works' do + options = { alternative: :non_abbreviated, interfix: '-' } + coder = Codification.unsuffixed_user_names(%w[gabriel garcia marquez], **options) + + assert_equal 'gabriel-marquez', coder.run + assert_equal 'garcia-marquez', coder.run + assert_equal 'gabriel-garcia-marquez', coder.run + + assert_raise(StopIteration) { coder.run } + end + + test 'simple use case with abbreviated options works' do + options = { alternative: :abbreviated, interfix: nil } + coder = Codification.unsuffixed_user_names(%w[gabriel garcia marquez], **options) + + assert_equal 'ggmarquez', coder.run + assert_equal 'ggarciam', coder.run + assert_equal 'gabrielgm', coder.run + assert_equal 'ggarciamarquez', coder.run + assert_equal 'gabrielgmarquez', coder.run + assert_equal 'gabrielgarciam', coder.run + assert_equal 'gabrielgarciamarquez', coder.run assert_raise(StopIteration) { coder.run } end test 'API with singular name works' do - assert_equal 'ggmarquez', Codification.unsuffixed_user_name(%w[gabriel garcia marquez]) + assert_equal 'gabriel.marquez', Codification.unsuffixed_user_name(%w[gabriel garcia marquez]) end test 'simple use case with memory works' do @@ -29,26 +51,25 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], memory: memory - memory.remember 'ggarciam' + memory.remember 'garcia.marquez' - assert_equal'ggmarquez', coder.run - assert_equal'gabrielgm', coder.run + assert_equal 'gabriel.marquez', coder.run + assert_equal 'gabriel.garcia.marquez', coder.run end test 'prefix option works' do coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], prefix: 'user.' - assert_equal'user.ggmarquez', coder.run - assert_equal'user.ggarciam', coder.run + assert_equal 'user.gabriel.marquez', coder.run + assert_equal 'user.garcia.marquez', coder.run + assert_equal 'user.gabriel.garcia.marquez', coder.run end test 'regex post process option works' do - coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], post_process: /.+garcia.+/ + coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], post_process: /.*garcia/ - assert_equal'ggarciam', coder.run - assert_equal'ggarciamarquez', coder.run - assert_equal'gabrielgarciam', coder.run - assert_equal'gabrielgarciamarquez', coder.run + assert_equal 'garcia.marquez', coder.run + assert_equal 'gabriel.garcia.marquez', coder.run assert_raise(StopIteration) { coder.run } end @@ -56,12 +77,14 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase test 'proc post process option works' do coder = Codification.unsuffixed_user_names %w[gabriel garcia marquez], post_process: proc { |s| s.upcase } - assert_equal'GGMARQUEZ', coder.run - assert_equal'GGARCIAM', coder.run + assert_equal 'GABRIEL.MARQUEZ', coder.run + assert_equal 'GARCIA.MARQUEZ', coder.run + assert_equal 'GABRIEL.GARCIA.MARQUEZ', coder.run end test 'offensive words should not be seen' do - coder = Codification.unsuffixed_user_names %w[yilmaz ali rak] + options = { alternative: :abbreviated, interfix: nil } + coder = Codification.unsuffixed_user_names(%w[yilmaz ali rak], **options) assert_equal 'yalir', coder.run assert_equal 'yilmazar', coder.run @@ -74,7 +97,8 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase end test 'reserved words should not be seen' do - coder = Codification.unsuffixed_user_names %w[william hile] + options = { alternative: :abbreviated, interfix: nil } + coder = Codification.unsuffixed_user_names(%w[william hile], **options) assert_equal 'williamh', coder.run assert_equal 'williamhile', coder.run @@ -82,8 +106,14 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase assert_raise(StopIteration) { coder.run } end - test 'can produce available names' do + test 'can produce (non abbreviated) available names' do available = Codification.unsuffixed_user_names(%w[suat alak]).available(3) + assert_equal %w[suat.alak], available + end + + test 'can produce abbreviated available names' do + options = { alternative: :abbreviated, interfix: nil } + available = Codification.unsuffixed_user_names(%w[suat alak], **options).available(3) assert_equal %w[suata suatalak], available end end From 06915dc0ff3b1180277e5792e095c43dabee190b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 12:22:09 +0300 Subject: [PATCH 099/279] Update Tenant codification tests against latest changes --- .../lib/nokul/tenant/codification/user.rb | 6 ++-- .../common/test/codification/user_test.rb | 31 +++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/user.rb b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb index ffb64d8df..8b8b46fac 100644 --- a/plugins/tenant/common/lib/nokul/tenant/codification/user.rb +++ b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb @@ -9,15 +9,17 @@ module User module_function - def name_generate(first_name:, last_name:, memory:) + def name_generate(first_name:, last_name:, memory:, **options) Support::Codification.suffixed_user_name [first_name, last_name], + **options, memory: memory, random_suffix_separator: const.random_suffix_separator, random_suffix_length: const.random_suffix_length end - def name_suggest(first_name:, last_name:, memory:) + def name_suggest(first_name:, last_name:, memory:, **options) Support::Codification.unsuffixed_user_names([first_name, last_name], + **options, memory: memory).available end end diff --git a/plugins/tenant/common/test/codification/user_test.rb b/plugins/tenant/common/test/codification/user_test.rb index d9e5bec62..41faad74e 100644 --- a/plugins/tenant/common/test/codification/user_test.rb +++ b/plugins/tenant/common/test/codification/user_test.rb @@ -6,7 +6,7 @@ module Nokul module Tenant module Codification class UserTest < ActiveSupport::TestCase - test 'name_generate works' do + test 'name_generate works by default' do user_name = User.name_generate(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: Support::Codification::SimpleMemory.new) @@ -16,11 +16,38 @@ class UserTest < ActiveSupport::TestCase assert_match(/^mkataturk#{sep}\d{#{len}}$/, user_name) end - test 'name_suggest works' do + test 'name_generate works with options' do + user_name = User.name_generate(first_name: 'Mustafa Kemal', + last_name: 'Atatürk', + memory: Support::Codification::SimpleMemory.new, + interfix: '-') + + sep = Regexp.escape(Codification::User.const.random_suffix_separator) + len = Codification::User.const.random_suffix_length + assert_match(/^m-k-ataturk#{sep}\d{#{len}}$/, user_name) + end + + test 'name_suggest works by default' do actual = User.name_suggest(first_name: 'Mustafa Kemal', last_name: 'Atatürk', memory: Support::Codification::SimpleMemory.new) + expected = %w[ + mustafa.ataturk + kemal.ataturk + mustafa.kemal.ataturk + ] + + assert_equal expected, actual + end + + test 'name_suggest works with options' do + actual = User.name_suggest(first_name: 'Mustafa Kemal', + last_name: 'Atatürk', + memory: Support::Codification::SimpleMemory.new, + alternative: :abbreviated, + interfix: nil) + expected = %w[ mkataturk mkemala From 3a2fde8a6a0537653a2673f9f731346bd6dad6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 14:07:39 +0300 Subject: [PATCH 100/279] Reimplement available methods by removing Amnesic Memory --- .../lib/nokul/support/codification/coder.rb | 53 +++++++++++++------ .../lib/nokul/support/codification/memory.rb | 16 +----- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/plugins/support/lib/nokul/support/codification/coder.rb b/plugins/support/lib/nokul/support/codification/coder.rb index d95c13407..b177876c1 100644 --- a/plugins/support/lib/nokul/support/codification/coder.rb +++ b/plugins/support/lib/nokul/support/codification/coder.rb @@ -17,13 +17,13 @@ def initialize(code, **options) setup if defined? setup end - def run_verbose(amnesic: false) + def run_verbose n = 0 while (n += 1) < LOOP_GUARD over_loop!(n) - attempt = try(amnesic: amnesic) + attempt = try return [attempt, n] if attempt @@ -33,26 +33,27 @@ def run_verbose(amnesic: false) raise Error, "Too many tries: #{n}" end - def run(**flags) - run_verbose(**flags).first - end - - def dry - clone.run(amnesic: true) + def run + run_verbose.first end def reset code.rewind end - DEFAULT_AVAILABLE_MAX = 10 + def available!(limit = nil) + self.class.available(code, limit: limit, **options) + end + + DEFAULT_AVAILABLE_LIMIT = 10 + + def self.available(code, limit: nil, **options) + coder = new(code, **options).extend Dry # extend object to avoid mutating memory - def available(number_of_available = DEFAULT_AVAILABLE_MAX) - instance = clone result = [] - number_of_available.times do - result << instance.run + (limit || DEFAULT_AVAILABLE_LIMIT).times do + result << coder.run rescue StopIteration break end @@ -72,13 +73,35 @@ def memory def over_loop!(*); end - def try(amnesic:) + def try return unless (result = processor.process(self, code.peek, **options)) - memory.learn(result, amnesic: amnesic) + learn result rescue Skip nil end + + private + + def learn(string) + memory.learn string + end + + # Patch module to generate codes without mutating memory + module Dry + def learn(string) + internal_memory.remember(string) if memory.remember?(string) + internal_memory.learn(string) + end + + private + + def internal_memory + @internal_memory ||= SimpleMemory.new + end + end + + private_constant :Dry end end end diff --git a/plugins/support/lib/nokul/support/codification/memory.rb b/plugins/support/lib/nokul/support/codification/memory.rb index d9a3418e0..bde7b4d9a 100644 --- a/plugins/support/lib/nokul/support/codification/memory.rb +++ b/plugins/support/lib/nokul/support/codification/memory.rb @@ -19,21 +19,7 @@ def forget(_string, **) def learn(string, **options) return nil if remember?(string, **options) - remember(string, **options) unless options[:amnesic] - string - end - end - - class AmnesicMemory < Memory - def remember(string, **) - string - end - - def remember?(_string, **) - false - end - - def forget(string, **) + remember(string, **options) string end end From 3bc95817f29aa5cb7ab311135910fc8cac49c694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 14:09:02 +0300 Subject: [PATCH 101/279] Update all tests against latest changes --- .../support/test/codification/coder_test.rb | 29 ++++++++++++++----- .../codification/random_numeric_codes_test.rb | 2 +- .../sequential_numeric_codes_test.rb | 2 +- .../codification/suffixed_user_names_test.rb | 2 +- .../unsuffixed_user_names_test.rb | 4 +-- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/plugins/support/test/codification/coder_test.rb b/plugins/support/test/codification/coder_test.rb index fa584b83a..1cea4f097 100644 --- a/plugins/support/test/codification/coder_test.rb +++ b/plugins/support/test/codification/coder_test.rb @@ -43,6 +43,28 @@ def take_out(value) assert_raise(StopIteration) { coder.run } end + test 'run_verbose should work' do + memory = SimpleMemory.new + memory.remember 'foo' + + coder = Coder.new TestSimpleCode::SimpleCode.new(%w[foo bar baz]), memory: memory + result, n = coder.run_verbose + + assert_equal 'bar', result + assert_equal 2, n + end + + test 'available should work' do + memory = SimpleMemory.new + memory.remember 'bar' + + result = Coder.available TestSimpleCode::SimpleCode.new(%w[foo bar baz quux]), memory: memory + assert_equal %w[foo baz quux], result + + result = Coder.available TestSimpleCode::SimpleCode.new(%w[foo bar baz quux]), memory: memory, limit: 2 + assert_equal %w[foo baz], result + end + test 'post processes should work as predicator' do memory = SimpleMemory.new memory.remember 'bar' @@ -164,13 +186,6 @@ def take_out(*) err = assert_raise(Error) { coder.run } assert err.message.include? 'many tries' end - - test 'dry run should work' do - coder = Codification.sequential_numeric_codes '0013'..'9999' - assert_equal '0013', coder.run - assert_equal '0014', coder.dry - assert_equal '0014', coder.run - end end end end diff --git a/plugins/support/test/codification/random_numeric_codes_test.rb b/plugins/support/test/codification/random_numeric_codes_test.rb index 60e0af59b..7df25d92c 100644 --- a/plugins/support/test/codification/random_numeric_codes_test.rb +++ b/plugins/support/test/codification/random_numeric_codes_test.rb @@ -52,7 +52,7 @@ class RandomNumericCodesTest < ActiveSupport::TestCase test 'can produce available numbers' do coder = Codification.random_numeric_codes('777'..'779') - assert_equal %w[777 778 779], coder.available(3).sort + assert_equal %w[777 778 779], coder.available!(3).sort end end end diff --git a/plugins/support/test/codification/sequential_numeric_codes_test.rb b/plugins/support/test/codification/sequential_numeric_codes_test.rb index fd4239a9a..0ba8bca0d 100644 --- a/plugins/support/test/codification/sequential_numeric_codes_test.rb +++ b/plugins/support/test/codification/sequential_numeric_codes_test.rb @@ -76,7 +76,7 @@ class SequentialNumericCodesTest < ActiveSupport::TestCase test 'can produce available numbers' do coder = Codification.sequential_numeric_codes '0002'..'9999' - assert_equal %w[0002 0003 0004], coder.available(3) + assert_equal %w[0002 0003 0004], coder.available!(3) end end end diff --git a/plugins/support/test/codification/suffixed_user_names_test.rb b/plugins/support/test/codification/suffixed_user_names_test.rb index 401319b54..264d1bdc4 100644 --- a/plugins/support/test/codification/suffixed_user_names_test.rb +++ b/plugins/support/test/codification/suffixed_user_names_test.rb @@ -100,7 +100,7 @@ class SuffixedUserNamesTest < ActiveSupport::TestCase end test 'can produce available names' do - available = Codification.suffixed_user_names(%w[suat alak]).available(3) + available = Codification.suffixed_user_names(%w[suat alak]).available!(3) assert_equal 3, available.size assert available.all? do |name| name.start_with?('suata.') diff --git a/plugins/support/test/codification/unsuffixed_user_names_test.rb b/plugins/support/test/codification/unsuffixed_user_names_test.rb index afdf80093..84630c9d4 100644 --- a/plugins/support/test/codification/unsuffixed_user_names_test.rb +++ b/plugins/support/test/codification/unsuffixed_user_names_test.rb @@ -107,13 +107,13 @@ class UnsuffixedUserNamesTest < ActiveSupport::TestCase end test 'can produce (non abbreviated) available names' do - available = Codification.unsuffixed_user_names(%w[suat alak]).available(3) + available = Codification.unsuffixed_user_names(%w[suat alak]).available!(3) assert_equal %w[suat.alak], available end test 'can produce abbreviated available names' do options = { alternative: :abbreviated, interfix: nil } - available = Codification.unsuffixed_user_names(%w[suat alak], **options).available(3) + available = Codification.unsuffixed_user_names(%w[suat alak], **options).available!(3) assert_equal %w[suata suatalak], available end end From 26ba5b507448a74ad15b42542439831a086f9c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 14:09:47 +0300 Subject: [PATCH 102/279] Use new available! --- plugins/tenant/common/lib/nokul/tenant/codification/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/codification/user.rb b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb index 8b8b46fac..dd82f9500 100644 --- a/plugins/tenant/common/lib/nokul/tenant/codification/user.rb +++ b/plugins/tenant/common/lib/nokul/tenant/codification/user.rb @@ -20,7 +20,7 @@ def name_generate(first_name:, last_name:, memory:, **options) def name_suggest(first_name:, last_name:, memory:, **options) Support::Codification.unsuffixed_user_names([first_name, last_name], **options, - memory: memory).available + memory: memory).available! end end end From ed2f70c62256417dc249721ff853162090f6b67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 14:09:50 +0300 Subject: [PATCH 103/279] Improve documentation on several points --- plugins/support/doc/codification.md | 107 +++++++++++++++++++++++++--- 1 file changed, 98 insertions(+), 9 deletions(-) diff --git a/plugins/support/doc/codification.md b/plugins/support/doc/codification.md index f58812a49..64f2d4e52 100644 --- a/plugins/support/doc/codification.md +++ b/plugins/support/doc/codification.md @@ -86,8 +86,10 @@ sergiler. ------- Kodlama, inşa zamanında bir `Code` nesnesi alan `Coder` nesneleriyle yürütülür. -Kodlama sürecinde üretilen kodun her seferinde tekillik ve uygunluk denetimi -yapılır. +Kodlama `run` metoduyla gerçekleşir. Bu süreçte üretilen kodun her seferinde +tekillik ve uygunluk denetimi yapılır ve üretilen ara kod bu koşulları +sağlamıyorsa bir sonraki değer üretilerek koşul sağlanancaya kadar devam +edilir. İçteki `Code` nesnesi tükendiğinde `StopIteration` istisnası üretilir. ```ruby memory = SimpleMemory.new @@ -116,6 +118,56 @@ end produced #=> ['foo', 'baz'] ``` +Her çalıştırmada (`run`) uygun kodun kaç denemede bulunduğunu öğrenmek +isterseniz `run_verbose` metodunu kullanabilirsiniz. + +```ruby +memory = SimpleMemory.new +memory.remember 'foo' + +coder = Codification::Coder.new SimpleCode.new(%w[foo bar baz]), memory: memory + +result, n = coder.run_verbose #=> 'bar', 2 +``` + +Kodlayıcıyı adım adım çalıştırmak yerine mevcut durumda üretilebilecek tüm +kodları öğrenmek isterseniz `available!` metodunu kullanabilirsiniz. + +```ruby +memory = SimpleMemory.new +memory.remember 'foo' + +coder = Codification::Coder.new SimpleCode.new(%w[foo bar baz quux]), memory: memory + +coder.available! #=> ['bar', 'baz', 'quux'] +``` + +`available!` metodu üretilen kodların sayısını öntanımlı olarak `10` ile +sınırlamaktadır. Metoda geçirilecek bir limit değeriyle bu sınırlamayı +ayarlayabilirsiniz. + +```ruby +memory = SimpleMemory.new +memory.remember 'foo' + +coder = Codification::Coder.new SimpleCode.new(%w[foo bar baz quux]), memory: memory + +coder.available! 2 #=> ['bar', 'baz'] +``` + +Metod içteki `Code` nesnesini mutasyona uğrattığından "bang" notasyonuyla (sonda +`!) adlandırılmıştır. Dilerseniz aynı isimli (fakat "bang" notasyonu +kullanılmayan) sınıf metodunu da kullanabilirsiniz. + +```ruby +memory = SimpleMemory.new +memory.remember 'foo' + +available = Codification::Coder.(SimpleCode.new(%w[foo bar baz quux]), memory: memory, limit: 2).available + +available #=> ['bar', 'baz'] +``` + `Processor` ----------- @@ -244,13 +296,6 @@ Yerleşik kodlamalar Özel bir kodlama hazırlamak yerine `codes` altında tanımlı yerleşik kodlama modüllerini kullanabilirsiniz. -- `random_numeric_codes`: Verilen aralıkta rastgele numerik kodlar üretir. - - ```ruby - coder = Codification.random_numeric_codes '00003'..'00099', prefix: '203' - coder.run #=> '20300023' (ilgili aralıkta rastgele) - ``` - - `sequential_numeric_codes`: Verilen aralıkta ardışık numerik kodlar üretir. ```ruby @@ -259,6 +304,23 @@ modüllerini kullanabilirsiniz. coder.run #=> '20300004' ``` + Seçenekler: + + + `prefix`: Üretilen koda eklenecek ilk ek. Öntanımlı: boş. + + `suffix`: Üretilen koda eklenecek son ek. Öntanımlı: boş. + + `base`: Ardışımda dikkate alınacak sayı tabanı. Öntanımlı: 10. + + `net_length`: Ardışımın (ekler çıkarıldığında kalan kısım) net uzunluğu. + Öntanımlı: verilen dizginin uzunluğu. + +- `random_numeric_codes`: Verilen aralıkta rastgele numerik kodlar üretir. + + ```ruby + coder = Codification.random_numeric_codes '00003'..'00099', prefix: '203' + coder.run #=> '20300023' (ilgili aralıkta rastgele) + ``` + + Seçenekler: `sequential_numeric_codes` ile aynı seçenekler. + - `suffixed_user_names`: Verilen isimlerden rastgele son ekli ve güvenli kullanıcı adları üretir. @@ -267,11 +329,38 @@ modüllerini kullanabilirsiniz. coder.run #=> 'mkataturk.123' (son ek rastgele) ``` + Seçenekler: + + + `prefix`: Üretilen isme eklenecek ilk ek. Öntanımlı: boş. + + `suffix`: Üretilen isme eklenecek son ek. Öntanımlı: boş. + + `interfix`: İsim sözcükleri arasındaki ayırıcı. Öntanımlı: boş. + + `alternative`: İsimlerin hangi formda üretileceği. Öntanımlı: `:abbreviated` + Geçerli seçenekler: `:abbreviated` (kısaltılmış), `:non_abbreviated` + (kısaltılmamış). + + `random_suffix_length`: Rastgele son ekin uzunluğu. Öntanımlı: 3. + + `random_suffix_separator`: Rastgele son ekte kullanılacak ayırıcı. Öntanımlı: `.` + - `unsuffixed_user_names`: Verilen isimlerden son eksiz ve güvenli kullanıcı adları üretir. ```ruby coder = Codification.unsuffixed_user_names %w[Mustafa Kemal Atatürk] + coder.run #=> 'mustafa.ataturk' + coder.run #=> 'kemal.ataturk' + coder.run #=> 'mustafa.kemal.ataturk' + ``` + + Seçenekler: + + + `prefix`: Üretilen isme eklenecek ilk ek. Öntanımlı: boş. + + `suffix`: Üretilen isme eklenecek son ek. Öntanımlı: boş. + + `interfix`: İsim sözcükleri arasındaki ayırıcı. Öntanımlı: `.`. + + `alternative`: İsimlerin hangi formda üretileceği. Öntanımlı: `:non_abbreviated` + Geçerli seçenekler: `:abbreviated` (kısaltılmış), `:non_abbreviated` + (kısaltılmamış). + + ```ruby + coder = Codification.unsuffixed_user_names(%w[Mustafa Kemal Atatürk], alternative: :abbreviated) coder.run #=> 'mkataturk' coder.run #=> 'mkemala' coder.run #=> 'mustafaka' From 585993086abe1b23fdd51d935c90b23772071de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 15:15:35 +0300 Subject: [PATCH 104/279] Fix nasty bug which skips writing file on quiet mode --- plugins/support/lib/nokul/support/utils/file_utils.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/utils/file_utils.rb b/plugins/support/lib/nokul/support/utils/file_utils.rb index ce0ea164e..f69b9c2f2 100644 --- a/plugins/support/lib/nokul/support/utils/file_utils.rb +++ b/plugins/support/lib/nokul/support/utils/file_utils.rb @@ -42,7 +42,9 @@ def with_status(new_file) def with_status_and_notification(new_file, **options, &block) new_file_exist_before = File.exist? new_file - return (status = with_status(new_file, &block)) if options[:quiet] + status = with_status(new_file, &block) + + return status if options[:quiet] if status warn new_file_exist_before ? "#{new_file} updated due to the changes." : "#{new_file} created." From b65523d0eccf06d96b15e07314bcf8e6ffe81616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 15:17:30 +0300 Subject: [PATCH 105/279] Add new Turkish abbreviations --- plugins/support/lib/nokul/support/data/tr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/data/tr.yml b/plugins/support/lib/nokul/support/data/tr.yml index dbcb938e7..39aec1b9a 100644 --- a/plugins/support/lib/nokul/support/data/tr.yml +++ b/plugins/support/lib/nokul/support/data/tr.yml @@ -19,11 +19,12 @@ abbreviations: - fak - gata - gce + - hz + - iö - khk - kktc - kpds - kpss - - hz - les - meb - myo @@ -50,6 +51,7 @@ abbreviations: - yds - ydus - ygs + - yl - yök - yökdil - yös From d55d5f69d31ea54e1b11fca701f0efcd62be6afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 15:18:32 +0300 Subject: [PATCH 106/279] Improve test failure message --- plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb index b511b8059..16bb166b7 100644 --- a/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb +++ b/plugins/tenant/common/lib/nokul/tenant/units/tests/src/all.rb @@ -36,8 +36,8 @@ def setup refute Tenant::Units.reproduce(quiet: true), <<~MSG Modified source files encountered when reproducing source files. - This means that you have edited some file but forgotten to - reproduce and commit. + This means that you have modified some file, or the reproduce logic + has changed but you have forgotten to reproduce and commit. Please run "bin/rails tenant:units:reproduce" and commit changes. MSG From 7c02ddf8fab3bd6b26f6e8e743eb98a67e5d49eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Thu, 28 Mar 2019 15:19:11 +0300 Subject: [PATCH 107/279] Update units data (only name attributes changed) --- plugins/tenant/omu/db/units/src/all.yml | 1056 +++++++++++------------ plugins/tenant/omu/db/units/src/yok.yml | 1056 +++++++++++------------ 2 files changed, 1056 insertions(+), 1056 deletions(-) diff --git a/plugins/tenant/omu/db/units/src/all.yml b/plugins/tenant/omu/db/units/src/all.yml index 7f2bd08d6..b1202b812 100644 --- a/plugins/tenant/omu/db/units/src/all.yml +++ b/plugins/tenant/omu/db/units/src/all.yml @@ -353,7 +353,7 @@ duration: 2 founded_at: 05.08.2010 -- name: Deniz ve Liman İşletmeciliği Programı (İö) +- name: Deniz ve Liman İşletmeciliği Programı (İÖ) abbreviation: ALAÇAM-MYO-UH-DLİ-PR-2 code: '205' yoksis_id: '276136' @@ -415,7 +415,7 @@ issues: - Kuruluş tarihi hatalı -- name: Posta Hizmetleri Programı (İö) +- name: Posta Hizmetleri Programı (İÖ) abbreviation: ALAÇAM-MYO-UH-PH-PR-2 code: '208' yoksis_id: '240435' @@ -460,7 +460,7 @@ duration: 2 founded_at: 10.06.2010 -- name: Lojistik Programı (İö) +- name: Lojistik Programı (İÖ) abbreviation: ALAÇAM-MYO-YO-L-PR-2 code: '210' yoksis_id: '240433' @@ -827,7 +827,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: BAFRA-MYO-BT-BP-PR-2 code: '213' yoksis_id: '169447' @@ -896,7 +896,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi ve Aromatik Bitkiler Programı (İö) +- name: Tıbbi ve Aromatik Bitkiler Programı (İÖ) abbreviation: BAFRA-MYO-BHÜ-TAB-PR-2 code: '217' yoksis_id: '169426' @@ -953,7 +953,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) (Bk.605) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) (Bk.605) abbreviation: BAFRA-MYO-MV-PR-2-605 code: '218' yoksis_id: '145961' @@ -1431,7 +1431,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 26.02.2010 -- name: Bilgisayar ve Öğretim Teknolojileri Eğitimi (Yl) (Tezli) +- name: Bilgisayar ve Öğretim Teknolojileri Eğitimi (YL) (Tezli) abbreviation: BÖTE-YL code: '601' yoksis_id: '244883' @@ -1445,7 +1445,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Biyoloji Eğitimi (Yl) (Tezli) +- name: Biyoloji Eğitimi (YL) (Tezli) abbreviation: BİYOEĞ-YL code: '602' yoksis_id: '301215' @@ -1459,7 +1459,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Eğitim Bilimleri (Dr) +- name: Eğitim Bilimleri (DR) abbreviation: EĞİTİM-BİLİM-EB-DR yoksis_id: '174849' parent_yoksis_id: '174846' @@ -1488,7 +1488,7 @@ - üst birim olan Eğitim Bilimleri (Dr) arşiv olarak görünüyor - Detsis tarafında anabilim dalı başkanlığı enstitüye bağlı -- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (Yl) +- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (YL) abbreviation: EFST-YL code: '604' yoksis_id: '327688' @@ -1502,7 +1502,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Programları ve Öğretim (Yl) (Tezli) +- name: Eğitim Programları ve Öğretim (YL) (Tezli) abbreviation: EPO-YL code: '605' yoksis_id: '207884' @@ -1516,7 +1516,7 @@ duration: 2 founded_at: 03.05.2011 -- name: Eğitim Programları ve Öğretim (Yl) (Tezsiz) +- name: Eğitim Programları ve Öğretim (YL) (Tezsiz) abbreviation: EPO-YZ code: '606' yoksis_id: '339817' @@ -1530,7 +1530,7 @@ duration: 2 founded_at: '09.05.2018' -- name: Eğitim Yönetimi (Dr) +- name: Eğitim Yönetimi (DR) abbreviation: EY-DR code: '607' yoksis_id: '327630' @@ -1544,7 +1544,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezli) +- name: Eğitim Yönetimi (YL) (Tezli) abbreviation: EY-YL code: '608' yoksis_id: '327629' @@ -1558,7 +1558,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Eğitim Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EY-YZ-UZ code: '012' yoksis_id: '327678' @@ -1572,7 +1572,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezsiz) (İö) +- name: Eğitim Yönetimi (YL) (Tezsiz) (İÖ) abbreviation: EY-YZ-2 code: '609' yoksis_id: '327631' @@ -1586,7 +1586,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (Dr) +- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (DR) abbreviation: EFST-DR code: '610' yoksis_id: '376129' @@ -1600,7 +1600,7 @@ duration: 4 founded_at: 27.06.2018 -- name: Fen Bilgisi Eğitim (Dr) +- name: Fen Bilgisi Eğitim (DR) abbreviation: FENBİL-DR code: '611' yoksis_id: '267754' @@ -1614,7 +1614,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Fen Bilgisi Eğitim (Yl) (Tezli) +- name: Fen Bilgisi Eğitim (YL) (Tezli) abbreviation: FENBİL-YL code: '612' yoksis_id: '267753' @@ -1630,7 +1630,7 @@ issues: - Kuruluş tarihi hatalı -- name: Fen Bilgisi Eğitim (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Fen Bilgisi Eğitim (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FENBİL-YZ-UZ code: '013' yoksis_id: '244484' @@ -1644,7 +1644,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Fen Bilgisi Eğitimi (Yl) (Tezsiz) (İö) +- name: Fen Bilgisi Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: FENBİL-YZ-2 code: '613' yoksis_id: '235189' @@ -1658,7 +1658,7 @@ duration: 2 founded_at: 01.03.2013 -- name: Fizik Eğitimi (Yl) (Tezli) +- name: Fizik Eğitimi (YL) (Tezli) abbreviation: FİZİKEĞ-YL code: '614' yoksis_id: '245968' @@ -1684,7 +1684,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Müzik Eğitimi (Yl) (Tezli) +- name: Müzik Eğitimi (YL) (Tezli) abbreviation: MÜZİK-YL code: '615' yoksis_id: '230796' @@ -1698,7 +1698,7 @@ duration: 2 founded_at: 29.01.2004 -- name: Müzik Eğitimi (Yl) (Tezsiz) (İö) +- name: Müzik Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: MÜZİK-YZ-2 code: '616' yoksis_id: '244884' @@ -1712,7 +1712,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Ortaöğretim Fen ve Matematik Alanları Eğitimi (Dr) +- name: Ortaöğretim Fen ve Matematik Alanları Eğitimi (DR) abbreviation: ORTAFENMAT-DR code: '617' yoksis_id: '174856' @@ -1726,7 +1726,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Ortaöğretim Sosyal Alanlar Eğitimi (Dr) +- name: Ortaöğretim Sosyal Alanlar Eğitimi (DR) abbreviation: ORTASOSYAL-DR code: '618' yoksis_id: '174850' @@ -1740,7 +1740,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: PDR-YL-ORDU code: '619' yoksis_id: '280865' @@ -1754,7 +1754,7 @@ duration: 2 founded_at: '09.09.2015' -- name: Resim-İş Eğitimi (Dr) +- name: Resim-İş Eğitimi (DR) abbreviation: RESİMİŞ-DR code: '620' yoksis_id: '230808' @@ -1768,7 +1768,7 @@ duration: 4 founded_at: 19.02.2003 -- name: Resim-İş Eğitimi (Yl) (Tezli) +- name: Resim-İş Eğitimi (YL) (Tezli) abbreviation: RESİMİŞ-YL code: '621' yoksis_id: '230810' @@ -1782,7 +1782,7 @@ duration: 2 founded_at: 13.07.2001 -- name: Sınıf Eğitimi (Dr) +- name: Sınıf Eğitimi (DR) abbreviation: SINIF-DR code: '622' yoksis_id: '267760' @@ -1796,7 +1796,7 @@ duration: 4 founded_at: 02.08.2017 -- name: Sınıf Eğitimi (Yl) (Tezli) +- name: Sınıf Eğitimi (YL) (Tezli) abbreviation: SINIF-YL code: '623' yoksis_id: '267759' @@ -1810,7 +1810,7 @@ duration: 2 founded_at: 02.08.2017 -- name: Sınıf Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sınıf Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SINIF-YZ-UZ code: '014' yoksis_id: '244486' @@ -1824,7 +1824,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Sınıf Eğitimi (Yl) (Tezsiz) (İö) +- name: Sınıf Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: SINIF-YZ-2 code: '624' yoksis_id: '327682' @@ -1838,7 +1838,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Dr) +- name: Sosyal Bilgiler Eğitimi (DR) abbreviation: SOSYALBİL-DR code: '625' yoksis_id: '327681' @@ -1852,7 +1852,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezli) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezli) abbreviation: SOSYALBİL-YL code: '626' yoksis_id: '327632' @@ -1866,7 +1866,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SOSYALBİL-YZ-UZ code: '015' yoksis_id: '244485' @@ -1880,7 +1880,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezsiz) (İö) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: SOSYALBİL-YZ-2 code: '627' yoksis_id: '327680' @@ -1894,7 +1894,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Tarih Eğitimi (Yl) (Tezli) +- name: Tarih Eğitimi (YL) (Tezli) abbreviation: TARİHEĞ-YL code: '628' yoksis_id: '213373' @@ -1908,7 +1908,7 @@ duration: 2 founded_at: 02.02.2012 -- name: Tarih Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Tarih Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: TARİHEĞ-YZ-UZ code: '016' yoksis_id: '244483' @@ -1922,7 +1922,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Türkçe Eğitimi (Dr) +- name: Türkçe Eğitimi (DR) abbreviation: TÜRKÇE-DR code: '629' yoksis_id: '174852' @@ -1936,7 +1936,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Türkçe Eğitimi (Yl) (Tezli) +- name: Türkçe Eğitimi (YL) (Tezli) abbreviation: TÜRKÇE-YL code: '630' yoksis_id: '267757' @@ -1962,7 +1962,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: İlköğretim (Dr) +- name: İlköğretim (DR) abbreviation: İLK-DR code: '631' yoksis_id: '174851' @@ -1976,7 +1976,7 @@ duration: 4 founded_at: 26.02.2010 -- name: İlköğretim Matematik Eğitimi (Yl) (Tezli) +- name: İlköğretim Matematik Eğitimi (YL) (Tezli) abbreviation: İLKMAT-YL code: '632' yoksis_id: '267758' @@ -1990,7 +1990,7 @@ duration: 2 founded_at: '08.02.2010' -- name: İlköğretim Sınıf Öğretmenliği (Yl) (Tezsiz) (İö) +- name: İlköğretim Sınıf Öğretmenliği (YL) (Tezsiz) (İÖ) abbreviation: İLKSINIF-YZ-2 code: '633' yoksis_id: '235186' @@ -2731,7 +2731,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Adli Bilimler (Yl) (Tezli) +- name: Adli Bilimler (YL) (Tezli) abbreviation: ADLİ-YL code: '634' yoksis_id: '255365' @@ -2745,7 +2745,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Akıllı Sistemler Mühendisliği (Yl) (Tezli) +- name: Akıllı Sistemler Mühendisliği (YL) (Tezli) abbreviation: ASM-YL code: '635' yoksis_id: '255366' @@ -2759,7 +2759,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Bahçe Bitkileri (Dr) +- name: Bahçe Bitkileri (DR) abbreviation: BAHÇE-DR code: '636' yoksis_id: '211283' @@ -2772,7 +2772,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Bahçe Bitkileri (Yl) (Tezli) +- name: Bahçe Bitkileri (YL) (Tezli) abbreviation: BAHÇE-YL code: '637' yoksis_id: '211284' @@ -2785,7 +2785,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Mühendisliği (Yl) (Tezli) +- name: Bilgisayar Mühendisliği (YL) (Tezli) abbreviation: BİLGİSAYAR-YL code: '603' yoksis_id: '211296' @@ -2798,7 +2798,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bitki Koruma (Dr) +- name: Bitki Koruma (DR) abbreviation: BİTKİKOR-DR code: '638' yoksis_id: '211294' @@ -2811,7 +2811,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Bitki Koruma (Yl) (Tezli) +- name: Bitki Koruma (YL) (Tezli) abbreviation: BİTKİKOR-YL code: '639' yoksis_id: '211293' @@ -2825,7 +2825,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Biyoloji (Dr) +- name: Biyoloji (DR) abbreviation: BİYO-DR code: '640' yoksis_id: '211282' @@ -2838,7 +2838,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoloji (Yl) (Tezli) +- name: Biyoloji (YL) (Tezli) abbreviation: BİYO-YL code: '641' yoksis_id: '211261' @@ -2852,7 +2852,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Biyoloji (Yl) (Tezsiz) +- name: Biyoloji (YL) (Tezsiz) abbreviation: BİYO-YZ code: '642' yoksis_id: '234077' @@ -2865,7 +2865,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Biyoloji (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Biyoloji (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: BİYO-YZ-UZ code: '017' yoksis_id: '317402' @@ -2879,7 +2879,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Elektrik-Elektronik Mühendisliği (Dr) +- name: Elektrik-Elektronik Mühendisliği (DR) abbreviation: ELEKTRİK-DR code: '643' yoksis_id: '211254' @@ -2892,7 +2892,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Elektrik-Elektronik Mühendisliği (Yl) (Tezli) +- name: Elektrik-Elektronik Mühendisliği (YL) (Tezli) abbreviation: ELEKTRİK-YL code: '644' yoksis_id: '211253' @@ -2905,7 +2905,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizik (Dr) +- name: Fizik (DR) abbreviation: FİZİK-DR code: '645' yoksis_id: '211257' @@ -2918,7 +2918,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik (Yl) (Tezli) +- name: Fizik (YL) (Tezli) abbreviation: FİZİK-YL code: '646' yoksis_id: '211258' @@ -2934,7 +2934,7 @@ issues: - Kuruluş tarihi hatalı -- name: Fizik (Yl) (Tezsiz) +- name: Fizik (YL) (Tezsiz) abbreviation: FİZİK-YZ code: '647' yoksis_id: '234095' @@ -2947,7 +2947,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizik (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Fizik (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FİZİK-YZ-UZ code: '018' yoksis_id: '317401' @@ -2961,7 +2961,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Gıda Mühendisliği (Dr) +- name: Gıda Mühendisliği (DR) abbreviation: GIDA-DR code: '648' yoksis_id: '211298' @@ -2974,7 +2974,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Gıda Mühendisliği (Dr) (Ordu Üniversitesi Ortak) +- name: Gıda Mühendisliği (DR) (Ordu Üniversitesi Ortak) abbreviation: GIDA-DR-ORDU code: '649' yoksis_id: '279463' @@ -2988,7 +2988,7 @@ duration: 4 founded_at: '08.07.2015' -- name: Gıda Mühendisliği (Yl) (Tezli) +- name: Gıda Mühendisliği (YL) (Tezli) abbreviation: GIDA-YL code: '650' yoksis_id: '211297' @@ -3002,7 +3002,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Gıda Mühendisliği (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Gıda Mühendisliği (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: GIDA-YL-ORDU code: '651' yoksis_id: '226065' @@ -3016,7 +3016,7 @@ duration: 2 founded_at: 13.09.2012 -- name: Harita Mühendisliği (Dr) +- name: Harita Mühendisliği (DR) abbreviation: HARİTA-DR code: '652' yoksis_id: '211266' @@ -3029,7 +3029,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Harita Mühendisliği (Yl) (Tezli) +- name: Harita Mühendisliği (YL) (Tezli) abbreviation: HARİTA-YL code: '653' yoksis_id: '211265' @@ -3045,7 +3045,7 @@ issues: - Kuruluş tarihi hatalı -- name: Hesaplamalı Bilimler (Dr) +- name: Hesaplamalı Bilimler (DR) abbreviation: HESAP-DR code: '654' yoksis_id: '255368' @@ -3059,7 +3059,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Kimya (Dr) +- name: Kimya (DR) abbreviation: FEN-KİMYA-DR code: '655' yoksis_id: '211290' @@ -3072,7 +3072,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Kimya (Yl) (Tezli) +- name: Kimya (YL) (Tezli) abbreviation: FEN-KİMYA-YL code: '656' yoksis_id: '211289' @@ -3086,7 +3086,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Kimya (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Kimya (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FEN-KİMYA-YL-UZ code: '019' yoksis_id: '317403' @@ -3112,7 +3112,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Kimya Mühendisliği (Yl) (Tezli) +- name: Kimya Mühendisliği (YL) (Tezli) abbreviation: KİMYA-YL code: '657' yoksis_id: '225905' @@ -3126,7 +3126,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Makine Mühendisliği (Dr) +- name: Makine Mühendisliği (DR) abbreviation: MAKİNE-DR code: '658' yoksis_id: '209678' @@ -3140,7 +3140,7 @@ duration: 4 founded_at: 23.08.2011 -- name: Makine Mühendisliği (Yl) (Tezli) +- name: Makine Mühendisliği (YL) (Tezli) abbreviation: MAKİNE-YL code: '659' yoksis_id: '169494' @@ -3154,7 +3154,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Matematik (Dr) +- name: Matematik (DR) abbreviation: MAT-DR code: '660' yoksis_id: '211256' @@ -3167,7 +3167,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Matematik (Dr) (Ordu Üniversitesi Ortak) +- name: Matematik (DR) (Ordu Üniversitesi Ortak) abbreviation: MAT-DR-ORDU code: '661' yoksis_id: '242518' @@ -3181,7 +3181,7 @@ duration: 4 founded_at: 27.06.2013 -- name: Matematik (Yl) (Tezli) +- name: Matematik (YL) (Tezli) abbreviation: MAT-YL code: '662' yoksis_id: '211255' @@ -3195,7 +3195,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Matematik (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Matematik (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: MAT-YL-UZ code: '020' yoksis_id: '317399' @@ -3209,7 +3209,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Metalurji ve Malzeme Mühendisliği (Yl) (Tezli) +- name: Metalurji ve Malzeme Mühendisliği (YL) (Tezli) abbreviation: MALZEME-YL code: '663' yoksis_id: '371245' @@ -3223,7 +3223,7 @@ duration: 2 founded_at: 23.05.2018 -- name: Nanobilim ve Nanoteknoloji (Dr) (İngilizce) +- name: Nanobilim ve Nanoteknoloji (DR) (İngilizce) abbreviation: NANO-DR-İNG code: '664' yoksis_id: '255370' @@ -3237,7 +3237,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Nanobilim ve Nanoteknoloji (Yl) (Tezli) (İngilizce) +- name: Nanobilim ve Nanoteknoloji (YL) (Tezli) (İngilizce) abbreviation: NANO-YL-İNG code: '665' yoksis_id: '255369' @@ -3251,7 +3251,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Sağlık, Gıda Güvenliği ve İlgili Politikalar (Yl) (Tezli) +- name: Sağlık, Gıda Güvenliği ve İlgili Politikalar (YL) (Tezli) abbreviation: SGGİP-YL code: '666' yoksis_id: '261702' @@ -3265,7 +3265,7 @@ duration: 2 founded_at: 25.09.2014 -- name: Tarım Ekonomisi (Dr) +- name: Tarım Ekonomisi (DR) abbreviation: TARIM-DR code: '667' yoksis_id: '176121' @@ -3279,7 +3279,7 @@ duration: 4 founded_at: 26.08.2010 -- name: Tarım Ekonomisi (Yl) (Tezli) +- name: Tarım Ekonomisi (YL) (Tezli) abbreviation: TARIM-YL code: '668' yoksis_id: '230597' @@ -3293,7 +3293,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tarım Makinaları ve Teknoloji Mühendisliği (Dr) +- name: Tarım Makinaları ve Teknoloji Mühendisliği (DR) abbreviation: TMT-DR code: '669' yoksis_id: '211260' @@ -3307,7 +3307,7 @@ duration: 4 founded_at: 15.09.2008 -- name: Tarım Makinaları ve Teknoloji Mühendisliği (Yl) (Tezli) +- name: Tarım Makinaları ve Teknoloji Mühendisliği (YL) (Tezli) abbreviation: TMT-YL code: '670' yoksis_id: '211259' @@ -3321,7 +3321,7 @@ duration: 2 founded_at: 03.06.2015 -- name: Tarımsal Biyoteknoloji (Dr) +- name: Tarımsal Biyoteknoloji (DR) abbreviation: TBT-DR code: '671' yoksis_id: '255701' @@ -3335,7 +3335,7 @@ duration: 4 founded_at: 20.02.2014 -- name: Tarımsal Biyoteknoloji (Yl) (Tezli) +- name: Tarımsal Biyoteknoloji (YL) (Tezli) abbreviation: TBT-YL code: '672' yoksis_id: '211287' @@ -3349,7 +3349,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tarımsal Yapılar ve Sulama (Dr) +- name: Tarımsal Yapılar ve Sulama (DR) abbreviation: TYS-DR code: '673' yoksis_id: '211250' @@ -3362,7 +3362,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarımsal Yapılar ve Sulama (Yl) (Tezli) +- name: Tarımsal Yapılar ve Sulama (YL) (Tezli) abbreviation: TYS-YL code: '674' yoksis_id: '211249' @@ -3376,7 +3376,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Tarla Bitkileri (Dr) +- name: Tarla Bitkileri (DR) abbreviation: TARLA-DR code: '675' yoksis_id: '211286' @@ -3389,7 +3389,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarla Bitkileri (Yl) (Tezli) +- name: Tarla Bitkileri (YL) (Tezli) abbreviation: TARLA-YL code: '676' yoksis_id: '211285' @@ -3403,7 +3403,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Taşınmaz Değerleme ve Geliştirme (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Taşınmaz Değerleme ve Geliştirme (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: TAŞINMAZ-YZ-UZ code: '021' yoksis_id: '215852' @@ -3417,7 +3417,7 @@ duration: 2 founded_at: 19.04.2012 -- name: Toprak Bilimi ve Bitki Besleme (Dr) +- name: Toprak Bilimi ve Bitki Besleme (DR) abbreviation: TOPRAK-DR code: '677' yoksis_id: '203725' @@ -3431,7 +3431,7 @@ duration: 4 founded_at: 17.02.2011 -- name: Toprak Bilimi ve Bitki Besleme (Yl) (Tezli) +- name: Toprak Bilimi ve Bitki Besleme (YL) (Tezli) abbreviation: TOPRAK-YL code: '678' yoksis_id: '203724' @@ -3445,7 +3445,7 @@ duration: 2 founded_at: 17.02.2011 -- name: Uçak ve Uzay Bilimleri Mühendisliği (Yl) (Tezli) +- name: Uçak ve Uzay Bilimleri Mühendisliği (YL) (Tezli) abbreviation: UÇAK-YL code: '679' yoksis_id: '339818' @@ -3472,7 +3472,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 01.06.2016 -- name: Yenilenebilir Enerji ve Uygulamaları (Yl) (Tezli) +- name: Yenilenebilir Enerji ve Uygulamaları (YL) (Tezli) abbreviation: FEN-BİLİM-YEU-YL code: '680' yoksis_id: '303045' @@ -3486,7 +3486,7 @@ duration: 2 founded_at: 01.06.2016 -- name: Zootekni (Dr) +- name: Zootekni (DR) abbreviation: ZOO-DR code: '681' yoksis_id: '211291' @@ -3499,7 +3499,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zootekni (Yl) (Tezli) +- name: Zootekni (YL) (Tezli) abbreviation: ZOO-YL code: '682' yoksis_id: '211292' @@ -3513,7 +3513,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Zootekni (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Zootekni (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: ZOO-YL-ORDU code: '683' yoksis_id: '226064' @@ -3527,7 +3527,7 @@ duration: 2 founded_at: 13.09.2012 -- name: Çevre Mühendisliği (Dr) +- name: Çevre Mühendisliği (DR) abbreviation: ÇEVRE-DR code: '684' yoksis_id: '211248' @@ -3540,7 +3540,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Çevre Mühendisliği (Yl) (Tezli) +- name: Çevre Mühendisliği (YL) (Tezli) abbreviation: ÇEVRE-YL code: '685' yoksis_id: '211247' @@ -3554,7 +3554,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Çevre Mühendisliği (Yl) (Tezli) (İngilizce) +- name: Çevre Mühendisliği (YL) (Tezli) (İngilizce) abbreviation: ÇEVRE-YL-İNG code: '686' yoksis_id: '244882' @@ -3568,7 +3568,7 @@ duration: 2 founded_at: 15.08.2013 -- name: İnşaat Mühendisliği (Dr) +- name: İnşaat Mühendisliği (DR) abbreviation: İNŞAAT-DR code: '687' yoksis_id: '213374' @@ -3582,7 +3582,7 @@ duration: 4 founded_at: 02.02.2012 -- name: İnşaat Mühendisliği (Yl) (Tezli) +- name: İnşaat Mühendisliği (YL) (Tezli) abbreviation: İNŞAAT-YL code: '688' yoksis_id: '231330' @@ -3608,7 +3608,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: İstatistik (Dr) +- name: İstatistik (DR) abbreviation: İSTATİSTİK-DR code: '689' yoksis_id: '211251' @@ -3621,7 +3621,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İstatistik (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: İstatistik (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: İSTATİSTİK-DR-KTÜ code: '690' yoksis_id: '213389' @@ -3635,7 +3635,7 @@ duration: 4 founded_at: 02.02.2012 -- name: İstatistik (Yl) (Tezli) +- name: İstatistik (YL) (Tezli) abbreviation: İSTATİSTİK-YL code: '691' yoksis_id: '211252' @@ -4908,7 +4908,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Görsel İletişim Tasarımı (Yl) (Tezli) +- name: Görsel İletişim Tasarımı (YL) (Tezli) abbreviation: GİT-YL code: '692' yoksis_id: '255316' @@ -4922,7 +4922,7 @@ duration: 2 founded_at: 20.02.2014 -- name: Müzikte Yorumculuk (Yl) (Tezli) +- name: Müzikte Yorumculuk (YL) (Tezli) abbreviation: MY-YL code: '693' yoksis_id: '258248' @@ -4936,7 +4936,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Müzikte Yorumculuk (Yl) (Tezsiz) +- name: Müzikte Yorumculuk (YL) (Tezsiz) abbreviation: MY-YZ code: '694' yoksis_id: '258249' @@ -4950,7 +4950,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Resim (Yl) (Tezli) +- name: Resim (YL) (Tezli) abbreviation: RESİM-YL code: '695' yoksis_id: '281828' @@ -4978,7 +4978,7 @@ duration: 4 founded_at: 12.07.2017 -- name: Tıbbi Resimleme (Yl) (Tezli) +- name: Tıbbi Resimleme (YL) (Tezli) abbreviation: TIBBİRESİM-YL code: '696' yoksis_id: '278819' @@ -5324,7 +5324,7 @@ duration: 2 founded_at: 27.04.2016 -- name: Büro Yönetimi ve Yönetici Asistanlığı Programı (İö) +- name: Büro Yönetimi ve Yönetici Asistanlığı Programı (İÖ) abbreviation: HAVZA-MYO-BHS-BYYA-PR-2 code: '258' yoksis_id: '175631' @@ -5409,7 +5409,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: HAVZA-MYO-OTEL-TOİ-PR-2 code: '261' yoksis_id: '169575' @@ -5451,7 +5451,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Fizyoterapi Programı (İö) +- name: Fizyoterapi Programı (İÖ) abbreviation: HAVZA-MYO-TERAPİ-FİZYO-PR-2 code: '263' yoksis_id: '169588' @@ -5534,7 +5534,7 @@ duration: 2 founded_at: 27.04.2016 -- name: İşletme Yönetimi Programı (İö) +- name: İşletme Yönetimi Programı (İÖ) abbreviation: HAVZA-MYO-YO-İY-PR-2 code: '266' yoksis_id: '240432' @@ -6834,7 +6834,7 @@ duration: 2 founded_at: 19.03.2014 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: SAMSUN-MYO-BT-BP-PR-2 code: '279' yoksis_id: '169876' @@ -6902,7 +6902,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Mimari Dekoratif Sanatlar Programı (İö) +- name: Mimari Dekoratif Sanatlar Programı (İÖ) abbreviation: SAMSUN-MYO-EL-MDS-PR-2 code: '282' yoksis_id: '169850' @@ -7055,7 +7055,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: SAMSUN-MYO-MV-PR-2 code: '286' yoksis_id: '169804' @@ -7100,7 +7100,7 @@ issues: - Kuruluş tarihi hatalı -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: SAMSUN-MYO-OTEL-TOİ-PR-2 code: '288' yoksis_id: '320498' @@ -7315,7 +7315,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Acil Hemşireliği (Dr) +- name: Acil Hemşireliği (DR) abbreviation: ACİL-DR code: '697' yoksis_id: '329992' @@ -7329,7 +7329,7 @@ duration: 4 founded_at: 22.02.2017 -- name: Acil Hemşireliği (Yl) (Tezli) +- name: Acil Hemşireliği (YL) (Tezli) abbreviation: ACİL-YL code: '698' yoksis_id: '329991' @@ -7343,7 +7343,7 @@ duration: 2 founded_at: 22.02.2017 -- name: Alerji-İmmünoloji (Yl) (Tezli) +- name: Alerji-İmmünoloji (YL) (Tezli) abbreviation: ALERJİ-YL code: '699' yoksis_id: '219171' @@ -7356,7 +7356,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Dr) +- name: Anatomi (DR) abbreviation: ANATOMİ-DR code: '700' yoksis_id: '169540' @@ -7369,7 +7369,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Anatomisi (Yl) (Tezli) +- name: Veterinerlik Anatomisi (YL) (Tezli) abbreviation: VETERİNER-ANATOMİ-YL code: '701' yoksis_id: '169511' @@ -7383,7 +7383,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Antrenörlük Eğitimi (Dr) +- name: Antrenörlük Eğitimi (DR) abbreviation: ANTRENÖR-DR code: '702' yoksis_id: '267669' @@ -7397,7 +7397,7 @@ duration: 4 founded_at: 25.03.2015 -- name: Antrenörlük Eğitimi (Yl) (Tezli) +- name: Antrenörlük Eğitimi (YL) (Tezli) abbreviation: ANTRENÖR-YL code: '703' yoksis_id: '267668' @@ -7411,7 +7411,7 @@ duration: 2 founded_at: 25.03.2015 -- name: Ağız, Diş ve Çene Cerrahisi (Dr) +- name: Ağız, Diş ve Çene Cerrahisi (DR) abbreviation: ADÇC-DR code: '704' yoksis_id: '169547' @@ -7424,7 +7424,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor (Dr) +- name: Beden Eğitimi ve Spor (DR) abbreviation: SAĞLIK-BİLİM-BES-DR code: '705' yoksis_id: '169551' @@ -7439,7 +7439,7 @@ issues: - SAĞLIK-BİLİM VE SOSYAL-BİLİM altında aynı isimli Doktora -- name: Beslenme Bilimleri (Yl) (Tezli) +- name: Beslenme Bilimleri (YL) (Tezli) abbreviation: BESLENME-YL code: '706' yoksis_id: '225937' @@ -7453,7 +7453,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Veterinerlik Besin Hijyeni ve Teknolojisi (Dr) +- name: Veterinerlik Besin Hijyeni ve Teknolojisi (DR) abbreviation: VETERİNER-BESİN-DR code: '707' yoksis_id: '169576' @@ -7466,7 +7466,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Besin Hijyeni ve Teknolojisi (Yl) (Tezli) +- name: Veterinerlik Besin Hijyeni ve Teknolojisi (YL) (Tezli) abbreviation: VETERİNER-BESİN-YL code: '708' yoksis_id: '169516' @@ -7480,7 +7480,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Veterinerlik Biyokimyası (Dr) +- name: Veterinerlik Biyokimyası (DR) abbreviation: VETERİNER-BİYOKİMYA-DR code: '709' yoksis_id: '213250' @@ -7494,7 +7494,7 @@ duration: 4 founded_at: 30.11.2011 -- name: Veterinerlik Biyokimyası (Yl) (Tezli) +- name: Veterinerlik Biyokimyası (YL) (Tezli) abbreviation: VETERİNER-BİYOKİMYA-YL code: '710' yoksis_id: '213249' @@ -7508,7 +7508,7 @@ duration: 2 founded_at: 30.11.2011 -- name: Biyoistatistik ve Tıp Bilişimi (Dr) +- name: Biyoistatistik ve Tıp Bilişimi (DR) abbreviation: BİYOİSTATİSTİK-DR code: '711' yoksis_id: '211302' @@ -7521,7 +7521,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoistatistik ve Tıp Bilişimi (Yl) (Tezli) +- name: Biyoistatistik ve Tıp Bilişimi (YL) (Tezli) abbreviation: BİYOİSTATİSTİK-YL code: '712' yoksis_id: '211301' @@ -7535,7 +7535,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Veterinerlik Cerrahisi (Dr) +- name: Veterinerlik Cerrahisi (DR) abbreviation: VETERİNER-CERRAHİ-DR code: '713' yoksis_id: '255317' @@ -7549,7 +7549,7 @@ duration: 4 founded_at: 20.02.2014 -- name: Veterinerlik Cerrahisi (Yl) (Tezli) +- name: Veterinerlik Cerrahisi (YL) (Tezli) abbreviation: VETERİNER-CERRAHİ-YL code: '714' yoksis_id: '244886' @@ -7563,7 +7563,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Veterinerlik Doğum ve Jinekolojisi (Dr) +- name: Veterinerlik Doğum ve Jinekolojisi (DR) abbreviation: VETERİNER-JİNEKOLOJİ-DR code: '715' yoksis_id: '169578' @@ -7576,7 +7576,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Dr) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (DR) abbreviation: DOĞUMHEM-DR code: '716' yoksis_id: '301224' @@ -7590,7 +7590,7 @@ duration: 4 founded_at: 10.08.2016 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Yl) (Tezli) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (YL) (Tezli) abbreviation: DOĞUMHEM-YL code: '717' yoksis_id: '301216' @@ -7604,7 +7604,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Yl) (Tezsiz) (İö) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (YL) (Tezsiz) (İÖ) abbreviation: DOĞUMHEM-YZ-2 code: '718' yoksis_id: '301217' @@ -7618,7 +7618,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Veterinerlik Doğum ve Jinekolojisi (Veteriner) (Yl) (Tezli) +- name: Veterinerlik Doğum ve Jinekolojisi (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-JİNEKOLOJİ-YL code: '719' yoksis_id: '169535' @@ -7633,7 +7633,7 @@ issues: - s/Vinekoloji/Jinekoloji -- name: Dölerme ve Suni Tohumlama (Dr) +- name: Dölerme ve Suni Tohumlama (DR) abbreviation: DÖLERME-DR code: '720' yoksis_id: '169574' @@ -7646,7 +7646,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dölerme ve Suni Tohumlama (Veteriner) (Yl) (Tezli) +- name: Dölerme ve Suni Tohumlama (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-DÖLERME-YL code: '721' yoksis_id: '169517' @@ -7660,7 +7660,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Restoratif Diş Tedavisi (Dr) +- name: Restoratif Diş Tedavisi (DR) abbreviation: RDT-DR code: '722' yoksis_id: '169553' @@ -7673,7 +7673,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ebelik (Yl) (Tezli) +- name: Ebelik (YL) (Tezli) abbreviation: EBELİK-YL code: '723' yoksis_id: '323921' @@ -7687,7 +7687,7 @@ duration: 2 founded_at: 07.06.2017 -- name: Endodonti (Dr) +- name: Endodonti (DR) abbreviation: ENDO-DR code: '724' yoksis_id: '209677' @@ -7701,7 +7701,7 @@ duration: 4 founded_at: 23.08.2011 -- name: Evde Bakım Hemşireliği (Yl) (Tezsiz) (İö) +- name: Evde Bakım Hemşireliği (YL) (Tezsiz) (İÖ) abbreviation: EBH-YZ-2 code: '725' yoksis_id: '220719' @@ -7715,7 +7715,7 @@ duration: 2 founded_at: 05.06.2012 -- name: Farmakoloji (Dr) +- name: Farmakoloji (DR) abbreviation: FARMAKOLOJİ-DR code: '726' yoksis_id: '169567' @@ -7728,7 +7728,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Farmakoloji ve Toksikoloji (Dr) +- name: Veterinerlik Farmakoloji ve Toksikoloji (DR) abbreviation: VETERİNER-FARMATOK-DR code: '727' yoksis_id: '169572' @@ -7742,7 +7742,7 @@ duration: 4 founded_at: 10.09.2009 -- name: Veterinerlik Farmakoloji ve Toksikoloji (Yl) (Tezli) +- name: Veterinerlik Farmakoloji ve Toksikoloji (YL) (Tezli) abbreviation: VETERİNER-FARMATOK-YL code: '728' yoksis_id: '283800' @@ -7756,7 +7756,7 @@ duration: 2 founded_at: 06.01.2016 -- name: Fizyoloji (Dr) +- name: Fizyoloji (DR) abbreviation: FİZYOLOJİ-DR code: '729' yoksis_id: '169541' @@ -7769,7 +7769,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Fizyolojsi (Yl) (Tezli) +- name: Veterinerlik Fizyolojsi (YL) (Tezli) abbreviation: VETERİNER-FİZYOLOJİ-YL code: '730' yoksis_id: '257559' @@ -7783,7 +7783,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Halk Sağlığı (Dr) +- name: Halk Sağlığı (DR) abbreviation: HALK-DR code: '731' yoksis_id: '169558' @@ -7796,7 +7796,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Halk Sağlığı Hemşireliği (Yl) (Tezli) +- name: Halk Sağlığı Hemşireliği (YL) (Tezli) abbreviation: HSH-YL code: '732' yoksis_id: '169518' @@ -7810,7 +7810,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Hastalıklar (Dr) (Veteriner) +- name: Hastalıklar (DR) (Veteriner) abbreviation: VETERİNER-HASTA-DR code: '733' yoksis_id: '219170' @@ -7823,7 +7823,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hayvan Besleme ve Beslenme Hastalıkları (Dr) +- name: Hayvan Besleme ve Beslenme Hastalıkları (DR) abbreviation: VETERİNER-HBH-DR code: '734' yoksis_id: '169580' @@ -7836,7 +7836,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hayvan Besleme ve Beslenme Hastalıkları (Yl) (Tezli) (Veteriner) +- name: Hayvan Besleme ve Beslenme Hastalıkları (YL) (Tezli) (Veteriner) abbreviation: VETERİNER-HBH-YL code: '735' yoksis_id: '169521' @@ -7849,7 +7849,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hemşirelik (Dr) +- name: Hemşirelik (DR) abbreviation: HEMŞİRE-DR code: '736' yoksis_id: '285232' @@ -7863,7 +7863,7 @@ duration: 4 founded_at: 22.06.2015 -- name: Hemşirelik (Yl) (Tezli) +- name: Hemşirelik (YL) (Tezli) abbreviation: HEMŞİRE-YL code: '737' yoksis_id: '285233' @@ -7877,7 +7877,7 @@ duration: 2 founded_at: 22.06.2015 -- name: Hemşirelik (Yl) (Tezli) (Hitit Üniversitesi Ortak) +- name: Hemşirelik (YL) (Tezli) (Hitit Üniversitesi Ortak) abbreviation: HEMŞİRE-YL-HİTİT code: '738' yoksis_id: '284464' @@ -7891,7 +7891,7 @@ duration: 2 founded_at: 13.01.2016 -- name: Hemşirelik (Yl) (Tezsiz) +- name: Hemşirelik (YL) (Tezsiz) abbreviation: HEMŞİRE-YZ code: '739' yoksis_id: '290926' @@ -7905,7 +7905,7 @@ duration: 2 founded_at: 10.06.2015 -- name: Histoloji ve Embriyoloji (Dr) +- name: Histoloji ve Embriyoloji (DR) abbreviation: HİSTO-DR code: '740' yoksis_id: '219168' @@ -7918,7 +7918,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Histoloji ve Embriyoloji (Yl) (Tezli) +- name: Histoloji ve Embriyoloji (YL) (Tezli) abbreviation: HİSTO-YL code: '741' yoksis_id: '219167' @@ -7932,7 +7932,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Kardiyopulmoner Fizyoterapi (Yl) (Tezli) +- name: Kardiyopulmoner Fizyoterapi (YL) (Tezli) abbreviation: KPF-YL code: '742' yoksis_id: '230172' @@ -7946,7 +7946,7 @@ duration: 2 founded_at: 25.08.2011 -- name: Klinik Sinir Bilimleri (Dr) +- name: Klinik Sinir Bilimleri (DR) abbreviation: KLİNİKSİNİR-DR code: '743' yoksis_id: '236919' @@ -7973,7 +7973,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 22.06.2016 -- name: Klinik Toksikoloji (Dr) +- name: Klinik Toksikoloji (DR) abbreviation: SAĞLIK-BİLİM-TOKSİK-DR-DA code: '744' yoksis_id: '297556' @@ -7987,7 +7987,7 @@ duration: 4 founded_at: 22.06.2016 -- name: Moleküler Tıp (Dr) +- name: Moleküler Tıp (DR) abbreviation: MOLTIP-DR code: '745' yoksis_id: '257542' @@ -8001,7 +8001,7 @@ duration: 4 founded_at: 17.04.2014 -- name: Moleküler Tıp (Yl) (Tezli) +- name: Moleküler Tıp (YL) (Tezli) abbreviation: MOL-TIP-YL code: '746' yoksis_id: '257541' @@ -8015,7 +8015,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Veterinerlik Mikrobiyolojisi (Yl) (Tezli) +- name: Veterinerlik Mikrobiyolojisi (YL) (Tezli) abbreviation: VETERİNER-MİKRO-YL code: '747' yoksis_id: '225902' @@ -8044,7 +8044,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok. SAĞLIK-BİLİM-TMİKRO-ADB ile benzerlik kontrol edilmeli. -- name: Veterinerlik Mikrobiyolojisi (Dr) +- name: Veterinerlik Mikrobiyolojisi (DR) abbreviation: VETERİNER-MİKRO-DR code: '748' yoksis_id: '280441' @@ -8058,7 +8058,7 @@ duration: 4 founded_at: 05.08.2015 -- name: Odyoloji (Yl) (Tezli) +- name: Odyoloji (YL) (Tezli) abbreviation: ODYO-TL code: '749' yoksis_id: '169523' @@ -8071,7 +8071,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Oral Diagnoz ve Radyoloji (Dr) +- name: Oral Diagnoz ve Radyoloji (DR) abbreviation: ODR-DR code: '750' yoksis_id: '169555' @@ -8084,7 +8084,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ortodonti (Dr) +- name: Ortodonti (DR) abbreviation: ORTO-DR code: '751' yoksis_id: '169543' @@ -8097,7 +8097,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Parazitoloji (Dr) +- name: Parazitoloji (DR) abbreviation: PARAZİT-DR code: '752' yoksis_id: '169560' @@ -8110,7 +8110,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Parazitolojisi (Yl) (Tezli) +- name: Veterinerlik Parazitolojisi (YL) (Tezli) abbreviation: VETERİNER-PARAZİT-YL code: '753' yoksis_id: '225901' @@ -8124,7 +8124,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Patoloji (Dr) +- name: Patoloji (DR) abbreviation: PATO-DR code: '754' yoksis_id: '169561' @@ -8137,7 +8137,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Patolojisi (Dr) +- name: Veterinerlik Patolojisi (DR) abbreviation: VETERİNER-PATO-DR code: '755' yoksis_id: '219169' @@ -8150,7 +8150,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Pedodonti (Dr) +- name: Pedodonti (DR) abbreviation: PEDO-DR code: '756' yoksis_id: '169570' @@ -8163,7 +8163,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Periodontoloji (Dr) +- name: Periodontoloji (DR) abbreviation: PERİO-DR code: '757' yoksis_id: '169546' @@ -8176,7 +8176,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Protetik Diş Tedavisi (Dr) +- name: Protetik Diş Tedavisi (DR) abbreviation: PDT-DR code: '758' yoksis_id: '169556' @@ -8189,7 +8189,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Radyolojik Bilimler (Dr) +- name: Radyolojik Bilimler (DR) abbreviation: RADYOB-DR code: '759' yoksis_id: '309657' @@ -8203,7 +8203,7 @@ duration: 4 founded_at: 28.03.2013 -- name: Radyolojik Bilimler (Yl) (Tezli) +- name: Radyolojik Bilimler (YL) (Tezli) abbreviation: RADYOB-YL code: '760' yoksis_id: '219260' @@ -8217,7 +8217,7 @@ duration: 2 founded_at: 03.03.2011 -- name: Ruh Sağlığı ve Hastalıkları Hemşireliği (Yl) (Tezli) +- name: Ruh Sağlığı ve Hastalıkları Hemşireliği (YL) (Tezli) abbreviation: RUH-YL code: '761' yoksis_id: '169527' @@ -8230,7 +8230,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Yönetimi (Dr) +- name: Sağlık Yönetimi (DR) abbreviation: SAĞLIKYÖN-DR code: '762' yoksis_id: '278605' @@ -8244,7 +8244,7 @@ duration: 4 founded_at: 16.06.2015 -- name: Sağlık Yönetimi (Yl) (Tezli) +- name: Sağlık Yönetimi (YL) (Tezli) abbreviation: SAĞLIKYÖN-YL code: '763' yoksis_id: '213229' @@ -8258,7 +8258,7 @@ duration: 2 founded_at: 30.11.2011 -- name: Sağlık Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sağlık Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SAĞLIKYÖN-TZ-UZ code: '028' yoksis_id: '215871' @@ -8272,7 +8272,7 @@ duration: 2 founded_at: 19.04.2012 -- name: Sağlık Yönetimi (Yl) (Tezsiz) (İö) +- name: Sağlık Yönetimi (YL) (Tezsiz) (İÖ) abbreviation: SAĞLIKYÖN-YZ-2 code: '764' yoksis_id: '225903' @@ -8286,7 +8286,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Su Ürünleri Hastalıkları (Yl) (Tezli) +- name: Su Ürünleri Hastalıkları (YL) (Tezli) abbreviation: SU-YL code: '765' yoksis_id: '261143' @@ -8300,7 +8300,7 @@ duration: 2 founded_at: 25.09.2014 -- name: Sucul Hayvan Hastalıkları (Dr) +- name: Sucul Hayvan Hastalıkları (DR) abbreviation: SUCUL-DR code: '766' yoksis_id: '334300' @@ -8327,7 +8327,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 03.03.2011 -- name: Sinir Bilimleri (Dr) +- name: Sinir Bilimleri (DR) abbreviation: SİNİR-DR code: '767' yoksis_id: '203750' @@ -8341,7 +8341,7 @@ duration: 4 founded_at: 03.03.2011 -- name: Sinir Bilimleri (Yl) (Tezli) +- name: Sinir Bilimleri (YL) (Tezli) abbreviation: SİNİR-YL code: '768' yoksis_id: '203749' @@ -8355,7 +8355,7 @@ duration: 2 founded_at: 03.03.2011 -- name: Tıbbi Biyokimya (Dr) +- name: Tıbbi Biyokimya (DR) abbreviation: TBİYOKİMYA-DR code: '769' yoksis_id: '169539' @@ -8369,7 +8369,7 @@ duration: 4 founded_at: 01.01.2009 -- name: Tıbbi Biyoloji (Dr) +- name: Tıbbi Biyoloji (DR) abbreviation: TBİYOLOJİ-DR code: '770' yoksis_id: '211304' @@ -8382,7 +8382,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tıbbi Biyoloji (Yl) (Tezli) +- name: Tıbbi Biyoloji (YL) (Tezli) abbreviation: TBİYOLOJİ-YL code: '771' yoksis_id: '211303' @@ -8396,7 +8396,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tıbbi Farmakoloji (Dr) +- name: Tıbbi Farmakoloji (DR) abbreviation: TFARMA-DR code: '772' yoksis_id: '211300' @@ -8409,7 +8409,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tıbbi Farmakoloji (Yl) (Tezli) +- name: Tıbbi Farmakoloji (YL) (Tezli) abbreviation: TFARMA-YL code: '773' yoksis_id: '211299' @@ -8423,7 +8423,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tıbbi Mikrobiyoloji (Dr) +- name: Tıbbi Mikrobiyoloji (DR) abbreviation: TMİKRO-DR code: '774' yoksis_id: '169549' @@ -8452,7 +8452,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok -- name: Tıp Hukuku (Yl) (Tezli) +- name: Tıp Hukuku (YL) (Tezli) abbreviation: SAĞLIK-BİLİM-TIPH-YL code: '775' yoksis_id: '301226' @@ -8466,7 +8466,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Uluslararası Düzenleyici Bilim (Yl) (Tezli) +- name: Uluslararası Düzenleyici Bilim (YL) (Tezli) abbreviation: UDB-YL code: '776' yoksis_id: '261826' @@ -8480,7 +8480,7 @@ duration: 2 founded_at: 15.10.2014 -- name: Veteriner Hekimliği Tarihi ve Deontoloji (Dr) +- name: Veteriner Hekimliği Tarihi ve Deontoloji (DR) abbreviation: VETERİNER-DEON-DR code: '777' yoksis_id: '255372' @@ -8494,7 +8494,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Veteriner Hekimliği Tarihi ve Deontoloji (Yl) (Tezli) +- name: Veteriner Hekimliği Tarihi ve Deontoloji (YL) (Tezli) abbreviation: VETERİNER-DEON-YL code: '778' yoksis_id: '255371' @@ -8508,7 +8508,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Veteriner Histoloji ve Embriyoloji (Yl) (Tezli) +- name: Veteriner Histoloji ve Embriyoloji (YL) (Tezli) abbreviation: VETERİNER-HİSTO-YL code: '779' yoksis_id: '325734' @@ -8522,7 +8522,7 @@ duration: 2 founded_at: 19.07.2017 -- name: Viroloji (Dr) +- name: Viroloji (DR) abbreviation: VİROLOJİ-DR code: '780' yoksis_id: '169563' @@ -8535,7 +8535,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Viroloji (Veteriner) (Dr) +- name: Viroloji (Veteriner) (DR) abbreviation: VETERİNER-VİROLOJİ-DR code: '781' yoksis_id: '244885' @@ -8549,7 +8549,7 @@ duration: 4 founded_at: 15.08.2013 -- name: Viroloji (Veteriner) (Yl) (Tezli) +- name: Viroloji (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-VİROLOJİ-YL code: '782' yoksis_id: '169533' @@ -8563,7 +8563,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Zootekni (Veteriner) (Dr) +- name: Zootekni (Veteriner) (DR) abbreviation: VETERİNER-ZOO-DR code: '783' yoksis_id: '169565' @@ -8577,7 +8577,7 @@ duration: 4 founded_at: 07.05.2018 -- name: Zootekni (Veteriner) (Yl) (Tezli) +- name: Zootekni (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-ZOO-YL code: '784' yoksis_id: '278856' @@ -8591,7 +8591,7 @@ duration: 2 founded_at: 24.06.2015 -- name: İç Hastalıkları (Veteriner) (Dr) +- name: İç Hastalıkları (Veteriner) (DR) abbreviation: VETERİNER-İÇH-DR code: '785' yoksis_id: '169569' @@ -8605,7 +8605,7 @@ duration: 4 founded_at: 07.05.2018 -- name: İç Hastalıkları (Yl) (Veteriner) (Tezli) +- name: İç Hastalıkları (YL) (Veteriner) (Tezli) abbreviation: VETERİNER-İÇH-YL code: '786' yoksis_id: '281621' @@ -9061,7 +9061,7 @@ issues: - Kuruluş tarihi hatalı -- name: Yaşlı Bakımı Programı (İö) +- name: Yaşlı Bakımı Programı (İÖ) abbreviation: SAĞLIK-MYO-SBH-YAŞLI-PR-2 code: '300' yoksis_id: '240439' @@ -9164,7 +9164,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Patoloji Laboratuvar Teknikleri Programı (İö) +- name: Patoloji Laboratuvar Teknikleri Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-PLT-PR-2 code: '306' yoksis_id: '215481' @@ -9192,7 +9192,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İö) +- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-TDS-PR-2 code: '308' yoksis_id: '169658' @@ -9222,7 +9222,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-TGT-PR-2 code: '310' yoksis_id: '243775' @@ -9270,7 +9270,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlk ve Acil Yardım Programı (İö) +- name: İlk ve Acil Yardım Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-İAY-PR-2 code: '313' yoksis_id: '229074' @@ -9296,7 +9296,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Arkeoloji (Yl) (Tezli) +- name: Arkeoloji (YL) (Tezli) abbreviation: ARKEO-YL code: '787' yoksis_id: '258247' @@ -9310,7 +9310,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Avrupa-Akdeniz Kültürler ve Turizm (Yl) (Tezli) +- name: Avrupa-Akdeniz Kültürler ve Turizm (YL) (Tezli) abbreviation: AAKT-YL code: '788' yoksis_id: '261825' @@ -9324,7 +9324,7 @@ duration: 2 founded_at: 15.10.2014 -- name: Beden Eğitimi ve Spor (Dr) +- name: Beden Eğitimi ve Spor (DR) abbreviation: SOSYAL-BİLİM-BES-DR code: '789' yoksis_id: '266388' @@ -9340,7 +9340,7 @@ issues: - SAĞLIK-BİLİM VE SOSYAL-BİLİM altında aynı isimli Doktora -- name: Coğrafya (Dr) +- name: Coğrafya (DR) abbreviation: COĞRAFYA-DR code: '790' yoksis_id: '175687' @@ -9354,7 +9354,7 @@ duration: 4 founded_at: 01.07.2010 -- name: Coğrafya (Yl) (Tezli) +- name: Coğrafya (YL) (Tezli) abbreviation: COĞRAFYA-YL code: '791' yoksis_id: '230727' @@ -9368,7 +9368,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Dini Danışmanlık ve Rehberlik (Yl) (Tezsiz) (İö) +- name: Dini Danışmanlık ve Rehberlik (YL) (Tezsiz) (İÖ) abbreviation: DDR-YZ-2 code: '792' yoksis_id: '225938' @@ -9397,7 +9397,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok. SOSYAL-BİLİM-İŞLENİ-ADB ile benzerlik kontrol edilmeli. -- name: Evlilik ve Aile Danışmanlığı (Yl) (Tezsiz) (İö) +- name: Evlilik ve Aile Danışmanlığı (YL) (Tezsiz) (İÖ) abbreviation: EVLİLİK-YZ-2 code: '793' yoksis_id: '255364' @@ -9411,7 +9411,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Felsefe (Dr) +- name: Felsefe (DR) abbreviation: FELSEFE-DR code: '794' yoksis_id: '301218' @@ -9425,7 +9425,7 @@ duration: 4 founded_at: 10.08.2016 -- name: Felsefe (Yl) (Tezli) +- name: Felsefe (YL) (Tezli) abbreviation: FELSEFE-YL code: '795' yoksis_id: '219791' @@ -9439,7 +9439,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Felsefe ve Din Bilimleri (Dr) +- name: Felsefe ve Din Bilimleri (DR) abbreviation: FELSEFEDİN-DR code: '796' yoksis_id: '169480' @@ -9452,7 +9452,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Felsefe ve Din Bilimleri (Yl) (Tezli) +- name: Felsefe ve Din Bilimleri (YL) (Tezli) abbreviation: FELSEFEDİN-YL code: '797' yoksis_id: '230721' @@ -9465,7 +9465,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Geleneksel Türk Müziği (Yl) (Tezli) +- name: Geleneksel Türk Müziği (YL) (Tezli) abbreviation: GTM-YL code: '798' yoksis_id: '297036' @@ -9479,7 +9479,7 @@ duration: 2 founded_at: 15.06.2016 -- name: Kadın ve Aile Araştırmaları (Yl) (Tezli) +- name: Kadın ve Aile Araştırmaları (YL) (Tezli) abbreviation: KAA-YL code: '799' yoksis_id: '230643' @@ -9493,7 +9493,7 @@ duration: 2 founded_at: 23.06.2011 -- name: Kamu Hukuku (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: Kamu Hukuku (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: KAMU-DR-KTÜ code: '800' yoksis_id: '225763' @@ -9507,7 +9507,7 @@ duration: 4 founded_at: 12.07.2012 -- name: Kamu Hukuku (Yl) (Tezli) +- name: Kamu Hukuku (YL) (Tezli) abbreviation: KAMU-YL code: '801' yoksis_id: '176119' @@ -9521,7 +9521,7 @@ duration: 2 founded_at: 26.08.2010 -- name: Kamu Hukuku (Yl) (Tezsiz) (İö) +- name: Kamu Hukuku (YL) (Tezsiz) (İÖ) abbreviation: KAMU-YZ-2 code: '802' yoksis_id: '230164' @@ -9535,7 +9535,7 @@ duration: 2 founded_at: 07.07.2011 -- name: Kamu Yönetimi (Dr) +- name: Kamu Yönetimi (DR) abbreviation: KAMUYÖN-DR code: '803' yoksis_id: '235191' @@ -9549,7 +9549,7 @@ duration: 4 founded_at: 01.03.2013 -- name: Kamu Yönetimi (Yl) (Tezli) +- name: Kamu Yönetimi (YL) (Tezli) abbreviation: KAMUYÖN-YL code: '804' yoksis_id: '219792' @@ -9563,7 +9563,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Muhasebe-Finansman (Yl) (Tezli) +- name: Muhasebe-Finansman (YL) (Tezli) abbreviation: MUHASEBE-YL code: '805' yoksis_id: '264822' @@ -9577,7 +9577,7 @@ duration: 2 founded_at: 20.01.2015 -- name: Muhasebe-Finansman (Yl) (Tezsiz) +- name: Muhasebe-Finansman (YL) (Tezsiz) abbreviation: MUHASEBE-YZ code: '806' yoksis_id: '264823' @@ -9591,7 +9591,7 @@ duration: 2 founded_at: 20.01.2015 -- name: Psikoloji (Yl) (Tezli) +- name: Psikoloji (YL) (Tezli) abbreviation: PSİKOLOJİ-YL code: '807' yoksis_id: '258246' @@ -9605,7 +9605,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Sanat Tarihi (Yl) (Tezli) +- name: Sanat Tarihi (YL) (Tezli) abbreviation: SANATTARİHİ-YL code: '808' yoksis_id: '283048' @@ -9619,7 +9619,7 @@ duration: 2 founded_at: 16.12.2015 -- name: Sosyoloji (Dr) +- name: Sosyoloji (DR) abbreviation: SOSYOLOJİ-DR code: '809' yoksis_id: '323943' @@ -9633,7 +9633,7 @@ duration: 4 founded_at: 07.06.2017 -- name: Sosyoloji (Yl) (Tezli) +- name: Sosyoloji (YL) (Tezli) abbreviation: SOSYOLOJİ-YL code: '810' yoksis_id: '219789' @@ -9647,7 +9647,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Spor Yöneticiliği (Dr) +- name: Spor Yöneticiliği (DR) abbreviation: SPORYÖN-DR code: '811' yoksis_id: '280862' @@ -9661,7 +9661,7 @@ duration: 4 founded_at: '09.09.2015' -- name: Spor Yöneticiliği (Yl) (Tezli) +- name: Spor Yöneticiliği (YL) (Tezli) abbreviation: SPORYÖN-YL code: '812' yoksis_id: '281995' @@ -9675,7 +9675,7 @@ duration: 2 founded_at: '09.09.2015' -- name: Siyaset Bilimi ve Kamu Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Siyaset Bilimi ve Kamu Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SBKY-YZ-UZ code: '029' yoksis_id: '267770' @@ -9691,7 +9691,7 @@ issues: - Kuruluş tarihi hatalı -- name: Tarih (Dr) +- name: Tarih (DR) abbreviation: TARİH-DR code: '813' yoksis_id: '169484' @@ -9704,7 +9704,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih (Yl) (Tezli) +- name: Tarih (YL) (Tezli) abbreviation: TARİH-YL code: '814' yoksis_id: '230726' @@ -9718,7 +9718,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Temel İslam Bilimleri (Dr) +- name: Temel İslam Bilimleri (DR) abbreviation: TİB-DR code: '815' yoksis_id: '169474' @@ -9731,7 +9731,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Temel İslam Bilimleri (Yl) (Tezli) +- name: Temel İslam Bilimleri (YL) (Tezli) abbreviation: TİB-YL code: '816' yoksis_id: '230720' @@ -9744,7 +9744,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm İşletmeciliği (Yl) (Tezli) +- name: Turizm İşletmeciliği (YL) (Tezli) abbreviation: TURİZMİŞ-YL code: '817' yoksis_id: '323944' @@ -9758,7 +9758,7 @@ duration: 2 founded_at: 07.06.2017 -- name: Turizm İşletmeciliği (Yl) (Tezsiz) +- name: Turizm İşletmeciliği (YL) (Tezsiz) abbreviation: TURİZMİŞ-YZ code: '818' yoksis_id: '301219' @@ -9772,7 +9772,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Türk Dili ve Edebiyatı (Dr) +- name: Türk Dili ve Edebiyatı (DR) abbreviation: TDE-DR code: '819' yoksis_id: '169487' @@ -9785,7 +9785,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı (Yl) (Tezli) +- name: Türk Dili ve Edebiyatı (YL) (Tezli) abbreviation: TDE-YL code: '820' yoksis_id: '230723' @@ -9799,7 +9799,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Uluslararası İlişkiler (Yl) (Tezli) +- name: Uluslararası İlişkiler (YL) (Tezli) abbreviation: Uİ-YL code: '821' yoksis_id: '169470' @@ -9812,7 +9812,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yerel Yönetimler (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Yerel Yönetimler (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: YERELYÖN-YZ-UZ code: '030' yoksis_id: '258555' @@ -9826,7 +9826,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Özel Hukuk (Yl) (Tezli) (Karadeniz Teknik Üniversitesi Ortak) +- name: Özel Hukuk (YL) (Tezli) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: ÖZELHUKUK-YL-KTÜ code: '822' yoksis_id: '255439' @@ -9840,7 +9840,7 @@ duration: 2 founded_at: 20.02.2014 -- name: İktisat (Dr) +- name: İktisat (DR) abbreviation: İKTİSAT-DR code: '823' yoksis_id: '281623' @@ -9854,7 +9854,7 @@ duration: 4 founded_at: 22.10.2015 -- name: İktisat (Yl) (Tezli) +- name: İktisat (YL) (Tezli) abbreviation: İKTİSAT-YL code: '824' yoksis_id: '219793' @@ -9868,7 +9868,7 @@ duration: 2 founded_at: 26.06.2012 -- name: İktisat (Yl) (Tezsiz) (İö) +- name: İktisat (YL) (Tezsiz) (İÖ) abbreviation: İKTİSAT-YZ-2 code: '825' yoksis_id: '323942' @@ -9895,7 +9895,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 22.06.2016 -- name: Medya ve İletişim Bilimleri (Yl) (Tezli) +- name: Medya ve İletişim Bilimleri (YL) (Tezli) abbreviation: SOSYAL-BİLİM-İLETİŞİM-MEDYA-YL code: '826' yoksis_id: '297536' @@ -9909,7 +9909,7 @@ duration: 2 founded_at: 22.06.2016 -- name: İslam Tarihi ve Sanatları (Dr) +- name: İslam Tarihi ve Sanatları (DR) abbreviation: İSLAMTS-DR code: '827' yoksis_id: '169479' @@ -9922,7 +9922,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi ve Sanatları (Yl) (Tezli) +- name: İslam Tarihi ve Sanatları (YL) (Tezli) abbreviation: İSLAMTS-YL code: '828' yoksis_id: '230799' @@ -9935,7 +9935,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İşletme (Dr) +- name: İşletme (DR) abbreviation: SOSYAL-BİLİM-İŞLETME-DR code: '829' yoksis_id: '235190' @@ -9949,7 +9949,7 @@ duration: 4 founded_at: 01.03.2013 -- name: İşletme (Yl) (Tezli) +- name: İşletme (YL) (Tezli) abbreviation: SOSYAL-BİLİM-İŞLETME-YL code: '830' yoksis_id: '209533' @@ -9963,7 +9963,7 @@ duration: 2 founded_at: 22.09.2011 -- name: İşletme (Yl) (Tezsiz) +- name: İşletme (YL) (Tezsiz) abbreviation: SOSYAL-BİLİM-İŞLETME-YZ code: '831' yoksis_id: '209537' @@ -9990,7 +9990,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 21.07.2011 -- name: İşletme ve Endüstri İlişkileri (Yl) (Tezli) +- name: İşletme ve Endüstri İlişkileri (YL) (Tezli) abbreviation: İŞLENİ-YL code: '832' yoksis_id: '219261' @@ -10122,7 +10122,7 @@ duration: 2 founded_at: 04.08.2017 -- name: Gıda Kalite Kontrolü ve Analizi Programı (İö) +- name: Gıda Kalite Kontrolü ve Analizi Programı (İÖ) abbreviation: TERME-MYO-GIDA-KKA-PR-2 code: '317' yoksis_id: '276137' @@ -12226,7 +12226,7 @@ duration: 2 founded_at: 26.02.2009 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-BT-BP-PR-2 code: '327' yoksis_id: '170003' @@ -12321,7 +12321,7 @@ duration: 2 founded_at: 21.07.2011 -- name: Ormancılık ve Orman Ürünleri Programı (İö) +- name: Ormancılık ve Orman Ürünleri Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-ORMAN-PR-2 code: '331' yoksis_id: '239580' @@ -12377,7 +12377,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-ÇBGH-ÇG-PR-2 code: '333' yoksis_id: '170006' @@ -12564,7 +12564,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Antrenörlük Eğitimi Programı (İö) +- name: Antrenörlük Eğitimi Programı (İÖ) abbreviation: ANTRENÖR-PR-2 code: '335' yoksis_id: '319847' @@ -12578,7 +12578,7 @@ duration: 4 founded_at: 20.04.2017 -- name: Antrenörlük Eğitimi Programı (İö) (Bk.2) +- name: Antrenörlük Eğitimi Programı (İÖ) (Bk.2) abbreviation: ANTRENÖR-PR-2-2 code: '336' yoksis_id: '169400' @@ -12752,7 +12752,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Spor Yöneticiliği Programı (İö) +- name: Spor Yöneticiliği Programı (İÖ) abbreviation: SPORYÖN-PR-2 code: '340' yoksis_id: '320347' @@ -12766,7 +12766,7 @@ duration: 4 founded_at: 20.04.2017 -- name: Spor Yöneticiliği Programı (İö) (Bk.2) +- name: Spor Yöneticiliği Programı (İÖ) (Bk.2) abbreviation: SPORYÖN-PR-2-2 code: '341' yoksis_id: '169406' @@ -12846,7 +12846,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Teknolojisi Programı (İö) +- name: Elektronik Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-ELEKTRO-ET-PR-2 code: '344' yoksis_id: '215491' @@ -12887,7 +12887,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) abbreviation: YEŞİLYURT-MYO-ELEKTRİK-PR-2 code: '346' yoksis_id: '215490' @@ -12929,7 +12929,7 @@ duration: 2 founded_at: 19.01.2011 -- name: Gıda Teknolojisi Programı (İö) +- name: Gıda Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-GIDA-TEKNO-PR-2 code: '348' yoksis_id: '267990' @@ -12971,7 +12971,7 @@ duration: 2 founded_at: 23.12.2010 -- name: Kimya Teknolojisi Programı (İö) +- name: Kimya Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-KİMYA-TEKNO-PR-2 code: '350' yoksis_id: '238468' @@ -13016,7 +13016,7 @@ duration: 2 founded_at: 19.01.2011 -- name: Endüstriyel Kalıpçılık Programı (İö) +- name: Endüstriyel Kalıpçılık Programı (İÖ) abbreviation: YEŞİLYURT-MYO-METAL-EK-PR-2 code: '352' yoksis_id: '257436' @@ -13057,7 +13057,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Otomotiv Teknolojisi Programı (İö) +- name: Otomotiv Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-MOTOR-OTO-PR-2 code: '354' yoksis_id: '240434' @@ -13891,7 +13891,7 @@ issues: - Kuruluş tarihi hatalı -- name: Çağrı Merkezi Hizmetleri Programı (İö) +- name: Çağrı Merkezi Hizmetleri Programı (İÖ) abbreviation: TİCARET-MYO-BHS-ÇMH-PR-2 code: '364' yoksis_id: '294078' @@ -13948,7 +13948,7 @@ duration: 2 founded_at: 04.08.2017 -- name: Bilgi Güvenliği Teknolojisi Programı (İö) +- name: Bilgi Güvenliği Teknolojisi Programı (İÖ) abbreviation: TİCARET-MYO-BT-BGT-PR-2 code: '367' yoksis_id: '267068' @@ -13977,7 +13977,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: TİCARET-MYO-BT-BP-PR-2 code: '369' yoksis_id: '229376' @@ -14017,7 +14017,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bankacılık ve Sigortacılık Programı (İö) +- name: Bankacılık ve Sigortacılık Programı (İÖ) abbreviation: TİCARET-MYO-FİNANS-BANKA-PR-2 code: '371' yoksis_id: '238469' @@ -14073,7 +14073,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: TİCARET-MYO-MV-PR-2 code: '373' yoksis_id: '229379' @@ -14115,7 +14115,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Sosyal Güvenlik Programı (İö) +- name: Sosyal Güvenlik Programı (İÖ) abbreviation: TİCARET-MYO-MKG-SG-PR-2 code: '375' yoksis_id: '257435' @@ -15166,7 +15166,7 @@ duration: 4 founded_at: 10.09.2009 -- name: İlahiyat Programı (İö) +- name: İlahiyat Programı (İÖ) abbreviation: İLAHİYAT-PR-2 code: '382' yoksis_id: '168774' @@ -15481,7 +15481,7 @@ duration: 4 founded_at: 18.04.2013 -- name: Halkla İlişkiler ve Tanıtım Programı (İö) +- name: Halkla İlişkiler ve Tanıtım Programı (İÖ) abbreviation: HİT-PR-2 code: '385' yoksis_id: '291019' @@ -15626,7 +15626,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) yoksis_id: '240436' parent_yoksis_id: '205956' unit_type_id: Önlisans/lisans Programı @@ -15815,7 +15815,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoloji Öğretmenliği Programı (İö) +- name: Biyoloji Öğretmenliği Programı (İÖ) yoksis_id: '273561' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15833,7 +15833,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fen Bilgisi Öğretmenliği Programı (İö) +- name: Fen Bilgisi Öğretmenliği Programı (İÖ) yoksis_id: '273563' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15887,7 +15887,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sosyal Bilgiler Öğretmenliği Programı (İö) +- name: Sosyal Bilgiler Öğretmenliği Programı (İÖ) yoksis_id: '273573' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15905,7 +15905,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sınıf Öğretmenliği Programı (İö) +- name: Sınıf Öğretmenliği Programı (İÖ) yoksis_id: '273571' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15941,7 +15941,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türkçe Öğretmenliği Programı (İö) +- name: Türkçe Öğretmenliği Programı (İÖ) yoksis_id: '273577' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15959,7 +15959,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Matematik Öğretmenliği Programı (İö) +- name: İlköğretim Matematik Öğretmenliği Programı (İÖ) yoksis_id: '273565' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -15995,7 +15995,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Bilgisayar Programcılığı Programı (İö) (Bk.320) +- name: Bilgisayar Programcılığı Programı (İÖ) (Bk.320) yoksis_id: '273578' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16004,7 +16004,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) (Bk.320) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) (Bk.320) yoksis_id: '273579' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16022,7 +16022,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '273581' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16040,7 +16040,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '273583' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16058,7 +16058,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Haberleşme Programı (İö) +- name: Elektronik Haberleşme Programı (İÖ) yoksis_id: '273585' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16076,7 +16076,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Elektronik Programı (İö) +- name: Endüstriyel Elektronik Programı (İÖ) yoksis_id: '273587' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16094,7 +16094,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Otomasyon Programı (İö) +- name: Endüstriyel Otomasyon Programı (İÖ) yoksis_id: '273589' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16121,7 +16121,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Haberleşme Programı (İö) +- name: Haberleşme Programı (İÖ) yoksis_id: '273592' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16139,7 +16139,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita Kadastropr. (İö) +- name: Harita Kadastropr. (İÖ) yoksis_id: '273594' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16148,7 +16148,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Hazır Giyim Programı (İö) (Bk.322) +- name: Hazır Giyim Programı (İÖ) (Bk.322) yoksis_id: '273595' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16166,7 +16166,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Kontrol Sistemleri Teknolojisi Programı (İö) +- name: Kontrol Sistemleri Teknolojisi Programı (İÖ) yoksis_id: '273599' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16175,7 +16175,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Makine Programı (İö) (Bk.320) +- name: Makine Programı (İÖ) (Bk.320) yoksis_id: '273600' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16193,7 +16193,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '273602' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16202,7 +16202,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Otomotiv Programı (İö) (Bk.320) +- name: Otomotiv Programı (İÖ) (Bk.320) yoksis_id: '273603' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16220,7 +16220,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Pazarlama Programı (İö) +- name: Pazarlama Programı (İÖ) yoksis_id: '273605' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16229,7 +16229,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tekstil Programı (İö) (Bk.322) +- name: Tekstil Programı (İÖ) (Bk.322) yoksis_id: '273606' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16256,7 +16256,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) yoksis_id: '273609' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16274,7 +16274,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otelcilik Programı (İö) +- name: Turizm ve Otelcilik Programı (İÖ) yoksis_id: '273611' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16292,7 +16292,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '273597' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -16352,7 +16352,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Endüstriyel Elektronik Programı (İö) (Bk.611) +- name: Endüstriyel Elektronik Programı (İÖ) (Bk.611) yoksis_id: '273615' parent_yoksis_id: '269761' unit_type_id: Önlisans/lisans Programı @@ -16380,7 +16380,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Organik Tarım Programı (İö) +- name: Organik Tarım Programı (İÖ) abbreviation: BAFRA-MYO-BHU-OT-PR-2 code: '390' yoksis_id: '169421' @@ -16417,7 +16417,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tütün Yetiştiriciliği ve İşlemeciliği Programı (İö) +- name: Tütün Yetiştiriciliği ve İşlemeciliği Programı (İÖ) abbreviation: BAFRA-MYO-BHU-TÜTÜN-PR-2 code: '393' yoksis_id: '145887' @@ -16498,7 +16498,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '145886' parent_yoksis_id: '122356' unit_type_id: Önlisans/lisans Programı @@ -16539,7 +16539,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Seracılık Programı (İö) +- name: Seracılık Programı (İÖ) yoksis_id: '169434' parent_yoksis_id: '122356' unit_type_id: Önlisans/lisans Programı @@ -16570,7 +16570,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '128053' parent_yoksis_id: '128052' unit_type_id: Önlisans/lisans Programı @@ -16684,7 +16684,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hazır Giyim Programı (İö) (Bk.612) +- name: Hazır Giyim Programı (İÖ) (Bk.612) yoksis_id: '273618' parent_yoksis_id: '269762' unit_type_id: Önlisans/lisans Programı @@ -16693,7 +16693,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tekstil Programı (İö) (Bk.612) +- name: Tekstil Programı (İÖ) (Bk.612) yoksis_id: '273620' parent_yoksis_id: '269762' unit_type_id: Önlisans/lisans Programı @@ -16840,7 +16840,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Alman Dili Eğitimi (Dr) +- name: Alman Dili Eğitimi (DR) abbreviation: EĞİTİM-BİLİM-ALM-DR code: '833' yoksis_id: '267762' @@ -16852,7 +16852,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Alman Dili Eğitimi (Yl) (Tezli) +- name: Alman Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-ALM-YL code: '834' yoksis_id: '267761' @@ -16864,7 +16864,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezli) +- name: Coğrafya Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-COĞ-YL code: '835' yoksis_id: '267769' @@ -16876,7 +16876,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezli) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-EYTPE-YL code: '836' yoksis_id: '267767' @@ -16888,7 +16888,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EĞİTİM-BİLİM-EYTPE-YZ-UZ code: '032' yoksis_id: '234519' @@ -16900,7 +16900,7 @@ unit_instruction_type_id: Uzaktan Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezsiz) (İö) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezsiz) (İÖ) abbreviation: EĞİTİM-BİLİM-EYTPE-YZ-2 code: '837' yoksis_id: '267768' @@ -16912,7 +16912,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Eğitimin Sosyal Tarihi ve Temelleri (Yl) (Tezli) +- name: Eğitimin Sosyal Tarihi ve Temelleri (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-ESTT-YL code: '838' yoksis_id: '255124' @@ -16924,7 +16924,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fransız Dili Eğitimi (Yl) (Tezli) +- name: Fransız Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-FR-YL code: '839' yoksis_id: '267763' @@ -16936,7 +16936,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Müzik Eğitimi (Dr) +- name: Müzik Eğitimi (DR) abbreviation: MÜZİK-DR code: '840' yoksis_id: '267755' @@ -16948,7 +16948,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Dr) +- name: Rehberlik ve Psikolojik Danışmanlık (DR) abbreviation: EĞİTİM-BİLİM-PDR-DR code: '841' yoksis_id: '267766' @@ -16960,7 +16960,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-PDR-YL code: '842' yoksis_id: '267765' @@ -16972,7 +16972,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sosyal Bilimler Eğitimi (Dr) +- name: Sosyal Bilimler Eğitimi (DR) abbreviation: EĞİTİM-BİLİM-SBE-DR code: '843' yoksis_id: '169483' @@ -16984,7 +16984,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sosyal Bilimler Eğitimi (Yl) (Tezli) +- name: Sosyal Bilimler Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-SBE-YL code: '844' yoksis_id: '267756' @@ -16996,7 +16996,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) +- name: İngiliz Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-İNG-YL code: '845' yoksis_id: '267764' @@ -17008,7 +17008,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) (Gazi Üniversitesi Ortak) +- name: İngiliz Dili Eğitimi (YL) (Tezli) (Gazi Üniversitesi Ortak) abbreviation: EĞİTİM-BİLİM-İNG-YL-GAZİ code: '846' yoksis_id: '235313' @@ -17030,7 +17030,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '277322' parent_yoksis_id: '122082' unit_type_id: Önlisans/lisans Programı @@ -17040,7 +17040,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Bilgisayar ve Öğretim Teknolojileri Öğretmenliği Programı (İö) +- name: Bilgisayar ve Öğretim Teknolojileri Öğretmenliği Programı (İÖ) abbreviation: BÖTE-PR-2 code: '396' yoksis_id: '168653' @@ -17064,7 +17064,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) yoksis_id: '285283' parent_yoksis_id: '122082' unit_type_id: Önlisans/lisans Programı @@ -17131,7 +17131,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık Programı (İö) +- name: Rehberlik ve Psikolojik Danışmanlık Programı (İÖ) abbreviation: PDR-PR-2 code: '402' yoksis_id: '168675' @@ -17153,7 +17153,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Resim-İş Öğretmenliği Programı (İö) +- name: Resim-İş Öğretmenliği Programı (İÖ) abbreviation: RESİMİŞ-PR-2 code: '403' yoksis_id: '169388' @@ -17165,7 +17165,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Biyoloji Öğretmenliği Programı (İö) +- name: Biyoloji Öğretmenliği Programı (İÖ) yoksis_id: '318208' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -17175,7 +17175,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Fen Bilgisi Öğretmenliği Programı (İö) +- name: Fen Bilgisi Öğretmenliği Programı (İÖ) abbreviation: MF-FEN-PR-2 code: '404' yoksis_id: '168657' @@ -17200,7 +17200,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Öğretmenliği Programı (İö) +- name: Fizik Öğretmenliği Programı (İÖ) yoksis_id: '268109' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -17223,7 +17223,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Matematik Öğretmenliği Programı (İö) +- name: Matematik Öğretmenliği Programı (İÖ) yoksis_id: '275945' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -17254,7 +17254,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Matematik Öğretmenliği Programı (İö) +- name: İlköğretim Matematik Öğretmenliği Programı (İÖ) abbreviation: MF-İLKMAT-PR-2 code: '408' yoksis_id: '168664' @@ -17358,7 +17358,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Okul Öncesi Öğretmenliği Programı (İö) +- name: Okul Öncesi Öğretmenliği Programı (İÖ) abbreviation: TE-OÖE-PR-2 code: '415' yoksis_id: '168673' @@ -17371,7 +17371,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Sınıf Öğretmenliği Programı (İö) +- name: Sınıf Öğretmenliği Programı (İÖ) abbreviation: TE-SINIF-PR-2 code: '416' yoksis_id: '168677' @@ -17452,7 +17452,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Coğrafya Öğretmenliği Programı (İö) +- name: Coğrafya Öğretmenliği Programı (İÖ) yoksis_id: '275947' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -17462,7 +17462,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Sosyal Bilgiler Öğretmenliği Programı (İö) +- name: Sosyal Bilgiler Öğretmenliği Programı (İÖ) abbreviation: TS-SOSYAL-PR-2 code: '421' yoksis_id: '168679' @@ -17486,7 +17486,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih Öğretmenliği Programı (İö) +- name: Tarih Öğretmenliği Programı (İÖ) yoksis_id: '321775' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -17506,7 +17506,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı Öğretmenliği Programı (İö) +- name: Türk Dili ve Edebiyatı Öğretmenliği Programı (İÖ) yoksis_id: '275949' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -17516,7 +17516,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Türkçe Öğretmenliği Programı (İö) +- name: Türkçe Öğretmenliği Programı (İÖ) abbreviation: TS-TÜRKÇE-PR-2 code: '423' yoksis_id: '168681' @@ -17528,7 +17528,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Almanca Öğretmenliği Programı (İö) +- name: Almanca Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-ALM-PR-2 code: '424' yoksis_id: '168651' @@ -17540,7 +17540,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Fransızca Öğretmenliği Programı (İö) +- name: Fransızca Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-FR-PR-2 code: '425' yoksis_id: '168662' @@ -17600,7 +17600,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İngilizce Öğretmenliği Programı (İö) +- name: İngilizce Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-İNG-PR-2 code: '430' yoksis_id: '168667' @@ -17636,7 +17636,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zihin Engelliler Öğretmenliği Programı (İö) +- name: Zihin Engelliler Öğretmenliği Programı (İÖ) abbreviation: ÖZELEĞİTİM-ZİHİN-PR-2 code: '432' yoksis_id: '168683' @@ -17662,7 +17662,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İşitme Engelliler Öğretmenliği Programı (İö) +- name: İşitme Engelliler Öğretmenliği Programı (İÖ) abbreviation: ÖZELEĞİTİM-İŞİTME-PR-2 code: '434' yoksis_id: '168669' @@ -17698,7 +17698,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) abbreviation: İDKABE-PR-2 code: '436' yoksis_id: '285294' @@ -17710,7 +17710,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Biyoloji Eğitimi (Yl) (Tezsiz) +- name: Biyoloji Eğitimi (YL) (Tezsiz) yoksis_id: '330618' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17720,7 +17720,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fen Bilgisi Eğitim (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Fen Bilgisi Eğitim (YL) (Tezli) (Ordu Üniversitesi Ortak) yoksis_id: '258271' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17730,7 +17730,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fen Bilgisi Eğitimi (Dr) +- name: Fen Bilgisi Eğitimi (DR) yoksis_id: '169496' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -17740,7 +17740,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Eğitimi (Yl) (Tezsiz) +- name: Fizik Eğitimi (YL) (Tezsiz) yoksis_id: '330619' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17750,7 +17750,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita Mühendisliği (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: Harita Mühendisliği (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: HARİTA-DR-KTÜ code: '847' yoksis_id: '215657' @@ -17762,7 +17762,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hesaplamalı Bilimler (Yl) (Tezli) +- name: Hesaplamalı Bilimler (YL) (Tezli) yoksis_id: '255367' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17772,7 +17772,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Kimya Eğitimi (Yl) (Tezsiz) +- name: Kimya Eğitimi (YL) (Tezsiz) yoksis_id: '330620' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17782,7 +17782,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Malzeme Bilimi ve Mühendisliği (Yl) (Tezli) +- name: Malzeme Bilimi ve Mühendisliği (YL) (Tezli) abbreviation: MALZEME-YL-DİĞER code: '848' yoksis_id: '211288' @@ -17796,7 +17796,7 @@ issues: - yoksis_id '371245' ile isim benzerliği, aktiflik farklı -- name: Matematik (Yl) (Tezsiz) +- name: Matematik (YL) (Tezsiz) yoksis_id: '234094' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17806,7 +17806,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Matematik Eğitimi (Yl) (Tezsiz) +- name: Matematik Eğitimi (YL) (Tezsiz) yoksis_id: '330621' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17816,7 +17816,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Moleküler Biyoloji ve Genetik (Dr) (Ücretli) +- name: Moleküler Biyoloji ve Genetik (DR) (Ücretli) abbreviation: MOLBİYOGEN-DR-ÜCRETLİ code: '849' yoksis_id: '299032' @@ -17828,7 +17828,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Moleküler Biyoloji ve Genetik (Yl) (Tezli) +- name: Moleküler Biyoloji ve Genetik (YL) (Tezli) abbreviation: MOLBİYOGEN-YL code: '850' yoksis_id: '381852' @@ -17843,7 +17843,7 @@ issues: - Yerleşke eksik -- name: Moleküler Biyoloji ve Genetik (Yl) (Tezli) (Ücretli) +- name: Moleküler Biyoloji ve Genetik (YL) (Tezli) (Ücretli) abbreviation: MOLBİYOGEN-YL-ÜCRETLİ code: '851' yoksis_id: '299033' @@ -17855,7 +17855,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri (Dr) +- name: Su Ürünleri (DR) yoksis_id: '321481' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -17865,7 +17865,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Su Ürünleri (Yl) (Tezli) +- name: Su Ürünleri (YL) (Tezli) yoksis_id: '330622' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17875,7 +17875,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri Avlama ve İşleme Tekniği (Dr) +- name: Su Ürünleri Avlama ve İşleme Tekniği (DR) yoksis_id: '321447' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -17885,7 +17885,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Su Ürünleri Avlama ve İşleme Tekniği  (Yl) (Tezli) +- name: Su Ürünleri Avlama ve İşleme Tekniği  (YL) (Tezli) yoksis_id: '317808' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17895,7 +17895,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri Yetiştiriciliği (Dr) +- name: Su Ürünleri Yetiştiriciliği (DR) yoksis_id: '321482' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -17905,7 +17905,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Fen Bilgisi Eğitimi (Yl) (Tezli) +- name: İlköğretim Fen Bilgisi Eğitimi (YL) (Tezli) yoksis_id: '324884' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -17915,7 +17915,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Mühendisliği (Yl) (Tezli) (Ücretli) +- name: İnşaat Mühendisliği (YL) (Tezli) (Ücretli) abbreviation: İNŞAAT-YL-ÜCRETLİ code: '852' yoksis_id: '299031' @@ -17993,7 +17993,7 @@ issues: - Aktifken kısaltma verdiğimiz bu birim kapatılmış -- name: Biyoloji Programı (İö) +- name: Biyoloji Programı (İÖ) abbreviation: BİYO-PR-2 code: '437' yoksis_id: '168688' @@ -18005,7 +18005,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Coğrafya Programı (İö) +- name: Coğrafya Programı (İÖ) abbreviation: COĞRAFYA-PR-2 code: '438' yoksis_id: '168694' @@ -18018,7 +18018,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Felsefe Programı (İö) +- name: Felsefe Programı (İÖ) abbreviation: FELSEFE-PR-2 code: '439' yoksis_id: '241626' @@ -18044,7 +18044,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Programı (İö) +- name: Fizik Programı (İÖ) abbreviation: FİZİK-PR-2 code: '441' yoksis_id: '168705' @@ -18068,7 +18068,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Kimya Programı (İö) +- name: Kimya Programı (İÖ) abbreviation: KİMYA-PR-2 code: '443' yoksis_id: '168709' @@ -18081,7 +18081,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Matematik Programı (İö) +- name: Matematik Programı (İÖ) abbreviation: MAT-PR-2 code: '444' yoksis_id: '168713' @@ -18239,7 +18239,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih Programı (İö) +- name: Tarih Programı (İÖ) abbreviation: TARİH-PR-2 code: '456' yoksis_id: '168718' @@ -18288,7 +18288,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı Programı (İö) +- name: Türk Dili ve Edebiyatı Programı (İÖ) abbreviation: TDE-PR-2 code: '460' yoksis_id: '168722' @@ -18320,7 +18320,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İstatistik Programı (İö) +- name: İstatistik Programı (İÖ) abbreviation: İSTATİSTİK-PR-2 code: '461' yoksis_id: '168707' @@ -18604,7 +18604,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '169582' parent_yoksis_id: '169579' unit_type_id: Önlisans/lisans Programı @@ -18644,7 +18644,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizyoterapi Programı (İö) +- name: Fizyoterapi Programı (İÖ) yoksis_id: '169583' parent_yoksis_id: '147579' unit_type_id: Önlisans/lisans Programı @@ -18696,7 +18696,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Emlak ve Emlak Yönetimi Programı (İö) +- name: Emlak ve Emlak Yönetimi Programı (İÖ) abbreviation: HAVZA-MYO-TPS-EMLAK-PR-2 code: '464' yoksis_id: '228555' @@ -18738,7 +18738,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '169577' parent_yoksis_id: '122382' unit_type_id: Önlisans/lisans Programı @@ -18782,7 +18782,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Teknolojisi Programı (İö) +- name: İnşaat Teknolojisi Programı (İÖ) abbreviation: HAVZA-MYO-İNŞAAT-PR-2 code: '466' yoksis_id: '145888' @@ -18887,7 +18887,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '169633' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -18898,7 +18898,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '381449' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -18918,7 +18918,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Mimari Restorasyon Programı (İö) +- name: Mimari Restorasyon Programı (İÖ) yoksis_id: '267991' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -18989,7 +18989,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '169612' parent_yoksis_id: '122293' unit_type_id: Önlisans/lisans Programı @@ -19020,7 +19020,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yapı Denetimi Programı (İö) +- name: Yapı Denetimi Programı (İÖ) yoksis_id: '229172' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -19041,7 +19041,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '145978' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -19062,7 +19062,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Teknolojisi Programı (İö) +- name: İnşaat Teknolojisi Programı (İÖ) yoksis_id: '238467' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -19099,7 +19099,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '273648' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -19126,7 +19126,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Pazarlama Programı (İö) +- name: Pazarlama Programı (İÖ) yoksis_id: '273653' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -19144,7 +19144,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '273651' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -19414,7 +19414,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Gıda Mühendisliği Programı (İö) +- name: Gıda Mühendisliği Programı (İÖ) abbreviation: GIDA-PR-2 code: '481' yoksis_id: '168868' @@ -19427,7 +19427,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Harita Mühendisliği Programı (İö) +- name: Harita Mühendisliği Programı (İÖ) abbreviation: HARİTA-PR-2 code: '482' yoksis_id: '168870' @@ -19450,7 +19450,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Jeodezi ve Fotogrametri Mühendisliği Programı (İö) +- name: Jeodezi ve Fotogrametri Mühendisliği Programı (İÖ) yoksis_id: '275953' parent_yoksis_id: '147731' unit_type_id: Önlisans/lisans Programı @@ -19460,7 +19460,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Makine Mühendisliği Programı (İö) +- name: Makine Mühendisliği Programı (İÖ) abbreviation: MAKİNE-PR-2 code: '483' yoksis_id: '168874' @@ -19497,7 +19497,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Çevre Mühendisliği Programı (İö) +- name: Çevre Mühendisliği Programı (İÖ) abbreviation: ÇEVRE-PR-2 code: '485' yoksis_id: '168863' @@ -19558,7 +19558,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İnşaat Mühendisliği Programı (İö) +- name: İnşaat Mühendisliği Programı (İÖ) abbreviation: İNŞAAT-PR-2 code: '490' yoksis_id: '168872' @@ -19703,7 +19703,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '169895' parent_yoksis_id: '169892' unit_type_id: Önlisans/lisans Programı @@ -19723,7 +19723,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Teknolojisi Programı (İö) +- name: Elektronik Teknolojisi Programı (İÖ) yoksis_id: '169905' parent_yoksis_id: '169899' unit_type_id: Önlisans/lisans Programı @@ -19743,7 +19743,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Otomotiv Teknolojisi Programı (İö) +- name: Otomotiv Teknolojisi Programı (İÖ) yoksis_id: '145865' parent_yoksis_id: '169909' unit_type_id: Önlisans/lisans Programı @@ -19773,7 +19773,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ağırlama Hizmetleri Programı (İö) +- name: Ağırlama Hizmetleri Programı (İÖ) yoksis_id: '169807' parent_yoksis_id: '168851' unit_type_id: Önlisans/lisans Programı @@ -19783,7 +19783,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Peyzaj ve Süs Bitkileri Programı (İö) +- name: Peyzaj ve Süs Bitkileri Programı (İÖ) abbreviation: SAMSUN-MYO-PARK-PEYZAJ-PR-2 code: '491' yoksis_id: '174838' @@ -19805,7 +19805,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) yoksis_id: '128073' parent_yoksis_id: '128071' unit_type_id: Önlisans/lisans Programı @@ -19816,7 +19816,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Grafik Tasarım Programı (İö) +- name: Grafik Tasarım Programı (İÖ) yoksis_id: '145864' parent_yoksis_id: '169841' unit_type_id: Önlisans/lisans Programı @@ -19837,7 +19837,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Basım ve Yayın Teknolojileri Programı (İö) +- name: Basım ve Yayın Teknolojileri Programı (İÖ) yoksis_id: '122363' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19857,7 +19857,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '122367' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19877,7 +19877,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Duvar Süsleme Sanatları Programı (İö) +- name: Duvar Süsleme Sanatları Programı (İÖ) yoksis_id: '301884' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19897,7 +19897,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '128058' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19927,7 +19927,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Elektronik Teknolojisi Programı (İö) +- name: Endüstriyel Elektronik Teknolojisi Programı (İÖ) yoksis_id: '145813' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19937,7 +19937,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Grafik Tasarımı Programı (İö) +- name: Grafik Tasarımı Programı (İÖ) abbreviation: SAMSUN-MYO-TEKNİK-GRAFİK-PR-2 code: '492' yoksis_id: '128059' @@ -19971,7 +19971,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Mimari Dekoratif Sanatlar Programı (İö) +- name: Mimari Dekoratif Sanatlar Programı (İÖ) yoksis_id: '169843' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -19982,7 +19982,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Otomotiv Programı (İö) +- name: Otomotiv Programı (İÖ) yoksis_id: '128065' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -20057,7 +20057,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) abbreviation: SAMSUN-MYO-ÇBGH-ÇG-PR-2 code: '494' yoksis_id: '169885' @@ -20080,7 +20080,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ağırlama Hizmetleri Programı (İö) +- name: Ağırlama Hizmetleri Programı (İÖ) yoksis_id: '169806' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -20101,7 +20101,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) yoksis_id: '169803' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -20125,7 +20125,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: SAMSUN-MYO-İKTİSAT-TOİ-PR-2 code: '496' yoksis_id: '169805' @@ -20148,7 +20148,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otelcilik Programı (İö) +- name: Turizm ve Otelcilik Programı (İÖ) yoksis_id: '301949' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -20574,7 +20574,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Acil Tıp Hemşireliği (Dr) +- name: Acil Tıp Hemşireliği (DR) yoksis_id: '257558' parent_yoksis_id: '122387' unit_type_id: Doktora Programı @@ -20584,7 +20584,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Acil Tıp Hemşireliği (Yl) (Tezli) +- name: Acil Tıp Hemşireliği (YL) (Tezli) yoksis_id: '213248' parent_yoksis_id: '122387' unit_type_id: Yüksek Lisans Programı @@ -20594,7 +20594,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Yl) (Tezli) +- name: Anatomi (YL) (Tezli) abbreviation: ANATOMİ-YL code: '853' yoksis_id: '267774' @@ -20606,7 +20606,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Veteriner) (Dr) +- name: Anatomi (Veteriner) (DR) abbreviation: VETERİNER-ANATOMİ-DR code: '854' yoksis_id: '267772' @@ -20618,7 +20618,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ağız, Diş ve Çene Radyolojisi (Dr) +- name: Ağız, Diş ve Çene Radyolojisi (DR) abbreviation: ADÇR-DR code: '855' yoksis_id: '267775' @@ -20630,7 +20630,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor (Yl) (Tezli) +- name: Beden Eğitimi ve Spor (YL) (Tezli) abbreviation: SAĞLIK-BİLİM-BES-YL code: '856' yoksis_id: '267776' @@ -20642,7 +20642,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Evde Bakım Hemşireliği (Yl) (Tezli) +- name: Evde Bakım Hemşireliği (YL) (Tezli) abbreviation: EBH-YL code: '857' yoksis_id: '267777' @@ -20654,7 +20654,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Evde Bakım Hemşireliği (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Evde Bakım Hemşireliği (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EBH-YZ-UZ code: '036' yoksis_id: '267778' @@ -20666,7 +20666,7 @@ unit_instruction_type_id: Uzaktan Öğretim duration: 2 -- name: Fizyoloji (Yl) (Tezli) +- name: Fizyoloji (YL) (Tezli) abbreviation: FİZYOLOJİ-YL code: '858' yoksis_id: '267779' @@ -20678,7 +20678,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Kurumları Yönetimi (Yl) (Tezsiz) (İö) (Canik Başarı Ortak) +- name: Sağlık Kurumları Yönetimi (YL) (Tezsiz) (İÖ) (Canik Başarı Ortak) yoksis_id: '235440' parent_yoksis_id: '122387' unit_type_id: Yüksek Lisans Programı @@ -20688,7 +20688,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tıbbi Biyokimya (Yl) (Tezli) +- name: Tıbbi Biyokimya (YL) (Tezli) abbreviation: TBİYOKİMYA-YL code: '859' yoksis_id: '267781' @@ -20700,7 +20700,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Mikrobiyoloji (Yl) (Tezli) +- name: Tıbbi Mikrobiyoloji (YL) (Tezli) abbreviation: TMİKRO-YL code: '860' yoksis_id: '267780' @@ -20854,7 +20854,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hemşirelik Programı (İö) +- name: Hemşirelik Programı (İÖ) yoksis_id: '322461' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -20929,7 +20929,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İö) +- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İÖ) yoksis_id: '122342' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -20960,7 +20960,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yaşlı Bakım Hizmetleri Programı (İö) +- name: Yaşlı Bakım Hizmetleri Programı (İÖ) yoksis_id: '169794' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -21055,7 +21055,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) (Ücretli) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) (Ücretli) abbreviation: SAĞLIK-MYO-THT-TGT-PR-2-ÜCRETLİ code: '515' yoksis_id: '304701' @@ -21067,7 +21067,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tıbbi Laboratuvar Teknikleri Programı (İö) +- name: Tıbbi Laboratuvar Teknikleri Programı (İÖ) yoksis_id: '145881' parent_yoksis_id: '169645' unit_type_id: Önlisans/lisans Programı @@ -21192,7 +21192,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayarlı Muhasebe ve Vergi Uygulama Programı (İö) (Bk.613) +- name: Bilgisayarlı Muhasebe ve Vergi Uygulama Programı (İÖ) (Bk.613) yoksis_id: '273678' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21219,7 +21219,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) (Bk.610) +- name: Elektrik Programı (İÖ) (Bk.610) yoksis_id: '273682' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21228,7 +21228,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Endüstriyel Elektronik Programı (İö) (Bk.611) +- name: Endüstriyel Elektronik Programı (İÖ) (Bk.611) yoksis_id: '273683' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21246,7 +21246,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Makine Programı (İö) (Bk.610) +- name: Makine Programı (İÖ) (Bk.610) yoksis_id: '273685' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21255,7 +21255,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Mobilya ve Dekorasyon Programı (İö) (Bk.610) +- name: Mobilya ve Dekorasyon Programı (İÖ) (Bk.610) yoksis_id: '273686' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21273,7 +21273,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) (Bk.613) +- name: Muhasebe Programı (İÖ) (Bk.613) yoksis_id: '273688' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -21342,7 +21342,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sinop Su Ürünleri Programı (İö) +- name: Sinop Su Ürünleri Programı (İÖ) yoksis_id: '273693' parent_yoksis_id: '269778' unit_type_id: Önlisans/lisans Programı @@ -21495,7 +21495,7 @@ issues: - Üst birim olan Sivil Havacılık YO kapatılmış -- name: Alman Dili Eğitimi (Yl) (Tezli) +- name: Alman Dili Eğitimi (YL) (Tezli) yoksis_id: '324897' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21505,7 +21505,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezli) +- name: Coğrafya Eğitimi (YL) (Tezli) yoksis_id: '330606' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21515,7 +21515,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezsiz) +- name: Coğrafya Eğitimi (YL) (Tezsiz) yoksis_id: '330607' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21525,7 +21525,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Eğitimi (Dr) +- name: Din Eğitimi (DR) yoksis_id: '330594' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21535,7 +21535,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Eğitimi (Yl) (Tezli) +- name: Din Eğitimi (YL) (Tezli) yoksis_id: '330593' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21545,7 +21545,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Felsefesi (Dr) +- name: Din Felsefesi (DR) yoksis_id: '330596' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21555,7 +21555,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Felsefesi (Yl) (Tezli) +- name: Din Felsefesi (YL) (Tezli) yoksis_id: '330595' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21565,7 +21565,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Kültürü ve Ahlak Bilgisi Eğitimi (Yl) (Tezsiz) +- name: Din Kültürü ve Ahlak Bilgisi Eğitimi (YL) (Tezsiz) yoksis_id: '381453' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21574,7 +21574,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Psikolojisi (Dr) +- name: Din Psikolojisi (DR) yoksis_id: '330598' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21584,7 +21584,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Psikolojisi (Yl) (Tezli) +- name: Din Psikolojisi (YL) (Tezli) yoksis_id: '330597' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21594,7 +21594,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Sosyolojisi (Dr) +- name: Din Sosyolojisi (DR) yoksis_id: '330599' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21604,7 +21604,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dinler Tarihi (Dr) +- name: Dinler Tarihi (DR) yoksis_id: '330601' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21614,7 +21614,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dinler Tarihi (Yl) (Tezli) +- name: Dinler Tarihi (YL) (Tezli) yoksis_id: '330600' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21624,7 +21624,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eski Türk Dili (Yl) (Tezli) +- name: Eski Türk Dili (YL) (Tezli) yoksis_id: '330616' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21634,7 +21634,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eski Türk Edebiyatı (Dr) +- name: Eski Türk Edebiyatı (DR) yoksis_id: '330617' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21644,7 +21644,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Eğitim Bilimleri (Dr) +- name: Eğitim Bilimleri (DR) yoksis_id: '324886' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21654,7 +21654,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Eğitim Bilimleri (Yl) (Tezli) +- name: Eğitim Bilimleri (YL) (Tezli) yoksis_id: '324885' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21664,7 +21664,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi ve Planlaması (Yl) (Tezsiz) +- name: Eğitim Yönetimi, Teftişi ve Planlaması (YL) (Tezsiz) yoksis_id: '176437' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21674,7 +21674,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Güzel Sanatlar Eğitimi (Dr) +- name: Güzel Sanatlar Eğitimi (DR) yoksis_id: '324890' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21684,7 +21684,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Güzel Sanatlar Eğitimi (Yl) (Tezli) +- name: Güzel Sanatlar Eğitimi (YL) (Tezli) yoksis_id: '324889' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21694,7 +21694,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Müzik Eğitimi (Yl) (Tezli) +- name: Müzik Eğitimi (YL) (Tezli) yoksis_id: '324891' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21704,7 +21704,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ortaöğretim Sosyal Alanlar Eğitimi (Yl) (Tezsiz) +- name: Ortaöğretim Sosyal Alanlar Eğitimi (YL) (Tezsiz) yoksis_id: '330608' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21714,7 +21714,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Rehberlik ve Psikolojik Danışmanlık (Dr) +- name: Rehberlik ve Psikolojik Danışmanlık (DR) yoksis_id: '324888' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21724,7 +21724,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) yoksis_id: '324887' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21734,7 +21734,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Resim-İş Eğitimi (Dr) +- name: Resim-İş Eğitimi (DR) yoksis_id: '324893' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21744,7 +21744,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Resim-İş Eğitimi (Yl) (Tezli) +- name: Resim-İş Eğitimi (YL) (Tezli) yoksis_id: '324892' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21754,7 +21754,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Kurumları Yönetimi (Yl) (Tezsiz) (İö) (OMÜ Ortak) (Ücretli) +- name: Sağlık Kurumları Yönetimi (YL) (Tezsiz) (İÖ) (OMÜ Ortak) (Ücretli) yoksis_id: '300981' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21764,7 +21764,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Sınıf Öğretmenliği (Yl) (Tezli) +- name: Sınıf Öğretmenliği (YL) (Tezli) yoksis_id: '314753' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21774,7 +21774,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tarih Eğitimi (Yl) (Tezli) +- name: Tarih Eğitimi (YL) (Tezli) yoksis_id: '330610' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21784,7 +21784,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tarih Eğitimi (Yl) (Tezsiz) +- name: Tarih Eğitimi (YL) (Tezsiz) yoksis_id: '330609' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21794,7 +21794,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk Dili ve Edebiyatı (Yl) (Ücretli) +- name: Türk Dili ve Edebiyatı (YL) (Ücretli) abbreviation: TDE-YL-ÜCRETLİ code: '861' yoksis_id: '311762' @@ -21806,7 +21806,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk Dili ve Edebiyatı Eğitimi (Yl) (Tezsiz) +- name: Türk Dili ve Edebiyatı Eğitimi (YL) (Tezsiz) yoksis_id: '330611' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21816,7 +21816,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk İslam Sanatları Tarihi (Yl) (Tezli) +- name: Türk İslam Sanatları Tarihi (YL) (Tezli) yoksis_id: '330605' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21826,7 +21826,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türkiye Cumhuriyeti Tarihi (Dr) +- name: Türkiye Cumhuriyeti Tarihi (DR) abbreviation: SOSYAL-BİLİM-TC-DR code: '862' yoksis_id: '267771' @@ -21838,7 +21838,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türkiye Cumhuriyeti Tarihi (Yl) (Tezli) +- name: Türkiye Cumhuriyeti Tarihi (YL) (Tezli) yoksis_id: '327638' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21848,7 +21848,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türkçe Eğitimi (Yl) (Tezli) +- name: Türkçe Eğitimi (YL) (Tezli) yoksis_id: '324896' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21858,7 +21858,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Uluslararası Ticaret ve İşletmecilik (Yl) (Tezli) (Ücretli) +- name: Uluslararası Ticaret ve İşletmecilik (YL) (Tezli) (Ücretli) abbreviation: UTİ-YL-ÜCRETLİ code: '863' yoksis_id: '299076' @@ -21870,7 +21870,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Uluslararası Ticaret ve İşletmecilik (Yl) (Tezsiz) (Ücretli) +- name: Uluslararası Ticaret ve İşletmecilik (YL) (Tezsiz) (Ücretli) abbreviation: UTİ-YZ-ÜCRETLİ code: '864' yoksis_id: '299077' @@ -21882,7 +21882,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yabancı Diller Eğitimi (Yl) (Tezli) +- name: Yabancı Diller Eğitimi (YL) (Tezli) yoksis_id: '324899' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21892,7 +21892,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yakın Çağ Tarihi (Dr) +- name: Yakın Çağ Tarihi (DR) yoksis_id: '330613' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21902,7 +21902,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Yakın Çağ Tarihi (Yl) (Tezli) +- name: Yakın Çağ Tarihi (YL) (Tezli) yoksis_id: '330612' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21912,7 +21912,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yeni Türk Edebiyatı (Yl) (Tezli) (Ücretli) +- name: Yeni Türk Edebiyatı (YL) (Tezli) (Ücretli) abbreviation: SOSYAL-BİLİM-YENİTE-YL-ÜCRETLİ code: '865' yoksis_id: '299078' @@ -21924,7 +21924,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yeni Çağ Tarihi (Yl) (Tezli) +- name: Yeni Çağ Tarihi (YL) (Tezli) yoksis_id: '330614' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21934,7 +21934,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çağdaş Türk Lehçeleri ve Edebiyatları (Yl) (Tezli) +- name: Çağdaş Türk Lehçeleri ve Edebiyatları (YL) (Tezli) yoksis_id: '330615' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21944,7 +21944,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlköğretim (Yl) (Tezli) +- name: İlköğretim (YL) (Tezli) yoksis_id: '324894' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21954,7 +21954,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlköğretim Sınıf Öğretmenliği (Yl) (Tezli) +- name: İlköğretim Sınıf Öğretmenliği (YL) (Tezli) yoksis_id: '314880' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21964,7 +21964,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) +- name: İngiliz Dili Eğitimi (YL) (Tezli) yoksis_id: '324898' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -21974,7 +21974,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İslam Felsefesi (Dr) +- name: İslam Felsefesi (DR) yoksis_id: '330602' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21984,7 +21984,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi (Dr) +- name: İslam Tarihi (DR) yoksis_id: '330604' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -21994,7 +21994,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi (Yl) (Tezli) +- name: İslam Tarihi (YL) (Tezli) yoksis_id: '330603' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -22004,7 +22004,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İşletme (Yl) (Tezsiz) (İö) (Canik Başarı Ortak) +- name: İşletme (YL) (Tezsiz) (İÖ) (Canik Başarı Ortak) yoksis_id: '235338' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -22014,7 +22014,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: İşletme (Yl) (Tezsiz) (İö) (Ondokuz Mayıs Ortak) (Ücretli) +- name: İşletme (YL) (Tezsiz) (İÖ) (Ondokuz Mayıs Ortak) (Ücretli) yoksis_id: '300980' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -22033,7 +22033,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: TERME-MYO-MV-PR-2 code: '516' yoksis_id: '145983' @@ -22327,7 +22327,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-MV-PR-2 code: '518' yoksis_id: '170010' @@ -22370,7 +22370,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) yoksis_id: '169995' parent_yoksis_id: '122301' unit_type_id: Önlisans/lisans Programı @@ -22434,7 +22434,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '145966' parent_yoksis_id: '122297' unit_type_id: Önlisans/lisans Programı @@ -22472,7 +22472,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '145973' parent_yoksis_id: '122299' unit_type_id: Önlisans/lisans Programı @@ -22514,7 +22514,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Antrenörlük Eğitimi Programı (İö) (Bk.2) +- name: Antrenörlük Eğitimi Programı (İÖ) (Bk.2) abbreviation: BESYO-ANTRENÖR-PR-2-2 code: '520' yoksis_id: '295466' @@ -22538,7 +22538,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '295468' parent_yoksis_id: '122373' unit_type_id: Önlisans/lisans Programı @@ -22560,7 +22560,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Spor Yöneticiliği Programı (İö) (Bk.2) +- name: Spor Yöneticiliği Programı (İÖ) (Bk.2) abbreviation: BESYO-SPORYÖN-PR-2-2 code: '523' yoksis_id: '295470' @@ -22572,7 +22572,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '277323' parent_yoksis_id: '122374' unit_type_id: Önlisans/lisans Programı @@ -22622,7 +22622,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bahçe Bitkileri Programı (İö) +- name: Bahçe Bitkileri Programı (İÖ) yoksis_id: '275955' parent_yoksis_id: '122259' unit_type_id: Önlisans/lisans Programı @@ -22694,7 +22694,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarla Bitkileri Programı (İö) +- name: Tarla Bitkileri Programı (İÖ) yoksis_id: '275958' parent_yoksis_id: '122267' unit_type_id: Önlisans/lisans Programı @@ -22783,7 +22783,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zootekni Programı (İö) +- name: Zootekni Programı (İÖ) yoksis_id: '275960' parent_yoksis_id: '122271' unit_type_id: Önlisans/lisans Programı @@ -22810,7 +22810,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) (Bk.601) +- name: Bilgisayar Programcılığı Programı (İÖ) (Bk.601) yoksis_id: '273622' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -22819,7 +22819,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) (Bk.601) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) (Bk.601) yoksis_id: '273623' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -22837,7 +22837,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) (Bk.606) +- name: Muhasebe Programı (İÖ) (Bk.606) yoksis_id: '273625' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -22855,7 +22855,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) (Bk.606) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) (Bk.606) yoksis_id: '273627' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -22864,7 +22864,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '324470' parent_yoksis_id: '169488' unit_type_id: Önlisans/lisans Programı @@ -22904,7 +22904,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) yoksis_id: '145991' parent_yoksis_id: '128047' unit_type_id: Önlisans/lisans Programı @@ -22955,7 +22955,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) yoksis_id: '145987' parent_yoksis_id: '122290' unit_type_id: Önlisans/lisans Programı @@ -23207,7 +23207,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Siyaset Bilimi ve Kamu Yönetimi Programı (İö) +- name: Siyaset Bilimi ve Kamu Yönetimi Programı (İÖ) abbreviation: SBKY-PR-2 code: '531' yoksis_id: '241628' @@ -23446,7 +23446,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İşletme Programı (İö) +- name: İşletme Programı (İÖ) abbreviation: İŞLETMEB-PR-2 code: '549' yoksis_id: '241627' @@ -23495,7 +23495,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) abbreviation: İDKABE-PR-2-DİĞER code: '551' yoksis_id: '241629' @@ -23540,7 +23540,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İstatistik (Yl) (İngilizce) (Tezli) +- name: İstatistik (YL) (İngilizce) (Tezli) abbreviation: İSTATİSTİK-YL-İNG code: '866' yoksis_id: '383211' diff --git a/plugins/tenant/omu/db/units/src/yok.yml b/plugins/tenant/omu/db/units/src/yok.yml index 3c87eb302..62c27c561 100644 --- a/plugins/tenant/omu/db/units/src/yok.yml +++ b/plugins/tenant/omu/db/units/src/yok.yml @@ -330,7 +330,7 @@ duration: 2 founded_at: 05.08.2010 -- name: Deniz ve Liman İşletmeciliği Programı (İö) +- name: Deniz ve Liman İşletmeciliği Programı (İÖ) abbreviation: ALAÇAM-MYO-UH-DLİ-PR-2 yoksis_id: '276136' parent_yoksis_id: '205956' @@ -388,7 +388,7 @@ issues: - Kuruluş tarihi hatalı -- name: Posta Hizmetleri Programı (İö) +- name: Posta Hizmetleri Programı (İÖ) abbreviation: ALAÇAM-MYO-UH-PH-PR-2 yoksis_id: '240435' parent_yoksis_id: '205956' @@ -430,7 +430,7 @@ duration: 2 founded_at: 10.06.2010 -- name: Lojistik Programı (İö) +- name: Lojistik Programı (İÖ) abbreviation: ALAÇAM-MYO-YO-L-PR-2 yoksis_id: '240433' parent_yoksis_id: '153820' @@ -770,7 +770,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: BAFRA-MYO-BT-BP-PR-2 yoksis_id: '169447' parent_yoksis_id: '169441' @@ -834,7 +834,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi ve Aromatik Bitkiler Programı (İö) +- name: Tıbbi ve Aromatik Bitkiler Programı (İÖ) abbreviation: BAFRA-MYO-BHÜ-TAB-PR-2 yoksis_id: '169426' parent_yoksis_id: '169417' @@ -887,7 +887,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) (Bk.605) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) (Bk.605) abbreviation: BAFRA-MYO-MV-PR-2-605 yoksis_id: '145961' parent_yoksis_id: '169471' @@ -1331,7 +1331,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 26.02.2010 -- name: Bilgisayar ve Öğretim Teknolojileri Eğitimi (Yl) (Tezli) +- name: Bilgisayar ve Öğretim Teknolojileri Eğitimi (YL) (Tezli) abbreviation: BÖTE-YL yoksis_id: '244883' parent_yoksis_id: '174846' @@ -1344,7 +1344,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Biyoloji Eğitimi (Yl) (Tezli) +- name: Biyoloji Eğitimi (YL) (Tezli) abbreviation: BİYOEĞ-YL yoksis_id: '301215' parent_yoksis_id: '174846' @@ -1357,7 +1357,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Eğitim Bilimleri (Dr) +- name: Eğitim Bilimleri (DR) abbreviation: EĞİTİM-BİLİM-EB-DR yoksis_id: '174849' parent_yoksis_id: '174846' @@ -1385,7 +1385,7 @@ - üst birim olan Eğitim Bilimleri (Dr) arşiv olarak görünüyor - Detsis tarafında anabilim dalı başkanlığı enstitüye bağlı -- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (Yl) +- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (YL) abbreviation: EFST-YL yoksis_id: '327688' parent_yoksis_id: '174846' @@ -1398,7 +1398,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Programları ve Öğretim (Yl) (Tezli) +- name: Eğitim Programları ve Öğretim (YL) (Tezli) abbreviation: EPO-YL yoksis_id: '207884' parent_yoksis_id: '174846' @@ -1411,7 +1411,7 @@ duration: 2 founded_at: 03.05.2011 -- name: Eğitim Programları ve Öğretim (Yl) (Tezsiz) +- name: Eğitim Programları ve Öğretim (YL) (Tezsiz) abbreviation: EPO-YZ yoksis_id: '339817' parent_yoksis_id: '174846' @@ -1424,7 +1424,7 @@ duration: 2 founded_at: '09.05.2018' -- name: Eğitim Yönetimi (Dr) +- name: Eğitim Yönetimi (DR) abbreviation: EY-DR yoksis_id: '327630' parent_yoksis_id: '174846' @@ -1437,7 +1437,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezli) +- name: Eğitim Yönetimi (YL) (Tezli) abbreviation: EY-YL yoksis_id: '327629' parent_yoksis_id: '174846' @@ -1450,7 +1450,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Eğitim Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EY-YZ-UZ yoksis_id: '327678' parent_yoksis_id: '174846' @@ -1463,7 +1463,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitim Yönetimi (Yl) (Tezsiz) (İö) +- name: Eğitim Yönetimi (YL) (Tezsiz) (İÖ) abbreviation: EY-YZ-2 yoksis_id: '327631' parent_yoksis_id: '174846' @@ -1476,7 +1476,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (Dr) +- name: Eğitimin Felsefi, Sosyal ve Tarihi Temelleri (DR) abbreviation: EFST-DR yoksis_id: '376129' parent_yoksis_id: '174846' @@ -1489,7 +1489,7 @@ duration: 4 founded_at: 27.06.2018 -- name: Fen Bilgisi Eğitim (Dr) +- name: Fen Bilgisi Eğitim (DR) abbreviation: FENBİL-DR yoksis_id: '267754' parent_yoksis_id: '174846' @@ -1502,7 +1502,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Fen Bilgisi Eğitim (Yl) (Tezli) +- name: Fen Bilgisi Eğitim (YL) (Tezli) abbreviation: FENBİL-YL yoksis_id: '267753' parent_yoksis_id: '174846' @@ -1517,7 +1517,7 @@ issues: - Kuruluş tarihi hatalı -- name: Fen Bilgisi Eğitim (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Fen Bilgisi Eğitim (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FENBİL-YZ-UZ yoksis_id: '244484' parent_yoksis_id: '174846' @@ -1530,7 +1530,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Fen Bilgisi Eğitimi (Yl) (Tezsiz) (İö) +- name: Fen Bilgisi Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: FENBİL-YZ-2 yoksis_id: '235189' parent_yoksis_id: '174846' @@ -1543,7 +1543,7 @@ duration: 2 founded_at: 01.03.2013 -- name: Fizik Eğitimi (Yl) (Tezli) +- name: Fizik Eğitimi (YL) (Tezli) abbreviation: FİZİKEĞ-YL yoksis_id: '245968' parent_yoksis_id: '174846' @@ -1567,7 +1567,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Müzik Eğitimi (Yl) (Tezli) +- name: Müzik Eğitimi (YL) (Tezli) abbreviation: MÜZİK-YL yoksis_id: '230796' parent_yoksis_id: '174846' @@ -1580,7 +1580,7 @@ duration: 2 founded_at: 29.01.2004 -- name: Müzik Eğitimi (Yl) (Tezsiz) (İö) +- name: Müzik Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: MÜZİK-YZ-2 yoksis_id: '244884' parent_yoksis_id: '174846' @@ -1593,7 +1593,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Ortaöğretim Fen ve Matematik Alanları Eğitimi (Dr) +- name: Ortaöğretim Fen ve Matematik Alanları Eğitimi (DR) abbreviation: ORTAFENMAT-DR yoksis_id: '174856' parent_yoksis_id: '174846' @@ -1606,7 +1606,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Ortaöğretim Sosyal Alanlar Eğitimi (Dr) +- name: Ortaöğretim Sosyal Alanlar Eğitimi (DR) abbreviation: ORTASOSYAL-DR yoksis_id: '174850' parent_yoksis_id: '174846' @@ -1619,7 +1619,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: PDR-YL-ORDU yoksis_id: '280865' parent_yoksis_id: '174846' @@ -1632,7 +1632,7 @@ duration: 2 founded_at: '09.09.2015' -- name: Resim-İş Eğitimi (Dr) +- name: Resim-İş Eğitimi (DR) abbreviation: RESİMİŞ-DR yoksis_id: '230808' parent_yoksis_id: '174846' @@ -1645,7 +1645,7 @@ duration: 4 founded_at: 19.02.2003 -- name: Resim-İş Eğitimi (Yl) (Tezli) +- name: Resim-İş Eğitimi (YL) (Tezli) abbreviation: RESİMİŞ-YL yoksis_id: '230810' parent_yoksis_id: '174846' @@ -1658,7 +1658,7 @@ duration: 2 founded_at: 13.07.2001 -- name: Sınıf Eğitimi (Dr) +- name: Sınıf Eğitimi (DR) abbreviation: SINIF-DR yoksis_id: '267760' parent_yoksis_id: '174846' @@ -1671,7 +1671,7 @@ duration: 4 founded_at: 02.08.2017 -- name: Sınıf Eğitimi (Yl) (Tezli) +- name: Sınıf Eğitimi (YL) (Tezli) abbreviation: SINIF-YL yoksis_id: '267759' parent_yoksis_id: '174846' @@ -1684,7 +1684,7 @@ duration: 2 founded_at: 02.08.2017 -- name: Sınıf Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sınıf Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SINIF-YZ-UZ yoksis_id: '244486' parent_yoksis_id: '174846' @@ -1697,7 +1697,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Sınıf Eğitimi (Yl) (Tezsiz) (İö) +- name: Sınıf Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: SINIF-YZ-2 yoksis_id: '327682' parent_yoksis_id: '174846' @@ -1710,7 +1710,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Dr) +- name: Sosyal Bilgiler Eğitimi (DR) abbreviation: SOSYALBİL-DR yoksis_id: '327681' parent_yoksis_id: '174846' @@ -1723,7 +1723,7 @@ duration: 4 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezli) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezli) abbreviation: SOSYALBİL-YL yoksis_id: '327632' parent_yoksis_id: '174846' @@ -1736,7 +1736,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SOSYALBİL-YZ-UZ yoksis_id: '244485' parent_yoksis_id: '174846' @@ -1749,7 +1749,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Sosyal Bilgiler Eğitimi (Yl) (Tezsiz) (İö) +- name: Sosyal Bilgiler Eğitimi (YL) (Tezsiz) (İÖ) abbreviation: SOSYALBİL-YZ-2 yoksis_id: '327680' parent_yoksis_id: '174846' @@ -1762,7 +1762,7 @@ duration: 2 founded_at: '08.08.2017' -- name: Tarih Eğitimi (Yl) (Tezli) +- name: Tarih Eğitimi (YL) (Tezli) abbreviation: TARİHEĞ-YL yoksis_id: '213373' parent_yoksis_id: '174846' @@ -1775,7 +1775,7 @@ duration: 2 founded_at: 02.02.2012 -- name: Tarih Eğitimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Tarih Eğitimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: TARİHEĞ-YZ-UZ yoksis_id: '244483' parent_yoksis_id: '174846' @@ -1788,7 +1788,7 @@ duration: 2 founded_at: 06.06.2013 -- name: Türkçe Eğitimi (Dr) +- name: Türkçe Eğitimi (DR) abbreviation: TÜRKÇE-DR yoksis_id: '174852' parent_yoksis_id: '174846' @@ -1801,7 +1801,7 @@ duration: 4 founded_at: 26.02.2010 -- name: Türkçe Eğitimi (Yl) (Tezli) +- name: Türkçe Eğitimi (YL) (Tezli) abbreviation: TÜRKÇE-YL yoksis_id: '267757' parent_yoksis_id: '174846' @@ -1825,7 +1825,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: İlköğretim (Dr) +- name: İlköğretim (DR) abbreviation: İLK-DR yoksis_id: '174851' parent_yoksis_id: '174846' @@ -1838,7 +1838,7 @@ duration: 4 founded_at: 26.02.2010 -- name: İlköğretim Matematik Eğitimi (Yl) (Tezli) +- name: İlköğretim Matematik Eğitimi (YL) (Tezli) abbreviation: İLKMAT-YL yoksis_id: '267758' parent_yoksis_id: '174846' @@ -1851,7 +1851,7 @@ duration: 2 founded_at: '08.02.2010' -- name: İlköğretim Sınıf Öğretmenliği (Yl) (Tezsiz) (İö) +- name: İlköğretim Sınıf Öğretmenliği (YL) (Tezsiz) (İÖ) abbreviation: İLKSINIF-YZ-2 yoksis_id: '235186' parent_yoksis_id: '174846' @@ -2537,7 +2537,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Adli Bilimler (Yl) (Tezli) +- name: Adli Bilimler (YL) (Tezli) abbreviation: ADLİ-YL yoksis_id: '255365' parent_yoksis_id: '122386' @@ -2550,7 +2550,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Akıllı Sistemler Mühendisliği (Yl) (Tezli) +- name: Akıllı Sistemler Mühendisliği (YL) (Tezli) abbreviation: ASM-YL yoksis_id: '255366' parent_yoksis_id: '122386' @@ -2563,7 +2563,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Bahçe Bitkileri (Dr) +- name: Bahçe Bitkileri (DR) abbreviation: BAHÇE-DR yoksis_id: '211283' parent_yoksis_id: '122386' @@ -2575,7 +2575,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Bahçe Bitkileri (Yl) (Tezli) +- name: Bahçe Bitkileri (YL) (Tezli) abbreviation: BAHÇE-YL yoksis_id: '211284' parent_yoksis_id: '122386' @@ -2587,7 +2587,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Mühendisliği (Yl) (Tezli) +- name: Bilgisayar Mühendisliği (YL) (Tezli) abbreviation: BİLGİSAYAR-YL yoksis_id: '211296' parent_yoksis_id: '122386' @@ -2599,7 +2599,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bitki Koruma (Dr) +- name: Bitki Koruma (DR) abbreviation: BİTKİKOR-DR yoksis_id: '211294' parent_yoksis_id: '122386' @@ -2611,7 +2611,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Bitki Koruma (Yl) (Tezli) +- name: Bitki Koruma (YL) (Tezli) abbreviation: BİTKİKOR-YL yoksis_id: '211293' parent_yoksis_id: '122386' @@ -2624,7 +2624,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Biyoloji (Dr) +- name: Biyoloji (DR) abbreviation: BİYO-DR yoksis_id: '211282' parent_yoksis_id: '122386' @@ -2636,7 +2636,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoloji (Yl) (Tezli) +- name: Biyoloji (YL) (Tezli) abbreviation: BİYO-YL yoksis_id: '211261' parent_yoksis_id: '122386' @@ -2649,7 +2649,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Biyoloji (Yl) (Tezsiz) +- name: Biyoloji (YL) (Tezsiz) abbreviation: BİYO-YZ yoksis_id: '234077' parent_yoksis_id: '122386' @@ -2661,7 +2661,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Biyoloji (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Biyoloji (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: BİYO-YZ-UZ yoksis_id: '317402' parent_yoksis_id: '122386' @@ -2674,7 +2674,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Elektrik-Elektronik Mühendisliği (Dr) +- name: Elektrik-Elektronik Mühendisliği (DR) abbreviation: ELEKTRİK-DR yoksis_id: '211254' parent_yoksis_id: '122386' @@ -2686,7 +2686,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Elektrik-Elektronik Mühendisliği (Yl) (Tezli) +- name: Elektrik-Elektronik Mühendisliği (YL) (Tezli) abbreviation: ELEKTRİK-YL yoksis_id: '211253' parent_yoksis_id: '122386' @@ -2698,7 +2698,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizik (Dr) +- name: Fizik (DR) abbreviation: FİZİK-DR yoksis_id: '211257' parent_yoksis_id: '122386' @@ -2710,7 +2710,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik (Yl) (Tezli) +- name: Fizik (YL) (Tezli) abbreviation: FİZİK-YL yoksis_id: '211258' parent_yoksis_id: '122386' @@ -2725,7 +2725,7 @@ issues: - Kuruluş tarihi hatalı -- name: Fizik (Yl) (Tezsiz) +- name: Fizik (YL) (Tezsiz) abbreviation: FİZİK-YZ yoksis_id: '234095' parent_yoksis_id: '122386' @@ -2737,7 +2737,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizik (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Fizik (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FİZİK-YZ-UZ yoksis_id: '317401' parent_yoksis_id: '122386' @@ -2750,7 +2750,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Gıda Mühendisliği (Dr) +- name: Gıda Mühendisliği (DR) abbreviation: GIDA-DR yoksis_id: '211298' parent_yoksis_id: '122386' @@ -2762,7 +2762,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Gıda Mühendisliği (Dr) (Ordu Üniversitesi Ortak) +- name: Gıda Mühendisliği (DR) (Ordu Üniversitesi Ortak) abbreviation: GIDA-DR-ORDU yoksis_id: '279463' parent_yoksis_id: '122386' @@ -2775,7 +2775,7 @@ duration: 4 founded_at: '08.07.2015' -- name: Gıda Mühendisliği (Yl) (Tezli) +- name: Gıda Mühendisliği (YL) (Tezli) abbreviation: GIDA-YL yoksis_id: '211297' parent_yoksis_id: '122386' @@ -2788,7 +2788,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Gıda Mühendisliği (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Gıda Mühendisliği (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: GIDA-YL-ORDU yoksis_id: '226065' parent_yoksis_id: '122386' @@ -2801,7 +2801,7 @@ duration: 2 founded_at: 13.09.2012 -- name: Harita Mühendisliği (Dr) +- name: Harita Mühendisliği (DR) abbreviation: HARİTA-DR yoksis_id: '211266' parent_yoksis_id: '122386' @@ -2813,7 +2813,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Harita Mühendisliği (Yl) (Tezli) +- name: Harita Mühendisliği (YL) (Tezli) abbreviation: HARİTA-YL yoksis_id: '211265' parent_yoksis_id: '122386' @@ -2828,7 +2828,7 @@ issues: - Kuruluş tarihi hatalı -- name: Hesaplamalı Bilimler (Dr) +- name: Hesaplamalı Bilimler (DR) abbreviation: HESAP-DR yoksis_id: '255368' parent_yoksis_id: '122386' @@ -2841,7 +2841,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Kimya (Dr) +- name: Kimya (DR) abbreviation: FEN-KİMYA-DR yoksis_id: '211290' parent_yoksis_id: '122386' @@ -2853,7 +2853,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Kimya (Yl) (Tezli) +- name: Kimya (YL) (Tezli) abbreviation: FEN-KİMYA-YL yoksis_id: '211289' parent_yoksis_id: '122386' @@ -2866,7 +2866,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Kimya (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Kimya (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: FEN-KİMYA-YL-UZ yoksis_id: '317403' parent_yoksis_id: '122386' @@ -2890,7 +2890,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Kimya Mühendisliği (Yl) (Tezli) +- name: Kimya Mühendisliği (YL) (Tezli) abbreviation: KİMYA-YL yoksis_id: '225905' parent_yoksis_id: '122386' @@ -2903,7 +2903,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Makine Mühendisliği (Dr) +- name: Makine Mühendisliği (DR) abbreviation: MAKİNE-DR yoksis_id: '209678' parent_yoksis_id: '122386' @@ -2916,7 +2916,7 @@ duration: 4 founded_at: 23.08.2011 -- name: Makine Mühendisliği (Yl) (Tezli) +- name: Makine Mühendisliği (YL) (Tezli) abbreviation: MAKİNE-YL yoksis_id: '169494' parent_yoksis_id: '122386' @@ -2929,7 +2929,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Matematik (Dr) +- name: Matematik (DR) abbreviation: MAT-DR yoksis_id: '211256' parent_yoksis_id: '122386' @@ -2941,7 +2941,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Matematik (Dr) (Ordu Üniversitesi Ortak) +- name: Matematik (DR) (Ordu Üniversitesi Ortak) abbreviation: MAT-DR-ORDU yoksis_id: '242518' parent_yoksis_id: '122386' @@ -2954,7 +2954,7 @@ duration: 4 founded_at: 27.06.2013 -- name: Matematik (Yl) (Tezli) +- name: Matematik (YL) (Tezli) abbreviation: MAT-YL yoksis_id: '211255' parent_yoksis_id: '122386' @@ -2967,7 +2967,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Matematik (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Matematik (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: MAT-YL-UZ yoksis_id: '317399' parent_yoksis_id: '122386' @@ -2980,7 +2980,7 @@ duration: 2 founded_at: 29.04.2012 -- name: Metalurji ve Malzeme Mühendisliği (Yl) (Tezli) +- name: Metalurji ve Malzeme Mühendisliği (YL) (Tezli) abbreviation: MALZEME-YL yoksis_id: '371245' parent_yoksis_id: '122386' @@ -2993,7 +2993,7 @@ duration: 2 founded_at: 23.05.2018 -- name: Nanobilim ve Nanoteknoloji (Dr) (İngilizce) +- name: Nanobilim ve Nanoteknoloji (DR) (İngilizce) abbreviation: NANO-DR-İNG yoksis_id: '255370' parent_yoksis_id: '122386' @@ -3006,7 +3006,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Nanobilim ve Nanoteknoloji (Yl) (Tezli) (İngilizce) +- name: Nanobilim ve Nanoteknoloji (YL) (Tezli) (İngilizce) abbreviation: NANO-YL-İNG yoksis_id: '255369' parent_yoksis_id: '122386' @@ -3019,7 +3019,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Sağlık, Gıda Güvenliği ve İlgili Politikalar (Yl) (Tezli) +- name: Sağlık, Gıda Güvenliği ve İlgili Politikalar (YL) (Tezli) abbreviation: SGGİP-YL yoksis_id: '261702' parent_yoksis_id: '122386' @@ -3032,7 +3032,7 @@ duration: 2 founded_at: 25.09.2014 -- name: Tarım Ekonomisi (Dr) +- name: Tarım Ekonomisi (DR) abbreviation: TARIM-DR yoksis_id: '176121' parent_yoksis_id: '122386' @@ -3045,7 +3045,7 @@ duration: 4 founded_at: 26.08.2010 -- name: Tarım Ekonomisi (Yl) (Tezli) +- name: Tarım Ekonomisi (YL) (Tezli) abbreviation: TARIM-YL yoksis_id: '230597' parent_yoksis_id: '122386' @@ -3058,7 +3058,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tarım Makinaları ve Teknoloji Mühendisliği (Dr) +- name: Tarım Makinaları ve Teknoloji Mühendisliği (DR) abbreviation: TMT-DR yoksis_id: '211260' parent_yoksis_id: '122386' @@ -3071,7 +3071,7 @@ duration: 4 founded_at: 15.09.2008 -- name: Tarım Makinaları ve Teknoloji Mühendisliği (Yl) (Tezli) +- name: Tarım Makinaları ve Teknoloji Mühendisliği (YL) (Tezli) abbreviation: TMT-YL yoksis_id: '211259' parent_yoksis_id: '122386' @@ -3084,7 +3084,7 @@ duration: 2 founded_at: 03.06.2015 -- name: Tarımsal Biyoteknoloji (Dr) +- name: Tarımsal Biyoteknoloji (DR) abbreviation: TBT-DR yoksis_id: '255701' parent_yoksis_id: '122386' @@ -3097,7 +3097,7 @@ duration: 4 founded_at: 20.02.2014 -- name: Tarımsal Biyoteknoloji (Yl) (Tezli) +- name: Tarımsal Biyoteknoloji (YL) (Tezli) abbreviation: TBT-YL yoksis_id: '211287' parent_yoksis_id: '122386' @@ -3110,7 +3110,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tarımsal Yapılar ve Sulama (Dr) +- name: Tarımsal Yapılar ve Sulama (DR) abbreviation: TYS-DR yoksis_id: '211250' parent_yoksis_id: '122386' @@ -3122,7 +3122,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarımsal Yapılar ve Sulama (Yl) (Tezli) +- name: Tarımsal Yapılar ve Sulama (YL) (Tezli) abbreviation: TYS-YL yoksis_id: '211249' parent_yoksis_id: '122386' @@ -3135,7 +3135,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Tarla Bitkileri (Dr) +- name: Tarla Bitkileri (DR) abbreviation: TARLA-DR yoksis_id: '211286' parent_yoksis_id: '122386' @@ -3147,7 +3147,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarla Bitkileri (Yl) (Tezli) +- name: Tarla Bitkileri (YL) (Tezli) abbreviation: TARLA-YL yoksis_id: '211285' parent_yoksis_id: '122386' @@ -3160,7 +3160,7 @@ duration: 2 founded_at: 30.04.2018 -- name: Taşınmaz Değerleme ve Geliştirme (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Taşınmaz Değerleme ve Geliştirme (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: TAŞINMAZ-YZ-UZ yoksis_id: '215852' parent_yoksis_id: '122386' @@ -3173,7 +3173,7 @@ duration: 2 founded_at: 19.04.2012 -- name: Toprak Bilimi ve Bitki Besleme (Dr) +- name: Toprak Bilimi ve Bitki Besleme (DR) abbreviation: TOPRAK-DR yoksis_id: '203725' parent_yoksis_id: '122386' @@ -3186,7 +3186,7 @@ duration: 4 founded_at: 17.02.2011 -- name: Toprak Bilimi ve Bitki Besleme (Yl) (Tezli) +- name: Toprak Bilimi ve Bitki Besleme (YL) (Tezli) abbreviation: TOPRAK-YL yoksis_id: '203724' parent_yoksis_id: '122386' @@ -3199,7 +3199,7 @@ duration: 2 founded_at: 17.02.2011 -- name: Uçak ve Uzay Bilimleri Mühendisliği (Yl) (Tezli) +- name: Uçak ve Uzay Bilimleri Mühendisliği (YL) (Tezli) abbreviation: UÇAK-YL yoksis_id: '339818' parent_yoksis_id: '122386' @@ -3224,7 +3224,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 01.06.2016 -- name: Yenilenebilir Enerji ve Uygulamaları (Yl) (Tezli) +- name: Yenilenebilir Enerji ve Uygulamaları (YL) (Tezli) abbreviation: FEN-BİLİM-YEU-YL yoksis_id: '303045' parent_yoksis_id: '303063' @@ -3237,7 +3237,7 @@ duration: 2 founded_at: 01.06.2016 -- name: Zootekni (Dr) +- name: Zootekni (DR) abbreviation: ZOO-DR yoksis_id: '211291' parent_yoksis_id: '122386' @@ -3249,7 +3249,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zootekni (Yl) (Tezli) +- name: Zootekni (YL) (Tezli) abbreviation: ZOO-YL yoksis_id: '211292' parent_yoksis_id: '122386' @@ -3262,7 +3262,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Zootekni (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Zootekni (YL) (Tezli) (Ordu Üniversitesi Ortak) abbreviation: ZOO-YL-ORDU yoksis_id: '226064' parent_yoksis_id: '122386' @@ -3275,7 +3275,7 @@ duration: 2 founded_at: 13.09.2012 -- name: Çevre Mühendisliği (Dr) +- name: Çevre Mühendisliği (DR) abbreviation: ÇEVRE-DR yoksis_id: '211248' parent_yoksis_id: '122386' @@ -3287,7 +3287,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Çevre Mühendisliği (Yl) (Tezli) +- name: Çevre Mühendisliği (YL) (Tezli) abbreviation: ÇEVRE-YL yoksis_id: '211247' parent_yoksis_id: '122386' @@ -3300,7 +3300,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Çevre Mühendisliği (Yl) (Tezli) (İngilizce) +- name: Çevre Mühendisliği (YL) (Tezli) (İngilizce) abbreviation: ÇEVRE-YL-İNG yoksis_id: '244882' parent_yoksis_id: '122386' @@ -3313,7 +3313,7 @@ duration: 2 founded_at: 15.08.2013 -- name: İnşaat Mühendisliği (Dr) +- name: İnşaat Mühendisliği (DR) abbreviation: İNŞAAT-DR yoksis_id: '213374' parent_yoksis_id: '122386' @@ -3326,7 +3326,7 @@ duration: 4 founded_at: 02.02.2012 -- name: İnşaat Mühendisliği (Yl) (Tezli) +- name: İnşaat Mühendisliği (YL) (Tezli) abbreviation: İNŞAAT-YL yoksis_id: '231330' parent_yoksis_id: '122386' @@ -3350,7 +3350,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: İstatistik (Dr) +- name: İstatistik (DR) abbreviation: İSTATİSTİK-DR yoksis_id: '211251' parent_yoksis_id: '122386' @@ -3362,7 +3362,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İstatistik (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: İstatistik (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: İSTATİSTİK-DR-KTÜ yoksis_id: '213389' parent_yoksis_id: '122386' @@ -3375,7 +3375,7 @@ duration: 4 founded_at: 02.02.2012 -- name: İstatistik (Yl) (Tezli) +- name: İstatistik (YL) (Tezli) abbreviation: İSTATİSTİK-YL yoksis_id: '211252' parent_yoksis_id: '122386' @@ -4549,7 +4549,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Görsel İletişim Tasarımı (Yl) (Tezli) +- name: Görsel İletişim Tasarımı (YL) (Tezli) abbreviation: GİT-YL yoksis_id: '255316' parent_yoksis_id: '208606' @@ -4562,7 +4562,7 @@ duration: 2 founded_at: 20.02.2014 -- name: Müzikte Yorumculuk (Yl) (Tezli) +- name: Müzikte Yorumculuk (YL) (Tezli) abbreviation: MY-YL yoksis_id: '258248' parent_yoksis_id: '208606' @@ -4575,7 +4575,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Müzikte Yorumculuk (Yl) (Tezsiz) +- name: Müzikte Yorumculuk (YL) (Tezsiz) abbreviation: MY-YZ yoksis_id: '258249' parent_yoksis_id: '208606' @@ -4588,7 +4588,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Resim (Yl) (Tezli) +- name: Resim (YL) (Tezli) abbreviation: RESİM-YL yoksis_id: '281828' parent_yoksis_id: '208606' @@ -4614,7 +4614,7 @@ duration: 4 founded_at: 12.07.2017 -- name: Tıbbi Resimleme (Yl) (Tezli) +- name: Tıbbi Resimleme (YL) (Tezli) abbreviation: TIBBİRESİM-YL yoksis_id: '278819' parent_yoksis_id: '208606' @@ -4935,7 +4935,7 @@ duration: 2 founded_at: 27.04.2016 -- name: Büro Yönetimi ve Yönetici Asistanlığı Programı (İö) +- name: Büro Yönetimi ve Yönetici Asistanlığı Programı (İÖ) abbreviation: HAVZA-MYO-BHS-BYYA-PR-2 yoksis_id: '175631' parent_yoksis_id: '169579' @@ -5014,7 +5014,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: HAVZA-MYO-OTEL-TOİ-PR-2 yoksis_id: '169575' parent_yoksis_id: '169571' @@ -5053,7 +5053,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Fizyoterapi Programı (İö) +- name: Fizyoterapi Programı (İÖ) abbreviation: HAVZA-MYO-TERAPİ-FİZYO-PR-2 yoksis_id: '169588' parent_yoksis_id: '169584' @@ -5130,7 +5130,7 @@ duration: 2 founded_at: 27.04.2016 -- name: İşletme Yönetimi Programı (İö) +- name: İşletme Yönetimi Programı (İÖ) abbreviation: HAVZA-MYO-YO-İY-PR-2 yoksis_id: '240432' parent_yoksis_id: '169598' @@ -6333,7 +6333,7 @@ duration: 2 founded_at: 19.03.2014 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: SAMSUN-MYO-BT-BP-PR-2 yoksis_id: '169876' parent_yoksis_id: '169871' @@ -6396,7 +6396,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Mimari Dekoratif Sanatlar Programı (İö) +- name: Mimari Dekoratif Sanatlar Programı (İÖ) abbreviation: SAMSUN-MYO-EL-MDS-PR-2 yoksis_id: '169850' parent_yoksis_id: '169847' @@ -6538,7 +6538,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: SAMSUN-MYO-MV-PR-2 yoksis_id: '169804' parent_yoksis_id: '169802' @@ -6580,7 +6580,7 @@ issues: - Kuruluş tarihi hatalı -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: SAMSUN-MYO-OTEL-TOİ-PR-2 yoksis_id: '320498' parent_yoksis_id: '168851' @@ -6780,7 +6780,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Acil Hemşireliği (Dr) +- name: Acil Hemşireliği (DR) abbreviation: ACİL-DR yoksis_id: '329992' parent_yoksis_id: '122387' @@ -6793,7 +6793,7 @@ duration: 4 founded_at: 22.02.2017 -- name: Acil Hemşireliği (Yl) (Tezli) +- name: Acil Hemşireliği (YL) (Tezli) abbreviation: ACİL-YL yoksis_id: '329991' parent_yoksis_id: '122387' @@ -6806,7 +6806,7 @@ duration: 2 founded_at: 22.02.2017 -- name: Alerji-İmmünoloji (Yl) (Tezli) +- name: Alerji-İmmünoloji (YL) (Tezli) abbreviation: ALERJİ-YL yoksis_id: '219171' parent_yoksis_id: '122387' @@ -6818,7 +6818,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Dr) +- name: Anatomi (DR) abbreviation: ANATOMİ-DR yoksis_id: '169540' parent_yoksis_id: '122387' @@ -6830,7 +6830,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Anatomisi (Yl) (Tezli) +- name: Veterinerlik Anatomisi (YL) (Tezli) abbreviation: VETERİNER-ANATOMİ-YL yoksis_id: '169511' parent_yoksis_id: '122387' @@ -6843,7 +6843,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Antrenörlük Eğitimi (Dr) +- name: Antrenörlük Eğitimi (DR) abbreviation: ANTRENÖR-DR yoksis_id: '267669' parent_yoksis_id: '122387' @@ -6856,7 +6856,7 @@ duration: 4 founded_at: 25.03.2015 -- name: Antrenörlük Eğitimi (Yl) (Tezli) +- name: Antrenörlük Eğitimi (YL) (Tezli) abbreviation: ANTRENÖR-YL yoksis_id: '267668' parent_yoksis_id: '122387' @@ -6869,7 +6869,7 @@ duration: 2 founded_at: 25.03.2015 -- name: Ağız, Diş ve Çene Cerrahisi (Dr) +- name: Ağız, Diş ve Çene Cerrahisi (DR) abbreviation: ADÇC-DR yoksis_id: '169547' parent_yoksis_id: '122387' @@ -6881,7 +6881,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor (Dr) +- name: Beden Eğitimi ve Spor (DR) abbreviation: SAĞLIK-BİLİM-BES-DR yoksis_id: '169551' parent_yoksis_id: '122387' @@ -6895,7 +6895,7 @@ issues: - SAĞLIK-BİLİM VE SOSYAL-BİLİM altında aynı isimli Doktora -- name: Beslenme Bilimleri (Yl) (Tezli) +- name: Beslenme Bilimleri (YL) (Tezli) abbreviation: BESLENME-YL yoksis_id: '225937' parent_yoksis_id: '122387' @@ -6908,7 +6908,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Veterinerlik Besin Hijyeni ve Teknolojisi (Dr) +- name: Veterinerlik Besin Hijyeni ve Teknolojisi (DR) abbreviation: VETERİNER-BESİN-DR yoksis_id: '169576' parent_yoksis_id: '122387' @@ -6920,7 +6920,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Besin Hijyeni ve Teknolojisi (Yl) (Tezli) +- name: Veterinerlik Besin Hijyeni ve Teknolojisi (YL) (Tezli) abbreviation: VETERİNER-BESİN-YL yoksis_id: '169516' parent_yoksis_id: '122387' @@ -6933,7 +6933,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Veterinerlik Biyokimyası (Dr) +- name: Veterinerlik Biyokimyası (DR) abbreviation: VETERİNER-BİYOKİMYA-DR yoksis_id: '213250' parent_yoksis_id: '122387' @@ -6946,7 +6946,7 @@ duration: 4 founded_at: 30.11.2011 -- name: Veterinerlik Biyokimyası (Yl) (Tezli) +- name: Veterinerlik Biyokimyası (YL) (Tezli) abbreviation: VETERİNER-BİYOKİMYA-YL yoksis_id: '213249' parent_yoksis_id: '122387' @@ -6959,7 +6959,7 @@ duration: 2 founded_at: 30.11.2011 -- name: Biyoistatistik ve Tıp Bilişimi (Dr) +- name: Biyoistatistik ve Tıp Bilişimi (DR) abbreviation: BİYOİSTATİSTİK-DR yoksis_id: '211302' parent_yoksis_id: '122387' @@ -6971,7 +6971,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoistatistik ve Tıp Bilişimi (Yl) (Tezli) +- name: Biyoistatistik ve Tıp Bilişimi (YL) (Tezli) abbreviation: BİYOİSTATİSTİK-YL yoksis_id: '211301' parent_yoksis_id: '122387' @@ -6984,7 +6984,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Veterinerlik Cerrahisi (Dr) +- name: Veterinerlik Cerrahisi (DR) abbreviation: VETERİNER-CERRAHİ-DR yoksis_id: '255317' parent_yoksis_id: '122387' @@ -6997,7 +6997,7 @@ duration: 4 founded_at: 20.02.2014 -- name: Veterinerlik Cerrahisi (Yl) (Tezli) +- name: Veterinerlik Cerrahisi (YL) (Tezli) abbreviation: VETERİNER-CERRAHİ-YL yoksis_id: '244886' parent_yoksis_id: '122387' @@ -7010,7 +7010,7 @@ duration: 2 founded_at: 15.08.2013 -- name: Veterinerlik Doğum ve Jinekolojisi (Dr) +- name: Veterinerlik Doğum ve Jinekolojisi (DR) abbreviation: VETERİNER-JİNEKOLOJİ-DR yoksis_id: '169578' parent_yoksis_id: '122387' @@ -7022,7 +7022,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Dr) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (DR) abbreviation: DOĞUMHEM-DR yoksis_id: '301224' parent_yoksis_id: '122387' @@ -7035,7 +7035,7 @@ duration: 4 founded_at: 10.08.2016 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Yl) (Tezli) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (YL) (Tezli) abbreviation: DOĞUMHEM-YL yoksis_id: '301216' parent_yoksis_id: '122387' @@ -7048,7 +7048,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Doğum ve Kadın Hastalıkları Hemşireliği (Yl) (Tezsiz) (İö) +- name: Doğum ve Kadın Hastalıkları Hemşireliği (YL) (Tezsiz) (İÖ) abbreviation: DOĞUMHEM-YZ-2 yoksis_id: '301217' parent_yoksis_id: '122387' @@ -7061,7 +7061,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Veterinerlik Doğum ve Jinekolojisi (Veteriner) (Yl) (Tezli) +- name: Veterinerlik Doğum ve Jinekolojisi (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-JİNEKOLOJİ-YL yoksis_id: '169535' parent_yoksis_id: '122387' @@ -7075,7 +7075,7 @@ issues: - s/Vinekoloji/Jinekoloji -- name: Dölerme ve Suni Tohumlama (Dr) +- name: Dölerme ve Suni Tohumlama (DR) abbreviation: DÖLERME-DR yoksis_id: '169574' parent_yoksis_id: '122387' @@ -7087,7 +7087,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dölerme ve Suni Tohumlama (Veteriner) (Yl) (Tezli) +- name: Dölerme ve Suni Tohumlama (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-DÖLERME-YL yoksis_id: '169517' parent_yoksis_id: '122387' @@ -7100,7 +7100,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Restoratif Diş Tedavisi (Dr) +- name: Restoratif Diş Tedavisi (DR) abbreviation: RDT-DR yoksis_id: '169553' parent_yoksis_id: '122387' @@ -7112,7 +7112,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ebelik (Yl) (Tezli) +- name: Ebelik (YL) (Tezli) abbreviation: EBELİK-YL yoksis_id: '323921' parent_yoksis_id: '122387' @@ -7125,7 +7125,7 @@ duration: 2 founded_at: 07.06.2017 -- name: Endodonti (Dr) +- name: Endodonti (DR) abbreviation: ENDO-DR yoksis_id: '209677' parent_yoksis_id: '122387' @@ -7138,7 +7138,7 @@ duration: 4 founded_at: 23.08.2011 -- name: Evde Bakım Hemşireliği (Yl) (Tezsiz) (İö) +- name: Evde Bakım Hemşireliği (YL) (Tezsiz) (İÖ) abbreviation: EBH-YZ-2 yoksis_id: '220719' parent_yoksis_id: '122387' @@ -7151,7 +7151,7 @@ duration: 2 founded_at: 05.06.2012 -- name: Farmakoloji (Dr) +- name: Farmakoloji (DR) abbreviation: FARMAKOLOJİ-DR yoksis_id: '169567' parent_yoksis_id: '122387' @@ -7163,7 +7163,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Farmakoloji ve Toksikoloji (Dr) +- name: Veterinerlik Farmakoloji ve Toksikoloji (DR) abbreviation: VETERİNER-FARMATOK-DR yoksis_id: '169572' parent_yoksis_id: '122387' @@ -7176,7 +7176,7 @@ duration: 4 founded_at: 10.09.2009 -- name: Veterinerlik Farmakoloji ve Toksikoloji (Yl) (Tezli) +- name: Veterinerlik Farmakoloji ve Toksikoloji (YL) (Tezli) abbreviation: VETERİNER-FARMATOK-YL yoksis_id: '283800' parent_yoksis_id: '122387' @@ -7189,7 +7189,7 @@ duration: 2 founded_at: 06.01.2016 -- name: Fizyoloji (Dr) +- name: Fizyoloji (DR) abbreviation: FİZYOLOJİ-DR yoksis_id: '169541' parent_yoksis_id: '122387' @@ -7201,7 +7201,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Fizyolojsi (Yl) (Tezli) +- name: Veterinerlik Fizyolojsi (YL) (Tezli) abbreviation: VETERİNER-FİZYOLOJİ-YL yoksis_id: '257559' parent_yoksis_id: '122387' @@ -7214,7 +7214,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Halk Sağlığı (Dr) +- name: Halk Sağlığı (DR) abbreviation: HALK-DR yoksis_id: '169558' parent_yoksis_id: '122387' @@ -7226,7 +7226,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Halk Sağlığı Hemşireliği (Yl) (Tezli) +- name: Halk Sağlığı Hemşireliği (YL) (Tezli) abbreviation: HSH-YL yoksis_id: '169518' parent_yoksis_id: '122387' @@ -7239,7 +7239,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Hastalıklar (Dr) (Veteriner) +- name: Hastalıklar (DR) (Veteriner) abbreviation: VETERİNER-HASTA-DR yoksis_id: '219170' parent_yoksis_id: '122387' @@ -7251,7 +7251,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hayvan Besleme ve Beslenme Hastalıkları (Dr) +- name: Hayvan Besleme ve Beslenme Hastalıkları (DR) abbreviation: VETERİNER-HBH-DR yoksis_id: '169580' parent_yoksis_id: '122387' @@ -7263,7 +7263,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hayvan Besleme ve Beslenme Hastalıkları (Yl) (Tezli) (Veteriner) +- name: Hayvan Besleme ve Beslenme Hastalıkları (YL) (Tezli) (Veteriner) abbreviation: VETERİNER-HBH-YL yoksis_id: '169521' parent_yoksis_id: '122387' @@ -7275,7 +7275,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hemşirelik (Dr) +- name: Hemşirelik (DR) abbreviation: HEMŞİRE-DR yoksis_id: '285232' parent_yoksis_id: '122387' @@ -7288,7 +7288,7 @@ duration: 4 founded_at: 22.06.2015 -- name: Hemşirelik (Yl) (Tezli) +- name: Hemşirelik (YL) (Tezli) abbreviation: HEMŞİRE-YL yoksis_id: '285233' parent_yoksis_id: '122387' @@ -7301,7 +7301,7 @@ duration: 2 founded_at: 22.06.2015 -- name: Hemşirelik (Yl) (Tezli) (Hitit Üniversitesi Ortak) +- name: Hemşirelik (YL) (Tezli) (Hitit Üniversitesi Ortak) abbreviation: HEMŞİRE-YL-HİTİT yoksis_id: '284464' parent_yoksis_id: '122387' @@ -7314,7 +7314,7 @@ duration: 2 founded_at: 13.01.2016 -- name: Hemşirelik (Yl) (Tezsiz) +- name: Hemşirelik (YL) (Tezsiz) abbreviation: HEMŞİRE-YZ yoksis_id: '290926' parent_yoksis_id: '122387' @@ -7327,7 +7327,7 @@ duration: 2 founded_at: 10.06.2015 -- name: Histoloji ve Embriyoloji (Dr) +- name: Histoloji ve Embriyoloji (DR) abbreviation: HİSTO-DR yoksis_id: '219168' parent_yoksis_id: '122387' @@ -7339,7 +7339,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Histoloji ve Embriyoloji (Yl) (Tezli) +- name: Histoloji ve Embriyoloji (YL) (Tezli) abbreviation: HİSTO-YL yoksis_id: '219167' parent_yoksis_id: '122387' @@ -7352,7 +7352,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Kardiyopulmoner Fizyoterapi (Yl) (Tezli) +- name: Kardiyopulmoner Fizyoterapi (YL) (Tezli) abbreviation: KPF-YL yoksis_id: '230172' parent_yoksis_id: '122387' @@ -7365,7 +7365,7 @@ duration: 2 founded_at: 25.08.2011 -- name: Klinik Sinir Bilimleri (Dr) +- name: Klinik Sinir Bilimleri (DR) abbreviation: KLİNİKSİNİR-DR yoksis_id: '236919' parent_yoksis_id: '122387' @@ -7390,7 +7390,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 22.06.2016 -- name: Klinik Toksikoloji (Dr) +- name: Klinik Toksikoloji (DR) abbreviation: SAĞLIK-BİLİM-TOKSİK-DR-DA yoksis_id: '297556' parent_yoksis_id: '297555' @@ -7403,7 +7403,7 @@ duration: 4 founded_at: 22.06.2016 -- name: Moleküler Tıp (Dr) +- name: Moleküler Tıp (DR) abbreviation: MOLTIP-DR yoksis_id: '257542' parent_yoksis_id: '122387' @@ -7416,7 +7416,7 @@ duration: 4 founded_at: 17.04.2014 -- name: Moleküler Tıp (Yl) (Tezli) +- name: Moleküler Tıp (YL) (Tezli) abbreviation: MOL-TIP-YL yoksis_id: '257541' parent_yoksis_id: '122387' @@ -7429,7 +7429,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Veterinerlik Mikrobiyolojisi (Yl) (Tezli) +- name: Veterinerlik Mikrobiyolojisi (YL) (Tezli) abbreviation: VETERİNER-MİKRO-YL yoksis_id: '225902' parent_yoksis_id: '122387' @@ -7456,7 +7456,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok. SAĞLIK-BİLİM-TMİKRO-ADB ile benzerlik kontrol edilmeli. -- name: Veterinerlik Mikrobiyolojisi (Dr) +- name: Veterinerlik Mikrobiyolojisi (DR) abbreviation: VETERİNER-MİKRO-DR yoksis_id: '280441' parent_yoksis_id: '280440' @@ -7469,7 +7469,7 @@ duration: 4 founded_at: 05.08.2015 -- name: Odyoloji (Yl) (Tezli) +- name: Odyoloji (YL) (Tezli) abbreviation: ODYO-TL yoksis_id: '169523' parent_yoksis_id: '122387' @@ -7481,7 +7481,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Oral Diagnoz ve Radyoloji (Dr) +- name: Oral Diagnoz ve Radyoloji (DR) abbreviation: ODR-DR yoksis_id: '169555' parent_yoksis_id: '122387' @@ -7493,7 +7493,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ortodonti (Dr) +- name: Ortodonti (DR) abbreviation: ORTO-DR yoksis_id: '169543' parent_yoksis_id: '122387' @@ -7505,7 +7505,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Parazitoloji (Dr) +- name: Parazitoloji (DR) abbreviation: PARAZİT-DR yoksis_id: '169560' parent_yoksis_id: '122387' @@ -7517,7 +7517,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Parazitolojisi (Yl) (Tezli) +- name: Veterinerlik Parazitolojisi (YL) (Tezli) abbreviation: VETERİNER-PARAZİT-YL yoksis_id: '225901' parent_yoksis_id: '122387' @@ -7530,7 +7530,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Patoloji (Dr) +- name: Patoloji (DR) abbreviation: PATO-DR yoksis_id: '169561' parent_yoksis_id: '122387' @@ -7542,7 +7542,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Veterinerlik Patolojisi (Dr) +- name: Veterinerlik Patolojisi (DR) abbreviation: VETERİNER-PATO-DR yoksis_id: '219169' parent_yoksis_id: '122387' @@ -7554,7 +7554,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Pedodonti (Dr) +- name: Pedodonti (DR) abbreviation: PEDO-DR yoksis_id: '169570' parent_yoksis_id: '122387' @@ -7566,7 +7566,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Periodontoloji (Dr) +- name: Periodontoloji (DR) abbreviation: PERİO-DR yoksis_id: '169546' parent_yoksis_id: '122387' @@ -7578,7 +7578,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Protetik Diş Tedavisi (Dr) +- name: Protetik Diş Tedavisi (DR) abbreviation: PDT-DR yoksis_id: '169556' parent_yoksis_id: '122387' @@ -7590,7 +7590,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Radyolojik Bilimler (Dr) +- name: Radyolojik Bilimler (DR) abbreviation: RADYOB-DR yoksis_id: '309657' parent_yoksis_id: '122387' @@ -7603,7 +7603,7 @@ duration: 4 founded_at: 28.03.2013 -- name: Radyolojik Bilimler (Yl) (Tezli) +- name: Radyolojik Bilimler (YL) (Tezli) abbreviation: RADYOB-YL yoksis_id: '219260' parent_yoksis_id: '122387' @@ -7616,7 +7616,7 @@ duration: 2 founded_at: 03.03.2011 -- name: Ruh Sağlığı ve Hastalıkları Hemşireliği (Yl) (Tezli) +- name: Ruh Sağlığı ve Hastalıkları Hemşireliği (YL) (Tezli) abbreviation: RUH-YL yoksis_id: '169527' parent_yoksis_id: '122387' @@ -7628,7 +7628,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Yönetimi (Dr) +- name: Sağlık Yönetimi (DR) abbreviation: SAĞLIKYÖN-DR yoksis_id: '278605' parent_yoksis_id: '122387' @@ -7641,7 +7641,7 @@ duration: 4 founded_at: 16.06.2015 -- name: Sağlık Yönetimi (Yl) (Tezli) +- name: Sağlık Yönetimi (YL) (Tezli) abbreviation: SAĞLIKYÖN-YL yoksis_id: '213229' parent_yoksis_id: '122387' @@ -7654,7 +7654,7 @@ duration: 2 founded_at: 30.11.2011 -- name: Sağlık Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Sağlık Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SAĞLIKYÖN-TZ-UZ yoksis_id: '215871' parent_yoksis_id: '122387' @@ -7667,7 +7667,7 @@ duration: 2 founded_at: 19.04.2012 -- name: Sağlık Yönetimi (Yl) (Tezsiz) (İö) +- name: Sağlık Yönetimi (YL) (Tezsiz) (İÖ) abbreviation: SAĞLIKYÖN-YZ-2 yoksis_id: '225903' parent_yoksis_id: '122387' @@ -7680,7 +7680,7 @@ duration: 2 founded_at: '09.08.2012' -- name: Su Ürünleri Hastalıkları (Yl) (Tezli) +- name: Su Ürünleri Hastalıkları (YL) (Tezli) abbreviation: SU-YL yoksis_id: '261143' parent_yoksis_id: '122387' @@ -7693,7 +7693,7 @@ duration: 2 founded_at: 25.09.2014 -- name: Sucul Hayvan Hastalıkları (Dr) +- name: Sucul Hayvan Hastalıkları (DR) abbreviation: SUCUL-DR yoksis_id: '334300' parent_yoksis_id: '122387' @@ -7718,7 +7718,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 03.03.2011 -- name: Sinir Bilimleri (Dr) +- name: Sinir Bilimleri (DR) abbreviation: SİNİR-DR yoksis_id: '203750' parent_yoksis_id: '203748' @@ -7731,7 +7731,7 @@ duration: 4 founded_at: 03.03.2011 -- name: Sinir Bilimleri (Yl) (Tezli) +- name: Sinir Bilimleri (YL) (Tezli) abbreviation: SİNİR-YL yoksis_id: '203749' parent_yoksis_id: '203748' @@ -7744,7 +7744,7 @@ duration: 2 founded_at: 03.03.2011 -- name: Tıbbi Biyokimya (Dr) +- name: Tıbbi Biyokimya (DR) abbreviation: TBİYOKİMYA-DR yoksis_id: '169539' parent_yoksis_id: '122387' @@ -7757,7 +7757,7 @@ duration: 4 founded_at: 01.01.2009 -- name: Tıbbi Biyoloji (Dr) +- name: Tıbbi Biyoloji (DR) abbreviation: TBİYOLOJİ-DR yoksis_id: '211304' parent_yoksis_id: '122387' @@ -7769,7 +7769,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tıbbi Biyoloji (Yl) (Tezli) +- name: Tıbbi Biyoloji (YL) (Tezli) abbreviation: TBİYOLOJİ-YL yoksis_id: '211303' parent_yoksis_id: '122387' @@ -7782,7 +7782,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tıbbi Farmakoloji (Dr) +- name: Tıbbi Farmakoloji (DR) abbreviation: TFARMA-DR yoksis_id: '211300' parent_yoksis_id: '122387' @@ -7794,7 +7794,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tıbbi Farmakoloji (Yl) (Tezli) +- name: Tıbbi Farmakoloji (YL) (Tezli) abbreviation: TFARMA-YL yoksis_id: '211299' parent_yoksis_id: '122387' @@ -7807,7 +7807,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Tıbbi Mikrobiyoloji (Dr) +- name: Tıbbi Mikrobiyoloji (DR) abbreviation: TMİKRO-DR yoksis_id: '169549' parent_yoksis_id: '122387' @@ -7834,7 +7834,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok -- name: Tıp Hukuku (Yl) (Tezli) +- name: Tıp Hukuku (YL) (Tezli) abbreviation: SAĞLIK-BİLİM-TIPH-YL yoksis_id: '301226' parent_yoksis_id: '301225' @@ -7847,7 +7847,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Uluslararası Düzenleyici Bilim (Yl) (Tezli) +- name: Uluslararası Düzenleyici Bilim (YL) (Tezli) abbreviation: UDB-YL yoksis_id: '261826' parent_yoksis_id: '122387' @@ -7860,7 +7860,7 @@ duration: 2 founded_at: 15.10.2014 -- name: Veteriner Hekimliği Tarihi ve Deontoloji (Dr) +- name: Veteriner Hekimliği Tarihi ve Deontoloji (DR) abbreviation: VETERİNER-DEON-DR yoksis_id: '255372' parent_yoksis_id: '122387' @@ -7873,7 +7873,7 @@ duration: 4 founded_at: 26.02.2014 -- name: Veteriner Hekimliği Tarihi ve Deontoloji (Yl) (Tezli) +- name: Veteriner Hekimliği Tarihi ve Deontoloji (YL) (Tezli) abbreviation: VETERİNER-DEON-YL yoksis_id: '255371' parent_yoksis_id: '122387' @@ -7886,7 +7886,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Veteriner Histoloji ve Embriyoloji (Yl) (Tezli) +- name: Veteriner Histoloji ve Embriyoloji (YL) (Tezli) abbreviation: VETERİNER-HİSTO-YL yoksis_id: '325734' parent_yoksis_id: '122387' @@ -7899,7 +7899,7 @@ duration: 2 founded_at: 19.07.2017 -- name: Viroloji (Dr) +- name: Viroloji (DR) abbreviation: VİROLOJİ-DR yoksis_id: '169563' parent_yoksis_id: '122387' @@ -7911,7 +7911,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Viroloji (Veteriner) (Dr) +- name: Viroloji (Veteriner) (DR) abbreviation: VETERİNER-VİROLOJİ-DR yoksis_id: '244885' parent_yoksis_id: '122387' @@ -7924,7 +7924,7 @@ duration: 4 founded_at: 15.08.2013 -- name: Viroloji (Veteriner) (Yl) (Tezli) +- name: Viroloji (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-VİROLOJİ-YL yoksis_id: '169533' parent_yoksis_id: '122387' @@ -7937,7 +7937,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Zootekni (Veteriner) (Dr) +- name: Zootekni (Veteriner) (DR) abbreviation: VETERİNER-ZOO-DR yoksis_id: '169565' parent_yoksis_id: '122387' @@ -7950,7 +7950,7 @@ duration: 4 founded_at: 07.05.2018 -- name: Zootekni (Veteriner) (Yl) (Tezli) +- name: Zootekni (Veteriner) (YL) (Tezli) abbreviation: VETERİNER-ZOO-YL yoksis_id: '278856' parent_yoksis_id: '122387' @@ -7963,7 +7963,7 @@ duration: 2 founded_at: 24.06.2015 -- name: İç Hastalıkları (Veteriner) (Dr) +- name: İç Hastalıkları (Veteriner) (DR) abbreviation: VETERİNER-İÇH-DR yoksis_id: '169569' parent_yoksis_id: '122387' @@ -7976,7 +7976,7 @@ duration: 4 founded_at: 07.05.2018 -- name: İç Hastalıkları (Yl) (Veteriner) (Tezli) +- name: İç Hastalıkları (YL) (Veteriner) (Tezli) abbreviation: VETERİNER-İÇH-YL yoksis_id: '281621' parent_yoksis_id: '122387' @@ -8398,7 +8398,7 @@ issues: - Kuruluş tarihi hatalı -- name: Yaşlı Bakımı Programı (İö) +- name: Yaşlı Bakımı Programı (İÖ) abbreviation: SAĞLIK-MYO-SBH-YAŞLI-PR-2 yoksis_id: '240439' parent_yoksis_id: '240437' @@ -8494,7 +8494,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Patoloji Laboratuvar Teknikleri Programı (İö) +- name: Patoloji Laboratuvar Teknikleri Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-PLT-PR-2 yoksis_id: '215481' parent_yoksis_id: '169645' @@ -8520,7 +8520,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İö) +- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-TDS-PR-2 yoksis_id: '169658' parent_yoksis_id: '169645' @@ -8548,7 +8548,7 @@ duration: 2 founded_at: 10.09.2009 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-TGT-PR-2 yoksis_id: '243775' parent_yoksis_id: '169645' @@ -8593,7 +8593,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlk ve Acil Yardım Programı (İö) +- name: İlk ve Acil Yardım Programı (İÖ) abbreviation: SAĞLIK-MYO-THT-İAY-PR-2 yoksis_id: '229074' parent_yoksis_id: '169645' @@ -8617,7 +8617,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 20.07.1982 -- name: Arkeoloji (Yl) (Tezli) +- name: Arkeoloji (YL) (Tezli) abbreviation: ARKEO-YL yoksis_id: '258247' parent_yoksis_id: '122388' @@ -8630,7 +8630,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Avrupa-Akdeniz Kültürler ve Turizm (Yl) (Tezli) +- name: Avrupa-Akdeniz Kültürler ve Turizm (YL) (Tezli) abbreviation: AAKT-YL yoksis_id: '261825' parent_yoksis_id: '122388' @@ -8643,7 +8643,7 @@ duration: 2 founded_at: 15.10.2014 -- name: Beden Eğitimi ve Spor (Dr) +- name: Beden Eğitimi ve Spor (DR) abbreviation: SOSYAL-BİLİM-BES-DR yoksis_id: '266388' parent_yoksis_id: '122388' @@ -8658,7 +8658,7 @@ issues: - SAĞLIK-BİLİM VE SOSYAL-BİLİM altında aynı isimli Doktora -- name: Coğrafya (Dr) +- name: Coğrafya (DR) abbreviation: COĞRAFYA-DR yoksis_id: '175687' parent_yoksis_id: '122388' @@ -8671,7 +8671,7 @@ duration: 4 founded_at: 01.07.2010 -- name: Coğrafya (Yl) (Tezli) +- name: Coğrafya (YL) (Tezli) abbreviation: COĞRAFYA-YL yoksis_id: '230727' parent_yoksis_id: '122388' @@ -8684,7 +8684,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Dini Danışmanlık ve Rehberlik (Yl) (Tezsiz) (İö) +- name: Dini Danışmanlık ve Rehberlik (YL) (Tezsiz) (İÖ) abbreviation: DDR-YZ-2 yoksis_id: '225938' parent_yoksis_id: '122388' @@ -8711,7 +8711,7 @@ issues: - Detsis tarafında anabilim dalı başkanlığı yok. SOSYAL-BİLİM-İŞLENİ-ADB ile benzerlik kontrol edilmeli. -- name: Evlilik ve Aile Danışmanlığı (Yl) (Tezsiz) (İö) +- name: Evlilik ve Aile Danışmanlığı (YL) (Tezsiz) (İÖ) abbreviation: EVLİLİK-YZ-2 yoksis_id: '255364' parent_yoksis_id: '122388' @@ -8724,7 +8724,7 @@ duration: 2 founded_at: 26.02.2014 -- name: Felsefe (Dr) +- name: Felsefe (DR) abbreviation: FELSEFE-DR yoksis_id: '301218' parent_yoksis_id: '122388' @@ -8737,7 +8737,7 @@ duration: 4 founded_at: 10.08.2016 -- name: Felsefe (Yl) (Tezli) +- name: Felsefe (YL) (Tezli) abbreviation: FELSEFE-YL yoksis_id: '219791' parent_yoksis_id: '122388' @@ -8750,7 +8750,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Felsefe ve Din Bilimleri (Dr) +- name: Felsefe ve Din Bilimleri (DR) abbreviation: FELSEFEDİN-DR yoksis_id: '169480' parent_yoksis_id: '122388' @@ -8762,7 +8762,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Felsefe ve Din Bilimleri (Yl) (Tezli) +- name: Felsefe ve Din Bilimleri (YL) (Tezli) abbreviation: FELSEFEDİN-YL yoksis_id: '230721' parent_yoksis_id: '122388' @@ -8774,7 +8774,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Geleneksel Türk Müziği (Yl) (Tezli) +- name: Geleneksel Türk Müziği (YL) (Tezli) abbreviation: GTM-YL yoksis_id: '297036' parent_yoksis_id: '122388' @@ -8787,7 +8787,7 @@ duration: 2 founded_at: 15.06.2016 -- name: Kadın ve Aile Araştırmaları (Yl) (Tezli) +- name: Kadın ve Aile Araştırmaları (YL) (Tezli) abbreviation: KAA-YL yoksis_id: '230643' parent_yoksis_id: '122388' @@ -8800,7 +8800,7 @@ duration: 2 founded_at: 23.06.2011 -- name: Kamu Hukuku (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: Kamu Hukuku (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: KAMU-DR-KTÜ yoksis_id: '225763' parent_yoksis_id: '122388' @@ -8813,7 +8813,7 @@ duration: 4 founded_at: 12.07.2012 -- name: Kamu Hukuku (Yl) (Tezli) +- name: Kamu Hukuku (YL) (Tezli) abbreviation: KAMU-YL yoksis_id: '176119' parent_yoksis_id: '122388' @@ -8826,7 +8826,7 @@ duration: 2 founded_at: 26.08.2010 -- name: Kamu Hukuku (Yl) (Tezsiz) (İö) +- name: Kamu Hukuku (YL) (Tezsiz) (İÖ) abbreviation: KAMU-YZ-2 yoksis_id: '230164' parent_yoksis_id: '122388' @@ -8839,7 +8839,7 @@ duration: 2 founded_at: 07.07.2011 -- name: Kamu Yönetimi (Dr) +- name: Kamu Yönetimi (DR) abbreviation: KAMUYÖN-DR yoksis_id: '235191' parent_yoksis_id: '122388' @@ -8852,7 +8852,7 @@ duration: 4 founded_at: 01.03.2013 -- name: Kamu Yönetimi (Yl) (Tezli) +- name: Kamu Yönetimi (YL) (Tezli) abbreviation: KAMUYÖN-YL yoksis_id: '219792' parent_yoksis_id: '122388' @@ -8865,7 +8865,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Muhasebe-Finansman (Yl) (Tezli) +- name: Muhasebe-Finansman (YL) (Tezli) abbreviation: MUHASEBE-YL yoksis_id: '264822' parent_yoksis_id: '122388' @@ -8878,7 +8878,7 @@ duration: 2 founded_at: 20.01.2015 -- name: Muhasebe-Finansman (Yl) (Tezsiz) +- name: Muhasebe-Finansman (YL) (Tezsiz) abbreviation: MUHASEBE-YZ yoksis_id: '264823' parent_yoksis_id: '122388' @@ -8891,7 +8891,7 @@ duration: 2 founded_at: 20.01.2015 -- name: Psikoloji (Yl) (Tezli) +- name: Psikoloji (YL) (Tezli) abbreviation: PSİKOLOJİ-YL yoksis_id: '258246' parent_yoksis_id: '122388' @@ -8904,7 +8904,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Sanat Tarihi (Yl) (Tezli) +- name: Sanat Tarihi (YL) (Tezli) abbreviation: SANATTARİHİ-YL yoksis_id: '283048' parent_yoksis_id: '122388' @@ -8917,7 +8917,7 @@ duration: 2 founded_at: 16.12.2015 -- name: Sosyoloji (Dr) +- name: Sosyoloji (DR) abbreviation: SOSYOLOJİ-DR yoksis_id: '323943' parent_yoksis_id: '122388' @@ -8930,7 +8930,7 @@ duration: 4 founded_at: 07.06.2017 -- name: Sosyoloji (Yl) (Tezli) +- name: Sosyoloji (YL) (Tezli) abbreviation: SOSYOLOJİ-YL yoksis_id: '219789' parent_yoksis_id: '122388' @@ -8943,7 +8943,7 @@ duration: 2 founded_at: 26.06.2012 -- name: Spor Yöneticiliği (Dr) +- name: Spor Yöneticiliği (DR) abbreviation: SPORYÖN-DR yoksis_id: '280862' parent_yoksis_id: '122388' @@ -8956,7 +8956,7 @@ duration: 4 founded_at: '09.09.2015' -- name: Spor Yöneticiliği (Yl) (Tezli) +- name: Spor Yöneticiliği (YL) (Tezli) abbreviation: SPORYÖN-YL yoksis_id: '281995' parent_yoksis_id: '122388' @@ -8969,7 +8969,7 @@ duration: 2 founded_at: '09.09.2015' -- name: Siyaset Bilimi ve Kamu Yönetimi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Siyaset Bilimi ve Kamu Yönetimi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: SBKY-YZ-UZ yoksis_id: '267770' parent_yoksis_id: '122388' @@ -8984,7 +8984,7 @@ issues: - Kuruluş tarihi hatalı -- name: Tarih (Dr) +- name: Tarih (DR) abbreviation: TARİH-DR yoksis_id: '169484' parent_yoksis_id: '122388' @@ -8996,7 +8996,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih (Yl) (Tezli) +- name: Tarih (YL) (Tezli) abbreviation: TARİH-YL yoksis_id: '230726' parent_yoksis_id: '122388' @@ -9009,7 +9009,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Temel İslam Bilimleri (Dr) +- name: Temel İslam Bilimleri (DR) abbreviation: TİB-DR yoksis_id: '169474' parent_yoksis_id: '122388' @@ -9021,7 +9021,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Temel İslam Bilimleri (Yl) (Tezli) +- name: Temel İslam Bilimleri (YL) (Tezli) abbreviation: TİB-YL yoksis_id: '230720' parent_yoksis_id: '122388' @@ -9033,7 +9033,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm İşletmeciliği (Yl) (Tezli) +- name: Turizm İşletmeciliği (YL) (Tezli) abbreviation: TURİZMİŞ-YL yoksis_id: '323944' parent_yoksis_id: '122388' @@ -9046,7 +9046,7 @@ duration: 2 founded_at: 07.06.2017 -- name: Turizm İşletmeciliği (Yl) (Tezsiz) +- name: Turizm İşletmeciliği (YL) (Tezsiz) abbreviation: TURİZMİŞ-YZ yoksis_id: '301219' parent_yoksis_id: '122388' @@ -9059,7 +9059,7 @@ duration: 2 founded_at: 10.08.2016 -- name: Türk Dili ve Edebiyatı (Dr) +- name: Türk Dili ve Edebiyatı (DR) abbreviation: TDE-DR yoksis_id: '169487' parent_yoksis_id: '122388' @@ -9071,7 +9071,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı (Yl) (Tezli) +- name: Türk Dili ve Edebiyatı (YL) (Tezli) abbreviation: TDE-YL yoksis_id: '230723' parent_yoksis_id: '122388' @@ -9084,7 +9084,7 @@ duration: 2 founded_at: 07.05.2018 -- name: Uluslararası İlişkiler (Yl) (Tezli) +- name: Uluslararası İlişkiler (YL) (Tezli) abbreviation: Uİ-YL yoksis_id: '169470' parent_yoksis_id: '122388' @@ -9096,7 +9096,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yerel Yönetimler (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Yerel Yönetimler (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: YERELYÖN-YZ-UZ yoksis_id: '258555' parent_yoksis_id: '122388' @@ -9109,7 +9109,7 @@ duration: 2 founded_at: 19.06.2014 -- name: Özel Hukuk (Yl) (Tezli) (Karadeniz Teknik Üniversitesi Ortak) +- name: Özel Hukuk (YL) (Tezli) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: ÖZELHUKUK-YL-KTÜ yoksis_id: '255439' parent_yoksis_id: '122388' @@ -9122,7 +9122,7 @@ duration: 2 founded_at: 20.02.2014 -- name: İktisat (Dr) +- name: İktisat (DR) abbreviation: İKTİSAT-DR yoksis_id: '281623' parent_yoksis_id: '122388' @@ -9135,7 +9135,7 @@ duration: 4 founded_at: 22.10.2015 -- name: İktisat (Yl) (Tezli) +- name: İktisat (YL) (Tezli) abbreviation: İKTİSAT-YL yoksis_id: '219793' parent_yoksis_id: '122388' @@ -9148,7 +9148,7 @@ duration: 2 founded_at: 26.06.2012 -- name: İktisat (Yl) (Tezsiz) (İö) +- name: İktisat (YL) (Tezsiz) (İÖ) abbreviation: İKTİSAT-YZ-2 yoksis_id: '323942' parent_yoksis_id: '122388' @@ -9173,7 +9173,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 22.06.2016 -- name: Medya ve İletişim Bilimleri (Yl) (Tezli) +- name: Medya ve İletişim Bilimleri (YL) (Tezli) abbreviation: SOSYAL-BİLİM-İLETİŞİM-MEDYA-YL yoksis_id: '297536' parent_yoksis_id: '297535' @@ -9186,7 +9186,7 @@ duration: 2 founded_at: 22.06.2016 -- name: İslam Tarihi ve Sanatları (Dr) +- name: İslam Tarihi ve Sanatları (DR) abbreviation: İSLAMTS-DR yoksis_id: '169479' parent_yoksis_id: '122388' @@ -9198,7 +9198,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi ve Sanatları (Yl) (Tezli) +- name: İslam Tarihi ve Sanatları (YL) (Tezli) abbreviation: İSLAMTS-YL yoksis_id: '230799' parent_yoksis_id: '122388' @@ -9210,7 +9210,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İşletme (Dr) +- name: İşletme (DR) abbreviation: SOSYAL-BİLİM-İŞLETME-DR yoksis_id: '235190' parent_yoksis_id: '122388' @@ -9223,7 +9223,7 @@ duration: 4 founded_at: 01.03.2013 -- name: İşletme (Yl) (Tezli) +- name: İşletme (YL) (Tezli) abbreviation: SOSYAL-BİLİM-İŞLETME-YL yoksis_id: '209533' parent_yoksis_id: '122388' @@ -9236,7 +9236,7 @@ duration: 2 founded_at: 22.09.2011 -- name: İşletme (Yl) (Tezsiz) +- name: İşletme (YL) (Tezsiz) abbreviation: SOSYAL-BİLİM-İŞLETME-YZ yoksis_id: '209537' parent_yoksis_id: '122388' @@ -9261,7 +9261,7 @@ unit_instruction_type_id: Normal Öğretim founded_at: 21.07.2011 -- name: İşletme ve Endüstri İlişkileri (Yl) (Tezli) +- name: İşletme ve Endüstri İlişkileri (YL) (Tezli) abbreviation: İŞLENİ-YL yoksis_id: '219261' parent_yoksis_id: '122388' @@ -9383,7 +9383,7 @@ duration: 2 founded_at: 04.08.2017 -- name: Gıda Kalite Kontrolü ve Analizi Programı (İö) +- name: Gıda Kalite Kontrolü ve Analizi Programı (İÖ) abbreviation: TERME-MYO-GIDA-KKA-PR-2 yoksis_id: '276137' parent_yoksis_id: '169952' @@ -11330,7 +11330,7 @@ duration: 2 founded_at: 26.02.2009 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-BT-BP-PR-2 yoksis_id: '170003' parent_yoksis_id: '169999' @@ -11418,7 +11418,7 @@ duration: 2 founded_at: 21.07.2011 -- name: Ormancılık ve Orman Ürünleri Programı (İö) +- name: Ormancılık ve Orman Ürünleri Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-ORMAN-PR-2 yoksis_id: '239580' parent_yoksis_id: '207454' @@ -11470,7 +11470,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-ÇBGH-ÇG-PR-2 yoksis_id: '170006' parent_yoksis_id: '170004' @@ -11643,7 +11643,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Antrenörlük Eğitimi Programı (İö) +- name: Antrenörlük Eğitimi Programı (İÖ) abbreviation: ANTRENÖR-PR-2 yoksis_id: '319847' parent_yoksis_id: '122377' @@ -11656,7 +11656,7 @@ duration: 4 founded_at: 20.04.2017 -- name: Antrenörlük Eğitimi Programı (İö) (Bk.2) +- name: Antrenörlük Eğitimi Programı (İÖ) (Bk.2) abbreviation: ANTRENÖR-PR-2-2 yoksis_id: '169400' parent_yoksis_id: '122377' @@ -11818,7 +11818,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Spor Yöneticiliği Programı (İö) +- name: Spor Yöneticiliği Programı (İÖ) abbreviation: SPORYÖN-PR-2 yoksis_id: '320347' parent_yoksis_id: '122376' @@ -11831,7 +11831,7 @@ duration: 4 founded_at: 20.04.2017 -- name: Spor Yöneticiliği Programı (İö) (Bk.2) +- name: Spor Yöneticiliği Programı (İÖ) (Bk.2) abbreviation: SPORYÖN-PR-2-2 yoksis_id: '169406' parent_yoksis_id: '122376' @@ -11905,7 +11905,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Teknolojisi Programı (İö) +- name: Elektronik Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-ELEKTRO-ET-PR-2 yoksis_id: '215491' parent_yoksis_id: '215486' @@ -11943,7 +11943,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) abbreviation: YEŞİLYURT-MYO-ELEKTRİK-PR-2 yoksis_id: '215490' parent_yoksis_id: '202398' @@ -11982,7 +11982,7 @@ duration: 2 founded_at: 19.01.2011 -- name: Gıda Teknolojisi Programı (İö) +- name: Gıda Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-GIDA-TEKNO-PR-2 yoksis_id: '267990' parent_yoksis_id: '202460' @@ -12021,7 +12021,7 @@ duration: 2 founded_at: 23.12.2010 -- name: Kimya Teknolojisi Programı (İö) +- name: Kimya Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-KİMYA-TEKNO-PR-2 yoksis_id: '238468' parent_yoksis_id: '215488' @@ -12063,7 +12063,7 @@ duration: 2 founded_at: 19.01.2011 -- name: Endüstriyel Kalıpçılık Programı (İö) +- name: Endüstriyel Kalıpçılık Programı (İÖ) abbreviation: YEŞİLYURT-MYO-METAL-EK-PR-2 yoksis_id: '257436' parent_yoksis_id: '202463' @@ -12101,7 +12101,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Otomotiv Teknolojisi Programı (İö) +- name: Otomotiv Teknolojisi Programı (İÖ) abbreviation: YEŞİLYURT-MYO-MOTOR-OTO-PR-2 yoksis_id: '240434' parent_yoksis_id: '215492' @@ -12877,7 +12877,7 @@ issues: - Kuruluş tarihi hatalı -- name: Çağrı Merkezi Hizmetleri Programı (İö) +- name: Çağrı Merkezi Hizmetleri Programı (İÖ) abbreviation: TİCARET-MYO-BHS-ÇMH-PR-2 yoksis_id: '294078' parent_yoksis_id: '237237' @@ -12930,7 +12930,7 @@ duration: 2 founded_at: 04.08.2017 -- name: Bilgi Güvenliği Teknolojisi Programı (İö) +- name: Bilgi Güvenliği Teknolojisi Programı (İÖ) abbreviation: TİCARET-MYO-BT-BGT-PR-2 yoksis_id: '267068' parent_yoksis_id: '229374' @@ -12957,7 +12957,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) abbreviation: TİCARET-MYO-BT-BP-PR-2 yoksis_id: '229376' parent_yoksis_id: '229374' @@ -12994,7 +12994,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bankacılık ve Sigortacılık Programı (İö) +- name: Bankacılık ve Sigortacılık Programı (İÖ) abbreviation: TİCARET-MYO-FİNANS-BANKA-PR-2 yoksis_id: '238469' parent_yoksis_id: '229371' @@ -13046,7 +13046,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: TİCARET-MYO-MV-PR-2 yoksis_id: '229379' parent_yoksis_id: '229377' @@ -13085,7 +13085,7 @@ duration: 2 founded_at: 17.04.2014 -- name: Sosyal Güvenlik Programı (İö) +- name: Sosyal Güvenlik Programı (İÖ) abbreviation: TİCARET-MYO-MKG-SG-PR-2 yoksis_id: '257435' parent_yoksis_id: '284505' @@ -14059,7 +14059,7 @@ duration: 4 founded_at: 10.09.2009 -- name: İlahiyat Programı (İö) +- name: İlahiyat Programı (İÖ) abbreviation: İLAHİYAT-PR-2 yoksis_id: '168774' parent_yoksis_id: '122157' @@ -14350,7 +14350,7 @@ duration: 4 founded_at: 18.04.2013 -- name: Halkla İlişkiler ve Tanıtım Programı (İö) +- name: Halkla İlişkiler ve Tanıtım Programı (İÖ) abbreviation: HİT-PR-2 yoksis_id: '291019' parent_yoksis_id: '204803' @@ -14487,7 +14487,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) yoksis_id: '240436' parent_yoksis_id: '205956' unit_type_id: Önlisans/lisans Programı @@ -14674,7 +14674,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Biyoloji Öğretmenliği Programı (İö) +- name: Biyoloji Öğretmenliği Programı (İÖ) yoksis_id: '273561' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14692,7 +14692,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fen Bilgisi Öğretmenliği Programı (İö) +- name: Fen Bilgisi Öğretmenliği Programı (İÖ) yoksis_id: '273563' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14746,7 +14746,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sosyal Bilgiler Öğretmenliği Programı (İö) +- name: Sosyal Bilgiler Öğretmenliği Programı (İÖ) yoksis_id: '273573' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14764,7 +14764,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sınıf Öğretmenliği Programı (İö) +- name: Sınıf Öğretmenliği Programı (İÖ) yoksis_id: '273571' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14800,7 +14800,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türkçe Öğretmenliği Programı (İö) +- name: Türkçe Öğretmenliği Programı (İÖ) yoksis_id: '273577' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14818,7 +14818,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Matematik Öğretmenliği Programı (İö) +- name: İlköğretim Matematik Öğretmenliği Programı (İÖ) yoksis_id: '273565' parent_yoksis_id: '269757' unit_type_id: Önlisans/lisans Programı @@ -14854,7 +14854,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Bilgisayar Programcılığı Programı (İö) (Bk.320) +- name: Bilgisayar Programcılığı Programı (İÖ) (Bk.320) yoksis_id: '273578' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14863,7 +14863,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) (Bk.320) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) (Bk.320) yoksis_id: '273579' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14881,7 +14881,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '273581' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14899,7 +14899,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '273583' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14917,7 +14917,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Haberleşme Programı (İö) +- name: Elektronik Haberleşme Programı (İÖ) yoksis_id: '273585' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14935,7 +14935,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Elektronik Programı (İö) +- name: Endüstriyel Elektronik Programı (İÖ) yoksis_id: '273587' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14953,7 +14953,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Otomasyon Programı (İö) +- name: Endüstriyel Otomasyon Programı (İÖ) yoksis_id: '273589' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14980,7 +14980,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Haberleşme Programı (İö) +- name: Haberleşme Programı (İÖ) yoksis_id: '273592' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -14998,7 +14998,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita Kadastropr. (İö) +- name: Harita Kadastropr. (İÖ) yoksis_id: '273594' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15007,7 +15007,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Hazır Giyim Programı (İö) (Bk.322) +- name: Hazır Giyim Programı (İÖ) (Bk.322) yoksis_id: '273595' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15025,7 +15025,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Kontrol Sistemleri Teknolojisi Programı (İö) +- name: Kontrol Sistemleri Teknolojisi Programı (İÖ) yoksis_id: '273599' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15034,7 +15034,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Makine Programı (İö) (Bk.320) +- name: Makine Programı (İÖ) (Bk.320) yoksis_id: '273600' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15052,7 +15052,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '273602' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15061,7 +15061,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Otomotiv Programı (İö) (Bk.320) +- name: Otomotiv Programı (İÖ) (Bk.320) yoksis_id: '273603' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15079,7 +15079,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Pazarlama Programı (İö) +- name: Pazarlama Programı (İÖ) yoksis_id: '273605' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15088,7 +15088,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tekstil Programı (İö) (Bk.322) +- name: Tekstil Programı (İÖ) (Bk.322) yoksis_id: '273606' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15115,7 +15115,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) yoksis_id: '273609' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15133,7 +15133,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otelcilik Programı (İö) +- name: Turizm ve Otelcilik Programı (İÖ) yoksis_id: '273611' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15151,7 +15151,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '273597' parent_yoksis_id: '269758' unit_type_id: Önlisans/lisans Programı @@ -15211,7 +15211,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Endüstriyel Elektronik Programı (İö) (Bk.611) +- name: Endüstriyel Elektronik Programı (İÖ) (Bk.611) yoksis_id: '273615' parent_yoksis_id: '269761' unit_type_id: Önlisans/lisans Programı @@ -15239,7 +15239,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Organik Tarım Programı (İö) +- name: Organik Tarım Programı (İÖ) abbreviation: BAFRA-MYO-BHU-OT-PR-2 yoksis_id: '169421' parent_yoksis_id: '169417' @@ -15273,7 +15273,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tütün Yetiştiriciliği ve İşlemeciliği Programı (İö) +- name: Tütün Yetiştiriciliği ve İşlemeciliği Programı (İÖ) abbreviation: BAFRA-MYO-BHU-TÜTÜN-PR-2 yoksis_id: '145887' parent_yoksis_id: '169417' @@ -15353,7 +15353,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '145886' parent_yoksis_id: '122356' unit_type_id: Önlisans/lisans Programı @@ -15394,7 +15394,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Seracılık Programı (İö) +- name: Seracılık Programı (İÖ) yoksis_id: '169434' parent_yoksis_id: '122356' unit_type_id: Önlisans/lisans Programı @@ -15425,7 +15425,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '128053' parent_yoksis_id: '128052' unit_type_id: Önlisans/lisans Programı @@ -15537,7 +15537,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hazır Giyim Programı (İö) (Bk.612) +- name: Hazır Giyim Programı (İÖ) (Bk.612) yoksis_id: '273618' parent_yoksis_id: '269762' unit_type_id: Önlisans/lisans Programı @@ -15546,7 +15546,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tekstil Programı (İö) (Bk.612) +- name: Tekstil Programı (İÖ) (Bk.612) yoksis_id: '273620' parent_yoksis_id: '269762' unit_type_id: Önlisans/lisans Programı @@ -15693,7 +15693,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Alman Dili Eğitimi (Dr) +- name: Alman Dili Eğitimi (DR) abbreviation: EĞİTİM-BİLİM-ALM-DR yoksis_id: '267762' parent_yoksis_id: '174846' @@ -15704,7 +15704,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Alman Dili Eğitimi (Yl) (Tezli) +- name: Alman Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-ALM-YL yoksis_id: '267761' parent_yoksis_id: '174846' @@ -15715,7 +15715,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezli) +- name: Coğrafya Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-COĞ-YL yoksis_id: '267769' parent_yoksis_id: '174846' @@ -15726,7 +15726,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezli) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-EYTPE-YL yoksis_id: '267767' parent_yoksis_id: '174846' @@ -15737,7 +15737,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EĞİTİM-BİLİM-EYTPE-YZ-UZ yoksis_id: '234519' parent_yoksis_id: '174846' @@ -15748,7 +15748,7 @@ unit_instruction_type_id: Uzaktan Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (Yl) (Tezsiz) (İö) +- name: Eğitim Yönetimi, Teftişi, Planlaması ve Ekonomisi (YL) (Tezsiz) (İÖ) abbreviation: EĞİTİM-BİLİM-EYTPE-YZ-2 yoksis_id: '267768' parent_yoksis_id: '174846' @@ -15759,7 +15759,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Eğitimin Sosyal Tarihi ve Temelleri (Yl) (Tezli) +- name: Eğitimin Sosyal Tarihi ve Temelleri (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-ESTT-YL yoksis_id: '255124' parent_yoksis_id: '174846' @@ -15770,7 +15770,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fransız Dili Eğitimi (Yl) (Tezli) +- name: Fransız Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-FR-YL yoksis_id: '267763' parent_yoksis_id: '174846' @@ -15781,7 +15781,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Müzik Eğitimi (Dr) +- name: Müzik Eğitimi (DR) abbreviation: MÜZİK-DR yoksis_id: '267755' parent_yoksis_id: '174846' @@ -15792,7 +15792,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Dr) +- name: Rehberlik ve Psikolojik Danışmanlık (DR) abbreviation: EĞİTİM-BİLİM-PDR-DR yoksis_id: '267766' parent_yoksis_id: '174846' @@ -15803,7 +15803,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-PDR-YL yoksis_id: '267765' parent_yoksis_id: '174846' @@ -15814,7 +15814,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sosyal Bilimler Eğitimi (Dr) +- name: Sosyal Bilimler Eğitimi (DR) abbreviation: EĞİTİM-BİLİM-SBE-DR yoksis_id: '169483' parent_yoksis_id: '174846' @@ -15825,7 +15825,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sosyal Bilimler Eğitimi (Yl) (Tezli) +- name: Sosyal Bilimler Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-SBE-YL yoksis_id: '267756' parent_yoksis_id: '174846' @@ -15836,7 +15836,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) +- name: İngiliz Dili Eğitimi (YL) (Tezli) abbreviation: EĞİTİM-BİLİM-İNG-YL yoksis_id: '267764' parent_yoksis_id: '174846' @@ -15847,7 +15847,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) (Gazi Üniversitesi Ortak) +- name: İngiliz Dili Eğitimi (YL) (Tezli) (Gazi Üniversitesi Ortak) abbreviation: EĞİTİM-BİLİM-İNG-YL-GAZİ yoksis_id: '235313' parent_yoksis_id: '174846' @@ -15868,7 +15868,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '277322' parent_yoksis_id: '122082' unit_type_id: Önlisans/lisans Programı @@ -15878,7 +15878,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Bilgisayar ve Öğretim Teknolojileri Öğretmenliği Programı (İö) +- name: Bilgisayar ve Öğretim Teknolojileri Öğretmenliği Programı (İÖ) abbreviation: BÖTE-PR-2 yoksis_id: '168653' parent_yoksis_id: '122154' @@ -15900,7 +15900,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) yoksis_id: '285283' parent_yoksis_id: '122082' unit_type_id: Önlisans/lisans Programı @@ -15963,7 +15963,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık Programı (İö) +- name: Rehberlik ve Psikolojik Danışmanlık Programı (İÖ) abbreviation: PDR-PR-2 yoksis_id: '168675' parent_yoksis_id: '122083' @@ -15984,7 +15984,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Resim-İş Öğretmenliği Programı (İö) +- name: Resim-İş Öğretmenliği Programı (İÖ) abbreviation: RESİMİŞ-PR-2 yoksis_id: '169388' parent_yoksis_id: '122097' @@ -15995,7 +15995,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Biyoloji Öğretmenliği Programı (İö) +- name: Biyoloji Öğretmenliği Programı (İÖ) yoksis_id: '318208' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -16005,7 +16005,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Fen Bilgisi Öğretmenliği Programı (İö) +- name: Fen Bilgisi Öğretmenliği Programı (İÖ) abbreviation: MF-FEN-PR-2 yoksis_id: '168657' parent_yoksis_id: '298694' @@ -16028,7 +16028,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Öğretmenliği Programı (İö) +- name: Fizik Öğretmenliği Programı (İÖ) yoksis_id: '268109' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -16050,7 +16050,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Matematik Öğretmenliği Programı (İö) +- name: Matematik Öğretmenliği Programı (İÖ) yoksis_id: '275945' parent_yoksis_id: '298694' unit_type_id: Önlisans/lisans Programı @@ -16080,7 +16080,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Matematik Öğretmenliği Programı (İö) +- name: İlköğretim Matematik Öğretmenliği Programı (İÖ) abbreviation: MF-İLKMAT-PR-2 yoksis_id: '168664' parent_yoksis_id: '298694' @@ -16176,7 +16176,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Okul Öncesi Öğretmenliği Programı (İö) +- name: Okul Öncesi Öğretmenliği Programı (İÖ) abbreviation: TE-OÖE-PR-2 yoksis_id: '168673' parent_yoksis_id: '298632' @@ -16188,7 +16188,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Sınıf Öğretmenliği Programı (İö) +- name: Sınıf Öğretmenliği Programı (İÖ) abbreviation: TE-SINIF-PR-2 yoksis_id: '168677' parent_yoksis_id: '298632' @@ -16263,7 +16263,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Coğrafya Öğretmenliği Programı (İö) +- name: Coğrafya Öğretmenliği Programı (İÖ) yoksis_id: '275947' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -16273,7 +16273,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Sosyal Bilgiler Öğretmenliği Programı (İö) +- name: Sosyal Bilgiler Öğretmenliği Programı (İÖ) abbreviation: TS-SOSYAL-PR-2 yoksis_id: '168679' parent_yoksis_id: '298815' @@ -16295,7 +16295,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih Öğretmenliği Programı (İö) +- name: Tarih Öğretmenliği Programı (İÖ) yoksis_id: '321775' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -16315,7 +16315,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı Öğretmenliği Programı (İö) +- name: Türk Dili ve Edebiyatı Öğretmenliği Programı (İÖ) yoksis_id: '275949' parent_yoksis_id: '298815' unit_type_id: Önlisans/lisans Programı @@ -16325,7 +16325,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Türkçe Öğretmenliği Programı (İö) +- name: Türkçe Öğretmenliği Programı (İÖ) abbreviation: TS-TÜRKÇE-PR-2 yoksis_id: '168681' parent_yoksis_id: '298815' @@ -16336,7 +16336,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Almanca Öğretmenliği Programı (İö) +- name: Almanca Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-ALM-PR-2 yoksis_id: '168651' parent_yoksis_id: '122088' @@ -16347,7 +16347,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Fransızca Öğretmenliği Programı (İö) +- name: Fransızca Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-FR-PR-2 yoksis_id: '168662' parent_yoksis_id: '122088' @@ -16402,7 +16402,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İngilizce Öğretmenliği Programı (İö) +- name: İngilizce Öğretmenliği Programı (İÖ) abbreviation: YDİLEĞ-İNG-PR-2 yoksis_id: '168667' parent_yoksis_id: '122088' @@ -16436,7 +16436,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zihin Engelliler Öğretmenliği Programı (İö) +- name: Zihin Engelliler Öğretmenliği Programı (İÖ) abbreviation: ÖZELEĞİTİM-ZİHİN-PR-2 yoksis_id: '168683' parent_yoksis_id: '122092' @@ -16460,7 +16460,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İşitme Engelliler Öğretmenliği Programı (İö) +- name: İşitme Engelliler Öğretmenliği Programı (İÖ) abbreviation: ÖZELEĞİTİM-İŞİTME-PR-2 yoksis_id: '168669' parent_yoksis_id: '122092' @@ -16493,7 +16493,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) abbreviation: İDKABE-PR-2 yoksis_id: '285294' parent_yoksis_id: '122100' @@ -16504,7 +16504,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Biyoloji Eğitimi (Yl) (Tezsiz) +- name: Biyoloji Eğitimi (YL) (Tezsiz) yoksis_id: '330618' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16514,7 +16514,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fen Bilgisi Eğitim (Yl) (Tezli) (Ordu Üniversitesi Ortak) +- name: Fen Bilgisi Eğitim (YL) (Tezli) (Ordu Üniversitesi Ortak) yoksis_id: '258271' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16524,7 +16524,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fen Bilgisi Eğitimi (Dr) +- name: Fen Bilgisi Eğitimi (DR) yoksis_id: '169496' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -16534,7 +16534,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Eğitimi (Yl) (Tezsiz) +- name: Fizik Eğitimi (YL) (Tezsiz) yoksis_id: '330619' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16544,7 +16544,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita Mühendisliği (Dr) (Karadeniz Teknik Üniversitesi Ortak) +- name: Harita Mühendisliği (DR) (Karadeniz Teknik Üniversitesi Ortak) abbreviation: HARİTA-DR-KTÜ yoksis_id: '215657' parent_yoksis_id: '122386' @@ -16555,7 +16555,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Hesaplamalı Bilimler (Yl) (Tezli) +- name: Hesaplamalı Bilimler (YL) (Tezli) yoksis_id: '255367' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16565,7 +16565,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Kimya Eğitimi (Yl) (Tezsiz) +- name: Kimya Eğitimi (YL) (Tezsiz) yoksis_id: '330620' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16575,7 +16575,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Malzeme Bilimi ve Mühendisliği (Yl) (Tezli) +- name: Malzeme Bilimi ve Mühendisliği (YL) (Tezli) abbreviation: MALZEME-YL-DİĞER yoksis_id: '211288' parent_yoksis_id: '122386' @@ -16588,7 +16588,7 @@ issues: - yoksis_id '371245' ile isim benzerliği, aktiflik farklı -- name: Matematik (Yl) (Tezsiz) +- name: Matematik (YL) (Tezsiz) yoksis_id: '234094' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16598,7 +16598,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Matematik Eğitimi (Yl) (Tezsiz) +- name: Matematik Eğitimi (YL) (Tezsiz) yoksis_id: '330621' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16608,7 +16608,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Moleküler Biyoloji ve Genetik (Dr) (Ücretli) +- name: Moleküler Biyoloji ve Genetik (DR) (Ücretli) abbreviation: MOLBİYOGEN-DR-ÜCRETLİ yoksis_id: '299032' parent_yoksis_id: '122386' @@ -16619,7 +16619,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Moleküler Biyoloji ve Genetik (Yl) (Tezli) +- name: Moleküler Biyoloji ve Genetik (YL) (Tezli) abbreviation: MOLBİYOGEN-YL yoksis_id: '381852' parent_yoksis_id: '122386' @@ -16633,7 +16633,7 @@ issues: - Yerleşke eksik -- name: Moleküler Biyoloji ve Genetik (Yl) (Tezli) (Ücretli) +- name: Moleküler Biyoloji ve Genetik (YL) (Tezli) (Ücretli) abbreviation: MOLBİYOGEN-YL-ÜCRETLİ yoksis_id: '299033' parent_yoksis_id: '122386' @@ -16644,7 +16644,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri (Dr) +- name: Su Ürünleri (DR) yoksis_id: '321481' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -16654,7 +16654,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Su Ürünleri (Yl) (Tezli) +- name: Su Ürünleri (YL) (Tezli) yoksis_id: '330622' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16664,7 +16664,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri Avlama ve İşleme Tekniği (Dr) +- name: Su Ürünleri Avlama ve İşleme Tekniği (DR) yoksis_id: '321447' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -16674,7 +16674,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Su Ürünleri Avlama ve İşleme Tekniği  (Yl) (Tezli) +- name: Su Ürünleri Avlama ve İşleme Tekniği  (YL) (Tezli) yoksis_id: '317808' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16684,7 +16684,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Su Ürünleri Yetiştiriciliği (Dr) +- name: Su Ürünleri Yetiştiriciliği (DR) yoksis_id: '321482' parent_yoksis_id: '122386' unit_type_id: Doktora Programı @@ -16694,7 +16694,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Fen Bilgisi Eğitimi (Yl) (Tezli) +- name: İlköğretim Fen Bilgisi Eğitimi (YL) (Tezli) yoksis_id: '324884' parent_yoksis_id: '122386' unit_type_id: Yüksek Lisans Programı @@ -16704,7 +16704,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Mühendisliği (Yl) (Tezli) (Ücretli) +- name: İnşaat Mühendisliği (YL) (Tezli) (Ücretli) abbreviation: İNŞAAT-YL-ÜCRETLİ yoksis_id: '299031' parent_yoksis_id: '122386' @@ -16781,7 +16781,7 @@ issues: - Aktifken kısaltma verdiğimiz bu birim kapatılmış -- name: Biyoloji Programı (İö) +- name: Biyoloji Programı (İÖ) abbreviation: BİYO-PR-2 yoksis_id: '168688' parent_yoksis_id: '122006' @@ -16792,7 +16792,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Coğrafya Programı (İö) +- name: Coğrafya Programı (İÖ) abbreviation: COĞRAFYA-PR-2 yoksis_id: '168694' parent_yoksis_id: '122012' @@ -16804,7 +16804,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Felsefe Programı (İö) +- name: Felsefe Programı (İÖ) abbreviation: FELSEFE-PR-2 yoksis_id: '241626' parent_yoksis_id: '128020' @@ -16828,7 +16828,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Fizik Programı (İö) +- name: Fizik Programı (İÖ) abbreviation: FİZİK-PR-2 yoksis_id: '168705' parent_yoksis_id: '122017' @@ -16850,7 +16850,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Kimya Programı (İö) +- name: Kimya Programı (İÖ) abbreviation: KİMYA-PR-2 yoksis_id: '168709' parent_yoksis_id: '122027' @@ -16862,7 +16862,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Matematik Programı (İö) +- name: Matematik Programı (İÖ) abbreviation: MAT-PR-2 yoksis_id: '168713' parent_yoksis_id: '122033' @@ -17007,7 +17007,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarih Programı (İö) +- name: Tarih Programı (İÖ) abbreviation: TARİH-PR-2 yoksis_id: '168718' parent_yoksis_id: '122045' @@ -17052,7 +17052,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türk Dili ve Edebiyatı Programı (İö) +- name: Türk Dili ve Edebiyatı Programı (İÖ) abbreviation: TDE-PR-2 yoksis_id: '168722' parent_yoksis_id: '122050' @@ -17083,7 +17083,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İstatistik Programı (İö) +- name: İstatistik Programı (İÖ) abbreviation: İSTATİSTİK-PR-2 yoksis_id: '168707' parent_yoksis_id: '122023' @@ -17365,7 +17365,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '169582' parent_yoksis_id: '169579' unit_type_id: Önlisans/lisans Programı @@ -17405,7 +17405,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Fizyoterapi Programı (İö) +- name: Fizyoterapi Programı (İÖ) yoksis_id: '169583' parent_yoksis_id: '147579' unit_type_id: Önlisans/lisans Programı @@ -17456,7 +17456,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Emlak ve Emlak Yönetimi Programı (İö) +- name: Emlak ve Emlak Yönetimi Programı (İÖ) abbreviation: HAVZA-MYO-TPS-EMLAK-PR-2 yoksis_id: '228555' parent_yoksis_id: '251125' @@ -17497,7 +17497,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '169577' parent_yoksis_id: '122382' unit_type_id: Önlisans/lisans Programı @@ -17540,7 +17540,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Teknolojisi Programı (İö) +- name: İnşaat Teknolojisi Programı (İÖ) abbreviation: HAVZA-MYO-İNŞAAT-PR-2 yoksis_id: '145888' parent_yoksis_id: '169596' @@ -17644,7 +17644,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '169633' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -17655,7 +17655,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '381449' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -17675,7 +17675,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Mimari Restorasyon Programı (İö) +- name: Mimari Restorasyon Programı (İÖ) yoksis_id: '267991' parent_yoksis_id: '169626' unit_type_id: Önlisans/lisans Programı @@ -17746,7 +17746,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Harita ve Kadastro Programı (İö) +- name: Harita ve Kadastro Programı (İÖ) yoksis_id: '169612' parent_yoksis_id: '122293' unit_type_id: Önlisans/lisans Programı @@ -17777,7 +17777,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yapı Denetimi Programı (İö) +- name: Yapı Denetimi Programı (İÖ) yoksis_id: '229172' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -17798,7 +17798,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '145978' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -17819,7 +17819,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Teknolojisi Programı (İö) +- name: İnşaat Teknolojisi Programı (İÖ) yoksis_id: '238467' parent_yoksis_id: '169618' unit_type_id: Önlisans/lisans Programı @@ -17856,7 +17856,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Büro Yönetimi ve Sekreterlik Programı (İö) +- name: Büro Yönetimi ve Sekreterlik Programı (İÖ) yoksis_id: '273648' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -17883,7 +17883,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Pazarlama Programı (İö) +- name: Pazarlama Programı (İÖ) yoksis_id: '273653' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -17901,7 +17901,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İnşaat Programı (İö) +- name: İnşaat Programı (İÖ) yoksis_id: '273651' parent_yoksis_id: '269767' unit_type_id: Önlisans/lisans Programı @@ -18157,7 +18157,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Gıda Mühendisliği Programı (İö) +- name: Gıda Mühendisliği Programı (İÖ) abbreviation: GIDA-PR-2 yoksis_id: '168868' parent_yoksis_id: '122195' @@ -18169,7 +18169,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Harita Mühendisliği Programı (İö) +- name: Harita Mühendisliği Programı (İÖ) abbreviation: HARİTA-PR-2 yoksis_id: '168870' parent_yoksis_id: '122204' @@ -18191,7 +18191,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Jeodezi ve Fotogrametri Mühendisliği Programı (İö) +- name: Jeodezi ve Fotogrametri Mühendisliği Programı (İÖ) yoksis_id: '275953' parent_yoksis_id: '147731' unit_type_id: Önlisans/lisans Programı @@ -18201,7 +18201,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Makine Mühendisliği Programı (İö) +- name: Makine Mühendisliği Programı (İÖ) abbreviation: MAKİNE-PR-2 yoksis_id: '168874' parent_yoksis_id: '122215' @@ -18236,7 +18236,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Çevre Mühendisliği Programı (İö) +- name: Çevre Mühendisliği Programı (İÖ) abbreviation: ÇEVRE-PR-2 yoksis_id: '168863' parent_yoksis_id: '122188' @@ -18292,7 +18292,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İnşaat Mühendisliği Programı (İö) +- name: İnşaat Mühendisliği Programı (İÖ) abbreviation: İNŞAAT-PR-2 yoksis_id: '168872' parent_yoksis_id: '122198' @@ -18436,7 +18436,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '169895' parent_yoksis_id: '169892' unit_type_id: Önlisans/lisans Programı @@ -18456,7 +18456,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektronik Teknolojisi Programı (İö) +- name: Elektronik Teknolojisi Programı (İÖ) yoksis_id: '169905' parent_yoksis_id: '169899' unit_type_id: Önlisans/lisans Programı @@ -18476,7 +18476,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Otomotiv Teknolojisi Programı (İö) +- name: Otomotiv Teknolojisi Programı (İÖ) yoksis_id: '145865' parent_yoksis_id: '169909' unit_type_id: Önlisans/lisans Programı @@ -18506,7 +18506,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ağırlama Hizmetleri Programı (İö) +- name: Ağırlama Hizmetleri Programı (İÖ) yoksis_id: '169807' parent_yoksis_id: '168851' unit_type_id: Önlisans/lisans Programı @@ -18516,7 +18516,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Peyzaj ve Süs Bitkileri Programı (İö) +- name: Peyzaj ve Süs Bitkileri Programı (İÖ) abbreviation: SAMSUN-MYO-PARK-PEYZAJ-PR-2 yoksis_id: '174838' parent_yoksis_id: '174835' @@ -18537,7 +18537,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) yoksis_id: '128073' parent_yoksis_id: '128071' unit_type_id: Önlisans/lisans Programı @@ -18548,7 +18548,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Grafik Tasarım Programı (İö) +- name: Grafik Tasarım Programı (İÖ) yoksis_id: '145864' parent_yoksis_id: '169841' unit_type_id: Önlisans/lisans Programı @@ -18569,7 +18569,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Basım ve Yayın Teknolojileri Programı (İö) +- name: Basım ve Yayın Teknolojileri Programı (İÖ) yoksis_id: '122363' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18589,7 +18589,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '122367' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18609,7 +18609,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Duvar Süsleme Sanatları Programı (İö) +- name: Duvar Süsleme Sanatları Programı (İÖ) yoksis_id: '301884' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18629,7 +18629,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) +- name: Elektrik Programı (İÖ) yoksis_id: '128058' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18659,7 +18659,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Endüstriyel Elektronik Teknolojisi Programı (İö) +- name: Endüstriyel Elektronik Teknolojisi Programı (İÖ) yoksis_id: '145813' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18669,7 +18669,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Grafik Tasarımı Programı (İö) +- name: Grafik Tasarımı Programı (İÖ) abbreviation: SAMSUN-MYO-TEKNİK-GRAFİK-PR-2 yoksis_id: '128059' parent_yoksis_id: '122361' @@ -18702,7 +18702,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Mimari Dekoratif Sanatlar Programı (İö) +- name: Mimari Dekoratif Sanatlar Programı (İÖ) yoksis_id: '169843' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18713,7 +18713,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Otomotiv Programı (İö) +- name: Otomotiv Programı (İÖ) yoksis_id: '128065' parent_yoksis_id: '122361' unit_type_id: Önlisans/lisans Programı @@ -18786,7 +18786,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) abbreviation: SAMSUN-MYO-ÇBGH-ÇG-PR-2 yoksis_id: '169885' parent_yoksis_id: '215482' @@ -18808,7 +18808,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ağırlama Hizmetleri Programı (İö) +- name: Ağırlama Hizmetleri Programı (İÖ) yoksis_id: '169806' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -18829,7 +18829,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) yoksis_id: '169803' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -18852,7 +18852,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otel İşletmeciliği Programı (İö) +- name: Turizm ve Otel İşletmeciliği Programı (İÖ) abbreviation: SAMSUN-MYO-İKTİSAT-TOİ-PR-2 yoksis_id: '169805' parent_yoksis_id: '122370' @@ -18874,7 +18874,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Turizm ve Otelcilik Programı (İö) +- name: Turizm ve Otelcilik Programı (İÖ) yoksis_id: '301949' parent_yoksis_id: '122370' unit_type_id: Önlisans/lisans Programı @@ -19277,7 +19277,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Acil Tıp Hemşireliği (Dr) +- name: Acil Tıp Hemşireliği (DR) yoksis_id: '257558' parent_yoksis_id: '122387' unit_type_id: Doktora Programı @@ -19287,7 +19287,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Acil Tıp Hemşireliği (Yl) (Tezli) +- name: Acil Tıp Hemşireliği (YL) (Tezli) yoksis_id: '213248' parent_yoksis_id: '122387' unit_type_id: Yüksek Lisans Programı @@ -19297,7 +19297,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Yl) (Tezli) +- name: Anatomi (YL) (Tezli) abbreviation: ANATOMİ-YL yoksis_id: '267774' parent_yoksis_id: '122387' @@ -19308,7 +19308,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Anatomi (Veteriner) (Dr) +- name: Anatomi (Veteriner) (DR) abbreviation: VETERİNER-ANATOMİ-DR yoksis_id: '267772' parent_yoksis_id: '122387' @@ -19319,7 +19319,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Ağız, Diş ve Çene Radyolojisi (Dr) +- name: Ağız, Diş ve Çene Radyolojisi (DR) abbreviation: ADÇR-DR yoksis_id: '267775' parent_yoksis_id: '122387' @@ -19330,7 +19330,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor (Yl) (Tezli) +- name: Beden Eğitimi ve Spor (YL) (Tezli) abbreviation: SAĞLIK-BİLİM-BES-YL yoksis_id: '267776' parent_yoksis_id: '122387' @@ -19341,7 +19341,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Evde Bakım Hemşireliği (Yl) (Tezli) +- name: Evde Bakım Hemşireliği (YL) (Tezli) abbreviation: EBH-YL yoksis_id: '267777' parent_yoksis_id: '122387' @@ -19352,7 +19352,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Evde Bakım Hemşireliği (Yl) (Tezsiz) (Uzaktan Öğretim) +- name: Evde Bakım Hemşireliği (YL) (Tezsiz) (Uzaktan Öğretim) abbreviation: EBH-YZ-UZ yoksis_id: '267778' parent_yoksis_id: '122387' @@ -19363,7 +19363,7 @@ unit_instruction_type_id: Uzaktan Öğretim duration: 2 -- name: Fizyoloji (Yl) (Tezli) +- name: Fizyoloji (YL) (Tezli) abbreviation: FİZYOLOJİ-YL yoksis_id: '267779' parent_yoksis_id: '122387' @@ -19374,7 +19374,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Kurumları Yönetimi (Yl) (Tezsiz) (İö) (Canik Başarı Ortak) +- name: Sağlık Kurumları Yönetimi (YL) (Tezsiz) (İÖ) (Canik Başarı Ortak) yoksis_id: '235440' parent_yoksis_id: '122387' unit_type_id: Yüksek Lisans Programı @@ -19384,7 +19384,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tıbbi Biyokimya (Yl) (Tezli) +- name: Tıbbi Biyokimya (YL) (Tezli) abbreviation: TBİYOKİMYA-YL yoksis_id: '267781' parent_yoksis_id: '122387' @@ -19395,7 +19395,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Mikrobiyoloji (Yl) (Tezli) +- name: Tıbbi Mikrobiyoloji (YL) (Tezli) abbreviation: TMİKRO-YL yoksis_id: '267780' parent_yoksis_id: '122387' @@ -19544,7 +19544,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Hemşirelik Programı (İö) +- name: Hemşirelik Programı (İÖ) yoksis_id: '322461' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -19618,7 +19618,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İö) +- name: Tıbbi Dokümantasyon ve Sekreterlik Programı (İÖ) yoksis_id: '122342' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -19649,7 +19649,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yaşlı Bakım Hizmetleri Programı (İö) +- name: Yaşlı Bakım Hizmetleri Programı (İÖ) yoksis_id: '169794' parent_yoksis_id: '122337' unit_type_id: Önlisans/lisans Programı @@ -19742,7 +19742,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tıbbi Görüntüleme Teknikleri Programı (İö) (Ücretli) +- name: Tıbbi Görüntüleme Teknikleri Programı (İÖ) (Ücretli) abbreviation: SAĞLIK-MYO-THT-TGT-PR-2-ÜCRETLİ yoksis_id: '304701' parent_yoksis_id: '169645' @@ -19753,7 +19753,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Tıbbi Laboratuvar Teknikleri Programı (İö) +- name: Tıbbi Laboratuvar Teknikleri Programı (İÖ) yoksis_id: '145881' parent_yoksis_id: '169645' unit_type_id: Önlisans/lisans Programı @@ -19878,7 +19878,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayarlı Muhasebe ve Vergi Uygulama Programı (İö) (Bk.613) +- name: Bilgisayarlı Muhasebe ve Vergi Uygulama Programı (İÖ) (Bk.613) yoksis_id: '273678' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -19905,7 +19905,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Elektrik Programı (İö) (Bk.610) +- name: Elektrik Programı (İÖ) (Bk.610) yoksis_id: '273682' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -19914,7 +19914,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Endüstriyel Elektronik Programı (İö) (Bk.611) +- name: Endüstriyel Elektronik Programı (İÖ) (Bk.611) yoksis_id: '273683' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -19932,7 +19932,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Makine Programı (İö) (Bk.610) +- name: Makine Programı (İÖ) (Bk.610) yoksis_id: '273685' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -19941,7 +19941,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Mobilya ve Dekorasyon Programı (İö) (Bk.610) +- name: Mobilya ve Dekorasyon Programı (İÖ) (Bk.610) yoksis_id: '273686' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -19959,7 +19959,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) (Bk.613) +- name: Muhasebe Programı (İÖ) (Bk.613) yoksis_id: '273688' parent_yoksis_id: '269775' unit_type_id: Önlisans/lisans Programı @@ -20028,7 +20028,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Sinop Su Ürünleri Programı (İö) +- name: Sinop Su Ürünleri Programı (İÖ) yoksis_id: '273693' parent_yoksis_id: '269778' unit_type_id: Önlisans/lisans Programı @@ -20179,7 +20179,7 @@ issues: - Üst birim olan Sivil Havacılık YO kapatılmış -- name: Alman Dili Eğitimi (Yl) (Tezli) +- name: Alman Dili Eğitimi (YL) (Tezli) yoksis_id: '324897' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20189,7 +20189,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezli) +- name: Coğrafya Eğitimi (YL) (Tezli) yoksis_id: '330606' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20199,7 +20199,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Coğrafya Eğitimi (Yl) (Tezsiz) +- name: Coğrafya Eğitimi (YL) (Tezsiz) yoksis_id: '330607' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20209,7 +20209,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Eğitimi (Dr) +- name: Din Eğitimi (DR) yoksis_id: '330594' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20219,7 +20219,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Eğitimi (Yl) (Tezli) +- name: Din Eğitimi (YL) (Tezli) yoksis_id: '330593' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20229,7 +20229,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Felsefesi (Dr) +- name: Din Felsefesi (DR) yoksis_id: '330596' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20239,7 +20239,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Felsefesi (Yl) (Tezli) +- name: Din Felsefesi (YL) (Tezli) yoksis_id: '330595' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20249,7 +20249,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Kültürü ve Ahlak Bilgisi Eğitimi (Yl) (Tezsiz) +- name: Din Kültürü ve Ahlak Bilgisi Eğitimi (YL) (Tezsiz) yoksis_id: '381453' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20258,7 +20258,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Psikolojisi (Dr) +- name: Din Psikolojisi (DR) yoksis_id: '330598' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20268,7 +20268,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Din Psikolojisi (Yl) (Tezli) +- name: Din Psikolojisi (YL) (Tezli) yoksis_id: '330597' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20278,7 +20278,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Din Sosyolojisi (Dr) +- name: Din Sosyolojisi (DR) yoksis_id: '330599' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20288,7 +20288,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dinler Tarihi (Dr) +- name: Dinler Tarihi (DR) yoksis_id: '330601' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20298,7 +20298,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Dinler Tarihi (Yl) (Tezli) +- name: Dinler Tarihi (YL) (Tezli) yoksis_id: '330600' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20308,7 +20308,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eski Türk Dili (Yl) (Tezli) +- name: Eski Türk Dili (YL) (Tezli) yoksis_id: '330616' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20318,7 +20318,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eski Türk Edebiyatı (Dr) +- name: Eski Türk Edebiyatı (DR) yoksis_id: '330617' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20328,7 +20328,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Eğitim Bilimleri (Dr) +- name: Eğitim Bilimleri (DR) yoksis_id: '324886' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20338,7 +20338,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Eğitim Bilimleri (Yl) (Tezli) +- name: Eğitim Bilimleri (YL) (Tezli) yoksis_id: '324885' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20348,7 +20348,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Eğitim Yönetimi, Teftişi ve Planlaması (Yl) (Tezsiz) +- name: Eğitim Yönetimi, Teftişi ve Planlaması (YL) (Tezsiz) yoksis_id: '176437' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20358,7 +20358,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Güzel Sanatlar Eğitimi (Dr) +- name: Güzel Sanatlar Eğitimi (DR) yoksis_id: '324890' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20368,7 +20368,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Güzel Sanatlar Eğitimi (Yl) (Tezli) +- name: Güzel Sanatlar Eğitimi (YL) (Tezli) yoksis_id: '324889' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20378,7 +20378,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Müzik Eğitimi (Yl) (Tezli) +- name: Müzik Eğitimi (YL) (Tezli) yoksis_id: '324891' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20388,7 +20388,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Ortaöğretim Sosyal Alanlar Eğitimi (Yl) (Tezsiz) +- name: Ortaöğretim Sosyal Alanlar Eğitimi (YL) (Tezsiz) yoksis_id: '330608' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20398,7 +20398,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Rehberlik ve Psikolojik Danışmanlık (Dr) +- name: Rehberlik ve Psikolojik Danışmanlık (DR) yoksis_id: '324888' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20408,7 +20408,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Rehberlik ve Psikolojik Danışmanlık (Yl) (Tezli) +- name: Rehberlik ve Psikolojik Danışmanlık (YL) (Tezli) yoksis_id: '324887' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20418,7 +20418,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Resim-İş Eğitimi (Dr) +- name: Resim-İş Eğitimi (DR) yoksis_id: '324893' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20428,7 +20428,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Resim-İş Eğitimi (Yl) (Tezli) +- name: Resim-İş Eğitimi (YL) (Tezli) yoksis_id: '324892' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20438,7 +20438,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Sağlık Kurumları Yönetimi (Yl) (Tezsiz) (İö) (OMÜ Ortak) (Ücretli) +- name: Sağlık Kurumları Yönetimi (YL) (Tezsiz) (İÖ) (OMÜ Ortak) (Ücretli) yoksis_id: '300981' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20448,7 +20448,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Sınıf Öğretmenliği (Yl) (Tezli) +- name: Sınıf Öğretmenliği (YL) (Tezli) yoksis_id: '314753' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20458,7 +20458,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tarih Eğitimi (Yl) (Tezli) +- name: Tarih Eğitimi (YL) (Tezli) yoksis_id: '330610' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20468,7 +20468,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Tarih Eğitimi (Yl) (Tezsiz) +- name: Tarih Eğitimi (YL) (Tezsiz) yoksis_id: '330609' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20478,7 +20478,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk Dili ve Edebiyatı (Yl) (Ücretli) +- name: Türk Dili ve Edebiyatı (YL) (Ücretli) abbreviation: TDE-YL-ÜCRETLİ yoksis_id: '311762' parent_yoksis_id: '122388' @@ -20489,7 +20489,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk Dili ve Edebiyatı Eğitimi (Yl) (Tezsiz) +- name: Türk Dili ve Edebiyatı Eğitimi (YL) (Tezsiz) yoksis_id: '330611' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20499,7 +20499,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türk İslam Sanatları Tarihi (Yl) (Tezli) +- name: Türk İslam Sanatları Tarihi (YL) (Tezli) yoksis_id: '330605' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20509,7 +20509,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türkiye Cumhuriyeti Tarihi (Dr) +- name: Türkiye Cumhuriyeti Tarihi (DR) abbreviation: SOSYAL-BİLİM-TC-DR yoksis_id: '267771' parent_yoksis_id: '122388' @@ -20520,7 +20520,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Türkiye Cumhuriyeti Tarihi (Yl) (Tezli) +- name: Türkiye Cumhuriyeti Tarihi (YL) (Tezli) yoksis_id: '327638' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20530,7 +20530,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Türkçe Eğitimi (Yl) (Tezli) +- name: Türkçe Eğitimi (YL) (Tezli) yoksis_id: '324896' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20540,7 +20540,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Uluslararası Ticaret ve İşletmecilik (Yl) (Tezli) (Ücretli) +- name: Uluslararası Ticaret ve İşletmecilik (YL) (Tezli) (Ücretli) abbreviation: UTİ-YL-ÜCRETLİ yoksis_id: '299076' parent_yoksis_id: '122388' @@ -20551,7 +20551,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Uluslararası Ticaret ve İşletmecilik (Yl) (Tezsiz) (Ücretli) +- name: Uluslararası Ticaret ve İşletmecilik (YL) (Tezsiz) (Ücretli) abbreviation: UTİ-YZ-ÜCRETLİ yoksis_id: '299077' parent_yoksis_id: '122388' @@ -20562,7 +20562,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yabancı Diller Eğitimi (Yl) (Tezli) +- name: Yabancı Diller Eğitimi (YL) (Tezli) yoksis_id: '324899' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20572,7 +20572,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yakın Çağ Tarihi (Dr) +- name: Yakın Çağ Tarihi (DR) yoksis_id: '330613' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20582,7 +20582,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Yakın Çağ Tarihi (Yl) (Tezli) +- name: Yakın Çağ Tarihi (YL) (Tezli) yoksis_id: '330612' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20592,7 +20592,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yeni Türk Edebiyatı (Yl) (Tezli) (Ücretli) +- name: Yeni Türk Edebiyatı (YL) (Tezli) (Ücretli) abbreviation: SOSYAL-BİLİM-YENİTE-YL-ÜCRETLİ yoksis_id: '299078' parent_yoksis_id: '122388' @@ -20603,7 +20603,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Yeni Çağ Tarihi (Yl) (Tezli) +- name: Yeni Çağ Tarihi (YL) (Tezli) yoksis_id: '330614' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20613,7 +20613,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çağdaş Türk Lehçeleri ve Edebiyatları (Yl) (Tezli) +- name: Çağdaş Türk Lehçeleri ve Edebiyatları (YL) (Tezli) yoksis_id: '330615' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20623,7 +20623,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlköğretim (Yl) (Tezli) +- name: İlköğretim (YL) (Tezli) yoksis_id: '324894' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20633,7 +20633,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İlköğretim Sınıf Öğretmenliği (Yl) (Tezli) +- name: İlköğretim Sınıf Öğretmenliği (YL) (Tezli) yoksis_id: '314880' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20643,7 +20643,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İngiliz Dili Eğitimi (Yl) (Tezli) +- name: İngiliz Dili Eğitimi (YL) (Tezli) yoksis_id: '324898' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20653,7 +20653,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İslam Felsefesi (Dr) +- name: İslam Felsefesi (DR) yoksis_id: '330602' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20663,7 +20663,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi (Dr) +- name: İslam Tarihi (DR) yoksis_id: '330604' parent_yoksis_id: '122388' unit_type_id: Doktora Programı @@ -20673,7 +20673,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İslam Tarihi (Yl) (Tezli) +- name: İslam Tarihi (YL) (Tezli) yoksis_id: '330603' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20683,7 +20683,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İşletme (Yl) (Tezsiz) (İö) (Canik Başarı Ortak) +- name: İşletme (YL) (Tezsiz) (İÖ) (Canik Başarı Ortak) yoksis_id: '235338' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20693,7 +20693,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: İşletme (Yl) (Tezsiz) (İö) (Ondokuz Mayıs Ortak) (Ücretli) +- name: İşletme (YL) (Tezsiz) (İÖ) (Ondokuz Mayıs Ortak) (Ücretli) yoksis_id: '300980' parent_yoksis_id: '122388' unit_type_id: Yüksek Lisans Programı @@ -20712,7 +20712,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: TERME-MYO-MV-PR-2 yoksis_id: '145983' parent_yoksis_id: '169947' @@ -21002,7 +21002,7 @@ unit_instruction_language_id: Türkçe unit_instruction_type_id: Normal Öğretim -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) abbreviation: VEZİRKÖPRÜ-MYO-MV-PR-2 yoksis_id: '170010' parent_yoksis_id: '170007' @@ -21044,7 +21044,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Çocuk Gelişimi Programı (İö) +- name: Çocuk Gelişimi Programı (İÖ) yoksis_id: '169995' parent_yoksis_id: '122301' unit_type_id: Önlisans/lisans Programı @@ -21107,7 +21107,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '145966' parent_yoksis_id: '122297' unit_type_id: Önlisans/lisans Programı @@ -21145,7 +21145,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) +- name: Muhasebe Programı (İÖ) yoksis_id: '145973' parent_yoksis_id: '122299' unit_type_id: Önlisans/lisans Programı @@ -21185,7 +21185,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Antrenörlük Eğitimi Programı (İö) (Bk.2) +- name: Antrenörlük Eğitimi Programı (İÖ) (Bk.2) abbreviation: BESYO-ANTRENÖR-PR-2-2 yoksis_id: '295466' parent_yoksis_id: '122373' @@ -21207,7 +21207,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '295468' parent_yoksis_id: '122373' unit_type_id: Önlisans/lisans Programı @@ -21228,7 +21228,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Spor Yöneticiliği Programı (İö) (Bk.2) +- name: Spor Yöneticiliği Programı (İÖ) (Bk.2) abbreviation: BESYO-SPORYÖN-PR-2-2 yoksis_id: '295470' parent_yoksis_id: '122373' @@ -21239,7 +21239,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 4 -- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İö) +- name: Beden Eğitimi ve Spor Öğretmenliği Programı (İÖ) yoksis_id: '277323' parent_yoksis_id: '122374' unit_type_id: Önlisans/lisans Programı @@ -21289,7 +21289,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bahçe Bitkileri Programı (İö) +- name: Bahçe Bitkileri Programı (İÖ) yoksis_id: '275955' parent_yoksis_id: '122259' unit_type_id: Önlisans/lisans Programı @@ -21360,7 +21360,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Tarla Bitkileri Programı (İö) +- name: Tarla Bitkileri Programı (İÖ) yoksis_id: '275958' parent_yoksis_id: '122267' unit_type_id: Önlisans/lisans Programı @@ -21446,7 +21446,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Zootekni Programı (İö) +- name: Zootekni Programı (İÖ) yoksis_id: '275960' parent_yoksis_id: '122271' unit_type_id: Önlisans/lisans Programı @@ -21473,7 +21473,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) (Bk.601) +- name: Bilgisayar Programcılığı Programı (İÖ) (Bk.601) yoksis_id: '273622' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -21482,7 +21482,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) (Bk.601) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) (Bk.601) yoksis_id: '273623' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -21500,7 +21500,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe Programı (İö) (Bk.606) +- name: Muhasebe Programı (İÖ) (Bk.606) yoksis_id: '273625' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -21518,7 +21518,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) (Bk.606) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) (Bk.606) yoksis_id: '273627' parent_yoksis_id: '269763' unit_type_id: Önlisans/lisans Programı @@ -21527,7 +21527,7 @@ unit_instruction_type_id: İkinci Öğretim duration: 2 -- name: Bilgisayar Teknolojisi ve Programlama Programı (İö) +- name: Bilgisayar Teknolojisi ve Programlama Programı (İÖ) yoksis_id: '324470' parent_yoksis_id: '169488' unit_type_id: Önlisans/lisans Programı @@ -21567,7 +21567,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Bilgisayar Programcılığı Programı (İö) +- name: Bilgisayar Programcılığı Programı (İÖ) yoksis_id: '145991' parent_yoksis_id: '128047' unit_type_id: Önlisans/lisans Programı @@ -21618,7 +21618,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: Muhasebe ve Vergi Uygulamaları Programı (İö) +- name: Muhasebe ve Vergi Uygulamaları Programı (İÖ) yoksis_id: '145987' parent_yoksis_id: '122290' unit_type_id: Önlisans/lisans Programı @@ -21864,7 +21864,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: Siyaset Bilimi ve Kamu Yönetimi Programı (İö) +- name: Siyaset Bilimi ve Kamu Yönetimi Programı (İÖ) abbreviation: SBKY-PR-2 yoksis_id: '241628' parent_yoksis_id: '128036' @@ -22083,7 +22083,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İşletme Programı (İö) +- name: İşletme Programı (İÖ) abbreviation: İŞLETMEB-PR-2 yoksis_id: '241627' parent_yoksis_id: '128030' @@ -22129,7 +22129,7 @@ unit_instruction_type_id: Normal Öğretim duration: 4 -- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İö) +- name: İlköğretim Din Kültürü ve Ahlak Bilgisi Öğretmenliği Programı (İÖ) abbreviation: İDKABE-PR-2-DİĞER yoksis_id: '241629' parent_yoksis_id: '128027' @@ -22172,7 +22172,7 @@ unit_instruction_type_id: Normal Öğretim duration: 2 -- name: İstatistik (Yl) (İngilizce) (Tezli) +- name: İstatistik (YL) (İngilizce) (Tezli) abbreviation: İSTATİSTİK-YL-İNG yoksis_id: '383211' parent_yoksis_id: '122386' From 31e6128911c9602dba24b8accbf47d15a7e8d418 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Thu, 28 Mar 2019 15:33:44 +0300 Subject: [PATCH 108/279] Archive prospective student if exists user --- .../first_registration/prospective_students_controller.rb | 3 +++ app/services/activatable/activation_service.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/first_registration/prospective_students_controller.rb b/app/controllers/first_registration/prospective_students_controller.rb index 3f8eb55ba..c103c256b 100644 --- a/app/controllers/first_registration/prospective_students_controller.rb +++ b/app/controllers/first_registration/prospective_students_controller.rb @@ -41,6 +41,9 @@ def register if prospective_student.register @prospective_student.update(registered: true) + if User.exists?(id_number: @prospective_student.id_number, activated: true) + @prospective_student.update(archived: true) + end redirect_to(:prospective_students, notice: t('.success')) else redirect_to(:prospective_students, alert: t('.warning')) diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index 74a0906fb..29e01c459 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -65,7 +65,7 @@ def active process rescue StandardError - errors.add(:base, T18n.t('.account.activations.system_error')) && false + errors.add(:base, I18n.t('.account.activations.system_error')) && false end private From 88cc927308bb1acd651fec2bda47ffb553c2d467 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Fri, 29 Mar 2019 08:23:33 +0300 Subject: [PATCH 109/279] Change validation name --- app/services/activatable/activation_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index 29e01c459..317d31a65 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -23,7 +23,7 @@ class ActivationService validates :document_no, allow_blank: true, length: { is: 9 } validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validates_with ActivationServiceValidator - validate :must_be_not_activated + validate :must_not_be_activated validate :must_be_prospective, unless: :activated? validate :must_be_verified_identity, if: :prospective? @@ -80,7 +80,7 @@ def process end end - def must_be_not_activated + def must_not_be_activated return if errors.any? errors.add(:base, I18n.t('.account.activations.already_activated')) if activated? From 3fbddf81a2d8601530f15fb681c904b4c49538b6 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Fri, 29 Mar 2019 14:33:15 +0300 Subject: [PATCH 110/279] Create activation service test --- .../activatable/activation_service.rb | 9 ++- .../accounts/activation_controller_test.rb | 25 +++--- test/fixtures/prospective_students.yml | 1 + .../activatable/activation_service_test.rb | 80 +++++++++++++++++++ 4 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 test/services/activatable/activation_service_test.rb diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index 317d31a65..9781c99f1 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -12,12 +12,15 @@ class ActivationService :serial_no, :document_no, :mobile_phone, - :country + :country, + :prospective, + :user validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } validates :first_name, presence: true validates :last_name, presence: true validates :date_of_birth, presence: true + validates :country, presence: true validates :serial, allow_blank: true, length: { is: 3 } validates :serial_no, allow_blank: true, numericality: { only_integer: true } validates :document_no, allow_blank: true, length: { is: 9 } @@ -71,8 +74,8 @@ def active private def process - prospective = ProspectiveStudent.find_by(id_number: id_number) - user = User.find_by(id_number: id_number) + @prospective = ProspectiveStudent.find_by(id_number: id_number) + @user = User.find_by(id_number: id_number) ProspectiveStudent.transaction do prospective.update(archived: true) diff --git a/test/controllers/accounts/activation_controller_test.rb b/test/controllers/accounts/activation_controller_test.rb index 274d64304..3473df63d 100644 --- a/test/controllers/accounts/activation_controller_test.rb +++ b/test/controllers/accounts/activation_controller_test.rb @@ -5,7 +5,6 @@ module Accounts class ActivationControllerTest < ActionDispatch::IntegrationTest setup do - @prospective = prospective_students(:mine) @form_params = %w[id_number first_name last_name date_of_birth serial serial_no document_no mobile_phone country] end @@ -21,18 +20,20 @@ class ActivationControllerTest < ActionDispatch::IntegrationTest end test 'should update activation' do - parameters = { - id_number: '56593662552', - first_name: 'Mine', - last_name: 'Uraslı', - date_of_birth: '1984-11-16', - serial: 'J10', - serial_no: '94646', - mobile_phone: '5551111111', - country: 'TR' - } + prospective = prospective_students(:mine) - patch activation_path, params: { activation: parameters } + patch activation_path, params: { + activation: { + id_number: prospective.id_number, + first_name: prospective.first_name, + last_name: prospective.last_name, + date_of_birth: '1984-11-16', + serial: 'J10', + serial_no: '94646', + mobile_phone: '5551111111', + country: 'TR' + } + } assert_redirected_to login_path(locale: I18n.locale) end end diff --git a/test/fixtures/prospective_students.yml b/test/fixtures/prospective_students.yml index 066694756..fdc06b278 100644 --- a/test/fixtures/prospective_students.yml +++ b/test/fixtures/prospective_students.yml @@ -8,6 +8,7 @@ serhat: military_status: true obs_status: true meb_status: true + registered: true academic_term: fall_2018_2019 expiry_date: 2019-01-15 08:00:00 john: diff --git a/test/services/activatable/activation_service_test.rb b/test/services/activatable/activation_service_test.rb new file mode 100644 index 000000000..5961d0db5 --- /dev/null +++ b/test/services/activatable/activation_service_test.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Activatable + class ActivationServiceTest < ActiveSupport::TestCase + setup do + prospective = prospective_students(:mine) + + @activation = + Activatable::ActivationService.new( + id_number: prospective.id_number, + first_name: prospective.first_name, + last_name: prospective.last_name, + date_of_birth: '1984-11-16', + serial: 'J10', + serial_no: '94646', + mobile_phone: '5551111111', + country: 'TR' + ) + end + + # validations: presence + %i[ + id_number + first_name + last_name + date_of_birth + country + mobile_phone + ].each do |property| + test "#{property} of activation can not be nil" do + @activation.send("#{property}=", nil) + assert_not @activation.valid? + assert_not_empty @activation.errors[property] + end + end + + # validations: numericality and length + test 'check numericality and length validations' do + assert_equal 11, @activation.id_number.length + assert_equal 3, @activation.serial.length + assert @activation.id_number.match(/\A\d+\z/) + assert @activation.serial_no.match(/\A\d+\z/) + end + + test 'phone number must be checked with country' do + @activation.country = 'DE' + assert_not @activation.valid? + assert_not_empty @activation.errors[:mobile_phone] + end + + test 'user must not be activated' do + assert_not @activation.activated? + end + + test 'student must be prospective' do + assert @activation.prospective? + end + + { + '70336212330' => 'record_not_found', + '10570898198' => 'already_activated' + }.each do |id_number, error_key| + test "check for faulty #{id_number}" do + fake = @activation.dup + fake.id_number = id_number + assert_not fake.active + assert_not_empty fake.errors[:base] + assert_equal I18n.t('.account.activations.' + error_key), fake.errors[:base].first + end + end + + test 'activation is must be active' do + assert @activation.active + assert @activation.prospective.archived? + assert @activation.user.activated? + end + end +end From 03e2c863d372acd666a99ccc3261f52e86bf0984 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 1 Apr 2019 08:49:05 +0300 Subject: [PATCH 111/279] Sort alphabetically --- .../activatable/activation_service.rb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/services/activatable/activation_service.rb b/app/services/activatable/activation_service.rb index 9781c99f1..6d0466aad 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activatable/activation_service.rb @@ -4,27 +4,27 @@ module Activatable class ActivationService include ActiveModel::Validations - attr_accessor :id_number, - :first_name, - :last_name, + attr_accessor :country, :date_of_birth, - :serial, - :serial_no, :document_no, + :first_name, + :id_number, + :last_name, :mobile_phone, - :country, :prospective, + :serial, + :serial_no, :user - validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } + validates :country, presence: true + validates :date_of_birth, presence: true + validates :document_no, allow_blank: true, length: { is: 9 } validates :first_name, presence: true + validates :id_number, presence: true, numericality: { only_integer: true }, length: { is: 11 } validates :last_name, presence: true - validates :date_of_birth, presence: true - validates :country, presence: true + validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validates :serial, allow_blank: true, length: { is: 3 } validates :serial_no, allow_blank: true, numericality: { only_integer: true } - validates :document_no, allow_blank: true, length: { is: 9 } - validates :mobile_phone, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validates_with ActivationServiceValidator validate :must_not_be_activated validate :must_be_prospective, unless: :activated? From 6fdb8dc6555f472d8275766d9d9d8b232a20d15e Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 1 Apr 2019 09:24:05 +0300 Subject: [PATCH 112/279] Add activation statuses to user page --- app/views/users/_account.html.erb | 8 ++++++++ config/locales/models/user/en.yml | 5 ++++- config/locales/models/user/tr.yml | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/views/users/_account.html.erb b/app/views/users/_account.html.erb index 5b9598dba..2a5cff478 100644 --- a/app/views/users/_account.html.erb +++ b/app/views/users/_account.html.erb @@ -24,6 +24,14 @@ <%= t('updated_at') %> <%= @user.updated_at %> + + <%= t('.activated') %> + <%= icon_for_check(@user.activated) %> + + + <%= t('.activated_at') %> + <%= @user.activated_at %> + diff --git a/config/locales/models/user/en.yml b/config/locales/models/user/en.yml index 6b36f98b8..c8c9d8d04 100644 --- a/config/locales/models/user/en.yml +++ b/config/locales/models/user/en.yml @@ -19,6 +19,8 @@ en: end_date: End Date start_date: Start Date user: &user_attributes + activated: Account Activation + activated_at: Account Activation Date articles_count: Articles Count current_password: Current Password email: E-mail @@ -70,6 +72,7 @@ en: informal_identity: Informal Identity new_identity: Create New Identity update_from_mernis: Update from MERNIS + student_identity: Student Identity user_identity: User Identity index: <<: *user_attributes @@ -94,4 +97,4 @@ en: employees: Employees identities: Identities update: - success: User successfully updated. \ No newline at end of file + success: User successfully updated. diff --git a/config/locales/models/user/tr.yml b/config/locales/models/user/tr.yml index f1fbfecce..bc97ff0e1 100644 --- a/config/locales/models/user/tr.yml +++ b/config/locales/models/user/tr.yml @@ -19,6 +19,8 @@ tr: end_date: Bitiş Tarihi start_date: Başlangıç Tarihi user: &user_attributes + activated: Hesap Aktifleştirme + activated_at: Hesap Aktifleştirme Tarihi articles_count: Makale Sayısı current_password: Mevcut Parola email: E-mail Adresi @@ -70,6 +72,7 @@ tr: informal_identity: Diğer Kimliğiniz new_identity: Yeni Kimlik Ekle update_from_mernis: MERNİS'ten Güncelle + student_identity: Öğrenci Kimliğiniz user_identity: Kullanıcı Kimliğiniz index: <<: *user_attributes @@ -94,4 +97,4 @@ tr: employees: Personel İşlemleri identities: Kimlik Bilgileri update: - success: Kullanıcı başarıyla güncellendi. \ No newline at end of file + success: Kullanıcı başarıyla güncellendi. From e8bd3bffe78f489ae13be4f94f0cd22c52a633fd Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 1 Apr 2019 14:06:28 +0300 Subject: [PATCH 113/279] Change function name in activation service validator --- app/validators/activation_service_validator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/validators/activation_service_validator.rb b/app/validators/activation_service_validator.rb index 51f4d375f..33f777daf 100644 --- a/app/validators/activation_service_validator.rb +++ b/app/validators/activation_service_validator.rb @@ -11,7 +11,7 @@ def check_all_identity_serial_numbers if blank_all_identity_serial_numbers? @record.errors[:base] << I18n.t('.cannot_be_blank', scope: %i[validators activation_service]) elsif @record.document_no.blank? - check_old_identity_serial_numbers? + check_old_identity_serial_numbers end end @@ -19,7 +19,7 @@ def blank_all_identity_serial_numbers? @record.serial.blank? && @record.serial_no.blank? && @record.document_no.blank? end - def check_old_identity_serial_numbers? + def check_old_identity_serial_numbers if @record.serial.present? && @record.serial_no.blank? @record.errors.add(:serial_no, :blank) elsif @record.serial.blank? && @record.serial_no.present? From b9aa41871e2b0a32489b373353fe23a5bfbf5c5b Mon Sep 17 00:00:00 2001 From: msdundar Date: Mon, 1 Apr 2019 15:28:46 +0300 Subject: [PATCH 114/279] Fix Twilio::Verify service --- app/services/twilio/verify.rb | 136 +++++++++++++++++----------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/app/services/twilio/verify.rb b/app/services/twilio/verify.rb index cdfbb7034..569e72a69 100644 --- a/app/services/twilio/verify.rb +++ b/app/services/twilio/verify.rb @@ -4,87 +4,87 @@ module Twilio class Verify - # register user to authy! - def register_user(email, phone, country_code) - authy = Authy::API.register_user( - email: email, - cellphone: phone, - country_code: country_code - ) - - if authy.ok? - # store authy_id in database - user.authy_id = authy.id - else - authy.errors + class << self + # register user to authy! + def register_user(email, phone, country_code) + authy = Authy::API.register_user( + email: email, + cellphone: phone, + country_code: country_code + ) + + if authy.ok? + # store authy_id in database + user.authy_id = authy.id + else + authy.errors + end end - end - # verify authy token - def verify_token(user, token) - response = Authy::API.verify( - id: user.authy_id, - token: token - ) - - response.ok? ? 'ok' : 'invalid' - end + # verify authy token + def verify_token(user, token) + response = Authy::API.verify( + id: user.authy_id, + token: token + ) - # request authy code as SMS - def request_sms(user) - response = Authy::API.request_sms( - id: user.authy_id, - locale: user.preferred_language || 'tr' - ) - - response.ok? ? 'ok' : response.errors - end + response.ok? ? 'ok' : 'invalid' + end - # request QR code for Google Authenticator etc. - def request_qr_code(user) - response = Authy::API.request_qr_code( - id: user.authy_id, - qr_size: 500, - label: Tenant.configuration.name - ) + # request authy code as SMS + def request_sms(user) + response = Authy::API.request_sms( + id: user.authy_id, + locale: user.preferred_language || 'tr' + ) - if response.ok? - response.qr_code # link of the QR image - else - response.errors + response.ok? ? 'ok' : response.errors end - end - def send_phone_verification_code(phone_number, locale = 'tr') - response = Authy::PhoneVerification.start( - via: 'sms', - country_code: parse_phone_number(phone_number)[:country_code], - phone_number: parse_phone_number(phone_number)[:normalized_number], - locale: locale - ) + # request QR code for Google Authenticator etc. + def request_qr_code(user) + response = Authy::API.request_qr_code( + id: user.authy_id, + qr_size: 500, + label: Tenant.configuration.name + ) + + if response.ok? + response.qr_code # link of the QR image + else + response.errors + end + end - 'ok' if response.ok? - end + def send_phone_verification_code(phone_number, locale = 'tr') + response = Authy::PhoneVerification.start( + via: 'sms', + country_code: parse_phone_number(phone_number)[:country_code], + phone_number: parse_phone_number(phone_number)[:normalized_number], + locale: locale + ) - def check_verification_code(phone_number, verification_code) - response = Authy::PhoneVerification.check( - verification_code: verification_code, - country_code: parse_phone_number(phone_number)[:country_code], - phone_number: parse_phone_number(phone_number)[:normalized_number] - ) + 'ok' if response.ok? + end - 'ok' if response.ok? - end + def check_verification_code(phone_number, verification_code) + response = Authy::PhoneVerification.check( + verification_code: verification_code, + country_code: parse_phone_number(phone_number)[:country_code], + phone_number: parse_phone_number(phone_number)[:normalized_number] + ) - private + 'ok' if response.ok? + end - def parse_phone_number(phone_number) - parsed_number = TelephoneNumber.parse(phone_number) + def parse_phone_number(phone_number) + parsed_number = TelephoneNumber.parse(phone_number) - { - country_code: parsed_number.country.country_code, - normalized_number: parsed_number.normalized_number - } + { + country_code: parsed_number.country.country_code, + normalized_number: parsed_number.normalized_number + } + end end end end From 1719fc1c135751b4a01c4a0bd65c9885e0896ef2 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 1 Apr 2019 18:51:22 +0300 Subject: [PATCH 115/279] Minor changes --- app/assets/javascripts/guest.js | 2 -- .../account/activations_controller.rb | 2 +- app/views/account/activations/new.html.erb | 16 ++++++++-------- .../controllers/account/activations.en.yml | 4 ++-- .../controllers/account/activations.tr.yml | 4 ++-- config/routes/account.rb | 2 +- .../accounts/activation_controller_test.rb | 4 ++-- 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/guest.js b/app/assets/javascripts/guest.js index f4ac1adf5..ffd56d502 100644 --- a/app/assets/javascripts/guest.js +++ b/app/assets/javascripts/guest.js @@ -1,7 +1,5 @@ // Manifest file for guest template. -//= require rails-ujs -//= require coreui //= require jquery/dist/jquery.min //= require toastr/build/toastr.min //= require shared/toastr_config diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 54704293f..0788fa862 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -10,7 +10,7 @@ def new @activation = Activatable::ActivationService.new end - def update + def create @activation = Activatable::ActivationService.new(params[:activation]) if @activation.active diff --git a/app/views/account/activations/new.html.erb b/app/views/account/activations/new.html.erb index 8ab5fb7ec..f0df1c505 100644 --- a/app/views/account/activations/new.html.erb +++ b/app/views/account/activations/new.html.erb @@ -3,7 +3,7 @@

<%= t('.activation') %>

<%= t('.account_activation') %>

- <%= simple_form_for(:activation, url: activation_path, html: { method: 'patch' }) do |f| %> + <%= simple_form_for(:activation, url: activation_path) do |f| %> <%= f.error_notification %> <% if @activation.errors.any? %>
    @@ -17,7 +17,7 @@
    <%= t('.identity_verification') %>
    - +
    <%= f.input :id_number, required: true, label: false, autofocus: true, wrapper: false, input_html: { class: @activation.errors[:id_number].any? ? 'is-invalid' : '' } %>
    @@ -26,19 +26,19 @@
    - +
    <%= f.input :first_name, required: true, label: false, wrapper: false %>
    - +
    <%= f.input :last_name, required: true, label: false, wrapper: false %>
    - +
    <%= f.input :date_of_birth, as: :date_time_picker, label: false, wrapper: false, input_html: { required: true } %>
    @@ -68,7 +68,7 @@
    <%= t('.phone_verification') %>
    - +
    <%= f.input :mobile_phone, label: false, wrapper: false, input_html: { class: @activation.errors[:mobile_phone].any? ? 'is-invalid' : '' } %>
    @@ -78,9 +78,9 @@
    - +
    - <%= f.input :country, collection: Country.all, value_method: :alpha_2_code, label: false, wrapper: false %> + <%= f.input :country, collection: Country.order(:name), value_method: :alpha_2_code, label: false, wrapper: false %>
    diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index 2e2d8de0e..df3a6ad41 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -14,6 +14,8 @@ en: account: activations: already_activated: Your account is already activated. + create: + success: Your account has been activated. identity_not_verified: Your identity not verified. Make sure that the data you entered is correct. record_not_found: There is no record in the system to activate your account. system_error: The system error has occurred. Please try later. @@ -29,5 +31,3 @@ en: privacy_policy: Privacy Policy user_agreement: User Agreement verify: Verify - update: - success: Your account has been activated. diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index 81397e522..43fa5aa9e 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -14,6 +14,8 @@ tr: account: activations: already_activated: Hesabınız zaten aktif durumda. + create: + success: Hesabınız aktifleştirildi. identity_not_verified: Kimlik bilgileriniz doğrulanamadı. Girmiş olduğunuz verilerin doğruluğundan emin olunuz. record_not_found: Sistemde hesabınızı aktifleştirecek bir kayıt bulunamamıştır. system_error: Sistemsel bir hata oluştu. Lütfen daha sonra tekrar deneyin. @@ -29,5 +31,3 @@ tr: privacy_policy: Gizlilik Politikalarımızı user_agreement: Kurallarımızı verify: Onayla - update: - success: Hesabınız aktifleştirildi. diff --git a/config/routes/account.rb b/config/routes/account.rb index 9442b1a0c..1a6e9a30f 100644 --- a/config/routes/account.rb +++ b/config/routes/account.rb @@ -17,7 +17,7 @@ scope module: :account do get 'activation', to: 'activations#new' - patch 'activation', to: 'activations#update' + post 'activation', to: 'activations#create' get '/profile', to: 'profile_settings#edit' patch '/profile', to: 'profile_settings#update' end diff --git a/test/controllers/accounts/activation_controller_test.rb b/test/controllers/accounts/activation_controller_test.rb index 3473df63d..b8c6e0ca0 100644 --- a/test/controllers/accounts/activation_controller_test.rb +++ b/test/controllers/accounts/activation_controller_test.rb @@ -19,10 +19,10 @@ class ActivationControllerTest < ActionDispatch::IntegrationTest end end - test 'should update activation' do + test 'should create activation' do prospective = prospective_students(:mine) - patch activation_path, params: { + post activation_path, params: { activation: { id_number: prospective.id_number, first_name: prospective.first_name, From 6242cd721f4613bc4c882eba45569f556005971f Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Mon, 1 Apr 2019 19:11:45 +0300 Subject: [PATCH 116/279] Add correct structure.sql --- db/structure.sql | 507 +++++++++++++++++++++++------------------------ 1 file changed, 247 insertions(+), 260 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index c340076ab..ad83e4890 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1,5 +1,6 @@ SET statement_timeout = 0; SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); @@ -7,20 +8,6 @@ SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - SET default_tablespace = ''; SET default_with_oids = false; @@ -2755,476 +2742,476 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: academic_terms id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.academic_terms ALTER COLUMN id SET DEFAULT nextval('public.academic_terms_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: action_text_rich_texts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.action_text_rich_texts ALTER COLUMN id SET DEFAULT nextval('public.action_text_rich_texts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: active_storage_attachments id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('public.active_storage_attachments_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: active_storage_blobs id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: addresses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses ALTER COLUMN id SET DEFAULT nextval('public.addresses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: administrative_functions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions ALTER COLUMN id SET DEFAULT nextval('public.administrative_functions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: agenda_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agenda_types ALTER COLUMN id SET DEFAULT nextval('public.agenda_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: agendas id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas ALTER COLUMN id SET DEFAULT nextval('public.agendas_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: articles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles ALTER COLUMN id SET DEFAULT nextval('public.articles_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: assessment_methods id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods ALTER COLUMN id SET DEFAULT nextval('public.assessment_methods_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: available_course_groups id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups ALTER COLUMN id SET DEFAULT nextval('public.available_course_groups_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: available_course_lecturers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers ALTER COLUMN id SET DEFAULT nextval('public.available_course_lecturers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: available_courses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses ALTER COLUMN id SET DEFAULT nextval('public.available_courses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: calendar_committee_decisions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions ALTER COLUMN id SET DEFAULT nextval('public.calendar_committee_decisions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: calendar_event_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types ALTER COLUMN id SET DEFAULT nextval('public.calendar_event_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: calendar_events id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events ALTER COLUMN id SET DEFAULT nextval('public.calendar_events_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: calendars id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars ALTER COLUMN id SET DEFAULT nextval('public.calendars_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: certifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications ALTER COLUMN id SET DEFAULT nextval('public.certifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: cities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities ALTER COLUMN id SET DEFAULT nextval('public.cities_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: committee_decisions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions ALTER COLUMN id SET DEFAULT nextval('public.committee_decisions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: committee_meetings id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings ALTER COLUMN id SET DEFAULT nextval('public.committee_meetings_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: countries id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries ALTER COLUMN id SET DEFAULT nextval('public.countries_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: course_assessment_methods id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods ALTER COLUMN id SET DEFAULT nextval('public.course_assessment_methods_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: course_evaluation_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types ALTER COLUMN id SET DEFAULT nextval('public.course_evaluation_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: course_group_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_group_types ALTER COLUMN id SET DEFAULT nextval('public.course_group_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: course_groups id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups ALTER COLUMN id SET DEFAULT nextval('public.course_groups_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: course_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_types ALTER COLUMN id SET DEFAULT nextval('public.course_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: courses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses ALTER COLUMN id SET DEFAULT nextval('public.courses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: curriculum_course_groups id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups ALTER COLUMN id SET DEFAULT nextval('public.curriculum_course_groups_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: curriculum_courses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses ALTER COLUMN id SET DEFAULT nextval('public.curriculum_courses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: curriculum_programs id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs ALTER COLUMN id SET DEFAULT nextval('public.curriculum_programs_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: curriculum_semesters id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters ALTER COLUMN id SET DEFAULT nextval('public.curriculum_semesters_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: curriculums id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums ALTER COLUMN id SET DEFAULT nextval('public.curriculums_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: districts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts ALTER COLUMN id SET DEFAULT nextval('public.districts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: document_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.document_types ALTER COLUMN id SET DEFAULT nextval('public.document_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: duties id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties ALTER COLUMN id SET DEFAULT nextval('public.duties_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: employees id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees ALTER COLUMN id SET DEFAULT nextval('public.employees_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: evaluation_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types ALTER COLUMN id SET DEFAULT nextval('public.evaluation_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: friendly_id_slugs id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendly_id_slugs ALTER COLUMN id SET DEFAULT nextval('public.friendly_id_slugs_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: group_courses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses ALTER COLUMN id SET DEFAULT nextval('public.group_courses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: high_school_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.high_school_types ALTER COLUMN id SET DEFAULT nextval('public.high_school_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: identities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities ALTER COLUMN id SET DEFAULT nextval('public.identities_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: languages id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages ALTER COLUMN id SET DEFAULT nextval('public.languages_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: meeting_agendas id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas ALTER COLUMN id SET DEFAULT nextval('public.meeting_agendas_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: positions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions ALTER COLUMN id SET DEFAULT nextval('public.positions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: projects id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.projects_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: prospective_students id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students ALTER COLUMN id SET DEFAULT nextval('public.prospective_students_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: registration_documents id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents ALTER COLUMN id SET DEFAULT nextval('public.registration_documents_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_disability_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types ALTER COLUMN id SET DEFAULT nextval('public.student_disability_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_drop_out_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types ALTER COLUMN id SET DEFAULT nextval('public.student_drop_out_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_education_levels id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels ALTER COLUMN id SET DEFAULT nextval('public.student_education_levels_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_entrance_point_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types ALTER COLUMN id SET DEFAULT nextval('public.student_entrance_point_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_entrance_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types ALTER COLUMN id SET DEFAULT nextval('public.student_entrance_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_grades id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades ALTER COLUMN id SET DEFAULT nextval('public.student_grades_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_grading_systems id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems ALTER COLUMN id SET DEFAULT nextval('public.student_grading_systems_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_punishment_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types ALTER COLUMN id SET DEFAULT nextval('public.student_punishment_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: student_studentship_statuses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses ALTER COLUMN id SET DEFAULT nextval('public.student_studentship_statuses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: students id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students ALTER COLUMN id SET DEFAULT nextval('public.students_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: titles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.titles ALTER COLUMN id SET DEFAULT nextval('public.titles_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: unit_calendars id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars ALTER COLUMN id SET DEFAULT nextval('public.unit_calendars_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: unit_instruction_languages id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages ALTER COLUMN id SET DEFAULT nextval('public.unit_instruction_languages_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: unit_instruction_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types ALTER COLUMN id SET DEFAULT nextval('public.unit_instruction_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: unit_statuses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses ALTER COLUMN id SET DEFAULT nextval('public.unit_statuses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: unit_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types ALTER COLUMN id SET DEFAULT nextval('public.unit_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: units id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units ALTER COLUMN id SET DEFAULT nextval('public.units_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: university_types id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.university_types ALTER COLUMN id SET DEFAULT nextval('public.university_types_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); -- --- Name: academic_terms_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: academic_terms academic_terms_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.academic_terms @@ -3232,7 +3219,7 @@ ALTER TABLE ONLY public.academic_terms -- --- Name: action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: action_text_rich_texts action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.action_text_rich_texts @@ -3240,7 +3227,7 @@ ALTER TABLE ONLY public.action_text_rich_texts -- --- Name: active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: active_storage_attachments active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_attachments @@ -3248,7 +3235,7 @@ ALTER TABLE ONLY public.active_storage_attachments -- --- Name: active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: active_storage_blobs active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.active_storage_blobs @@ -3256,7 +3243,7 @@ ALTER TABLE ONLY public.active_storage_blobs -- --- Name: addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: addresses addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -3264,7 +3251,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: administrative_functions_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions administrative_functions_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3272,7 +3259,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: administrative_functions_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions administrative_functions_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3280,7 +3267,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: administrative_functions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: administrative_functions administrative_functions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.administrative_functions @@ -3288,7 +3275,7 @@ ALTER TABLE ONLY public.administrative_functions -- --- Name: agenda_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: agenda_types agenda_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agenda_types @@ -3296,7 +3283,7 @@ ALTER TABLE ONLY public.agenda_types -- --- Name: agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: agendas agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -3304,7 +3291,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.ar_internal_metadata @@ -3312,7 +3299,7 @@ ALTER TABLE ONLY public.ar_internal_metadata -- --- Name: articles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: articles articles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles @@ -3320,7 +3307,7 @@ ALTER TABLE ONLY public.articles -- --- Name: assessment_methods_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: assessment_methods assessment_methods_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods @@ -3328,7 +3315,7 @@ ALTER TABLE ONLY public.assessment_methods -- --- Name: assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: assessment_methods assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assessment_methods @@ -3336,7 +3323,7 @@ ALTER TABLE ONLY public.assessment_methods -- --- Name: available_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_groups available_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups @@ -3344,7 +3331,7 @@ ALTER TABLE ONLY public.available_course_groups -- --- Name: available_course_lecturers_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_lecturers available_course_lecturers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -3352,7 +3339,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: available_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses available_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -3360,7 +3347,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: calendar_committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_committee_decisions calendar_committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -3368,7 +3355,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: calendar_event_types_identifier_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types calendar_event_types_identifier_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3376,7 +3363,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_event_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types calendar_event_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3384,7 +3371,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_event_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_event_types calendar_event_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_event_types @@ -3392,7 +3379,7 @@ ALTER TABLE ONLY public.calendar_event_types -- --- Name: calendar_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_events calendar_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -3400,7 +3387,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: calendars calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars @@ -3408,7 +3395,7 @@ ALTER TABLE ONLY public.calendars -- --- Name: certifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: certifications certifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications @@ -3416,7 +3403,7 @@ ALTER TABLE ONLY public.certifications -- --- Name: cities_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: cities cities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities @@ -3424,7 +3411,7 @@ ALTER TABLE ONLY public.cities -- --- Name: committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: committee_decisions committee_decisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions @@ -3432,7 +3419,7 @@ ALTER TABLE ONLY public.committee_decisions -- --- Name: committee_meetings_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: committee_meetings committee_meetings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings @@ -3440,7 +3427,7 @@ ALTER TABLE ONLY public.committee_meetings -- --- Name: countries_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: countries countries_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries @@ -3448,7 +3435,7 @@ ALTER TABLE ONLY public.countries -- --- Name: countries_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: countries countries_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.countries @@ -3456,7 +3443,7 @@ ALTER TABLE ONLY public.countries -- --- Name: course_assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_assessment_methods course_assessment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -3464,7 +3451,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: course_evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_evaluation_types course_evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -3472,7 +3459,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: course_group_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_group_types course_group_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_group_types @@ -3480,7 +3467,7 @@ ALTER TABLE ONLY public.course_group_types -- --- Name: course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_groups course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -3488,7 +3475,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: course_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: course_types course_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_types @@ -3496,7 +3483,7 @@ ALTER TABLE ONLY public.course_types -- --- Name: courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: courses courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -3504,7 +3491,7 @@ ALTER TABLE ONLY public.courses -- --- Name: curriculum_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_course_groups curriculum_course_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -3512,7 +3499,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: curriculum_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_courses curriculum_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -3520,7 +3507,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: curriculum_programs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_programs curriculum_programs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -3528,7 +3515,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: curriculum_semesters_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_semesters curriculum_semesters_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters @@ -3536,7 +3523,7 @@ ALTER TABLE ONLY public.curriculum_semesters -- --- Name: curriculums_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: curriculums curriculums_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums @@ -3544,7 +3531,7 @@ ALTER TABLE ONLY public.curriculums -- --- Name: districts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: districts districts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts @@ -3552,7 +3539,7 @@ ALTER TABLE ONLY public.districts -- --- Name: document_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: document_types document_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.document_types @@ -3560,7 +3547,7 @@ ALTER TABLE ONLY public.document_types -- --- Name: duties_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: duties duties_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -3568,7 +3555,7 @@ ALTER TABLE ONLY public.duties -- --- Name: employees_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: employees employees_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -3576,7 +3563,7 @@ ALTER TABLE ONLY public.employees -- --- Name: evaluation_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: evaluation_types evaluation_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types @@ -3584,7 +3571,7 @@ ALTER TABLE ONLY public.evaluation_types -- --- Name: evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: evaluation_types evaluation_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.evaluation_types @@ -3592,7 +3579,7 @@ ALTER TABLE ONLY public.evaluation_types -- --- Name: friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: friendly_id_slugs friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendly_id_slugs @@ -3600,7 +3587,7 @@ ALTER TABLE ONLY public.friendly_id_slugs -- --- Name: group_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_courses group_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -3608,7 +3595,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: high_school_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: high_school_types high_school_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.high_school_types @@ -3616,7 +3603,7 @@ ALTER TABLE ONLY public.high_school_types -- --- Name: identities_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: identities identities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -3624,7 +3611,7 @@ ALTER TABLE ONLY public.identities -- --- Name: languages_iso_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages languages_iso_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3632,7 +3619,7 @@ ALTER TABLE ONLY public.languages -- --- Name: languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3640,7 +3627,7 @@ ALTER TABLE ONLY public.languages -- --- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: languages languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.languages @@ -3648,7 +3635,7 @@ ALTER TABLE ONLY public.languages -- --- Name: meeting_agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: meeting_agendas meeting_agendas_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -3656,7 +3643,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: positions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: positions positions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -3664,7 +3651,7 @@ ALTER TABLE ONLY public.positions -- --- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects @@ -3672,7 +3659,7 @@ ALTER TABLE ONLY public.projects -- --- Name: prospective_students_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students prospective_students_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -3680,7 +3667,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: registration_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: registration_documents registration_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -3688,7 +3675,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.schema_migrations @@ -3696,7 +3683,7 @@ ALTER TABLE ONLY public.schema_migrations -- --- Name: student_disability_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types student_disability_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3704,7 +3691,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_disability_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types student_disability_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3712,7 +3699,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_disability_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_disability_types student_disability_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_disability_types @@ -3720,7 +3707,7 @@ ALTER TABLE ONLY public.student_disability_types -- --- Name: student_drop_out_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types student_drop_out_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3728,7 +3715,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_drop_out_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types student_drop_out_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3736,7 +3723,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_drop_out_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_drop_out_types student_drop_out_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_drop_out_types @@ -3744,7 +3731,7 @@ ALTER TABLE ONLY public.student_drop_out_types -- --- Name: student_education_levels_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels student_education_levels_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3752,7 +3739,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_education_levels_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels student_education_levels_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3760,7 +3747,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_education_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_education_levels student_education_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_education_levels @@ -3768,7 +3755,7 @@ ALTER TABLE ONLY public.student_education_levels -- --- Name: student_entrance_point_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types student_entrance_point_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3776,7 +3763,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_point_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types student_entrance_point_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3784,7 +3771,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_point_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_point_types student_entrance_point_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_point_types @@ -3792,7 +3779,7 @@ ALTER TABLE ONLY public.student_entrance_point_types -- --- Name: student_entrance_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types student_entrance_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3800,7 +3787,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_entrance_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types student_entrance_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3808,7 +3795,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_entrance_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_entrance_types student_entrance_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_entrance_types @@ -3816,7 +3803,7 @@ ALTER TABLE ONLY public.student_entrance_types -- --- Name: student_grades_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades student_grades_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3824,7 +3811,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grades_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades student_grades_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3832,7 +3819,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grades_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grades student_grades_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grades @@ -3840,7 +3827,7 @@ ALTER TABLE ONLY public.student_grades -- --- Name: student_grading_systems_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems student_grading_systems_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3848,7 +3835,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_grading_systems_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems student_grading_systems_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3856,7 +3843,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_grading_systems_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_grading_systems student_grading_systems_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_grading_systems @@ -3864,7 +3851,7 @@ ALTER TABLE ONLY public.student_grading_systems -- --- Name: student_punishment_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types student_punishment_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3872,7 +3859,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_punishment_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types student_punishment_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3880,7 +3867,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_punishment_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_punishment_types student_punishment_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_punishment_types @@ -3888,7 +3875,7 @@ ALTER TABLE ONLY public.student_punishment_types -- --- Name: student_studentship_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses student_studentship_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3896,7 +3883,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: student_studentship_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses student_studentship_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3904,7 +3891,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: student_studentship_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: student_studentship_statuses student_studentship_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.student_studentship_statuses @@ -3912,7 +3899,7 @@ ALTER TABLE ONLY public.student_studentship_statuses -- --- Name: students_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: students students_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -3920,7 +3907,7 @@ ALTER TABLE ONLY public.students -- --- Name: titles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: titles titles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.titles @@ -3928,7 +3915,7 @@ ALTER TABLE ONLY public.titles -- --- Name: unit_calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_calendars unit_calendars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars @@ -3936,7 +3923,7 @@ ALTER TABLE ONLY public.unit_calendars -- --- Name: unit_instruction_languages_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages unit_instruction_languages_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3944,7 +3931,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages unit_instruction_languages_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3952,7 +3939,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_languages unit_instruction_languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_languages @@ -3960,7 +3947,7 @@ ALTER TABLE ONLY public.unit_instruction_languages -- --- Name: unit_instruction_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types unit_instruction_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3968,7 +3955,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_instruction_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types unit_instruction_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3976,7 +3963,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_instruction_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_instruction_types unit_instruction_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_instruction_types @@ -3984,7 +3971,7 @@ ALTER TABLE ONLY public.unit_instruction_types -- --- Name: unit_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses unit_statuses_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -3992,7 +3979,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses unit_statuses_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -4000,7 +3987,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_statuses unit_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_statuses @@ -4008,7 +3995,7 @@ ALTER TABLE ONLY public.unit_statuses -- --- Name: unit_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types unit_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4016,7 +4003,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: unit_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types unit_types_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4024,7 +4011,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: unit_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: unit_types unit_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_types @@ -4032,7 +4019,7 @@ ALTER TABLE ONLY public.unit_types -- --- Name: units_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: units units_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4040,7 +4027,7 @@ ALTER TABLE ONLY public.units -- --- Name: university_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: university_types university_types_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.university_types @@ -4048,7 +4035,7 @@ ALTER TABLE ONLY public.university_types -- --- Name: users_email_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users users_email_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4056,7 +4043,7 @@ ALTER TABLE ONLY public.users -- --- Name: users_id_number_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users users_id_number_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4064,7 +4051,7 @@ ALTER TABLE ONLY public.users -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4660,7 +4647,7 @@ CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING bt -- --- Name: fk_rails_0011c39cc3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_events fk_rails_0011c39cc3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -4668,7 +4655,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: fk_rails_02803298e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: calendars fk_rails_02803298e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendars @@ -4676,7 +4663,7 @@ ALTER TABLE ONLY public.calendars -- --- Name: fk_rails_051656b790; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: courses fk_rails_051656b790; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -4684,7 +4671,7 @@ ALTER TABLE ONLY public.courses -- --- Name: fk_rails_05369f2b5b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: meeting_agendas fk_rails_05369f2b5b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -4692,7 +4679,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: fk_rails_085e487ff3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_courses fk_rails_085e487ff3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -4700,7 +4687,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: fk_rails_11f2fa1aba; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: agendas fk_rails_11f2fa1aba; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -4708,7 +4695,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: fk_rails_148c9e88f4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: students fk_rails_148c9e88f4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -4716,7 +4703,7 @@ ALTER TABLE ONLY public.students -- --- Name: fk_rails_1b35a03564; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: duties fk_rails_1b35a03564; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -4724,7 +4711,7 @@ ALTER TABLE ONLY public.duties -- --- Name: fk_rails_1b98d66e19; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: addresses fk_rails_1b98d66e19; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -4732,7 +4719,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: fk_rails_2f3d74d701; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: registration_documents fk_rails_2f3d74d701; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -4740,7 +4727,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: fk_rails_3154ddd827; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: students fk_rails_3154ddd827; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.students @@ -4748,7 +4735,7 @@ ALTER TABLE ONLY public.students -- --- Name: fk_rails_32e14f7893; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_semesters fk_rails_32e14f7893; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_semesters @@ -4756,7 +4743,7 @@ ALTER TABLE ONLY public.curriculum_semesters -- --- Name: fk_rails_33195b0adb; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_programs fk_rails_33195b0adb; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -4764,7 +4751,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: fk_rails_3351011c48; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_assessment_methods fk_rails_3351011c48; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -4772,7 +4759,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: fk_rails_356137da91; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses fk_rails_356137da91; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -4780,7 +4767,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: fk_rails_3b3edaa11b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_courses fk_rails_3b3edaa11b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -4788,7 +4775,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: fk_rails_3befe032e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculums fk_rails_3befe032e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculums @@ -4796,7 +4783,7 @@ ALTER TABLE ONLY public.curriculums -- --- Name: fk_rails_3d31dad1cc; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: articles fk_rails_3d31dad1cc; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.articles @@ -4804,7 +4791,7 @@ ALTER TABLE ONLY public.articles -- --- Name: fk_rails_3f1a2d48dd; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: duties fk_rails_3f1a2d48dd; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.duties @@ -4812,7 +4799,7 @@ ALTER TABLE ONLY public.duties -- --- Name: fk_rails_40d03200ff; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_groups fk_rails_40d03200ff; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -4820,7 +4807,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: fk_rails_410eb899ca; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_410eb899ca; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4828,7 +4815,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_4126944f82; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: employees fk_rails_4126944f82; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -4836,7 +4823,7 @@ ALTER TABLE ONLY public.employees -- --- Name: fk_rails_4181a1584a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_courses fk_rails_4181a1584a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -4844,7 +4831,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: fk_rails_44d9592deb; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: committee_decisions fk_rails_44d9592deb; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_decisions @@ -4852,7 +4839,7 @@ ALTER TABLE ONLY public.committee_decisions -- --- Name: fk_rails_4783d78ac5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses fk_rails_4783d78ac5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -4860,7 +4847,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: fk_rails_47a7d8ee6a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: unit_calendars fk_rails_47a7d8ee6a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars @@ -4868,7 +4855,7 @@ ALTER TABLE ONLY public.unit_calendars -- --- Name: fk_rails_48c9e0c5a2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: addresses fk_rails_48c9e0c5a2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.addresses @@ -4876,7 +4863,7 @@ ALTER TABLE ONLY public.addresses -- --- Name: fk_rails_4af2ef6ebe; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_groups fk_rails_4af2ef6ebe; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_groups @@ -4884,7 +4871,7 @@ ALTER TABLE ONLY public.course_groups -- --- Name: fk_rails_4f3eb3da94; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_committee_decisions fk_rails_4f3eb3da94; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -4892,7 +4879,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: fk_rails_5373344100; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: identities fk_rails_5373344100; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -4900,7 +4887,7 @@ ALTER TABLE ONLY public.identities -- --- Name: fk_rails_54b90f3e1c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_54b90f3e1c; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -4908,7 +4895,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_5503b9bced; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_programs fk_rails_5503b9bced; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_programs @@ -4916,7 +4903,7 @@ ALTER TABLE ONLY public.curriculum_programs -- --- Name: fk_rails_5951990ba9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_5951990ba9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4924,7 +4911,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_5d6264c4f2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_committee_decisions fk_rails_5d6264c4f2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_committee_decisions @@ -4932,7 +4919,7 @@ ALTER TABLE ONLY public.calendar_committee_decisions -- --- Name: fk_rails_64d7b22524; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: calendar_events fk_rails_64d7b22524; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.calendar_events @@ -4940,7 +4927,7 @@ ALTER TABLE ONLY public.calendar_events -- --- Name: fk_rails_694b3fc610; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: meeting_agendas fk_rails_694b3fc610; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.meeting_agendas @@ -4948,7 +4935,7 @@ ALTER TABLE ONLY public.meeting_agendas -- --- Name: fk_rails_728bb39a67; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_courses fk_rails_728bb39a67; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_courses @@ -4956,7 +4943,7 @@ ALTER TABLE ONLY public.group_courses -- --- Name: fk_rails_78999e7b17; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: positions fk_rails_78999e7b17; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -4964,7 +4951,7 @@ ALTER TABLE ONLY public.positions -- --- Name: fk_rails_83a021318e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_83a021318e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -4972,7 +4959,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_8540afbff7; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: identities fk_rails_8540afbff7; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.identities @@ -4980,7 +4967,7 @@ ALTER TABLE ONLY public.identities -- --- Name: fk_rails_86397e28ff; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_lecturers fk_rails_86397e28ff; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -4988,7 +4975,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: fk_rails_89bfbfdd76; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_course_groups fk_rails_89bfbfdd76; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -4996,7 +4983,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: fk_rails_8ab0da65e4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_8ab0da65e4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -5004,7 +4991,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_8d264a5cbc; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: positions fk_rails_8d264a5cbc; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.positions @@ -5012,7 +4999,7 @@ ALTER TABLE ONLY public.positions -- --- Name: fk_rails_917e7d3603; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_lecturers fk_rails_917e7d3603; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_lecturers @@ -5020,7 +5007,7 @@ ALTER TABLE ONLY public.available_course_lecturers -- --- Name: fk_rails_92c48f7cf2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: districts fk_rails_92c48f7cf2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.districts @@ -5028,7 +5015,7 @@ ALTER TABLE ONLY public.districts -- --- Name: fk_rails_93498b6370; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_93498b6370; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5036,7 +5023,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_996e05be41; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: cities fk_rails_996e05be41; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.cities @@ -5044,7 +5031,7 @@ ALTER TABLE ONLY public.cities -- --- Name: fk_rails_99ad041748; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: certifications fk_rails_99ad041748; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certifications @@ -5052,7 +5039,7 @@ ALTER TABLE ONLY public.certifications -- --- Name: fk_rails_a6111d55a4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_a6111d55a4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5060,7 +5047,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_a72394c071; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: courses fk_rails_a72394c071; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -5068,7 +5055,7 @@ ALTER TABLE ONLY public.courses -- --- Name: fk_rails_a7647dd384; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: registration_documents fk_rails_a7647dd384; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -5076,7 +5063,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: fk_rails_a9099f01f5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses fk_rails_a9099f01f5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5084,7 +5071,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: fk_rails_b1c146f76e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_b1c146f76e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5092,7 +5079,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_b25d062eb5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_evaluation_types fk_rails_b25d062eb5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -5100,7 +5087,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: fk_rails_b872a6760a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects fk_rails_b872a6760a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.projects @@ -5108,7 +5095,7 @@ ALTER TABLE ONLY public.projects -- --- Name: fk_rails_b92b5eaf98; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: agendas fk_rails_b92b5eaf98; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.agendas @@ -5116,7 +5103,7 @@ ALTER TABLE ONLY public.agendas -- --- Name: fk_rails_bb4be290e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_evaluation_types fk_rails_bb4be290e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_evaluation_types @@ -5124,7 +5111,7 @@ ALTER TABLE ONLY public.course_evaluation_types -- --- Name: fk_rails_c4a7c8b06e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses fk_rails_c4a7c8b06e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5132,7 +5119,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: fk_rails_cb5582d97e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: courses fk_rails_cb5582d97e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.courses @@ -5140,7 +5127,7 @@ ALTER TABLE ONLY public.courses -- --- Name: fk_rails_cb709e42ad; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: registration_documents fk_rails_cb709e42ad; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registration_documents @@ -5148,7 +5135,7 @@ ALTER TABLE ONLY public.registration_documents -- --- Name: fk_rails_d94afad69b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_d94afad69b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5156,7 +5143,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_db99877142; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_db99877142; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -5164,7 +5151,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_dcfd3d4fc3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: employees fk_rails_dcfd3d4fc3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.employees @@ -5172,7 +5159,7 @@ ALTER TABLE ONLY public.employees -- --- Name: fk_rails_e756d4597e; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_courses fk_rails_e756d4597e; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_courses @@ -5180,7 +5167,7 @@ ALTER TABLE ONLY public.curriculum_courses -- --- Name: fk_rails_ea494f8318; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: units fk_rails_ea494f8318; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.units @@ -5188,7 +5175,7 @@ ALTER TABLE ONLY public.units -- --- Name: fk_rails_ea9bbc92e2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prospective_students fk_rails_ea9bbc92e2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prospective_students @@ -5196,7 +5183,7 @@ ALTER TABLE ONLY public.prospective_students -- --- Name: fk_rails_edbeba9693; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_course_groups fk_rails_edbeba9693; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_course_groups @@ -5204,7 +5191,7 @@ ALTER TABLE ONLY public.available_course_groups -- --- Name: fk_rails_f0035661f5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: curriculum_course_groups fk_rails_f0035661f5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.curriculum_course_groups @@ -5212,7 +5199,7 @@ ALTER TABLE ONLY public.curriculum_course_groups -- --- Name: fk_rails_f2b5f80e2c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: course_assessment_methods fk_rails_f2b5f80e2c; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.course_assessment_methods @@ -5220,7 +5207,7 @@ ALTER TABLE ONLY public.course_assessment_methods -- --- Name: fk_rails_f75b60bc6a; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: available_courses fk_rails_f75b60bc6a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.available_courses @@ -5228,7 +5215,7 @@ ALTER TABLE ONLY public.available_courses -- --- Name: fk_rails_f85b219ea4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: committee_meetings fk_rails_f85b219ea4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.committee_meetings @@ -5236,7 +5223,7 @@ ALTER TABLE ONLY public.committee_meetings -- --- Name: fk_rails_faff5aa83d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: unit_calendars fk_rails_faff5aa83d; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.unit_calendars From 4b7f2f9f8fc1c79a8703e92fd28d4a87986619e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 3 Apr 2019 10:04:55 +0300 Subject: [PATCH 117/279] Update app/views/account/activations/_js.html.erb Co-Authored-By: ecmelkytz --- app/views/account/activations/_js.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb index 88820f413..43875d92b 100644 --- a/app/views/account/activations/_js.html.erb +++ b/app/views/account/activations/_js.html.erb @@ -8,7 +8,7 @@ configure_disabled_params() function configure_disabled_params() { - if($('#activation_serial').val().length || $('#activation_serial_no').val().length) { + if ($('#activation_serial').val().length || $('#activation_serial_no').val().length) { $('#activation_document_no').prop('disabled', true) $("label[for='activation_document_no']").addClass('text-muted') } From 8444f08ad8e2800b08f4c2d8f17fbd2ff48d9493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 3 Apr 2019 10:05:07 +0300 Subject: [PATCH 118/279] Update app/views/account/activations/_js.html.erb Co-Authored-By: ecmelkytz --- app/views/account/activations/_js.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb index 43875d92b..4bec05468 100644 --- a/app/views/account/activations/_js.html.erb +++ b/app/views/account/activations/_js.html.erb @@ -12,7 +12,7 @@ $('#activation_document_no').prop('disabled', true) $("label[for='activation_document_no']").addClass('text-muted') } - if($('#activation_document_no').val().length) { + if ($('#activation_document_no').val().length) { $('#activation_serial, #activation_serial_no').prop('disabled', true) $("label[for='activation_serial'], label[for='activation_serial_no']").addClass('text-muted') $('#span_serial, #span_serial_no').addClass('text-muted') From 87b35cad16cc2606d225b2d506b933d18a874a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 3 Apr 2019 10:05:18 +0300 Subject: [PATCH 119/279] Update app/views/account/activations/_js.html.erb Co-Authored-By: ecmelkytz --- app/views/account/activations/_js.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb index 4bec05468..93147d3d0 100644 --- a/app/views/account/activations/_js.html.erb +++ b/app/views/account/activations/_js.html.erb @@ -20,7 +20,7 @@ }; $('#activation_serial, #activation_serial_no').on('input', function() { - if($('#activation_serial').val().length || $('#activation_serial_no').val().length) { + if ($('#activation_serial').val().length || $('#activation_serial_no').val().length) { $('#activation_document_no').prop('disabled', true) $("label[for='activation_document_no']").addClass('text-muted') } else { From 16b94a7d79b4b00142d63661b52032ce9eb0ec24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 3 Apr 2019 10:05:26 +0300 Subject: [PATCH 120/279] Update app/views/account/activations/_js.html.erb Co-Authored-By: ecmelkytz --- app/views/account/activations/_js.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb index 93147d3d0..681ca6e35 100644 --- a/app/views/account/activations/_js.html.erb +++ b/app/views/account/activations/_js.html.erb @@ -30,7 +30,7 @@ }); $('#activation_document_no').on('input', function() { - if($(this).val().length) { + if ($(this).val().length) { $('#activation_serial, #activation_serial_no').prop('disabled', true) $("label[for='activation_serial'], label[for='activation_serial_no']").addClass('text-muted') $('#span_serial, #span_serial_no').addClass('text-muted') From 3389d66997be0eb4f82cdab4eb7ed8cffe03f91e Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Wed, 3 Apr 2019 10:46:40 +0300 Subject: [PATCH 121/279] Change module name from activatable to activation --- app/controllers/account/activations_controller.rb | 4 ++-- .../{activatable => activation}/activation_service.rb | 8 +++++--- config/locales/controllers/account/activations.en.yml | 2 +- config/locales/controllers/account/activations.tr.yml | 2 +- .../activation_service_test.rb | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) rename app/services/{activatable => activation}/activation_service.rb (96%) rename test/services/{activatable => activation}/activation_service_test.rb (97%) diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 0788fa862..54129acf1 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -7,11 +7,11 @@ class ActivationsController < ApplicationController layout 'guest' def new - @activation = Activatable::ActivationService.new + @activation = Activation::ActivationService.new end def create - @activation = Activatable::ActivationService.new(params[:activation]) + @activation = Activation::ActivationService.new(params[:activation]) if @activation.active redirect_to login_path, notice: t('.success') diff --git a/app/services/activatable/activation_service.rb b/app/services/activation/activation_service.rb similarity index 96% rename from app/services/activatable/activation_service.rb rename to app/services/activation/activation_service.rb index 6d0466aad..555cbf061 100644 --- a/app/services/activatable/activation_service.rb +++ b/app/services/activation/activation_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Activatable +module Activation class ActivationService include ActiveModel::Validations @@ -67,8 +67,10 @@ def active return unless valid? process - rescue StandardError - errors.add(:base, I18n.t('.account.activations.system_error')) && false + rescue StandardError => err + Rails.logger.error err.message + errors.add(:base, I18n.t('.account.activations.system_error')) + false end private diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index df3a6ad41..94c38c51c 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -1,7 +1,7 @@ en: activemodel: attributes: - activatable/activation_service: &activation_attributes + activation/activation_service: &activation_attributes country: Country date_of_birth: Date of Birth document_no: Document No diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index 43fa5aa9e..bf6eec238 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -1,7 +1,7 @@ tr: activemodel: attributes: - activatable/activation_service: &activation_attributes + activation/activation_service: &activation_attributes country: Ülke date_of_birth: Doğum Tarihi document_no: Doküman No diff --git a/test/services/activatable/activation_service_test.rb b/test/services/activation/activation_service_test.rb similarity index 97% rename from test/services/activatable/activation_service_test.rb rename to test/services/activation/activation_service_test.rb index 5961d0db5..033d01261 100644 --- a/test/services/activatable/activation_service_test.rb +++ b/test/services/activation/activation_service_test.rb @@ -2,13 +2,13 @@ require 'test_helper' -module Activatable +module Activation class ActivationServiceTest < ActiveSupport::TestCase setup do prospective = prospective_students(:mine) @activation = - Activatable::ActivationService.new( + Activation::ActivationService.new( id_number: prospective.id_number, first_name: prospective.first_name, last_name: prospective.last_name, From aaeff19b4afab1da583902745f96f9290962c560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 3 Apr 2019 12:26:11 +0300 Subject: [PATCH 122/279] markdownlint: Allow br tag --- .markdownlintrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.markdownlintrc b/.markdownlintrc index 8384db3e4..81ec8e421 100644 --- a/.markdownlintrc +++ b/.markdownlintrc @@ -15,5 +15,8 @@ }, "MD029": { "style": "ordered" + }, + "MD033": { + "allowed_elements": ["br"] } } From 5f88f2756edc1bf9b88015c75034a58bab0b034f Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Wed, 3 Apr 2019 15:12:36 +0300 Subject: [PATCH 123/279] Add active_for_authentication? method to user model --- app/models/user.rb | 8 ++++++++ config/locales/controllers/account/devise.en.yml | 1 + config/locales/controllers/account/devise.tr.yml | 1 + 3 files changed, 10 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index a7110d24d..36e1a0152 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -101,6 +101,14 @@ def self.with_most_projects where.not(projects_count: 0).order('projects_count desc').limit(10) end + def active_for_authentication? + super && activated? + end + + def inactive_message + activated? ? super : :account_not_activated + end + private def build_address_information diff --git a/config/locales/controllers/account/devise.en.yml b/config/locales/controllers/account/devise.en.yml index e20522d82..4bddf7968 100644 --- a/config/locales/controllers/account/devise.en.yml +++ b/config/locales/controllers/account/devise.en.yml @@ -1,6 +1,7 @@ en: devise: failure: + account_not_activated: Your account is not activated. Firstly activate your account please. already_authenticated: You are already signed in. inactive: Your account is not activated yet. invalid: "Invalid %{authentication_keys} or password." diff --git a/config/locales/controllers/account/devise.tr.yml b/config/locales/controllers/account/devise.tr.yml index 748a7c903..56546ccb9 100644 --- a/config/locales/controllers/account/devise.tr.yml +++ b/config/locales/controllers/account/devise.tr.yml @@ -1,6 +1,7 @@ tr: devise: failure: + account_not_activated: Hesabınız aktif değil. Lütfen önce hesabınızı aktifleştirin. already_authenticated: Zaten giriş yaptınız. inactive: Hesabınız henüz aktif edilmedi. invalid: "Geçersiz %{authentication_keys} veya parola." From 684e9ca35b9fbc630b0fe62988007cde1c666250 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Wed, 3 Apr 2019 15:21:23 +0300 Subject: [PATCH 124/279] Add activation status test to user --- test/models/user_test.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/models/user_test.rb b/test/models/user_test.rb index eb65d6588..e4342ee08 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -127,4 +127,9 @@ class UserTest < ActiveSupport::TestCase ) end end + + test 'check user activation status' do + assert users(:john).active_for_authentication? # activated user + assert_not users(:mine).active_for_authentication? # not activated user + end end From 45015c3bcafab010e7222ec27dd23bf9283d0993 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Wed, 3 Apr 2019 15:31:27 +0300 Subject: [PATCH 125/279] Change class name from activation_service to student_activation_service --- app/controllers/account/activations_controller.rb | 4 ++-- .../{activation_service.rb => student_activation_service.rb} | 2 +- ...ion_service_test.rb => student_activation_service_test.rb} | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename app/services/activation/{activation_service.rb => student_activation_service.rb} (98%) rename test/services/activation/{activation_service_test.rb => student_activation_service_test.rb} (94%) diff --git a/app/controllers/account/activations_controller.rb b/app/controllers/account/activations_controller.rb index 54129acf1..5c3a8741c 100644 --- a/app/controllers/account/activations_controller.rb +++ b/app/controllers/account/activations_controller.rb @@ -7,11 +7,11 @@ class ActivationsController < ApplicationController layout 'guest' def new - @activation = Activation::ActivationService.new + @activation = Activation::StudentActivationService.new end def create - @activation = Activation::ActivationService.new(params[:activation]) + @activation = Activation::StudentActivationService.new(params[:activation]) if @activation.active redirect_to login_path, notice: t('.success') diff --git a/app/services/activation/activation_service.rb b/app/services/activation/student_activation_service.rb similarity index 98% rename from app/services/activation/activation_service.rb rename to app/services/activation/student_activation_service.rb index 555cbf061..22d21011a 100644 --- a/app/services/activation/activation_service.rb +++ b/app/services/activation/student_activation_service.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Activation - class ActivationService + class StudentActivationService include ActiveModel::Validations attr_accessor :country, diff --git a/test/services/activation/activation_service_test.rb b/test/services/activation/student_activation_service_test.rb similarity index 94% rename from test/services/activation/activation_service_test.rb rename to test/services/activation/student_activation_service_test.rb index 033d01261..ab9459768 100644 --- a/test/services/activation/activation_service_test.rb +++ b/test/services/activation/student_activation_service_test.rb @@ -3,12 +3,12 @@ require 'test_helper' module Activation - class ActivationServiceTest < ActiveSupport::TestCase + class StudentActivationServiceTest < ActiveSupport::TestCase setup do prospective = prospective_students(:mine) @activation = - Activation::ActivationService.new( + Activation::StudentActivationService.new( id_number: prospective.id_number, first_name: prospective.first_name, last_name: prospective.last_name, From 3c8103c647f79cc8a9cd39dc5d7a0ca6f0f5aa98 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Wed, 3 Apr 2019 19:50:34 +0300 Subject: [PATCH 126/279] Refactor activation js Co-Authored-By: isubas --- app/views/account/activations/_js.html.erb | 48 +++++++++------------- app/views/layouts/guest.html.erb | 3 ++ 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/app/views/account/activations/_js.html.erb b/app/views/account/activations/_js.html.erb index 681ca6e35..027d6d7be 100644 --- a/app/views/account/activations/_js.html.erb +++ b/app/views/account/activations/_js.html.erb @@ -1,45 +1,35 @@ diff --git a/app/views/layouts/guest.html.erb b/app/views/layouts/guest.html.erb index 3af6088b4..d64ff13a5 100644 --- a/app/views/layouts/guest.html.erb +++ b/app/views/layouts/guest.html.erb @@ -4,6 +4,9 @@ <%= render 'layouts/shared/meta' %> <%= stylesheet_link_tag 'guest', media: 'all' %> <%= javascript_include_tag 'guest' %> +
    From ee074abda37d5ab81d32353fadb452234a877054 Mon Sep 17 00:00:00 2001 From: msdundar Date: Thu, 4 Apr 2019 16:21:10 +0300 Subject: [PATCH 127/279] Upgrade dependencies --- Gemfile.lock | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index aebacc2e9..3dfb3b9ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: 4ec486145290efb4059b64e84a2bfd9e157bf787 + revision: fd81e83be7a6fcaa34467ff3d01ab6f66c922d6c specs: actioncable (6.0.0.beta3) actionpack (= 6.0.0.beta3) @@ -56,6 +56,7 @@ GIT activesupport (= 6.0.0.beta3) activestorage (6.0.0.beta3) actionpack (= 6.0.0.beta3) + activejob (= 6.0.0.beta3) activerecord (= 6.0.0.beta3) marcel (~> 0.3.1) activesupport (6.0.0.beta3) @@ -63,7 +64,7 @@ GIT i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 1.4, >= 1.4.2) + zeitwerk (~> 1.4, >= 1.4.3) rails (6.0.0.beta3) actioncable (= 6.0.0.beta3) actionmailbox (= 6.0.0.beta3) @@ -88,7 +89,7 @@ GIT GIT remote: https://github.com/rails/web-console.git - revision: 3b0e6d6521f46d347bb42252865c3c87b8a84b65 + revision: bba90ba6001723a1414d5f196a9793c1ac5b46ce specs: web-console (3.7.0) actionview (>= 5.2) @@ -133,8 +134,8 @@ GEM authy (2.7.5) httpclient (>= 2.5.3.3) aws-eventstream (1.0.2) - aws-partitions (1.146.0) - aws-sdk-core (3.48.2) + aws-partitions (1.149.0) + aws-sdk-core (3.48.3) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1.0) aws-sigv4 (~> 1.1) @@ -142,7 +143,7 @@ GEM aws-sdk-kms (1.16.0) aws-sdk-core (~> 3, >= 3.48.2) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.35.0) + aws-sdk-s3 (1.36.0) aws-sdk-core (~> 3, >= 3.48.2) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.0) @@ -157,8 +158,8 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties - bindex (0.5.0) - bootsnap (1.4.1) + bindex (0.6.0) + bootsnap (1.4.2) msgpack (~> 1.0) brakeman (4.5.0) builder (3.2.3) @@ -166,7 +167,7 @@ GEM bundler (>= 1.2.0, < 3) thor (~> 0.18) byebug (11.0.1) - capybara (3.15.0) + capybara (3.16.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -193,16 +194,16 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.4) - devise (4.6.1) + devise (4.6.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 6.0) responders warden (~> 1.2.3) docile (1.3.1) - dotenv (2.7.1) - dotenv-rails (2.7.1) - dotenv (= 2.7.1) + dotenv (2.7.2) + dotenv-rails (2.7.2) + dotenv (= 2.7.2) railties (>= 3.2, < 6.1) email_address (0.1.11) netaddr (~> 2.0) @@ -252,10 +253,10 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - lol_dba (2.1.5) - actionpack (>= 3.0) - activerecord (>= 3.0) - railties (>= 3.0) + lol_dba (2.1.7) + actionpack (>= 3.0, < 6.0) + activerecord (>= 3.0, < 6.0) + railties (>= 3.0, < 6.0) loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -277,11 +278,11 @@ GEM nexmo (5.6.0) jwt (~> 2) nio4r (2.3.1) - nokogiri (1.10.1) + nokogiri (1.10.2) mini_portile2 (~> 2.4.0) orm_adapter (0.5.0) - pagy (2.1.3) - parallel (1.14.0) + pagy (2.1.5) + parallel (1.17.0) parser (2.6.2.0) ast (~> 2.4.0) pg (1.1.4) @@ -299,7 +300,7 @@ GEM public_suffix (3.0.3) puma (3.12.1) pwned (1.2.1) - rack (2.0.6) + rack (2.0.7) rack-attack (5.4.2) rack (>= 1.0, < 3) rack-mini-profiler (1.0.2) @@ -321,7 +322,7 @@ GEM rb-inotify (0.10.0) ffi (~> 1.0) redis (4.1.0) - regexp_parser (1.3.0) + regexp_parser (1.4.0) rein (4.0.0) activerecord (>= 4.0.0, < 6) activesupport (>= 4.0.0, < 6) @@ -404,7 +405,7 @@ GEM uniform_notifier (1.12.1) warden (1.2.8) rack (>= 2.0.6) - webdrivers (3.7.0) + webdrivers (3.7.2) net_http_ssl_fix nokogiri (~> 1.6) rubyzip (~> 1.0) @@ -420,11 +421,11 @@ GEM websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - wicked_pdf (1.2.1) + wicked_pdf (1.2.2) activesupport xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (1.4.2) + zeitwerk (1.4.3) PLATFORMS ruby From f54d342d66aa1a72479f15e7b4e6d05659aba356 Mon Sep 17 00:00:00 2001 From: msdundar Date: Thu, 4 Apr 2019 16:25:54 +0300 Subject: [PATCH 128/279] Upgrade yarn dependencies --- yarn.lock | 454 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 239 insertions(+), 215 deletions(-) diff --git a/yarn.lock b/yarn.lock index 95d7a244a..9c96242b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,16 +10,16 @@ "@babel/highlight" "^7.0.0" "@babel/core@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.0.tgz#248fd6874b7d755010bfe61f557461d4f446d9e9" - integrity sha512-Dzl7U0/T69DFOTwqz/FJdnOSWS57NpjNfCwMKHABr589Lg8uX1RrlBIJ7L5Dubt/xkLsx0xH5EBFzlBVes1ayA== + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f" + integrity sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.4.0" - "@babel/helpers" "^7.4.0" - "@babel/parser" "^7.4.0" + "@babel/helpers" "^7.4.3" + "@babel/parser" "^7.4.3" "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.0" + "@babel/traverse" "^7.4.3" "@babel/types" "^7.4.0" convert-source-map "^1.1.0" debug "^4.1.0" @@ -65,9 +65,9 @@ "@babel/types" "^7.4.0" "@babel/helper-create-class-features-plugin@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.0.tgz#30fd090e059d021995c1762a5b76798fa0b51d82" - integrity sha512-2K8NohdOT7P6Vyp23QH4w2IleP8yG3UJsbRKwA4YP6H8fErcLkFuuEEqbF2/BYBKSNci/FWJiqm6R3VhM/QHgw== + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz#5bbd279c6c3ac6a60266b89bbfe7f8021080a1ef" + integrity sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" @@ -130,17 +130,17 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-module-transforms@^7.1.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" - integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== +"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz#b1e357a1c49e58a47211a6853abb8e2aaefeb064" + integrity sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" "@babel/template" "^7.2.2" "@babel/types" "^7.2.2" - lodash "^4.17.10" + lodash "^4.17.11" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" @@ -154,12 +154,12 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== -"@babel/helper-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" - integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== +"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.3.tgz#9d6e5428bfd638ab53b37ae4ec8caf0477495147" + integrity sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA== dependencies: - lodash "^4.17.10" + lodash "^4.17.11" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" @@ -207,13 +207,13 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.4.0": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.2.tgz#3bdfa46a552ca77ef5a0f8551be5f0845ae989be" - integrity sha512-gQR1eQeroDzFBikhrCccm5Gs2xBjZ57DNjGbqTaHo911IpmSxflOQWMAHPw/TXk8L3isv7s9lYzUkexOeTQUYg== +"@babel/helpers@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.3.tgz#7b1d354363494b31cb9a2417ae86af32b7853a3b" + integrity sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q== dependencies: "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.0" + "@babel/traverse" "^7.4.3" "@babel/types" "^7.4.0" "@babel/highlight@^7.0.0": @@ -225,10 +225,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.0": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.2.tgz#b4521a400cb5a871eab3890787b4bc1326d38d91" - integrity sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g== +"@babel/parser@^7.4.0", "@babel/parser@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.3.tgz#eb3ac80f64aa101c907d4ce5406360fe75b7895b" + integrity sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ== "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" @@ -255,10 +255,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.3.4", "@babel/plugin-proposal-object-rest-spread@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.0.tgz#e4960575205eadf2a1ab4e0c79f9504d5b82a97f" - integrity sha512-uTNi8pPYyUH2eWHyYWWSYJKwKg34hhgl4/dbejEjL+64OhbHjTX7wEVWMQl82tEmdDsGeu77+s8HHLS627h6OQ== +"@babel/plugin-proposal-object-rest-spread@^7.3.4", "@babel/plugin-proposal-object-rest-spread@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz#be27cd416eceeba84141305b93c282f5de23bbb4" + integrity sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -346,10 +346,10 @@ "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.11" -"@babel/plugin-transform-classes@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.0.tgz#e3428d3c8a3d01f33b10c529b998ba1707043d4d" - integrity sha512-XGg1Mhbw4LDmrO9rSTNe+uI79tQPdGs0YASlxgweYRLZqo/EQktjaOV4tchL/UZbM0F+/94uOipmdNGoaGOEYg== +"@babel/plugin-transform-classes@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz#adc7a1137ab4287a555d429cc56ecde8f40c062c" + integrity sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.4.0" @@ -367,21 +367,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.3.2", "@babel/plugin-transform-destructuring@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.0.tgz#acbb9b2418d290107db333f4d6cd8aa6aea00343" - integrity sha512-HySkoatyYTY3ZwLI8GGvkRWCFrjAGXUHur5sMecmCIdIharnlcWWivOqDJI76vvmVZfzwb6G08NREsrY96RhGQ== +"@babel/plugin-transform-destructuring@^7.3.2", "@babel/plugin-transform-destructuring@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz#1a95f5ca2bf2f91ef0648d5de38a8d472da4350f" + integrity sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" - integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== +"@babel/plugin-transform-dotall-regex@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz#fceff1c16d00c53d32d980448606f812cd6d02bf" + integrity sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.3" + regexpu-core "^4.5.4" "@babel/plugin-transform-duplicate-keys@^7.2.0": version "7.2.0" @@ -398,17 +398,17 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-for-of@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.0.tgz#56c8c36677f5d4a16b80b12f7b768de064aaeb5f" - integrity sha512-vWdfCEYLlYSxbsKj5lGtzA49K3KANtb8qCPQ1em07txJzsBwY+cKJzBHizj5fl3CCx7vt+WPdgDLTHmydkbQSQ== +"@babel/plugin-transform-for-of@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz#c36ff40d893f2b8352202a2558824f70cd75e9fe" + integrity sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" - integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== +"@babel/plugin-transform-function-name@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz#130c27ec7fb4f0cba30e958989449e5ec8d22bbd" + integrity sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -420,6 +420,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-member-expression-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-modules-amd@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" @@ -428,12 +435,12 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.0.tgz#3b8ec61714d3b75d20c5ccfa157f2c2e087fd4ca" - integrity sha512-iWKAooAkipG7g1IY0eah7SumzfnIT3WNhT4uYB2kIsvHnNSB6MDYVa5qyICSwaTBDBY2c4SnJ3JtEa6ltJd6Jw== +"@babel/plugin-transform-modules-commonjs@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz#3917f260463ac08f8896aa5bd54403f6e1fed165" + integrity sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA== dependencies: - "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-module-transforms" "^7.4.3" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" @@ -475,26 +482,40 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.0.tgz#a1309426fac4eecd2a9439a4c8c35124a11a48a9" - integrity sha512-Xqv6d1X+doyiuCGDoVJFtlZx0onAX0tnc3dY8w71pv/O0dODAbusVv2Ale3cGOwfiyi895ivOBhYa9DhAM8dUA== +"@babel/plugin-transform-parameters@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz#e5ff62929fdf4cf93e58badb5e2430303003800d" + integrity sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA== dependencies: "@babel/helper-call-delegate" "^7.4.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-regenerator@^7.3.4", "@babel/plugin-transform-regenerator@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.0.tgz#0780e27ee458cc3fdbad18294d703e972ae1f6d1" - integrity sha512-SZ+CgL4F0wm4npojPU6swo/cK4FcbLgxLd4cWpHaNXY/NJ2dpahODCqBbAwb2rDmVszVb3SSjnk9/vik3AYdBw== +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" + integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.3.4", "@babel/plugin-transform-regenerator@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz#2a697af96887e2bbf5d303ab0221d139de5e739c" + integrity sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A== dependencies: regenerator-transform "^0.13.4" +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-runtime@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.0.tgz#b4d8c925ed957471bc57e0b9da53408ebb1ed457" - integrity sha512-1uv2h9wnRj98XX3g0l4q+O3jFM6HfayKup7aIu4pnnlzGz0H+cYckGBC74FZIWJXJSXAmeJ9Yu5Gg2RQpS4hWg== + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz#4d6691690ecdc9f5cb8c3ab170a1576c1f556371" + integrity sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -538,33 +559,33 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" - integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== +"@babel/plugin-transform-unicode-regex@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz#3868703fc0e8f443dda65654b298df576f7b863b" + integrity sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.3" + regexpu-core "^4.5.4" -"@babel/polyfill@^7.2.5": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.0.tgz#90f9d68ae34ac42ab4b4aa03151848f536960218" - integrity sha512-bVsjsrtsDflIHp5I6caaAa2V25Kzn50HKPL6g3X0P0ni1ks+58cPB8Mz6AOKVuRPgaVdq/OwEUc/1vKqX+Mo4A== +"@babel/polyfill@^7.2.5", "@babel/polyfill@^7.4.0": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.3.tgz#332dc6f57b718017c3a8b37b4eea8aa6eeac1187" + integrity sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q== dependencies: core-js "^2.6.5" regenerator-runtime "^0.13.2" "@babel/preset-env@^7.3.4": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.2.tgz#2f5ba1de2daefa9dcca653848f96c7ce2e406676" - integrity sha512-OEz6VOZaI9LW08CWVS3d9g/0jZA6YCn1gsKIy/fut7yZCJti5Lm1/Hi+uo/U+ODm7g4I6gULrCP+/+laT8xAsA== + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.3.tgz#e71e16e123dc0fbf65a52cbcbcefd072fbd02880" + integrity sha512-FYbZdV12yHdJU5Z70cEg0f6lvtpZ8jFSDakTm7WXeJbLXh4R0ztGEu/SW7G1nJ2ZvKwDhz8YrbA84eYyprmGqw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.4.0" + "@babel/plugin-proposal-object-rest-spread" "^7.4.3" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" "@babel/plugin-proposal-unicode-property-regex" "^7.4.0" "@babel/plugin-syntax-async-generators" "^7.2.0" @@ -575,41 +596,44 @@ "@babel/plugin-transform-async-to-generator" "^7.4.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" "@babel/plugin-transform-block-scoping" "^7.4.0" - "@babel/plugin-transform-classes" "^7.4.0" + "@babel/plugin-transform-classes" "^7.4.3" "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.4.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.4.3" + "@babel/plugin-transform-dotall-regex" "^7.4.3" "@babel/plugin-transform-duplicate-keys" "^7.2.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.4.0" - "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.3" + "@babel/plugin-transform-function-name" "^7.4.3" "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.4.0" + "@babel/plugin-transform-modules-commonjs" "^7.4.3" "@babel/plugin-transform-modules-systemjs" "^7.4.0" "@babel/plugin-transform-modules-umd" "^7.2.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.2" "@babel/plugin-transform-new-target" "^7.4.0" "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.4.0" - "@babel/plugin-transform-regenerator" "^7.4.0" + "@babel/plugin-transform-parameters" "^7.4.3" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.3" + "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" "@babel/plugin-transform-spread" "^7.2.0" "@babel/plugin-transform-sticky-regex" "^7.2.0" "@babel/plugin-transform-template-literals" "^7.2.0" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.3" "@babel/types" "^7.4.0" - browserslist "^4.4.2" + browserslist "^4.5.2" core-js-compat "^3.0.0" invariant "^2.2.2" js-levenshtein "^1.1.3" - semver "^5.3.0" + semver "^5.5.0" -"@babel/runtime@^7.3.4": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.2.tgz#f5ab6897320f16decd855eed70b705908a313fe8" - integrity sha512-7Bl2rALb7HpvXFL7TETNzKSAeBVCPHELzc0C//9FCxN8nsiueWSJBqaF+2oIJScyILStASR/Cx5WMkXGYTiJFA== +"@babel/runtime@^7.3.4", "@babel/runtime@^7.4.2": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.3.tgz#79888e452034223ad9609187a0ad1fe0d2ad4bdc" + integrity sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA== dependencies: regenerator-runtime "^0.13.2" @@ -622,16 +646,16 @@ "@babel/parser" "^7.4.0" "@babel/types" "^7.4.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.0.tgz#14006967dd1d2b3494cdd650c686db9daf0ddada" - integrity sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.0", "@babel/traverse@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.3.tgz#1a01f078fc575d589ff30c0f71bf3c3d9ccbad84" + integrity sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.4.0" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.0" - "@babel/parser" "^7.4.0" + "@babel/parser" "^7.4.3" "@babel/types" "^7.4.0" debug "^4.1.0" globals "^11.1.0" @@ -677,11 +701,11 @@ integrity sha512-yeeoWp+bNS84nP1977Y8UCiQ9pssO+f4QuVj3i0/gYZFjjvOgxx0dnyWhtowD5sLYnCRMPlPpqyjwXze3SlkYg== "@coreui/coreui@^2.1.7": - version "2.1.8" - resolved "https://registry.yarnpkg.com/@coreui/coreui/-/coreui-2.1.8.tgz#9246359da602487a693af0215fc3bbcbbd21ad87" - integrity sha512-YyGfMNcu47QbRpUoMejVXOFcKBL4huWy3szhIC2VIrzxufB5LZq9qOrVf2n25NeBtVCw5Y4Y2oIoN0k998U8ww== + version "2.1.9" + resolved "https://registry.yarnpkg.com/@coreui/coreui/-/coreui-2.1.9.tgz#3a38cd73299a1db8db5c25c175d87945c6063f66" + integrity sha512-AsGgZgH4UBivCU5M0r2hyzSO0c+YI7ZnPbQDD63F+hrCVGbz3YH+HXqGLWAhoVVjTW8haT9dDn/d8y5AUtAm6A== dependencies: - "@babel/polyfill" "^7.2.5" + "@babel/polyfill" "^7.4.0" "@coreui/coreui-plugin-npm-postinstall" "^1.0.2" bootstrap "^4.3.1" @@ -721,7 +745,7 @@ "@rails/webpacker@https://github.com/rails/webpacker": version "4.0.2" - resolved "https://github.com/rails/webpacker#554221c9c48b03f49b37b60e81193755a19a1465" + resolved "https://github.com/rails/webpacker#90df6f551eb93c18d104d5ba20ecd898e3cc58cf" dependencies: "@babel/core" "^7.3.4" "@babel/plugin-proposal-class-properties" "^7.3.4" @@ -742,7 +766,7 @@ file-loader "^3.0.1" flatted "^2.0.0" glob "^7.1.3" - js-yaml "^3.12.2" + js-yaml "^3.13.0" mini-css-extract-plugin "^0.5.0" node-sass "^4.11.0" optimize-css-assets-webpack-plugin "^5.0.1" @@ -1212,12 +1236,13 @@ babel-plugin-dynamic-import-node@^2.2.0: object.assign "^4.1.0" babel-plugin-macros@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.5.0.tgz#01f4d3b50ed567a67b80a30b9da066e94f4097b6" - integrity sha512-BWw0lD0kVZAXRD3Od1kMrdmfudqzDzYv2qrN3l2ISR1HVp1EgLKfbOrYV9xmY5k3qx3RIu5uPAUZZZHpo0o5Iw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.5.1.tgz#4a119ac2c2e19b458c259b9accd7ee34fd57ec6f" + integrity sha512-xN3KhAxPzsJ6OQTktCanNpIFnnMsCV+t8OloKxIL72D6+SUZYFn9qfklPgef5HyyDtzYZqqb+fs1S12+gQY82Q== dependencies: - cosmiconfig "^5.0.5" - resolve "^1.8.1" + "@babel/runtime" "^7.4.2" + cosmiconfig "^5.2.0" + resolve "^1.10.0" balanced-match@^1.0.0: version "1.0.0" @@ -1260,9 +1285,9 @@ big.js@^5.2.2: integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== binary-extensions@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1" - integrity sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw== + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== block-stream@*: version "0.0.9" @@ -1272,9 +1297,9 @@ block-stream@*: inherits "~2.0.0" bluebird@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" - integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== + version "3.5.4" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" + integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" @@ -1407,14 +1432,14 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.1: - version "4.5.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.2.tgz#36ad281f040af684555a23c780f5c2081c752df0" - integrity sha512-zmJVLiKLrzko0iszd/V4SsjTaomFeoVzQGYYOYgRgsbh7WNh95RgDB0CmBdFWYs/3MyFSt69NypjL/h3iaddKQ== +browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.1, browserslist@^4.5.2: + version "4.5.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.4.tgz#166c4ecef3b51737a42436ea8002aeea466ea2c7" + integrity sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag== dependencies: - caniuse-lite "^1.0.30000951" - electron-to-chromium "^1.3.116" - node-releases "^1.1.11" + caniuse-lite "^1.0.30000955" + electron-to-chromium "^1.3.122" + node-releases "^1.1.13" buffer-from@^1.0.0: version "1.1.1" @@ -1533,9 +1558,9 @@ camelcase@^4.1.0: integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= camelcase@^5.0.0, camelcase@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.2.0.tgz#e7522abda5ed94cc0489e1b8466610e88404cf45" - integrity sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ== + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== caniuse-api@^3.0.0: version "3.0.0" @@ -1547,10 +1572,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000947, caniuse-lite@^1.0.30000951: - version "1.0.30000951" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz#c7c2fd4d71080284c8677dd410368df8d83688fe" - integrity sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000947, caniuse-lite@^1.0.30000955: + version "1.0.30000957" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" + integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ== case-sensitive-paths-webpack-plugin@^2.2.0: version "2.2.0" @@ -1611,9 +1636,9 @@ chartjs-color@^2.1.0: color-convert "^0.5.3" chokidar@^2.0.0, chokidar@^2.0.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" - integrity sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg== + version "2.1.5" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" + integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== dependencies: anymatch "^2.0.0" async-each "^1.0.1" @@ -1625,7 +1650,7 @@ chokidar@^2.0.0, chokidar@^2.0.2: normalize-path "^3.0.0" path-is-absolute "^1.0.0" readdirp "^2.2.1" - upath "^1.1.0" + upath "^1.1.1" optionalDependencies: fsevents "^1.2.7" @@ -1790,9 +1815,9 @@ commander@2.17.1: integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== commander@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== commondir@^1.0.1: version "1.0.1" @@ -1962,15 +1987,14 @@ cosmiconfig@^4.0.0: parse-json "^4.0.0" require-from-string "^2.0.1" -cosmiconfig@^5.0.0, cosmiconfig@^5.0.5: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.1.0.tgz#6c5c35e97f37f985061cdf653f114784231185cf" - integrity sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q== +cosmiconfig@^5.0.0, cosmiconfig@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.0.tgz#45038e4d28a7fe787203aede9c25bca4a08b12c8" + integrity sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g== dependencies: import-fresh "^2.0.0" is-directory "^0.3.1" - js-yaml "^3.9.0" - lodash.get "^4.4.2" + js-yaml "^3.13.0" parse-json "^4.0.0" create-ecdh@^4.0.0: @@ -2520,10 +2544,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.116: - version "1.3.118" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.118.tgz#5c82b0445a40934e6cae9c2f40bfaaa986ea44a3" - integrity sha512-/1FpHvmKmKo2Z6CCza2HfkrKvKhU7Rq4nvyX1FOherdTrdTufhVrJbCrcrIqgqUCI+BG6JC2rlY4z5QA1G0NOw== +electron-to-chromium@^1.3.122: + version "1.3.122" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.122.tgz#b32a0805f48557bd3c3b8104eadc7fa511b14a9a" + integrity sha512-3RKoIyCN4DhP2dsmleuFvpJAIDOseWH88wFYBzb22CSwoFDSWRc4UAMfrtc9h8nBdJjTNIN3rogChgOy6eFInw== elliptic@^6.0.0: version "6.4.1" @@ -2682,9 +2706,9 @@ eslint-plugin-node@^8.0.1: semver "^5.5.0" eslint-plugin-promise@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz#2d074b653f35a23d1ba89d8e976a985117d1c6a2" - integrity sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg== + version "4.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.1.1.tgz#1e08cb68b5b2cd8839f8d5864c796f56d82746db" + integrity sha512-faAHw7uzlNPy7b45J1guyjazw28M+7gJokKUjC5JSFoYfUEyy6Gw/i7YQvmv2Yk00sUjWcmzXQLpU1Ki/C2IZQ== eslint-plugin-standard@^4.0.0: version "4.0.0" @@ -2710,9 +2734,9 @@ eslint-visitor-keys@^1.0.0: integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== eslint@^5.13.0: - version "5.15.3" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.15.3.tgz#c79c3909dc8a7fa3714fb340c11e30fd2526b8b5" - integrity sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ== + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.9.1" @@ -2734,7 +2758,7 @@ eslint@^5.13.0: import-fresh "^3.0.0" imurmurhash "^0.1.4" inquirer "^6.2.2" - js-yaml "^3.12.0" + js-yaml "^3.13.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.11" @@ -3615,9 +3639,9 @@ icss-utils@^4.1.0: postcss "^7.0.14" ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== iferr@^0.1.5: version "0.1.5" @@ -3959,9 +3983,9 @@ is-glob@^3.1.0: is-extglob "^2.1.0" is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" @@ -4121,7 +4145,7 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.12.0, js-yaml@^3.12.2, js-yaml@^3.9.0: +js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.9.0: version "3.13.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e" integrity sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== @@ -4337,7 +4361,7 @@ lodash.clonedeep@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.get@^4.0, lodash.get@^4.4.2: +lodash.get@^4.0: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= @@ -4479,9 +4503,9 @@ media-typer@0.3.0: integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= mem@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.2.0.tgz#5ee057680ed9cb8dad8a78d820f9a8897a102025" - integrity sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: map-age-cleaner "^0.1.1" mimic-fn "^2.0.0" @@ -4566,9 +4590,9 @@ mime@1.4.1: integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== mime@^2.3.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" - integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w== + version "2.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.1.tgz#19eb7357bebbda37df585b14038347721558c715" + integrity sha512-VRUfmQO0rCd3hKwBymAn3kxYzBHr3I/wdVMywgG3HhXOwrCQgN84ZagpdTm2tZ4TNtwsSmyJWYO88mb5XvzGqQ== mimic-fn@^1.0.0: version "1.2.0" @@ -4576,9 +4600,9 @@ mimic-fn@^1.0.0: integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== mimic-fn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.0.0.tgz#0913ff0b121db44ef5848242c38bbb35d44cabde" - integrity sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== mini-css-extract-plugin@^0.5.0: version "0.5.0" @@ -4716,9 +4740,9 @@ mute-stream@0.0.7: integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.10.0, nan@^2.9.2: - version "2.13.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.1.tgz#a15bee3790bde247e8f38f1d446edcdaeb05f2dd" - integrity sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA== + version "2.13.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" + integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== nanomatch@^1.2.9: version "1.2.13" @@ -4834,10 +4858,10 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.11: - version "1.1.11" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.11.tgz#9a0841a4b0d92b7d5141ed179e764f42ad22724a" - integrity sha512-8v1j5KfP+s5WOTa1spNUAOfreajQPN12JXbRR0oDE+YrJBQCXBnNqUDj27EKpPLOoSiU3tKi3xGPB+JaOdUEQQ== +node-releases@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.13.tgz#8c03296b5ae60c08e2ff4f8f22ae45bd2f210083" + integrity sha512-fKZGviSXR6YvVPyc011NHuJDSD8gFQvLPmc2d2V3BS4gr52ycyQ1Xzs7a8B+Ax3Ni/W+5h1h4SqmzeoA8WZRmA== dependencies: semver "^5.3.0" @@ -5184,9 +5208,9 @@ p-try@^1.0.0: integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.1.0.tgz#c1a0f1030e97de018bb2c718929d2af59463e505" - integrity sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== pace-progress@1.0.2: version "1.0.2" @@ -5208,9 +5232,9 @@ parallel-transform@^1.1.0: readable-stream "^2.1.5" parent-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" - integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA== + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" @@ -5463,12 +5487,12 @@ postcss-color-gray@^5.0.0: postcss-values-parser "^2.0.0" postcss-color-hex-alpha@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.2.tgz#e9b1886bb038daed33f6394168c210b40bb4fdb6" - integrity sha512-8bIOzQMGdZVifoBQUJdw+yIY00omBd2EwkJXepQo9cjp1UOHHHoeRDeSzTP6vakEpaRc6GAIOfvcQR7jBYaG5Q== + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.3.tgz#a8d9ca4c39d497c9661e374b9c51899ef0f87388" + integrity sha512-PF4GDel8q3kkreVXKLAGNpHKilXsZ6xuu+mOQMHWHLPNyjiUBOr75sp5ZKJfmv1MCus5/DWUGcK9hm6qHEnXYw== dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss "^7.0.14" + postcss-values-parser "^2.0.1" postcss-color-mod-function@^3.0.3: version "3.0.3" @@ -5507,19 +5531,19 @@ postcss-convert-values@^4.0.1: postcss-value-parser "^3.0.0" postcss-custom-media@^7.0.7: - version "7.0.7" - resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-7.0.7.tgz#bbc698ed3089ded61aad0f5bfb1fb48bf6969e73" - integrity sha512-bWPCdZKdH60wKOTG4HKEgxWnZVjAIVNOJDvi3lkuTa90xo/K0YHa2ZnlKLC5e2qF8qCcMQXt0yzQITBp8d0OFA== + version "7.0.8" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz#fffd13ffeffad73621be5f387076a28b00294e0c" + integrity sha512-c9s5iX0Ge15o00HKbuRuTqNndsJUbaXdiNsksnVH8H4gdc+zbLzr/UasOwNG6CTDpLFekVY4672eWdiiWu2GUg== dependencies: - postcss "^7.0.5" + postcss "^7.0.14" postcss-custom-properties@^8.0.9: - version "8.0.9" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-8.0.9.tgz#8943870528a6eae4c8e8d285b6ccc9fd1f97e69c" - integrity sha512-/Lbn5GP2JkKhgUO2elMs4NnbUJcvHX4AaF5nuJDaNkd2chYW1KA5qtOGGgdkBEWcXtKSQfHXzT7C6grEVyb13w== + version "8.0.10" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-8.0.10.tgz#e8dc969e1e15c555f0b836b7f278ef47e3cdeaff" + integrity sha512-GDL0dyd7++goDR4SSasYdRNNvp4Gqy1XMzcCnTijiph7VB27XXpJ8bW/AI0i2VSBZ55TpdGhMr37kMSpRfYD0Q== dependencies: - postcss "^7.0.5" - postcss-values-parser "^2.0.0" + postcss "^7.0.14" + postcss-values-parser "^2.0.1" postcss-custom-selectors@^5.1.2: version "5.1.2" @@ -6048,7 +6072,7 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3, postcss-value-parser@^ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-values-parser@^2.0.0: +postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== @@ -6301,9 +6325,9 @@ readable-stream@1.1: string_decoder "~0.10.x" readable-stream@^3.0.6: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.2.0.tgz#de17f229864c120a9f56945756e4f32c4045245d" - integrity sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw== + version "3.3.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.3.0.tgz#cb8011aad002eb717bf040291feba8569c986fb9" + integrity sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -6368,7 +6392,7 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -regexpu-core@^4.1.3, regexpu-core@^4.5.4: +regexpu-core@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== @@ -6638,9 +6662,9 @@ selfsigned@^1.9.1: node-forge "0.7.5" "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== semver@~5.3.0: version "5.3.0" @@ -7492,7 +7516,7 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.1.0: +upath@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== @@ -7653,9 +7677,9 @@ webpack-cli@^3.2.3: yargs "^12.0.5" webpack-dev-middleware@^3.5.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz#91f2531218a633a99189f7de36045a331a4b9cd4" - integrity sha512-XQmemun8QJexMEvNFbD2BIg4eSKrmSIMrTfnl2nql2Sc6OGAYFyb8rwuYrCjl/IiEYYuyTEiimMscu7EXji/Dw== + version "3.6.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.2.tgz#f37a27ad7c09cd7dc67cd97655413abaa1f55942" + integrity sha512-A47I5SX60IkHrMmZUlB0ZKSWi29TZTcPz7cha1Z75yYOsgWh/1AcPmQEbC8ZIbU3A1ytSv1PMU0PyPz2Lmz2jg== dependencies: memory-fs "^0.4.1" mime "^2.3.1" From 51bf58011bb94b5016246e08cbf93b2597ef2f5d Mon Sep 17 00:00:00 2001 From: msdundar Date: Mon, 8 Apr 2019 13:35:27 +0300 Subject: [PATCH 129/279] Upgrade dependencies --- Gemfile.lock | 12 ++--- yarn.lock | 124 ++++++++++++++++++++++++++++----------------------- 2 files changed, 73 insertions(+), 63 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3dfb3b9ba..6f343734d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: fd81e83be7a6fcaa34467ff3d01ab6f66c922d6c + revision: bf1494a1018a0bdc50dac4e87fdbf4b6b03083fa specs: actioncable (6.0.0.beta3) actionpack (= 6.0.0.beta3) @@ -64,7 +64,7 @@ GIT i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 1.4, >= 1.4.3) + zeitwerk (~> 2.0) rails (6.0.0.beta3) actioncable (= 6.0.0.beta3) actionmailbox (= 6.0.0.beta3) @@ -283,10 +283,10 @@ GEM orm_adapter (0.5.0) pagy (2.1.5) parallel (1.17.0) - parser (2.6.2.0) + parser (2.6.2.1) ast (~> 2.4.0) pg (1.1.4) - pg_search (2.1.4) + pg_search (2.1.5) activerecord (>= 4.2) activesupport (>= 4.2) pghero (2.2.0) @@ -329,7 +329,7 @@ GEM responders (2.4.1) actionpack (>= 4.2.0, < 6.0) railties (>= 4.2.0, < 6.0) - rubocop (0.66.0) + rubocop (0.67.2) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) @@ -425,7 +425,7 @@ GEM activesupport xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (1.4.3) + zeitwerk (2.0.0) PLATFORMS ruby diff --git a/yarn.lock b/yarn.lock index 9c96242b8..437b28c3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1197,12 +1197,12 @@ atob@^2.1.1: integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== autoprefixer@^9.4.9: - version "9.5.0" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.0.tgz#7e51d0355c11596e6cf9a0afc9a44e86d1596c70" - integrity sha512-hMKcyHsZn5+qL6AUeP3c8OyuteZ4VaUlg+fWbyl8z7PqsKHF/Bf8/px3K6AT8aMzDkBo8Bc11245MM+itDBOxQ== + version "9.5.1" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.1.tgz#243b1267b67e7e947f28919d786b50d3bb0fb357" + integrity sha512-KJSzkStUl3wP0D5sdMlP82Q52JLy5+atf2MHAre48+ckWkXgixmfHyWmA77wFDy6jTHU6mIgXv6hAQ2mf1PjJQ== dependencies: - browserslist "^4.4.2" - caniuse-lite "^1.0.30000947" + browserslist "^4.5.4" + caniuse-lite "^1.0.30000957" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^7.0.14" @@ -1432,7 +1432,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.1, browserslist@^4.5.2: +browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.2, browserslist@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.4.tgz#166c4ecef3b51737a42436ea8002aeea466ea2c7" integrity sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag== @@ -1530,9 +1530,9 @@ callsites@^2.0.0: integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= callsites@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" - integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase-keys@^2.0.0: version "2.1.0" @@ -1572,7 +1572,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000947, caniuse-lite@^1.0.30000955: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000955, caniuse-lite@^1.0.30000957: version "1.0.30000957" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ== @@ -1948,24 +1948,24 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-compat@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.0.0.tgz#cd9810b8000742535a4a43773866185e310bd4f7" - integrity sha512-W/Ppz34uUme3LmXWjMgFlYyGnbo1hd9JvA0LNQ4EmieqVjg2GPYbj3H6tcdP2QGPGWdRKUqZVbVKLNIFVs/HiA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.0.1.tgz#bff73ba31ca8687431b9c88f78d3362646fb76f0" + integrity sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g== dependencies: - browserslist "^4.5.1" - core-js "3.0.0" - core-js-pure "3.0.0" - semver "^5.6.0" + browserslist "^4.5.4" + core-js "3.0.1" + core-js-pure "3.0.1" + semver "^6.0.0" -core-js-pure@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.0.0.tgz#a5679adb4875427c8c0488afc93e6f5b7125859b" - integrity sha512-yPiS3fQd842RZDgo/TAKGgS0f3p2nxssF1H65DIZvZv0Od5CygP8puHXn3IQiM/39VAvgCbdaMQpresrbGgt9g== +core-js-pure@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.0.1.tgz#37358fb0d024e6b86d443d794f4e37e949098cbe" + integrity sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g== -core-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.0.tgz#a8dbfa978d29bfc263bfb66c556d0ca924c28957" - integrity sha512-WBmxlgH2122EzEJ6GH8o9L/FeoUKxxxZ6q6VUxoTlsE4EvbTWKJb447eyVxTEuq0LpXjlq/kCB2qgBvsYRkLvQ== +core-js@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.1.tgz#1343182634298f7f38622f95e73f54e48ddf4738" + integrity sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew== core-js@^2.6.5: version "2.6.5" @@ -2337,7 +2337,7 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-gateway@^4.0.1: +default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== @@ -2545,9 +2545,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.122: - version "1.3.122" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.122.tgz#b32a0805f48557bd3c3b8104eadc7fa511b14a9a" - integrity sha512-3RKoIyCN4DhP2dsmleuFvpJAIDOseWH88wFYBzb22CSwoFDSWRc4UAMfrtc9h8nBdJjTNIN3rogChgOy6eFInw== + version "1.3.124" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz#861fc0148748a11b3e5ccebdf8b795ff513fa11f" + integrity sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w== elliptic@^6.0.0: version "6.4.1" @@ -3773,11 +3773,11 @@ inquirer@^6.2.2: through "^2.3.6" internal-ip@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.2.0.tgz#46e81b638d84c338e5c67e42b1a17db67d0814fa" - integrity sha512-ZY8Rk+hlvFeuMmG5uH1MXhhdeMntmIaxaInvAmzMq/SHV8rv4Kh+6GiQNNDQd0wZFrcO+FiTBo8lui/osKOyJw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" + integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== dependencies: - default-gateway "^4.0.1" + default-gateway "^4.2.0" ipaddr.js "^1.9.0" interpret@^1.1.0: @@ -4145,10 +4145,10 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.9.0: - version "3.13.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e" - integrity sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== +js-yaml@^3.13.0, js-yaml@^3.9.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -4572,7 +4572,12 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.38.0 < 2", mime-db@~1.38.0: +"mime-db@>= 1.38.0 < 2": + version "1.39.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.39.0.tgz#f95a20275742f7d2ad0429acfe40f4233543780e" + integrity sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw== + +mime-db@~1.38.0: version "1.38.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== @@ -4590,9 +4595,9 @@ mime@1.4.1: integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== mime@^2.3.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.1.tgz#19eb7357bebbda37df585b14038347721558c715" - integrity sha512-VRUfmQO0rCd3hKwBymAn3kxYzBHr3I/wdVMywgG3HhXOwrCQgN84ZagpdTm2tZ4TNtwsSmyJWYO88mb5XvzGqQ== + version "2.4.2" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" + integrity sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg== mimic-fn@^1.0.0: version "1.2.0" @@ -5004,9 +5009,9 @@ object-copy@^0.1.0: kind-of "^3.0.3" object-keys@^1.0.11, object-keys@^1.0.12: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.0.tgz#11bd22348dd2e096a045ab06f6c85bcc340fa032" - integrity sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object-visit@^1.0.0: version "1.0.1" @@ -5165,9 +5170,9 @@ p-finally@^1.0.0: integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-is-promise@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.0.0.tgz#7554e3d572109a87e1f3f53f6a7d85d1b194f4c5" - integrity sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg== + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== p-limit@^1.1.0: version "1.3.0" @@ -5433,9 +5438,9 @@ pnp-webpack-plugin@^1.4.1: ts-pnp "^1.0.0" popper.js@^1.14.7: - version "1.14.7" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.7.tgz#e31ec06cfac6a97a53280c3e55e4e0c860e7738e" - integrity sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ== + version "1.15.0" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" + integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== portfinder@^1.0.9: version "1.0.20" @@ -6666,6 +6671,11 @@ selfsigned@^1.9.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== +semver@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" + integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -6936,9 +6946,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" - integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== + version "3.0.4" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" + integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== spdy-transport@^3.0.0: version "3.0.0" @@ -7196,9 +7206,9 @@ supports-color@^6.1.0: has-flag "^3.0.0" svgo@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.0.tgz#305a8fc0f4f9710828c65039bb93d5793225ffc3" - integrity sha512-xBfxJxfk4UeVN8asec9jNxHiv3UAMv/ujwBWGYvQhhMb2u3YTGKkiybPcLFDLq7GLLWE9wa73e0/m8L5nTzQbw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.1.tgz#3fedde75a4016193e1c2608b5fdef6f3e4a9fd99" + integrity sha512-Y1+LyT4/y1ms4/0yxPMSlvx6dIbgklE9w8CIOnfeoFGB74MEkq8inSfEr6NhocTaFbyYp0a1dvNgRKGRmEBlzA== dependencies: chalk "^2.4.1" coa "^2.0.2" @@ -7207,7 +7217,7 @@ svgo@^1.0.0: css-tree "1.0.0-alpha.28" css-url-regex "^1.1.0" csso "^3.5.1" - js-yaml "^3.12.0" + js-yaml "^3.13.0" mkdirp "~0.5.1" object.values "^1.1.0" sax "~1.2.4" From e7813eb4ee718d59e91f29cc9c8ceabe39c57250 Mon Sep 17 00:00:00 2001 From: ecmelkytz Date: Tue, 9 Apr 2019 09:35:37 +0300 Subject: [PATCH 130/279] Fix account activation locale pages Fixes #898 --- config/locales/controllers/account/activations.en.yml | 2 +- config/locales/controllers/account/activations.tr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/controllers/account/activations.en.yml b/config/locales/controllers/account/activations.en.yml index 94c38c51c..1b569c07f 100644 --- a/config/locales/controllers/account/activations.en.yml +++ b/config/locales/controllers/account/activations.en.yml @@ -1,7 +1,7 @@ en: activemodel: attributes: - activation/activation_service: &activation_attributes + activation/student_activation_service: &activation_attributes country: Country date_of_birth: Date of Birth document_no: Document No diff --git a/config/locales/controllers/account/activations.tr.yml b/config/locales/controllers/account/activations.tr.yml index bf6eec238..86cbf0bf1 100644 --- a/config/locales/controllers/account/activations.tr.yml +++ b/config/locales/controllers/account/activations.tr.yml @@ -1,7 +1,7 @@ tr: activemodel: attributes: - activation/activation_service: &activation_attributes + activation/student_activation_service: &activation_attributes country: Ülke date_of_birth: Doğum Tarihi document_no: Doküman No From 93aa386be71a0cef5b2ce7191951ff8cd1f818e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 9 Apr 2019 13:32:55 +0300 Subject: [PATCH 131/279] Add .gitallowed file to ignore git-secrets false positives --- .gitallowed | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitallowed diff --git a/.gitallowed b/.gitallowed new file mode 100644 index 000000000..3f0765e29 --- /dev/null +++ b/.gitallowed @@ -0,0 +1,9 @@ +^db/encrypted_data +\byarn\.lock +\bGemfile\.lock +^app/lib/nokul/database_url\.rb +^README.md:[6-7]: +^lib/templates/ldap/config/.* +^test/fixtures/users.yml:(1|6|11|16): +^test/system/account_settings_page_flow_test.rb:20: +^test/system/login_page_flow_test.rb:15: From 5c8fd98dedfe19bcbed35660b546d9b24ce3aa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 9 Apr 2019 13:52:47 +0300 Subject: [PATCH 132/279] Fix Rubocop offenses --- app/models/address.rb | 1 - app/models/user.rb | 1 - app/services/activation/student_activation_service.rb | 4 ++-- plugins/support/test/codification/memory_test.rb | 2 +- plugins/support/test/core_ext/class_test.rb | 2 +- plugins/tenant/common/lib/nokul/tenant.rb | 4 ++-- plugins/tenant/common/lib/nokul/tenant/api.rb | 2 +- plugins/tenant/common/lib/nokul/tenant/engine.rb | 4 ++-- 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/models/address.rb b/app/models/address.rb index 66c3edba6..0a1ecdcbc 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -19,7 +19,6 @@ class Address < ApplicationRecord # validations validates :full_address, presence: true, length: { maximum: 255 } validates :phone_number, length: { maximum: 255 }, - allow_nil: true, allow_blank: true, telephone_number: { country: proc { |record| record.country }, types: [:mobile] } validates :type, uniqueness: { scope: :user }, inclusion: { in: types.keys } diff --git a/app/models/user.rb b/app/models/user.rb index 36e1a0152..352d3b6c9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -34,7 +34,6 @@ class User < ApplicationRecord # validations validates :email, presence: true, uniqueness: true, length: { maximum: 255 } validates :extension_number, allow_blank: true, - allow_nil: true, length: { maximum: 8 }, numericality: { only_integer: true } validates :id_number, uniqueness: true, numericality: { only_integer: true }, length: { is: 11 } diff --git a/app/services/activation/student_activation_service.rb b/app/services/activation/student_activation_service.rb index 22d21011a..1dc91b554 100644 --- a/app/services/activation/student_activation_service.rb +++ b/app/services/activation/student_activation_service.rb @@ -67,8 +67,8 @@ def active return unless valid? process - rescue StandardError => err - Rails.logger.error err.message + rescue StandardError => e + Rails.logger.error e.message errors.add(:base, I18n.t('.account.activations.system_error')) false end diff --git a/plugins/support/test/codification/memory_test.rb b/plugins/support/test/codification/memory_test.rb index a0932bcc6..e765008a7 100644 --- a/plugins/support/test/codification/memory_test.rb +++ b/plugins/support/test/codification/memory_test.rb @@ -24,7 +24,7 @@ def remember?(*) test 'simple memory should work as expected' do memory = SimpleMemory.new - refute memory.remember? 19 + assert_not memory.remember? 19 assert_equal 23, memory.remember(23) assert memory.remember? 23 diff --git a/plugins/support/test/core_ext/class_test.rb b/plugins/support/test/core_ext/class_test.rb index f788b11d5..1734fb2f7 100644 --- a/plugins/support/test/core_ext/class_test.rb +++ b/plugins/support/test/core_ext/class_test.rb @@ -57,7 +57,7 @@ class ChildFromConveyedBase < ConveyedBase assert_equal %w[foo bar], TestClassesTwo::ConveyedBase.array_attr assert_equal %w[foo bar child_addition], TestClassesTwo::ChildFromConveyedBase.array_attr - refute TestClassesTwo::ConveyedBase.respond_to? :other + assert_not TestClassesTwo::ConveyedBase.respond_to? :other assert_equal 'ok', TestClassesTwo::ChildFromConveyedBase.other end end diff --git a/plugins/tenant/common/lib/nokul/tenant.rb b/plugins/tenant/common/lib/nokul/tenant.rb index ebef36b2b..4b00e6dd4 100644 --- a/plugins/tenant/common/lib/nokul/tenant.rb +++ b/plugins/tenant/common/lib/nokul/tenant.rb @@ -27,8 +27,8 @@ def load(fallback: DEFAULT_TENANT) return if engine raise Error::LoadError, "Tenant seems to be uninitialized after loading from plugin #{plugin}" - rescue LoadError => err - raise Error::LoadError, "Couldn't load Tenant #{tenant} from plugin #{plugin}: #{err.message}" + rescue LoadError => e + raise Error::LoadError, "Couldn't load Tenant #{tenant} from plugin #{plugin}: #{e.message}" end def initialize(engine_class) diff --git a/plugins/tenant/common/lib/nokul/tenant/api.rb b/plugins/tenant/common/lib/nokul/tenant/api.rb index 89570cd9c..c2a6883ac 100644 --- a/plugins/tenant/common/lib/nokul/tenant/api.rb +++ b/plugins/tenant/common/lib/nokul/tenant/api.rb @@ -12,7 +12,7 @@ module Tenant module_function - def root + def root # rubocop:disable Lint/UnneededCopDisableDirective,Rails/Delegate engine.root end diff --git a/plugins/tenant/common/lib/nokul/tenant/engine.rb b/plugins/tenant/common/lib/nokul/tenant/engine.rb index bde48f8e2..5c4b31f35 100644 --- a/plugins/tenant/common/lib/nokul/tenant/engine.rb +++ b/plugins/tenant/common/lib/nokul/tenant/engine.rb @@ -16,10 +16,10 @@ def deep_config_for(name, env: Rails.env) config = (YAML.safe_load(ERB.new(yaml.read).result, [], [], true) || {})[env] || {} config.to_deep_ostruct - rescue Psych::SyntaxError => err + rescue Psych::SyntaxError => e raise "YAML syntax error occurred while parsing #{yaml}. " \ 'Please note that YAML must be consistently indented using spaces. Tabs are not allowed. ' \ - "Error: #{err.message}" + "Error: #{e.message}" end def config_file_for(name) From 00b739057d491295e07c6551c845a7aed02f14e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 9 Apr 2019 15:53:06 +0300 Subject: [PATCH 133/279] Add task for git-secrets --- lib/tasks/security.rake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/tasks/security.rake b/lib/tasks/security.rake index 980329f31..8a19e3e8d 100644 --- a/lib/tasks/security.rake +++ b/lib/tasks/security.rake @@ -15,6 +15,18 @@ namespace :security do sh 'bundle audit check --update', verbose: false end + desc 'Scans repository with git-secrets for sensitive data' + task secrets: :environment do |task| + puts "########### #{task.full_comment} ###########" + sh 'command -v git-secrets >/dev/null', verbose: false do |ok| + if ok + sh 'git secrets --scan', verbose: false + else + puts 'git-secrets required; skipping test' + end + end + end + desc 'Runs all security tasks' - task all: %w[brakeman audit] + task all: %w[brakeman audit secrets] end From 13614c1a374f5ebb7524761136838cfdc74af242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 9 Apr 2019 15:53:27 +0300 Subject: [PATCH 134/279] Add minimal documentation to start using git-secrets --- doc/git/commit.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/git/commit.md b/doc/git/commit.md index 46409df4f..32ba5b7b7 100644 --- a/doc/git/commit.md +++ b/doc/git/commit.md @@ -5,6 +5,15 @@ author: M. Serhat Dundar Commit ====== +- Çalışmalarınız süresince proje deposuna hassas nitelikte verilerin kazayla + eklenmesini önlemek için `git-secrets`'i kurun ve yapılandırın. + + ```bash + sudo curl -fsSL -o /usr/local/bin/scripts https://raw.githubusercontent.com/omu/debian/master/bin/scripts + sudo chmod +x /usr/local/bin/scripts + sudo scripts operator/git + ``` + - Projeyi `bundle` ettikten sonra `fit-commit` git hook'larını kurun: `fit-commit install` - Her bir commit'in kendi içerisinde anlamsal bir bütünlüğe sahip olması için özen gösterin. Yaptığınız tüm From 178c7a2a551d47cec7d81d8b939250ddbd5b1da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Tue, 9 Apr 2019 18:26:22 +0300 Subject: [PATCH 135/279] Fix offense by fixing the exclude rule --- plugins/tenant/common/.rubocop.yml | 2 +- plugins/tenant/common/lib/nokul/tenant/api.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tenant/common/.rubocop.yml b/plugins/tenant/common/.rubocop.yml index 51d00d6fc..3dfe64750 100644 --- a/plugins/tenant/common/.rubocop.yml +++ b/plugins/tenant/common/.rubocop.yml @@ -15,7 +15,7 @@ Naming/FileName: - lib/nokul-tenant.rb Rails/Delegate: Exclude: - - lib/nokul/tenant/initialize.rb + - lib/nokul/tenant/api.rb Rails/Output: Exclude: - lib/**/*.rb diff --git a/plugins/tenant/common/lib/nokul/tenant/api.rb b/plugins/tenant/common/lib/nokul/tenant/api.rb index c2a6883ac..89570cd9c 100644 --- a/plugins/tenant/common/lib/nokul/tenant/api.rb +++ b/plugins/tenant/common/lib/nokul/tenant/api.rb @@ -12,7 +12,7 @@ module Tenant module_function - def root # rubocop:disable Lint/UnneededCopDisableDirective,Rails/Delegate + def root engine.root end From 59cc4643371153a2c37270a46933d3729039f55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 10 Apr 2019 09:52:38 +0300 Subject: [PATCH 136/279] Drop note to install git-secrets manually --- doc/git/commit.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/git/commit.md b/doc/git/commit.md index 32ba5b7b7..044e40ffc 100644 --- a/doc/git/commit.md +++ b/doc/git/commit.md @@ -14,6 +14,9 @@ Commit sudo scripts operator/git ``` + Kurulumu elle yapmak istiyorsanız ilgili betiği + [inceleyin](https://github.com/omu/debian/blob/master/lib/scripts/operator/git.sh). + - Projeyi `bundle` ettikten sonra `fit-commit` git hook'larını kurun: `fit-commit install` - Her bir commit'in kendi içerisinde anlamsal bir bütünlüğe sahip olması için özen gösterin. Yaptığınız tüm From ae009811d3688aabd92458053231fc4065e28409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Okta=C5=9F?= Date: Wed, 10 Apr 2019 10:03:24 +0300 Subject: [PATCH 137/279] Document git-secrets usage in simple terms --- doc/git/commit.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/git/commit.md b/doc/git/commit.md index 044e40ffc..5b74e9faa 100644 --- a/doc/git/commit.md +++ b/doc/git/commit.md @@ -6,7 +6,9 @@ Commit ====== - Çalışmalarınız süresince proje deposuna hassas nitelikte verilerin kazayla - eklenmesini önlemek için `git-secrets`'i kurun ve yapılandırın. + eklenmesini önlemek için `git-secrets`'i kurun ve yapılandırın. Kurulumu elle + yapmak istiyorsanız ilgili betiği + [inceleyin](https://github.com/omu/debian/blob/master/lib/scripts/operator/git.sh). ```bash sudo curl -fsSL -o /usr/local/bin/scripts https://raw.githubusercontent.com/omu/debian/master/bin/scripts @@ -14,8 +16,13 @@ Commit sudo scripts operator/git ``` - Kurulumu elle yapmak istiyorsanız ilgili betiği - [inceleyin](https://github.com/omu/debian/blob/master/lib/scripts/operator/git.sh). + Bu sayede her committe git-secrets ile değişiklikleri inceleyen bir Git + kancası sisteminize kurulacak ve değişiklikler hassas veri içeriyorsa commit + engellenecektir. Böyle bir durumla karşılaştığınızda uyarının hatalı olduğunu + düşünüyorsanız ("false positive") depo kökündeki [.gitallowed](/.gitallowed) + dosyasında elle veya [git-secrets + ile](https://github.com/awslabs/git-secrets#ignoring-false-positives) ekleme + yapın. - Projeyi `bundle` ettikten sonra `fit-commit` git hook'larını kurun: `fit-commit install` From e7ddcbbe578179d8148f15e07105fa1e19ed619b Mon Sep 17 00:00:00 2001 From: isubas Date: Fri, 19 Apr 2019 16:55:53 +0300 Subject: [PATCH 138/279] =?UTF-8?q?Sensitive=20mod=C3=BClunde=20read=5Fwri?= =?UTF-8?q?te=20i=C5=9Flemindeki=20hatay=C4=B1=20d=C3=BCzelt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support::Sensitive.read_write işlevi sonucu dosyalar `.enc.enc` uzantılı olarak oluşmaktaydı. Hata düzeltilerek dosyaların `.enc` uzantılı olarak oluşturulması sağlandı. --- plugins/support/lib/nokul/support/sensitive.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/support/lib/nokul/support/sensitive.rb b/plugins/support/lib/nokul/support/sensitive.rb index 828c3441a..3872c6df5 100644 --- a/plugins/support/lib/nokul/support/sensitive.rb +++ b/plugins/support/lib/nokul/support/sensitive.rb @@ -28,7 +28,7 @@ def writelines(path, contents) end def read_write(path) - write(expand_path(path), File.read(path)) + write(path, File.read(path)) end EXT = '.enc' From 3f685b41e20b0ad64f540c74033c839e96d33c1f Mon Sep 17 00:00:00 2001 From: isubas Date: Fri, 19 Apr 2019 16:58:26 +0300 Subject: [PATCH 139/279] =?UTF-8?q?Seed=20ve=20dump=20dosyalar=C4=B1nda=20?= =?UTF-8?q?ufak=20iyile=C5=9Ftirmeler=20yap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/seeds.rb | 79 +++++++++++++++++++++++++++++---------------- lib/tasks/dump.rake | 4 +-- 2 files changed, 54 insertions(+), 29 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index e7dbe3703..169f554dd 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,36 +6,61 @@ def load_seed_data end end -def extract_file(file_name) - extraction_path = Rails.root.join('db', 'encrypted_data', "#{file_name}.tar.gz").to_s - `tar xvzf "#{extraction_path}" -C tmp/` -end +class RestoreEncryptedSql + ENCRYTED_DATA_DIR = 'db/encrypted_data' + COMPRESS_EXT = '.tar.gz' -def decrypt_and_write_to_file(file_name) - file_to_decrypt = "tmp/#{file_name}.sql.enc" - file_to_write = "tmp/#{file_name}.sql" - File.write( - file_to_write, - Support::Sensitive.read(file_to_decrypt) - ) -end + def self.call(file_name) + new(file_name).restore + end -def restore_sql_dump(file_name) - config = ActiveRecord::Base.configurations[Rails.env] - dump_file = Rails.root.join('tmp', "#{file_name}.sql") + attr_reader :file_name - connection = "PGPASSWORD=#{config['password']} psql \ - -h #{config['host']} \ - -d #{config['database']} \ - -U #{config['username']} " + def initialize(file_name) + @file_name = file_name + @dir = Dir.tmpdir + end - `#{connection + "-f #{dump_file}"}` -end + def restore + file = prepare_file_for_restored + + `#{db_connection + " -f #{file.path}"}` + + file.close + end + + private + + attr_reader :dir -def restore_from_backup(file_name) - extract_file(file_name) - decrypt_and_write_to_file(file_name) - restore_sql_dump(file_name) + def db_connection + config = ActiveRecord::Base.configurations[Rails.env] + + "PGPASSWORD=#{config['password']} psql \ + -h #{config['host']} \ + -U #{config['username']} \ + -d #{config['database']}" + end + + def extract + path = Rails.root.join(ENCRYTED_DATA_DIR, "#{file_name}#{COMPRESS_EXT}") + + `tar xvzf "#{path}" -C #{dir}`.strip + end + + def prepare_file_for_restored + extracted_file = extract.delete_suffix('.enc') + + tmp = Tempfile.new("#{file_name}-#{Time.now.to_i}.sql") + + # https://www.endpoint.com/blog/2015/01/28/postgres-sessionreplication-role + tmp << <<-SQL + SET session_replication_role = replica; + #{Support::Sensitive.read("#{dir}/#{extracted_file}")} + SET session_replication_role = origin; + SQL + tmp + end end # Seed logic goes below @@ -49,10 +74,10 @@ def restore_from_backup(file_name) Osym::ImportProspectiveStudentsJob.perform_later('db/encrypted_data/prospective_students.csv') end else - restore_from_backup('static_data') + RestoreEncryptedSql.call('static_data') if ENV['SAMPLE_DATA'].eql?('true') - restore_from_backup('sample_data') if ENV['SAMPLE_DATA'].eql?('true') + RestoreEncryptedSql.call('sample_data') load_seed_data end end diff --git a/lib/tasks/dump.rake b/lib/tasks/dump.rake index 5e8748c2c..55b7b6b12 100644 --- a/lib/tasks/dump.rake +++ b/lib/tasks/dump.rake @@ -36,7 +36,7 @@ namespace :dump do Support::Sensitive.read_write 'tmp/static_data.sql' - sh 'tar -cvzf db/encrypted_data/static_data.tar.gz tmp/static_data.sql.enc.enc' + sh 'tar -cvzf db/encrypted_data/static_data.tar.gz tmp/static_data.sql.enc' sh 'rm tmp/static_data.*' end @@ -60,7 +60,7 @@ namespace :dump do Support::Sensitive.read_write 'tmp/sample_data.sql' - sh 'tar -cvzf db/encrypted_data/sample_data.tar.gz tmp/sample_data.sql.enc.enc' + sh 'tar -cvzf db/encrypted_data/sample_data.tar.gz tmp/sample_data.sql.enc' sh 'rm tmp/sample_data.*' end From cbff7828e3c7dbf375cd648f5181fd3084d49e2b Mon Sep 17 00:00:00 2001 From: isubas Date: Fri, 19 Apr 2019 16:59:03 +0300 Subject: [PATCH 140/279] =?UTF-8?q?DB=20dumplar=C4=B1n=C4=B1=20yeniden=20o?= =?UTF-8?q?lu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/encrypted_data/sample_data.tar.gz | 4 ++-- db/encrypted_data/static_data.tar.gz | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/encrypted_data/sample_data.tar.gz b/db/encrypted_data/sample_data.tar.gz index c76084139..9815cde8a 100644 --- a/db/encrypted_data/sample_data.tar.gz +++ b/db/encrypted_data/sample_data.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c0049fc41100e4b01f803282fa9240501476d938e1dd0617d2b49c3aee52305b -size 13954483 +oid sha256:e8a3da61dac935006fe0ceee553af372c904ce94314d321f643a04556320413e +size 14799584 diff --git a/db/encrypted_data/static_data.tar.gz b/db/encrypted_data/static_data.tar.gz index 38eb7fc10..c28a211b9 100644 --- a/db/encrypted_data/static_data.tar.gz +++ b/db/encrypted_data/static_data.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ceef16c60bb98de89c1fcd68a522fb2a6e0c11590d5862e74b8f83cdeb77ad61 -size 2462685 +oid sha256:5c33b02ee0c424f8bb0e53cd3727fddbcf8683be50d6fb3677956cdfaa864c61 +size 3288366 From 271e69a3688523cf5936e2b7f7b24bb2db159159 Mon Sep 17 00:00:00 2001 From: isubas Date: Fri, 19 Apr 2019 17:01:39 +0300 Subject: [PATCH 141/279] Update structure.sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PG versiyon uyuşmazlıklarından kaynaklı oluşan durum düzeltildi --- db/structure.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index ad83e4890..93c42fadd 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -171,8 +171,8 @@ CREATE TABLE public.addresses ( full_address character varying, district_id bigint NOT NULL, user_id bigint NOT NULL, - updated_at timestamp without time zone DEFAULT now(), - created_at timestamp without time zone DEFAULT now(), + updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, + created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, CONSTRAINT addresses_created_at_null CHECK ((created_at IS NOT NULL)), CONSTRAINT addresses_full_address_length CHECK ((length((full_address)::text) <= 255)), CONSTRAINT addresses_full_address_presence CHECK (((full_address IS NOT NULL) AND ((full_address)::text !~ '^\s*$'::text))), @@ -1669,8 +1669,8 @@ CREATE TABLE public.identities ( registered_to character varying, user_id bigint NOT NULL, student_id bigint, - created_at timestamp without time zone DEFAULT now(), - updated_at timestamp without time zone DEFAULT now(), + created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, + updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, CONSTRAINT identities_created_at_null CHECK ((created_at IS NOT NULL)), CONSTRAINT identities_date_of_birth_null CHECK ((date_of_birth IS NOT NULL)), CONSTRAINT identities_fathers_name_length CHECK ((length((fathers_name)::text) <= 255)), @@ -2685,7 +2685,7 @@ CREATE TABLE public.users ( last_sign_in_at timestamp without time zone, current_sign_in_ip inet, last_sign_in_ip inet, - password_changed_at timestamp without time zone DEFAULT now(), + password_changed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, failed_attempts integer DEFAULT 0, unlock_token character varying, locked_at timestamp without time zone, From 9e665980133a39b26636c1d9388c25d4deaec626 Mon Sep 17 00:00:00 2001 From: msdundar Date: Fri, 19 Apr 2019 22:05:04 +0300 Subject: [PATCH 142/279] Upgrade dependencies --- Gemfile.lock | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6f343734d..3e763758e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: bf1494a1018a0bdc50dac4e87fdbf4b6b03083fa + revision: 92c464373abe7c486e189b21a6376aca01173b06 specs: actioncable (6.0.0.beta3) actionpack (= 6.0.0.beta3) @@ -64,7 +64,7 @@ GIT i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.0) + zeitwerk (~> 2.1, >= 2.1.2) rails (6.0.0.beta3) actioncable (= 6.0.0.beta3) actionmailbox (= 6.0.0.beta3) @@ -89,7 +89,7 @@ GIT GIT remote: https://github.com/rails/web-console.git - revision: bba90ba6001723a1414d5f196a9793c1ac5b46ce + revision: b249558881eaddfd01903bc6f24c5f0fd0a3b53d specs: web-console (3.7.0) actionview (>= 5.2) @@ -134,8 +134,8 @@ GEM authy (2.7.5) httpclient (>= 2.5.3.3) aws-eventstream (1.0.2) - aws-partitions (1.149.0) - aws-sdk-core (3.48.3) + aws-partitions (1.151.0) + aws-sdk-core (3.48.4) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1.0) aws-sigv4 (~> 1.1) @@ -158,8 +158,8 @@ GEM html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties - bindex (0.6.0) - bootsnap (1.4.2) + bindex (0.7.0) + bootsnap (1.4.3) msgpack (~> 1.0) brakeman (4.5.0) builder (3.2.3) @@ -167,7 +167,7 @@ GEM bundler (>= 1.2.0, < 3) thor (~> 0.18) byebug (11.0.1) - capybara (3.16.1) + capybara (3.17.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -176,8 +176,8 @@ GEM regexp_parser (~> 1.2) xpath (~> 3.2) chartkick (3.0.2) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (1.0.1) + rake (< 13.0) cocoon (1.2.12) codacy-coverage (2.1.0) simplecov @@ -222,8 +222,8 @@ GEM ffi (1.10.0) fit-commit (3.8.1) swearjar (~> 1.3) - font-awesome-rails (4.7.0.4) - railties (>= 3.2, < 6.0) + font-awesome-rails (4.7.0.5) + railties (>= 3.2, < 6.1) friendly_id (5.2.5) activerecord (>= 4.0.0) globalid (0.4.2) @@ -235,7 +235,7 @@ GEM httpclient (2.8.3) i18n (1.6.0) concurrent-ruby (~> 1.0) - image_processing (1.8.0) + image_processing (1.9.0) mini_magick (>= 4.9.3, < 5) ruby-vips (>= 2.0.13, < 3) jaro_winkler (1.5.2) @@ -253,7 +253,7 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - lol_dba (2.1.7) + lol_dba (2.1.8) actionpack (>= 3.0, < 6.0) activerecord (>= 3.0, < 6.0) railties (>= 3.0, < 6.0) @@ -270,10 +270,9 @@ GEM mini_mime (1.0.1) mini_portile2 (2.4.0) minitest (5.11.3) - msgpack (1.2.9) + msgpack (1.2.10) multi_json (1.13.1) multipart-post (2.0.0) - net_http_ssl_fix (0.0.10) netaddr (2.0.3) nexmo (5.6.0) jwt (~> 2) @@ -286,7 +285,7 @@ GEM parser (2.6.2.1) ast (~> 2.4.0) pg (1.1.4) - pg_search (2.1.5) + pg_search (2.1.6) activerecord (>= 4.2) activesupport (>= 4.2) pghero (2.2.0) @@ -301,7 +300,7 @@ GEM puma (3.12.1) pwned (1.2.1) rack (2.0.7) - rack-attack (5.4.2) + rack-attack (6.0.0) rack (>= 1.0, < 3) rack-mini-profiler (1.0.2) rack (>= 1.2.0) @@ -352,10 +351,10 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (3.141.0) - childprocess (~> 0.5) + selenium-webdriver (3.141.5926) + childprocess (>= 0.5, < 2.0) rubyzip (~> 1.2, >= 1.2.2) - sidekiq (5.2.5) + sidekiq (5.2.6) connection_pool (~> 2.2, >= 2.2.2) rack (>= 1.5.0) rack-protection (>= 1.5.0) @@ -386,7 +385,7 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) swearjar (1.3.0) - telephone_number (1.3.4) + telephone_number (1.4.0) thor (0.20.3) thread_safe (0.3.6) tilt (2.0.9) @@ -405,8 +404,7 @@ GEM uniform_notifier (1.12.1) warden (1.2.8) rack (>= 2.0.6) - webdrivers (3.7.2) - net_http_ssl_fix + webdrivers (3.8.0) nokogiri (~> 1.6) rubyzip (~> 1.0) selenium-webdriver (~> 3.0) @@ -425,7 +423,7 @@ GEM activesupport xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.0.0) + zeitwerk (2.1.2) PLATFORMS ruby From f28710298124bf4397229ce5aae6a189c090dc6c Mon Sep 17 00:00:00 2001 From: msdundar Date: Fri, 19 Apr 2019 22:09:09 +0300 Subject: [PATCH 143/279] Upgrade yarn dependencies --- yarn.lock | 366 ++++++++++++++++++++++++------------------------------ 1 file changed, 164 insertions(+), 202 deletions(-) diff --git a/yarn.lock b/yarn.lock index 437b28c3c..0bcdd9d92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -745,7 +745,7 @@ "@rails/webpacker@https://github.com/rails/webpacker": version "4.0.2" - resolved "https://github.com/rails/webpacker#90df6f551eb93c18d104d5ba20ecd898e3cc58cf" + resolved "https://github.com/rails/webpacker#2387331b33c635ec7638af3fad5856cd5b1ea8c2" dependencies: "@babel/core" "^7.3.4" "@babel/plugin-proposal-class-properties" "^7.3.4" @@ -1109,6 +1109,14 @@ array-flatten@^2.1.0: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -1165,9 +1173,9 @@ astral-regex@^1.0.0: integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== async-each@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" - integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== async-foreach@^0.1.3: version "0.1.3" @@ -1433,13 +1441,13 @@ browserify-zlib@^0.2.0: pako "~1.0.5" browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.2, browserslist@^4.5.4: - version "4.5.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.4.tgz#166c4ecef3b51737a42436ea8002aeea466ea2c7" - integrity sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag== + version "4.5.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.5.tgz#fe1a352330d2490d5735574c149a85bc18ef9b82" + integrity sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA== dependencies: - caniuse-lite "^1.0.30000955" - electron-to-chromium "^1.3.122" - node-releases "^1.1.13" + caniuse-lite "^1.0.30000960" + electron-to-chromium "^1.3.124" + node-releases "^1.1.14" buffer-from@^1.0.0: version "1.1.1" @@ -1552,11 +1560,6 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0, camelcase@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -1572,10 +1575,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000955, caniuse-lite@^1.0.30000957: - version "1.0.30000957" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" - integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000957, caniuse-lite@^1.0.30000960: + version "1.0.30000962" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000962.tgz#6c10c3ab304b89bea905e66adf98c0905088ee44" + integrity sha512-WXYsW38HK+6eaj5IZR16Rn91TGhU3OhbwjKZvJ4HN/XBIABLKfbij9Mnd3pM0VEwZSlltWjoWg3I8FQ0DGgNOA== case-sensitive-paths-webpack-plugin@^2.2.0: version "2.2.0" @@ -1635,7 +1638,7 @@ chartjs-color@^2.1.0: chartjs-color-string "^0.6.0" color-convert "^0.5.3" -chokidar@^2.0.0, chokidar@^2.0.2: +chokidar@^2.0.2, chokidar@^2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== @@ -1825,9 +1828,9 @@ commondir@^1.0.1: integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== compressible@~2.0.16: version "2.0.16" @@ -1848,7 +1851,7 @@ compression-webpack-plugin@^2.0.0: serialize-javascript "^1.4.0" webpack-sources "^1.0.1" -compression@^1.5.2: +compression@^1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== @@ -1876,7 +1879,7 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -connect-history-api-fallback@^1.3.0: +connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== @@ -2284,7 +2287,7 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2310,13 +2313,6 @@ decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" - integrity sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg== - dependencies: - xregexp "4.0.0" - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -2374,17 +2370,17 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= +del@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-4.1.0.tgz#049543b8290e1a9293e2bd150ab3a06f637322b8" + integrity sha512-C4kvKNlYrwXhKxz97BuohF8YoGgQ23Xm9lvoHmgT7JaPGprSEjk3+XFled74Yt/x0ZABUHg2D67covzAPUKx5Q== dependencies: globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" delayed-stream@~1.0.0: version "1.0.0" @@ -2544,7 +2540,7 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.122: +electron-to-chromium@^1.3.124: version "1.3.124" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz#861fc0148748a11b3e5ccebdf8b795ff513fa11f" integrity sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w== @@ -2617,7 +2613,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.12.0, es-abstract@^1.5.1: +es-abstract@^1.12.0, es-abstract@^1.5.1, es-abstract@^1.7.0: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== @@ -2661,10 +2657,10 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.5.0" -eslint-module-utils@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz#546178dab5e046c8b562bbb50705e2456d7bda49" - integrity sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w== +eslint-module-utils@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz#8b93499e9b00eab80ccb6614e69f03678e84e09a" + integrity sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw== dependencies: debug "^2.6.8" pkg-dir "^2.0.0" @@ -2678,20 +2674,21 @@ eslint-plugin-es@^1.3.1: regexpp "^2.0.1" eslint-plugin-import@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz#97ac3e75d0791c4fac0e15ef388510217be7f66f" - integrity sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A== + version "2.17.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz#d227d5c6dc67eca71eb590d2bb62fb38d86e9fcb" + integrity sha512-m+cSVxM7oLsIpmwNn2WXTJoReOF9f/CtLMo7qOVmKd1KntBy0hEcuNZ3erTmWjx+DxRO0Zcrm5KwAvI9wHcV5g== dependencies: + array-includes "^3.0.3" contains-path "^0.1.0" debug "^2.6.9" doctrine "1.5.0" eslint-import-resolver-node "^0.3.2" - eslint-module-utils "^2.3.0" + eslint-module-utils "^2.4.0" has "^1.0.3" lodash "^4.17.11" minimatch "^3.0.4" read-pkg-up "^2.0.0" - resolve "^1.9.0" + resolve "^1.10.0" eslint-plugin-node@^8.0.1: version "8.0.1" @@ -2881,7 +2878,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -express@^4.16.2: +express@^4.16.4: version "4.16.4" resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== @@ -3218,12 +3215,12 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" - integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== + version "1.2.8" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.8.tgz#57ea5320f762cd4696e5e8e87120eccc8b11cacf" + integrity sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA== dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" + nan "^2.12.1" + node-pre-gyp "^0.12.0" fstream@^1.0.0, fstream@^1.0.2: version "1.0.11" @@ -3525,7 +3522,7 @@ html-comment-regex@^1.1.0: resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== -html-entities@^1.2.0: +html-entities@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= @@ -3661,9 +3658,9 @@ ignore@^4.0.6: integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== ignore@^5.0.2: - version "5.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.0.6.tgz#562dacc7ec27d672dde433aa683c543b24c17694" - integrity sha512-/+hp3kUf/Csa32ktIaj0OlRqQxrgs30n62M90UBpNd9k+ENEch5S+hmbW3DtcJGz3sYFTh4F3A6fQ0q7KWsp4w== + version "5.1.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.1.tgz#2fc6b8f518aff48fef65a7f348ed85632448e4a5" + integrity sha512-DWjnQIFLenVrwyRCKZT+7a7/U4Cqgar4WG8V++K3hw+lrW1hc/SIwdiGmtxKCVACmHULTuGeBbHJmbwW7/sAvA== import-cwd@^2.0.0: version "2.1.0" @@ -3754,9 +3751,9 @@ ini@^1.3.4, ini@~1.3.0: integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== inquirer@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" - integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== + version "6.3.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" + integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" @@ -3769,7 +3766,7 @@ inquirer@^6.2.2: run-async "^2.2.0" rxjs "^6.4.0" string-width "^2.1.0" - strip-ansi "^5.0.0" + strip-ansi "^5.1.0" through "^2.3.6" internal-ip@^4.2.0: @@ -3812,12 +3809,7 @@ ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -ipaddr.js@^1.9.0: +ipaddr.js@1.9.0, ipaddr.js@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== @@ -4001,15 +3993,15 @@ is-obj@^1.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= +is-path-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.0.0.tgz#d4777a8e227a00096a31f030db3770f84b116c02" + integrity sha512-m5dHHzpOXEiv18JEORttBO64UgTEypx99vCxQLjbBvGhOJxnTNglYoFXxwo6AbsQb79sqqycQEHv2hWkHZAijA== -is-path-in-cwd@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" - integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== +is-path-in-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.0.0.tgz#68e452a6eec260500cec21e029c0a44cc0dcd2ea" + integrity sha512-6Vz5Gc9s/sDA3JBVu0FzWufm8xaBsqy1zn8Q6gmvGP6nSDMw78aS4poBNeatWjaRpTpxxLn1WOndAiOlk+qY8A== dependencies: is-path-inside "^1.0.0" @@ -4125,11 +4117,16 @@ jquery.maskedinput@^1.4.1: resolved "https://registry.yarnpkg.com/jquery.maskedinput/-/jquery.maskedinput-1.4.1.tgz#3ea8f4cdc4eafce7354c27b66a73d0f44defc327" integrity sha1-Pqj0zcTq/Oc1TCe2anPQ9E3vwyc= -jquery@3.3.1, jquery@>=1.12.0: +jquery@3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg== +jquery@>=1.12.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.0.tgz#8de513fa0fa4b2c7d2e48a530e26f0596936efdf" + integrity sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ== + js-base64@^2.1.8: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -4145,7 +4142,7 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.0, js-yaml@^3.9.0: +js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -4236,7 +4233,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -killable@^1.0.0: +killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== @@ -4411,7 +4408,7 @@ lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.5, lodash@~4.17.10 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -loglevel@^1.4.1: +loglevel@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" integrity sha1-4PyVEztu8nbNyIh82vJKpvFW+Po= @@ -4572,22 +4569,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.38.0 < 2": +"mime-db@>= 1.38.0 < 2", mime-db@~1.39.0: version "1.39.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.39.0.tgz#f95a20275742f7d2ad0429acfe40f4233543780e" integrity sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw== -mime-db@~1.38.0: - version "1.38.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" - integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== - mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.22" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" - integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== + version "2.1.23" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.23.tgz#d4eacd87de99348a6858fe1e479aad877388d977" + integrity sha512-ROk/m+gMVSrRxTkMlaQOvFmFmYDc7sZgrjjM76abqmd2Cc5fCV7jAMA5XUccEtJ3cYiYdgixUVI+fApc2LkXlw== dependencies: - mime-db "~1.38.0" + mime-db "~1.39.0" mime@1.4.1: version "1.4.1" @@ -4744,7 +4736,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.10.0, nan@^2.9.2: +nan@^2.10.0, nan@^2.12.1: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== @@ -4772,11 +4764,11 @@ natural-compare@^1.4.0: integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.0.tgz#ce3fea21197267bacb310705a7bbe24f2a3a3492" + integrity sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg== dependencies: - debug "^2.1.2" + debug "^4.1.0" iconv-lite "^0.4.4" sax "^1.2.4" @@ -4847,10 +4839,10 @@ node-libs-browser@^2.0.0: util "^0.11.0" vm-browserify "0.0.4" -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -4863,10 +4855,10 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.13.tgz#8c03296b5ae60c08e2ff4f8f22ae45bd2f210083" - integrity sha512-fKZGviSXR6YvVPyc011NHuJDSD8gFQvLPmc2d2V3BS4gr52ycyQ1Xzs7a8B+Ax3Ni/W+5h1h4SqmzeoA8WZRmA== +node-releases@^1.1.14: + version "1.1.15" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.15.tgz#9e76a73b0eca3bf7801addaa0e6ce90c795f2b9a" + integrity sha512-cKV097BQaZr8LTSRUa2+oc/aX5L8UkZtPQrMSTgiJEeaW7ymTDCoRaGCoaTqk0lqnalcoSHu4wjSl0Cmj2+bMw== dependencies: semver "^5.3.0" @@ -5086,7 +5078,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opn@^5.1.0: +opn@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== @@ -5202,10 +5194,10 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== p-try@^1.0.0: version "1.0.0" @@ -5291,9 +5283,9 @@ parserlib@~1.1.1: integrity sha1-pkz6ckBiQ0/fw1HJpOwtkrlMBvQ= parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== pascalcase@^0.1.1: version "0.1.1" @@ -5442,7 +5434,7 @@ popper.js@^1.14.7: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== -portfinder@^1.0.9: +portfinder@^1.0.20: version "1.0.20" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.20.tgz#bea68632e54b2e13ab7b0c4775e9b41bf270e44a" integrity sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw== @@ -6126,12 +6118,12 @@ promise-inflight@^1.0.1: integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== + version "2.0.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" + integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== dependencies: forwarded "~0.1.2" - ipaddr.js "1.8.0" + ipaddr.js "1.9.0" prr@~1.0.1: version "1.0.1" @@ -6519,7 +6511,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1, resolve@^1.9.0: +resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== @@ -6549,7 +6541,7 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@2, rimraf@2.6.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -6659,7 +6651,7 @@ select2@^4.0.6-rc.1: almond "~0.3.1" jquery-mousewheel "~3.1.13" -selfsigned@^1.9.1: +selfsigned@^1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.4.tgz#cdd7eccfca4ed7635d47a08bf2d5d3074092e2cd" integrity sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw== @@ -6701,11 +6693,11 @@ send@0.16.2: statuses "~1.4.0" serialize-javascript@^1.4.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" - integrity sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw== + version "1.7.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" + integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== -serve-index@^1.7.2: +serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= @@ -6890,9 +6882,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@~0.5.10: - version "0.5.11" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.11.tgz#efac2ce0800355d026326a0ca23e162aeac9a4e2" - integrity sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ== + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -7128,7 +7120,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0: +strip-ansi@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -7206,9 +7198,9 @@ supports-color@^6.1.0: has-flag "^3.0.0" svgo@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.1.tgz#3fedde75a4016193e1c2608b5fdef6f3e4a9fd99" - integrity sha512-Y1+LyT4/y1ms4/0yxPMSlvx6dIbgklE9w8CIOnfeoFGB74MEkq8inSfEr6NhocTaFbyYp0a1dvNgRKGRmEBlzA== + version "1.2.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.2.tgz#0253d34eccf2aed4ad4f283e11ee75198f9d7316" + integrity sha512-rAfulcwp2D9jjdGu+0CuqlrAUin6bBWrpoqXWwKDZZZJfXcUXQSxLJOFJCQCSA0x0pP2U0TxSlJu2ROq5Bq6qA== dependencies: chalk "^2.4.1" coa "^2.0.2" @@ -7217,7 +7209,7 @@ svgo@^1.0.0: css-tree "1.0.0-alpha.28" css-url-regex "^1.1.0" csso "^3.5.1" - js-yaml "^3.13.0" + js-yaml "^3.13.1" mkdirp "~0.5.1" object.values "^1.1.0" sax "~1.2.4" @@ -7236,9 +7228,9 @@ table@^5.2.3: string-width "^3.0.0" tapable@^1.0.0, tapable@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.1.tgz#4d297923c5a72a42360de2ab52dadfaaec00018e" - integrity sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA== + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tar@^2.0.0: version "2.2.1" @@ -7388,9 +7380,9 @@ trim-right@^1.0.1: integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= trix@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/trix/-/trix-1.1.0.tgz#8286149128f032d6d6df17fc8dcd2ee2aed5e7de" - integrity sha512-FKqrxRdCOzdq+mKJeZC9Mio02T0gZipOo64Aw4uytWhI7+OH8n41iooT0UL9s0vbppm4HN/1B5Ns2rGCo4iNZA== + version "1.1.1" + resolved "https://registry.yarnpkg.com/trix/-/trix-1.1.1.tgz#ca8a3fab4d23d960a17e88441d601cb22a86f5d5" + integrity sha512-dNHTcryRK0EmwCyJDOBrG6OznL8HNEVVlecq/xzxLj3M9Eht5DV4yl+eCYX8RKyfrtBcNki+mpKIxESgXaGGZA== "true-case-path@^1.0.2": version "1.0.3" @@ -7400,9 +7392,9 @@ trix@^1.0.0: glob "^7.1.2" ts-pnp@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.0.1.tgz#fde74a6371676a167abaeda1ffc0fdb423520098" - integrity sha512-Zzg9XH0anaqhNSlDRibNC8Kp+B9KNM0uRIpLpGkGyrgRIttA7zZBhotTSEoEyuDrz3QW2LGtu2dxuk34HzIGnQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.0.tgz#391d01656478c5e1afca4fd568f11c7a379ca89e" + integrity sha512-hJkGMrHwSZtk6gsRR3GUXBQ2vFTdO9SgL/e+rNFyvBsBLKl1J6bjRGt5+NW2f5yRTMW8so58nwvvs93nqi5sGw== tslib@^1.9.0: version "1.9.3" @@ -7544,9 +7536,9 @@ urix@^0.1.0: integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse@^1.4.3: - version "1.4.4" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8" - integrity sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg== + version "1.4.6" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.6.tgz#baf91d6e6783c8a795eb476892ffef2737fc0456" + integrity sha512-/B8AD9iQ01seoXmXf9z/MjLZQIdOoYl/+gvsQF6+mpnxaTfG9P7srYaiqaDMyKkR36XMXfhqSHss5MyFAO8lew== dependencies: querystringify "^2.0.0" requires-port "^1.0.0" @@ -7686,7 +7678,7 @@ webpack-cli@^3.2.3: v8-compile-cache "^2.0.2" yargs "^12.0.5" -webpack-dev-middleware@^3.5.1: +webpack-dev-middleware@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.2.tgz#f37a27ad7c09cd7dc67cd97655413abaa1f55942" integrity sha512-A47I5SX60IkHrMmZUlB0ZKSWi29TZTcPz7cha1Z75yYOsgWh/1AcPmQEbC8ZIbU3A1ytSv1PMU0PyPz2Lmz2jg== @@ -7697,40 +7689,40 @@ webpack-dev-middleware@^3.5.1: webpack-log "^2.0.0" webpack-dev-server@^3.1.14: - version "3.2.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.2.1.tgz#1b45ce3ecfc55b6ebe5e36dab2777c02bc508c4e" - integrity sha512-sjuE4mnmx6JOh9kvSbPYw3u/6uxCLHNWfhWaIPwcXWsvWOPN+nc5baq4i9jui3oOBRXGonK9+OI0jVkaz6/rCw== + version "3.3.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.3.1.tgz#7046e49ded5c1255a82c5d942bcdda552b72a62d" + integrity sha512-jY09LikOyGZrxVTXK0mgIq9y2IhCoJ05848dKZqX1gAGLU1YDqgpOT71+W53JH/wI4v6ky4hm+KvSyW14JEs5A== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" - chokidar "^2.0.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" + chokidar "^2.1.5" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" debug "^4.1.1" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" + del "^4.1.0" + express "^4.16.4" + html-entities "^1.2.1" http-proxy-middleware "^0.19.1" import-local "^2.0.0" internal-ip "^4.2.0" ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" + killable "^1.0.1" + loglevel "^1.6.1" + opn "^5.5.0" + portfinder "^1.0.20" schema-utils "^1.0.0" - selfsigned "^1.9.1" - semver "^5.6.0" - serve-index "^1.7.2" + selfsigned "^1.10.4" + semver "^6.0.0" + serve-index "^1.9.1" sockjs "0.3.19" sockjs-client "1.3.0" spdy "^4.0.0" - strip-ansi "^3.0.0" + strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" - webpack-dev-middleware "^3.5.1" + webpack-dev-middleware "^3.6.2" webpack-log "^2.0.0" - yargs "12.0.2" + yargs "12.0.5" webpack-log@^2.0.0: version "2.0.0" @@ -7749,9 +7741,9 @@ webpack-sources@^1.0.0, webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack- source-map "~0.6.1" webpack@^4.29.6: - version "4.29.6" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.29.6.tgz#66bf0ec8beee4d469f8b598d3988ff9d8d90e955" - integrity sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw== + version "4.30.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.30.0.tgz#aca76ef75630a22c49fcc235b39b4c57591d33a9" + integrity sha512-4hgvO2YbAFUhyTdlR4FNyt2+YaYBYHavyzjCMbZzgglo02rlKi/pcsEzwCuCpsn1ryzIl1cq/u8ArIKu8JBYMg== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" @@ -7852,11 +7844,6 @@ xml@1.0.1: resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" - integrity sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg== - xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -7882,13 +7869,6 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== -yargs-parser@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - yargs-parser@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" @@ -7904,25 +7884,7 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs@12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc" - integrity sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ== - dependencies: - cliui "^4.0.0" - decamelize "^2.0.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" - -yargs@^12.0.5: +yargs@12.0.5, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== From 4ea6db6c5f17b3a6dc6d7cd0b8e236675e96edd0 Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:03:31 +0300 Subject: [PATCH 144/279] =?UTF-8?q?Dump=20i=C5=9Fleminde=20s=C4=B1k=C4=B1?= =?UTF-8?q?=C5=9Ft=C4=B1rma=20format=C4=B1n=C4=B1=20gzip=20olarak=20ayarla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/dump.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/dump.rake b/lib/tasks/dump.rake index 55b7b6b12..3907230c0 100644 --- a/lib/tasks/dump.rake +++ b/lib/tasks/dump.rake @@ -36,7 +36,7 @@ namespace :dump do Support::Sensitive.read_write 'tmp/static_data.sql' - sh 'tar -cvzf db/encrypted_data/static_data.tar.gz tmp/static_data.sql.enc' + sh 'gzip -c tmp/static_data.sql.enc > db/encrypted_data/static_data.sql.enc.gz' sh 'rm tmp/static_data.*' end @@ -60,7 +60,7 @@ namespace :dump do Support::Sensitive.read_write 'tmp/sample_data.sql' - sh 'tar -cvzf db/encrypted_data/sample_data.tar.gz tmp/sample_data.sql.enc' + sh 'gzip -c tmp/sample_data.sql.enc > db/encrypted_data/sample_data.sql.enc.gz' sh 'rm tmp/sample_data.*' end From 7c2d135c2f9e0e31e1e774ad58c0fbbd6627b358 Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:04:41 +0300 Subject: [PATCH 145/279] =?UTF-8?q?Sensitive=20mod=C3=BCl=C3=BCne=20i?= =?UTF-8?q?=C3=A7eri=C4=9Fi=20decrypt=20etmek=20i=C3=A7in=20y=C3=B6ntem=20?= =?UTF-8?q?ekle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/support/lib/nokul/support/sensitive.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/support/lib/nokul/support/sensitive.rb b/plugins/support/lib/nokul/support/sensitive.rb index 3872c6df5..5a1ccbaa9 100644 --- a/plugins/support/lib/nokul/support/sensitive.rb +++ b/plugins/support/lib/nokul/support/sensitive.rb @@ -31,6 +31,10 @@ def read_write(path) write(path, File.read(path)) end + def content_decrypt(content) + encryptor('').send(:decrypt, content) + end + EXT = '.enc' def expand_path(path) From 7d26e10116c6bb53cc27ed38361585ca805e78ce Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:10:16 +0300 Subject: [PATCH 146/279] =?UTF-8?q?.gz=20uzant=C4=B1l=C4=B1=20dosyalar?= =?UTF-8?q?=C4=B1=20git-lfs=20takibine=20al?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index f087b429e..741b99403 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ *.tar.gz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text From 11369af619d26b03132cbcfa55cd24b5792b166a Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:11:55 +0300 Subject: [PATCH 147/279] =?UTF-8?q?DB=20dumplar=C4=B1n=C4=B1=20.gz=20forma?= =?UTF-8?q?t=C4=B1nda=20yeniden=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/encrypted_data/sample_data.sql.enc.gz | 3 +++ db/encrypted_data/sample_data.tar.gz | 3 --- db/encrypted_data/static_data.sql.enc.gz | 3 +++ db/encrypted_data/static_data.tar.gz | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 db/encrypted_data/sample_data.sql.enc.gz delete mode 100644 db/encrypted_data/sample_data.tar.gz create mode 100644 db/encrypted_data/static_data.sql.enc.gz delete mode 100644 db/encrypted_data/static_data.tar.gz diff --git a/db/encrypted_data/sample_data.sql.enc.gz b/db/encrypted_data/sample_data.sql.enc.gz new file mode 100644 index 000000000..a0605148c --- /dev/null +++ b/db/encrypted_data/sample_data.sql.enc.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2728ce736bb61439dae7b884c38f6c64207f8e0c477eb22ec9b67761da8e980 +size 14799332 diff --git a/db/encrypted_data/sample_data.tar.gz b/db/encrypted_data/sample_data.tar.gz deleted file mode 100644 index 9815cde8a..000000000 --- a/db/encrypted_data/sample_data.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e8a3da61dac935006fe0ceee553af372c904ce94314d321f643a04556320413e -size 14799584 diff --git a/db/encrypted_data/static_data.sql.enc.gz b/db/encrypted_data/static_data.sql.enc.gz new file mode 100644 index 000000000..b27cf0009 --- /dev/null +++ b/db/encrypted_data/static_data.sql.enc.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f30f38b6294962985e79e20bd5f2c62e47e0d2aec2ac568891effe434826176 +size 3288340 diff --git a/db/encrypted_data/static_data.tar.gz b/db/encrypted_data/static_data.tar.gz deleted file mode 100644 index c28a211b9..000000000 --- a/db/encrypted_data/static_data.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c33b02ee0c424f8bb0e53cd3727fddbcf8683be50d6fb3677956cdfaa864c61 -size 3288366 From 33ff948a073b6eba84d7548d95267d16f24b28bc Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:13:50 +0300 Subject: [PATCH 148/279] =?UTF-8?q?Seed=20i=C5=9Flemini=20refactor=20et?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/seeds.rb | 100 +++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 169f554dd..b5c9ab687 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,66 +1,61 @@ # frozen_string_literal: true -def load_seed_data - Dir[Rails.root.join('db', 'beta_seed', '*.rb')].sort.each do |seed| - load seed - end -end - -class RestoreEncryptedSql - ENCRYTED_DATA_DIR = 'db/encrypted_data' - COMPRESS_EXT = '.tar.gz' +module PgExec - def self.call(file_name) - new(file_name).restore - end - - attr_reader :file_name + module_function - def initialize(file_name) - @file_name = file_name - @dir = Dir.tmpdir + def call(sql) + db = PG.connect(**args) + # https://www.endpoint.com/blog/2015/01/28/postgres-sessionreplication-role + db.exec <<~SQL + SET session_replication_role = replica; + #{sql} + SET session_replication_role = origin; + SQL + ensure + db.close end - def restore - file = prepare_file_for_restored - - `#{db_connection + " -f #{file.path}"}` - - file.close + def args + config = ActiveRecord::Base.configurations[Rails.env] + { + host: config['host'], + dbname: config['database'], + user: config['username'], + password: config['password'] + } end - private + private :args +end - attr_reader :dir - def db_connection - config = ActiveRecord::Base.configurations[Rails.env] +ENCRYTED_DATA_DIR = 'db/encrypted_data' +COMPRESSED_FILE_EXT = '.sql.enc.gz' - "PGPASSWORD=#{config['password']} psql \ - -h #{config['host']} \ - -U #{config['username']} \ - -d #{config['database']}" +def restore_seed_data(encrypted_data_name) + if Rails.env.production? && !ENV['ALLOW_FOR_PRODUCTION'].eql?('true') + abort( + "You are attempting to run a restore against your production database + If you are sure you want to continue, run the same command with the environment variable: + ALLOW_FOR_PRODUCTION=true" + ) end - def extract - path = Rails.root.join(ENCRYTED_DATA_DIR, "#{file_name}#{COMPRESS_EXT}") - - `tar xvzf "#{path}" -C #{dir}`.strip - end + path = Rails.root.join( + ENCRYTED_DATA_DIR, + "#{encrypted_data_name}#{COMPRESSED_FILE_EXT}" + ) - def prepare_file_for_restored - extracted_file = extract.delete_suffix('.enc') + abort("File not found in: #{path}") unless path.exist? - tmp = Tempfile.new("#{file_name}-#{Time.now.to_i}.sql") - - # https://www.endpoint.com/blog/2015/01/28/postgres-sessionreplication-role - tmp << <<-SQL - SET session_replication_role = replica; - #{Support::Sensitive.read("#{dir}/#{extracted_file}")} - SET session_replication_role = origin; - SQL - tmp - end + PgExec.call( + Support::Sensitive.content_decrypt( + ActiveSupport::Gzip.decompress(File.read(path)) + ) + ) +rescue Pg::Error => e + abort("SQL error during exec: #{e.message}") end # Seed logic goes below @@ -74,10 +69,13 @@ def prepare_file_for_restored Osym::ImportProspectiveStudentsJob.perform_later('db/encrypted_data/prospective_students.csv') end else - RestoreEncryptedSql.call('static_data') + restore_seed_data('static_data') if ENV['SAMPLE_DATA'].eql?('true') - RestoreEncryptedSql.call('sample_data') - load_seed_data + restore_seed_data('sample_data') + + Dir[Rails.root.join('db', 'beta_seed', '*.rb')].sort.each do |seed| + load seed + end end end From ec984f687395766416b3ab1bea08b7e50a056745 Mon Sep 17 00:00:00 2001 From: isubas Date: Sat, 20 Apr 2019 11:23:51 +0300 Subject: [PATCH 149/279] Fix rubocop offenses and minor changes --- db/seeds.rb | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index b5c9ab687..9bcf7ca58 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true module PgExec - module_function def call(sql) @@ -25,34 +24,18 @@ def args password: config['password'] } end - - private :args end - ENCRYTED_DATA_DIR = 'db/encrypted_data' COMPRESSED_FILE_EXT = '.sql.enc.gz' def restore_seed_data(encrypted_data_name) - if Rails.env.production? && !ENV['ALLOW_FOR_PRODUCTION'].eql?('true') - abort( - "You are attempting to run a restore against your production database - If you are sure you want to continue, run the same command with the environment variable: - ALLOW_FOR_PRODUCTION=true" - ) - end - - path = Rails.root.join( - ENCRYTED_DATA_DIR, - "#{encrypted_data_name}#{COMPRESSED_FILE_EXT}" - ) + path = Rails.root.join(ENCRYTED_DATA_DIR, "#{encrypted_data_name}#{COMPRESSED_FILE_EXT}") abort("File not found in: #{path}") unless path.exist? PgExec.call( - Support::Sensitive.content_decrypt( - ActiveSupport::Gzip.decompress(File.read(path)) - ) + Support::Sensitive.content_decrypt(ActiveSupport::Gzip.decompress(File.read(path))) ) rescue Pg::Error => e abort("SQL error during exec: #{e.message}") From d4dcc717a5e384ba230fce2486de2482750424c8 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:22:14 +0300 Subject: [PATCH 150/279] =?UTF-8?q?Dinamik=20scope=20i=C3=A7in=20geli?= =?UTF-8?q?=C5=9Ftirilen=20Patron=20modul=C3=BCn=C3=BC=20ekle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/patron.rb | 21 +++++ app/lib/patron/errors.rb | 5 ++ app/lib/patron/permission_builder.rb | 28 +++++++ app/lib/patron/rolable.rb | 32 ++++++++ app/lib/patron/role_builder.rb | 40 ++++++++++ app/lib/patron/scopable.rb | 16 ++++ app/lib/patron/scope.rb | 11 +++ app/lib/patron/scope/base.rb | 43 ++++++++++ app/lib/patron/scope/dsl.rb | 99 ++++++++++++++++++++++++ app/lib/patron/scope/model.rb | 21 +++++ app/lib/patron/scope/query/arel.rb | 56 ++++++++++++++ app/lib/patron/scope/query/builder.rb | 51 ++++++++++++ app/lib/patron/scope/query/parameter.rb | 28 +++++++ app/lib/patron/scope/store/accessor.rb | 84 ++++++++++++++++++++ app/lib/patron/scope/store/validation.rb | 32 ++++++++ app/lib/patron/scope/view/form.rb | 81 +++++++++++++++++++ app/lib/patron/utils/i18n.rb | 45 +++++++++++ app/lib/patron/version.rb | 5 ++ 18 files changed, 698 insertions(+) create mode 100644 app/lib/patron.rb create mode 100644 app/lib/patron/errors.rb create mode 100644 app/lib/patron/permission_builder.rb create mode 100644 app/lib/patron/rolable.rb create mode 100644 app/lib/patron/role_builder.rb create mode 100644 app/lib/patron/scopable.rb create mode 100644 app/lib/patron/scope.rb create mode 100644 app/lib/patron/scope/base.rb create mode 100644 app/lib/patron/scope/dsl.rb create mode 100644 app/lib/patron/scope/model.rb create mode 100644 app/lib/patron/scope/query/arel.rb create mode 100644 app/lib/patron/scope/query/builder.rb create mode 100644 app/lib/patron/scope/query/parameter.rb create mode 100644 app/lib/patron/scope/store/accessor.rb create mode 100644 app/lib/patron/scope/store/validation.rb create mode 100644 app/lib/patron/scope/view/form.rb create mode 100644 app/lib/patron/utils/i18n.rb create mode 100644 app/lib/patron/version.rb diff --git a/app/lib/patron.rb b/app/lib/patron.rb new file mode 100644 index 000000000..424218904 --- /dev/null +++ b/app/lib/patron.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require_relative 'patron/version' +require_relative 'patron/errors' +require_relative 'patron/rolable' +require_relative 'patron/scopable' +require_relative 'patron/utils/i18n.rb' +require_relative 'patron/scope' +require_relative 'patron/permission_builder' +require_relative 'patron/role_builder' + +module Patron + module_function + + def scope_names + return Patron::Scope::Base.descendants if Rails.env.production? + + Dir.glob(Rails.root.join('app', 'scopes', '*.rb')) + .map { |f| File.basename(f, '.rb').classify } + end +end diff --git a/app/lib/patron/errors.rb b/app/lib/patron/errors.rb new file mode 100644 index 000000000..948348b5a --- /dev/null +++ b/app/lib/patron/errors.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Patron + class Error < StandardError; end +end diff --git a/app/lib/patron/permission_builder.rb b/app/lib/patron/permission_builder.rb new file mode 100644 index 000000000..1409b4793 --- /dev/null +++ b/app/lib/patron/permission_builder.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Patron + module PermissionBuilder + mattr_accessor :all, default: {} + + def permissions + @permissions ||= {} + end + + # Example + # permission :foo, name: 'Foo', description: 'Desc' + def permission(identifier, name:, description:) + generated_permission = Permission.new( + name: name, + identifier: identifier, + description: description + ) + + permissions[identifier] = generated_permission + all[identifier] = generated_permission + end + + Permission = Struct.new(:name, :identifier, :description, keyword_init: true) + + private_constant :Permission + end +end diff --git a/app/lib/patron/rolable.rb b/app/lib/patron/rolable.rb new file mode 100644 index 000000000..3cda54108 --- /dev/null +++ b/app/lib/patron/rolable.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module Patron + module Rolable + extend ActiveSupport::Concern + + included do + has_many :role_assignments, class_name: 'Patron::RoleAssignment', dependent: :destroy + has_many :roles, class_name: 'Patron::Role', through: :role_assignments + has_many :permissions, class_name: 'Patron::Permission', through: :roles + end + + def roles?(*identifiers) + roles.where(identifier: identifiers).count == identifiers.count + end + + def any_roles?(*identifiers) + roles.exists?(identifier: identifiers) + end + + def permissions?(*identifiers) + permissions.where(identifier: identifiers).count == identifiers.count + end + + def any_permissions?(*identifiers) + permissions.exists?(identifier: identifiers) + end + + alias role? roles? + alias permission? permissions? + end +end diff --git a/app/lib/patron/role_builder.rb b/app/lib/patron/role_builder.rb new file mode 100644 index 000000000..d897bae9d --- /dev/null +++ b/app/lib/patron/role_builder.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Patron + module RoleBuilder + def roles + @roles ||= {} + end + + def role(identifier, name:, permissions:) + roles[identifier] = Role.new( + name: name, + identifier: identifier, + permissions: permissions + ) + end + + class Role + attr_reader :identifier, :name, :permissions + + def initialize(identifier:, name:, permissions:) + @identifier = identifier + @name = name + @permissions = Set.new(permissions) + check! + end + + private + + def check! + raise ArgumentError, 'Not empty permissions' if permissions.blank? + + permissions.each do |permission| + raise ArgumentError, "Not found permission, #{permission}" unless PermissionBuilder.all.key?(permission) + end + end + end + + private_constant :Role + end +end diff --git a/app/lib/patron/scopable.rb b/app/lib/patron/scopable.rb new file mode 100644 index 000000000..58d89d7b7 --- /dev/null +++ b/app/lib/patron/scopable.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Patron + module Scopable + extend ActiveSupport::Concern + + included do + has_many :scope_assignments, class_name: 'Patron::ScopeAssignment', dependent: :destroy + has_many :query_stores, class_name: 'Patron::QueryStore', through: :scope_assignments + end + + def query_store_by(scope) + query_stores.where(scope_name: scope) + end + end +end diff --git a/app/lib/patron/scope.rb b/app/lib/patron/scope.rb new file mode 100644 index 000000000..bd9169b08 --- /dev/null +++ b/app/lib/patron/scope.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require_relative 'scope/query/arel' +require_relative 'scope/query/parameter' +require_relative 'scope/query/builder' +require_relative 'scope/view/form' +require_relative 'scope/dsl' +require_relative 'scope/base' +require_relative 'scope/model' +require_relative 'scope/store/accessor' +require_relative 'scope/store/validation' diff --git a/app/lib/patron/scope/base.rb b/app/lib/patron/scope/base.rb new file mode 100644 index 000000000..c57c823c6 --- /dev/null +++ b/app/lib/patron/scope/base.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +module Patron + module Scope + class Base + extend DSL + extend View::Form + + def self.model + to_s.delete_suffix('Scope').safe_constantize + end + + attr_reader :user + + def initialize(user, current_scope: nil) + @user = user + @current_scope = current_scope + end + + def scope(bypass: nil) + return model.all if bypass.nil? ? bypass? : bypass + + query = Query::Builder.call(self) + + @current_scope = query.present? ? model.where(query) : model.none + end + + def bypass? + false + end + + protected + + def current_scope + @current_scope || scope || model + end + + def model + @_model ||= self.class.model + end + end + end +end diff --git a/app/lib/patron/scope/dsl.rb b/app/lib/patron/scope/dsl.rb new file mode 100644 index 000000000..8479ae4a3 --- /dev/null +++ b/app/lib/patron/scope/dsl.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +module Patron + module Scope + module DSL + def preview_attributes(*attributes) + @preview_attributes ||= begin + (attributes.presence || filter_attributes).each_with_object({}) do |item, hash| + case item + when Symbol, String then hash[item] = item + when Hash then hash.merge!(item) + end + end + end + end + + def filter(attribute, **options) + exist!(attribute) + + filters[attribute] = Option.new(attribute, options) + end + + def filters + @_filters ||= {} + end + + def filter_attributes + filters.keys + end + + private + + def exist!(attribute) + return if model.attribute_names.include?(attribute.to_s) + + raise ArgumentError, attribute + end + + class Option + SUPPORTED_TYPES = %i[string array].freeze + + attr_reader :collection, + :type, + :multiple, + :i18n_key + + def initialize(attribute, **args) + @collection = collection_to_proc(args) + @multiple = args.fetch(:multiple, false) + @type = forecast_type(args) + @i18n_key = args.fetch(:i18n_key, attribute) + check! + end + + def forecast_type(args) + return :array unless collection.call.nil? + + args.fetch(:type, :string) + end + + def field_type + return :select if collection.call.present? + + case type + when :string then :string + when :array then :select + else :string + end + end + + def collection? + type == :array + end + + private + + def collection_to_proc(args) + collection = args.fetch(:collection, proc { nil }) + + case collection + when Proc then collection + when Array, Range then proc { collection } + else + raise ArgumentError, "Unsupported data type (#{collection.class}), "\ + 'collection can only be in Array, Range and Proc types' + end + end + + def check! + return if SUPPORTED_TYPES.include? type.to_sym + + raise ArgumentError, "Unsupport type, supported types #{SUPPORTED_TYPES.join(',')}" + end + end + + private_constant :Option + end + end +end diff --git a/app/lib/patron/scope/model.rb b/app/lib/patron/scope/model.rb new file mode 100644 index 000000000..6c62b07b2 --- /dev/null +++ b/app/lib/patron/scope/model.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Patron + module Scope + module Model + extend ActiveSupport::Concern + + class_methods do + def scope_for(user, **options) + scope_klass.new(user, current_scope: current_scope).scope(options) + end + + private + + def scope_klass + @_scope_klass ||= "#{name}Scope".safe_constantize + end + end + end + end +end diff --git a/app/lib/patron/scope/query/arel.rb b/app/lib/patron/scope/query/arel.rb new file mode 100644 index 000000000..674c203f8 --- /dev/null +++ b/app/lib/patron/scope/query/arel.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +module Patron + module Scope + module Query + module Arel + mattr_accessor :predicates, default: Set.new + + def self.define_predicate(name, **options) + predicate = options.fetch(:equivalent_to, name) + suffix = options.fetch(:suffix, '') + prefix = options.fetch(:prefix, '') + + predicates << name + + define_method(name) do |model, attribute, value| + model.arel_table[attribute].public_send( + predicate, format_and_sanitize_value(predicate, value, suffix, prefix) + ) + end + + module_function(name) + end + + define_predicate :in + define_predicate :not_in + define_predicate :equal, equivalent_to: :eq + define_predicate :not_equal, equivalent_to: :not_eq + define_predicate :greater_than, equivalent_to: :gt + define_predicate :greater_than_to_equal, equivalent_to: :gteq + define_predicate :less_than, equivalent_to: :lt + define_predicate :less_than_to_equal, equivalent_to: :lteq + define_predicate :start_with, equivalent_to: :matches, suffix: '%' + define_predicate :end_with, equivalent_to: :matches, prefix: '%' + define_predicate :contain, equivalent_to: :matches, suffix: '%', prefix: '%' + define_predicate :not_start_with, equivalent_to: :does_not_match, suffix: '%' + define_predicate :not_end_with, equivalent_to: :does_not_match, prefix: '%' + define_predicate :not_contain, equivalent_to: :does_not_match, suffix: '%', prefix: '%' + + def self.merge(queries, with:) + queries.inject do |current_query, query| + current_query.public_send(with.to_s, query) + end + end + + def self.format_and_sanitize_value(predicate, value, suffix, prefix) + case predicate + when :in, :not_in then [*value].map { |item| ActiveRecord::Base.sanitize_sql(item) } + when /match/ then [prefix, ActiveRecord::Base.sanitize_sql_like(value), suffix].join + else ActiveRecord::Base.sanitize_sql(value) + end + end + end + end + end +end diff --git a/app/lib/patron/scope/query/builder.rb b/app/lib/patron/scope/query/builder.rb new file mode 100644 index 000000000..3d15967cd --- /dev/null +++ b/app/lib/patron/scope/query/builder.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +module Patron + module Scope + module Query + class Builder + def initialize(instance) + @instance = instance + @klass = instance.class + end + + def self.call(instance) + new(instance).send(:build) + end + + private_class_method :new + + private + + attr_reader :instance, :klass + + def build + queries = records.map do |record| + parameters = build_parameters(record) + nodes = parameters.map { |parameter| parameter.to_arel_for(klass.model) } + + Query::Arel.merge(nodes.compact, with: :and) + end + + Query::Arel.merge(queries.compact, with: :or) + end + + def build_parameters(record) + parameters = record.parameters + + return [] if parameters.blank? + + parameters.map do |key, options| + Query::Parameter.new(name: key, **options.symbolize_keys) + end + end + + def records + @records ||= begin + instance.user.query_stores_by(klass.to_s) + end + end + end + end + end +end diff --git a/app/lib/patron/scope/query/parameter.rb b/app/lib/patron/scope/query/parameter.rb new file mode 100644 index 000000000..fdc96265b --- /dev/null +++ b/app/lib/patron/scope/query/parameter.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Patron + module Scope + module Query + class Parameter + attr_accessor :name, :query_type, :skip_empty, :value + + def initialize(**args) + @name = args[:name] + @query_type = args[:query_type] + @skip_empty = ActiveModel::Type::Boolean.new.cast(args[:skip_empty]) + @value = args[:value] + end + + def to_arel_for(model) + Query::Arel.public_send(query_type, model, name, value) if assignable? + end + + private + + def assignable? + value.present? || !skip_empty + end + end + end + end +end diff --git a/app/lib/patron/scope/store/accessor.rb b/app/lib/patron/scope/store/accessor.rb new file mode 100644 index 000000000..1915d9953 --- /dev/null +++ b/app/lib/patron/scope/store/accessor.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +module Patron + module Scope + module Store + module Accessor + extend ActiveSupport::Concern + + def accessors + @_accessors ||= Set.new + end + + def permitted_attributes + @_permitted_attributes ||= Set.new + end + + ACCESSORS_SUFFIXES = %w[ + value + query_type + skip_empty + ].freeze + + # AccessorDefiner + module AccessorDefiner + def define_accessor_methods(accessor, filter, suffix) + accessors << accessor + + # Getter + define_singleton_method(accessor) { parameters_for(filter)[suffix] } + + # Setter + define_singleton_method("#{accessor}=") do |value| + parameters_for(filter)[suffix] = standardize(value) + end + end + + def standardize(value) + value.is_a?(Array) ? value.select(&:present?) : value + end + + def parameters_for(accessor) + parameters[accessor] = {} unless parameters.key?(accessor) + parameters[accessor] + end + end + + # PermittedAttributeDefiner + module PermittedAttributeDefiner + def define_permitted_attributes(accessor, suffix, option) + permitted_attributes << if suffix == 'value' && option.multiple + { accessor => [] } + else + accessor + end + end + end + + included do + after_initialize :define_dynamic_accessors + + include AccessorDefiner + include PermittedAttributeDefiner + + private + + def define_dynamic_accessors + scope_klass.filters.each do |filter, option| + ACCESSORS_SUFFIXES.each do |suffix| + accessor = "#{filter}_#{suffix}" + + define_accessor_methods(accessor, filter, suffix) + define_permitted_attributes(accessor.to_sym, suffix, option) + end + end + end + + def scope_klass + @_scope_klass ||= name.safe_constantize + end + end + end + end + end +end diff --git a/app/lib/patron/scope/store/validation.rb b/app/lib/patron/scope/store/validation.rb new file mode 100644 index 000000000..246963c72 --- /dev/null +++ b/app/lib/patron/scope/store/validation.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +require 'pry' +module Patron + module Scope + module Store + module Validation + extend ActiveSupport::Concern + + included do + before_validation :set_accessors_validations, if: :scope_name? + + def set_accessors_validations + [*scope_klass&.filter_attributes].each do |filter| + unless skip_empty_for?(filter) + validates_presence_of "#{filter}_value".to_sym + validates_presence_of "#{filter}_query_type".to_sym + end + validates_inclusion_of "#{filter}_skip_empty".to_sym, in: %w[true false] + end + end + + def skip_empty_for?(filter) + ActiveModel::Type::Boolean.new.cast( + public_send("#{filter}_skip_empty") + ) + end + end + end + end + end +end diff --git a/app/lib/patron/scope/view/form.rb b/app/lib/patron/scope/view/form.rb new file mode 100644 index 000000000..eaddf39fa --- /dev/null +++ b/app/lib/patron/scope/view/form.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +module Patron + module Scope + module View + module Form + Field = Struct.new( + :name, + :as, + :collection, + :required, + :multiple, + :label, + keyword_init: true + ) + + def fields_for_form + @_fields_for_form ||= begin + filters.map do |filter, option| + [ + generate_field_for_value(filter, option), + generate_field_for_query_type(filter, option), + generate_field_for_skip_empty(filter, option) + ] + end + end + end + + private + + def generate_field_for_value(filter, option) + Field.new( + name: "#{filter}_value", + as: option.field_type, + collection: option.collection, + multiple: option.multiple, + label: label_for(option.i18n_key, 'value') + ) + end + + def generate_field_for_query_type(filter, option) + Field.new( + name: "#{filter}_query_type", + as: :select, + collection: Utils::I18n.translate_collection_for_query_types( + arel_predicates_for(option.type) + ), + required: true, + label: label_for(option.i18n_key, 'query_type') + ) + end + + def generate_field_for_skip_empty(filter, option) + Field.new( + name: "#{filter}_skip_empty", + collection: Utils::I18n.translate_collection_for_boolean( + %w[true false] + ), + as: :select, + label: label_for(option.i18n_key, 'skip_empty') + ) + end + + def arel_predicates_for(type) + case type + when :array then %i[in not_in] + when :string then Query::Arel.predicates.to_a - %i[in not_in] + else [] + end + end + + def label_for(filter, suffix) + [ + Utils::I18n.translate_filter(filter, class_name: model), + Utils::I18n.translate_suffix(suffix) + ].join(' - ') + end + end + end + end +end diff --git a/app/lib/patron/utils/i18n.rb b/app/lib/patron/utils/i18n.rb new file mode 100644 index 000000000..21ba7f6e3 --- /dev/null +++ b/app/lib/patron/utils/i18n.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module Patron + module Utils + module I18n + module_function + + def translate_filter(name, class_name:) + translate(name, scope: [:activerecord, :attributes, class_name.to_s.underscore]) + end + + def translate_suffix(name) + translate(name, scope: %i[patron suffixes]) + end + + def translate_query_type(name) + translate(name, scope: %i[patron query_types]) + end + + def translate_skip_empty(name) + translate(name, scope: %i[patron boolean]) + end + + def translate_collection_for_boolean(collection) + [*collection].map do |item| + [translate_skip_empty(item), item] + end + end + + def translate_collection_for_query_types(collection) + [*collection].map do |item| + [translate_query_type(item), item] + end + end + + def translate(name, **options) + return '' if name.blank? + + ::I18n.translate(name, options) + end + + private_class_method :translate + end + end +end diff --git a/app/lib/patron/version.rb b/app/lib/patron/version.rb new file mode 100644 index 000000000..5a284c489 --- /dev/null +++ b/app/lib/patron/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Patron + VERSION = '0.1.0' +end From 1c7afc418c94e75bec7d880b3543dcff49232b5b Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:23:04 +0300 Subject: [PATCH 151/279] =?UTF-8?q?Yetkilendirme=20i=C5=9Flemleri=20i?= =?UTF-8?q?=C3=A7in=20controller'lar=C4=B1=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../patron/dashboard_controller.rb | 13 ++++ .../patron/permissions_controller.rb | 13 ++++ .../patron/query_stores_controller.rb | 63 +++++++++++++++++++ app/controllers/patron/roles_controller.rb | 50 +++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 app/controllers/patron/dashboard_controller.rb create mode 100644 app/controllers/patron/permissions_controller.rb create mode 100644 app/controllers/patron/query_stores_controller.rb create mode 100644 app/controllers/patron/roles_controller.rb diff --git a/app/controllers/patron/dashboard_controller.rb b/app/controllers/patron/dashboard_controller.rb new file mode 100644 index 000000000..9e9c27699 --- /dev/null +++ b/app/controllers/patron/dashboard_controller.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Patron + class DashboardController < ApplicationController + def index + @counter = { + roles: Patron::Role.count, + permissions: Patron::Permission.count, + query_stores: Patron::QueryStore.count + } + end + end +end diff --git a/app/controllers/patron/permissions_controller.rb b/app/controllers/patron/permissions_controller.rb new file mode 100644 index 000000000..de579a12c --- /dev/null +++ b/app/controllers/patron/permissions_controller.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Patron + class PermissionsController < ApplicationController + def index + @permissions = Permission.all + end + + def show + @permission = Permission.find(params[:id]) + end + end +end diff --git a/app/controllers/patron/query_stores_controller.rb b/app/controllers/patron/query_stores_controller.rb new file mode 100644 index 000000000..384e149c1 --- /dev/null +++ b/app/controllers/patron/query_stores_controller.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +module Patron + class QueryStoresController < ApplicationController + include SearchableModule + + before_action :set_query_store, only: %i[show edit update destroy preview] + + def index + @query_stores = pagy_by_search(Patron::QueryStore) + end + + def show; end + + def new + @query_store = init_query_scope(params[:scope]) + end + + def edit; end + + def create + @query_store = init_query_scope(query_store_params[:scope_name]) + @query_store.assign_attributes(query_store_params) + @query_store.save ? redirect_to(@query_store, notice: t('.success')) : render(:new) + end + + def update + @query_store.update(query_store_params) ? redirect_to(@query_store, notice: t('.success')) : render(:new) + end + + def destroy + if @query_store.destroy + redirect_to(patron_query_stores_path, notice: t('.success')) + else + redirect_to(patron_query_store_path, alert: t('.warning')) + end + end + + def preview + @scope = @query_store.scope_instance + @collection = @query_store.scope_for_preview + @attributes = @query_store.scope_klass.preview_attributes + end + + private + + def init_query_scope(scope_name) + Patron::QueryStore.new(scope_name: scope_name) + end + + def set_query_store + @query_store = Patron::QueryStore.find(params[:id]) + end + + def query_store_params + @query_store ||= init_query_scope(params[:patron_query_store][:scope_name]) + + params.require(:patron_query_store).permit( + :name, :scope_name, *@query_store.permitted_attributes.to_a + ) + end + end +end diff --git a/app/controllers/patron/roles_controller.rb b/app/controllers/patron/roles_controller.rb new file mode 100644 index 000000000..396440bfb --- /dev/null +++ b/app/controllers/patron/roles_controller.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module Patron + class RolesController < ApplicationController + include SearchableModule + + before_action :set_role, only: %i[show edit update destroy] + + def index + @roles = pagy_by_search(Patron::Role.order(:name)) + end + + def show; end + + def new + @role = Patron::Role.new + end + + def edit; end + + def create + @role = Patron::Role.new(role_params) + @role.save ? redirect_to(@role, notice: t('.success')) : render(:new) + end + + def update + @role.update(role_params) ? redirect_to(@role, notice: t('.success')) : render(:new) + end + + def destroy + if @role.destroy + redirect_to(patron_roles_path, notice: t('.success')) + else + redirect_to(patron_roles_path, alert: t('.warning')) + end + end + + private + + # Use callbacks to share common setup or constraints between actions. + def set_role + @role = Role.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def role_params + params.require(:patron_role).permit(:name, :identifier, :locked, permission_ids: []) + end + end +end From faeac85717246087ba51944ae8730595498fb069 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:23:37 +0300 Subject: [PATCH 152/279] =?UTF-8?q?Yetkilendirme=20i=C5=9Flemleri=20i?= =?UTF-8?q?=C3=A7in=20view'leri=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/patron/dashboard/index.html.erb | 41 +++++++++++++ app/views/patron/permissions/index.html.erb | 21 +++++++ app/views/patron/permissions/show.html.erb | 11 ++++ app/views/patron/query_stores/_form.html.erb | 51 ++++++++++++++++ app/views/patron/query_stores/edit.html.erb | 1 + app/views/patron/query_stores/index.html.erb | 59 +++++++++++++++++++ app/views/patron/query_stores/new.html.erb | 1 + .../patron/query_stores/preview.html.erb | 31 ++++++++++ app/views/patron/query_stores/show.html.erb | 50 ++++++++++++++++ app/views/patron/roles/_form.html.erb | 35 +++++++++++ app/views/patron/roles/edit.html.erb | 1 + app/views/patron/roles/index.html.erb | 41 +++++++++++++ app/views/patron/roles/new.html.erb | 1 + app/views/patron/roles/show.html.erb | 38 ++++++++++++ 14 files changed, 382 insertions(+) create mode 100644 app/views/patron/dashboard/index.html.erb create mode 100644 app/views/patron/permissions/index.html.erb create mode 100644 app/views/patron/permissions/show.html.erb create mode 100644 app/views/patron/query_stores/_form.html.erb create mode 100644 app/views/patron/query_stores/edit.html.erb create mode 100644 app/views/patron/query_stores/index.html.erb create mode 100644 app/views/patron/query_stores/new.html.erb create mode 100644 app/views/patron/query_stores/preview.html.erb create mode 100644 app/views/patron/query_stores/show.html.erb create mode 100644 app/views/patron/roles/_form.html.erb create mode 100644 app/views/patron/roles/edit.html.erb create mode 100644 app/views/patron/roles/index.html.erb create mode 100644 app/views/patron/roles/new.html.erb create mode 100644 app/views/patron/roles/show.html.erb diff --git a/app/views/patron/dashboard/index.html.erb b/app/views/patron/dashboard/index.html.erb new file mode 100644 index 000000000..4c826065e --- /dev/null +++ b/app/views/patron/dashboard/index.html.erb @@ -0,0 +1,41 @@ +
    +
    +
    +
    +

    Roller

    +
    +
    + Role Atamaları Yapılan Menü <%= @counter[:roles] %> +
    + <%= link_to 'Rol Yönetimi', patron_roles_path, class: 'btn btn-primary btn-xs' %> +
    +
    +
    + +
    +
    +
    +

    İzinler

    +
    +
    + İzin Atamaları Yapılan Menü <%= @counter[:permissions] %> +
    + <%= link_to 'İzin Yönetimi', patron_permissions_path, class: 'btn btn-primary btn-xs' %> +
    +
    +
    + +
    +
    +
    +

    Kapsamlar

    +
    +
    + Kapsam Oluşturma Menüsü <%= @counter[:query_stores] %> +
    + <%= link_to 'Kapsam Yönetimi', patron_query_stores_path, class: 'btn btn-primary btn-xs' %> +
    +
    +
    +
    + diff --git a/app/views/patron/permissions/index.html.erb b/app/views/patron/permissions/index.html.erb new file mode 100644 index 000000000..5cd9b69c0 --- /dev/null +++ b/app/views/patron/permissions/index.html.erb @@ -0,0 +1,21 @@ +

    Permissions

    +
    + + + + + + + + + + <% @permissions.each do |permission| %> + + + + + <% end %> + +
    NameIdentifier
    <%= permission.name %><%= permission.identifier %> + <%= link_to_actions(permission, except: %i[edit destroy]) %> +
    diff --git a/app/views/patron/permissions/show.html.erb b/app/views/patron/permissions/show.html.erb new file mode 100644 index 000000000..01532bfdd --- /dev/null +++ b/app/views/patron/permissions/show.html.erb @@ -0,0 +1,11 @@ +<% action_bar do %> + <%= link_to_back 'Back', permissions_path %> +<% end %> + +
    +
    <%= @permission.name %>
    +
    +

    Identifier: <%= @permission.identifier %>

    +

    Description: <%= @permission.description %>

    +
    +
    diff --git a/app/views/patron/query_stores/_form.html.erb b/app/views/patron/query_stores/_form.html.erb new file mode 100644 index 000000000..403464337 --- /dev/null +++ b/app/views/patron/query_stores/_form.html.erb @@ -0,0 +1,51 @@ +
    +
    + <%= action_bar do %> + <%= link_to_back(:back) %> + <% end %> + +
    +
    + <%= fa_icon 'user-tag' %> + <%= 'Query Store' %> +
    +
    + <%= simple_form_for query_store do |f| %> +
    + <%= f.input :name %> +
    + +
    + <%= f.input :scope_name, as: :hidden %> +
    + +
    + <% query_store.scope_klass.fields_for_form.each do |field_group| %> +
    +
    +
    + <% field_group.each do |field| %> +
    + <%= f.label field.name, field.label %> + <%= f.input field.name, + as: field.as, + collection: field.collection, + required: field.required, + label: false, + input_html: { multiple: field.multiple } %> +
    + <% end %> +
    +
    +
    + <% end %> +
    + +
    + <%= f.button :submit, class: 'btn btn-success' %> +
    + <% end %> +
    +
    +
    +
    diff --git a/app/views/patron/query_stores/edit.html.erb b/app/views/patron/query_stores/edit.html.erb new file mode 100644 index 000000000..fcfc7f39d --- /dev/null +++ b/app/views/patron/query_stores/edit.html.erb @@ -0,0 +1 @@ +<%= render 'form', query_store: @query_store %> diff --git a/app/views/patron/query_stores/index.html.erb b/app/views/patron/query_stores/index.html.erb new file mode 100644 index 000000000..e7ac646a0 --- /dev/null +++ b/app/views/patron/query_stores/index.html.erb @@ -0,0 +1,59 @@ +<%= action_bar do %> + +<% end %> + +
    +
    +
    +
    + <%= fa_icon 'tags', text: "t('.card_header')" %> + +
    + <%= link_to_new "t('.new_query_store_link')", new_patron_query_store_path %> +
    +
    +
    + <%= render 'layouts/shared/smart_search_form', + path: patron_query_stores_path, + placeholder: "t('.name')" %> + + + + + + + + + + <% @query_stores.each do |query_store| %> + + + + + + <% end %> + +
    <%= "t('.name')" %><%= "t('.scope_name')" %><%= t('actions') %>
    <%= query_store.name %><%= query_store.scope_name %> + <%= link_to_actions(query_store) %> +
    +
    + +
    +
    diff --git a/app/views/patron/query_stores/new.html.erb b/app/views/patron/query_stores/new.html.erb new file mode 100644 index 000000000..fcfc7f39d --- /dev/null +++ b/app/views/patron/query_stores/new.html.erb @@ -0,0 +1 @@ +<%= render 'form', query_store: @query_store %> diff --git a/app/views/patron/query_stores/preview.html.erb b/app/views/patron/query_stores/preview.html.erb new file mode 100644 index 000000000..621c6c16a --- /dev/null +++ b/app/views/patron/query_stores/preview.html.erb @@ -0,0 +1,31 @@ +<%= action_bar do %> + <%= link_to_back :back %> + <%= link_to_edit [:edit, @query_store] %> +<% end %> + + + +
    +
    + + + <% @attributes.keys.each do |attribute| %> + + <% end %> + + + + <% @collection.each do |item| %> + + <% @attributes.values.each do |attribute| %> + + <% end %> + + <% end %> + +
    <%= attribute %>
    <%= item.public_send(attribute) %>
    +
    +
    diff --git a/app/views/patron/query_stores/show.html.erb b/app/views/patron/query_stores/show.html.erb new file mode 100644 index 000000000..75e182916 --- /dev/null +++ b/app/views/patron/query_stores/show.html.erb @@ -0,0 +1,50 @@ +<%= action_bar do %> + <%= link_to_back patron_query_stores_path %> + <%= link_to_edit [:edit, @query_store] %> +<% end %> + +

    <%= @query_store.name %>

    + +
    + +
    + <% @query_store.scope_klass.filters.each do |attribute, option| %> +
    +
    +
    + <%= Patron::Utils::I18n.translate_filter(option.i18n_key, class_name: @query_store.scope_klass.model) %> + ( <%= attribute %> ) +
    + +
    + + + + + + + + + + + + + +
    + <%= Patron::Utils::I18n.translate_suffix('value') %> + + <%= @query_store.public_send("#{attribute}_value") %> +
    + <%= Patron::Utils::I18n.translate_suffix('query_type') %> + + <%= Patron::Utils::I18n.translate_query_type(@query_store.public_send("#{attribute}_query_type")) %> +
    + <%= Patron::Utils::I18n.translate_suffix('skip_empty') %> + + <%= Patron::Utils::I18n.translate_skip_empty(@query_store.public_send("#{attribute}_skip_empty")) %> +
    +
    +
    +
    + <% end %> +
    diff --git a/app/views/patron/roles/_form.html.erb b/app/views/patron/roles/_form.html.erb new file mode 100644 index 000000000..5e8ce5135 --- /dev/null +++ b/app/views/patron/roles/_form.html.erb @@ -0,0 +1,35 @@ +
    +
    + <%= action_bar do %> + <%= link_to_back(:back) %> + <% end %> + +
    +
    + <%= fa_icon 'user-tag' %> + <%= 'Roles' %> +
    +
    + <%= simple_form_for(@role) do |f| %> + <%= f.error_notification %> + +
    + <%= f.input :name, required: true %> +
    + +
    + <%= f.input :identifier, required: true %> +
    + +
    + <%= f.association :permissions, required: true %> +
    + +
    + <%= f.button :submit, class: 'btn btn-outline-success btn-sm' %> +
    + <% end %> +
    +
    +
    +
    diff --git a/app/views/patron/roles/edit.html.erb b/app/views/patron/roles/edit.html.erb new file mode 100644 index 000000000..262401bc4 --- /dev/null +++ b/app/views/patron/roles/edit.html.erb @@ -0,0 +1 @@ +<%= render 'form', role: @role %> diff --git a/app/views/patron/roles/index.html.erb b/app/views/patron/roles/index.html.erb new file mode 100644 index 000000000..99e1b989a --- /dev/null +++ b/app/views/patron/roles/index.html.erb @@ -0,0 +1,41 @@ +
    +
    +
    +
    + <%= fa_icon 'tags', text: "t('.card_header')" %> + +
    + <%= link_to_new "t('.new_role_link')", new_patron_role_path %> +
    +
    +
    + <%= render 'layouts/shared/smart_search_form', + path: patron_roles_path, + placeholder: "t('.name')" %> + + + + + + + + + + <% @roles.each do |role| %> + + + + + + <% end %> + +
    <%= "t('.name')" %><%= "t('.identifier')" %><%= t('actions') %>
    <%= role.name %><%= role.identifier %><%= link_to_actions(role) %>
    +
    +
    + +
    +
    diff --git a/app/views/patron/roles/new.html.erb b/app/views/patron/roles/new.html.erb new file mode 100644 index 000000000..2d3436368 --- /dev/null +++ b/app/views/patron/roles/new.html.erb @@ -0,0 +1 @@ +<%= render 'form' %> diff --git a/app/views/patron/roles/show.html.erb b/app/views/patron/roles/show.html.erb new file mode 100644 index 000000000..acfe22b26 --- /dev/null +++ b/app/views/patron/roles/show.html.erb @@ -0,0 +1,38 @@ + + +
    +
    + <%= action_bar do %> + <%= link_to_back patron_roles_path %> + <%= link_to_edit [:edit, @role] %> + <% end %> + +

    <%= @role.name %>

    + +
    +
    Permissions
    +
    +
      + <% @role.permissions.each do |permission| %> +
    • + <%= permission.name %> +
    • + <% end %> +
    +
    +
    + +
    +
    Users
    +
    +
      + <% [].each do |user| %> +
    • + <%= user.email %> +
    • + <% end %> +
    +
    +
    +
    +
    From abdef06593c95abee78da9094d1f229674f513f6 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:24:12 +0300 Subject: [PATCH 153/279] =?UTF-8?q?Yetkilendirme=20i=C5=9Flemleri=20i?= =?UTF-8?q?=C3=A7in=20model'leri=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/patron/permission.rb | 14 ++++++++++++ app/models/patron/query_store.rb | 32 +++++++++++++++++++++++++++ app/models/patron/role.rb | 24 ++++++++++++++++++++ app/models/patron/role_assignment.rb | 12 ++++++++++ app/models/patron/role_permission.rb | 12 ++++++++++ app/models/patron/scope_assignment.rb | 9 ++++++++ 6 files changed, 103 insertions(+) create mode 100644 app/models/patron/permission.rb create mode 100644 app/models/patron/query_store.rb create mode 100644 app/models/patron/role.rb create mode 100644 app/models/patron/role_assignment.rb create mode 100644 app/models/patron/role_permission.rb create mode 100644 app/models/patron/scope_assignment.rb diff --git a/app/models/patron/permission.rb b/app/models/patron/permission.rb new file mode 100644 index 000000000..c4fd49042 --- /dev/null +++ b/app/models/patron/permission.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Patron + class Permission < ApplicationRecord + # relations + has_many :role_permissions, dependent: :destroy + has_many :roles, through: :role_permissions + + # validations + validates :name, uniqueness: true, presence: true, length: { maximum: 255 } + validates :identifier, uniqueness: true, presence: true, length: { maximum: 255 } + validates :description, length: { maximum: 65_535 } + end +end diff --git a/app/models/patron/query_store.rb b/app/models/patron/query_store.rb new file mode 100644 index 000000000..e9da9b1e9 --- /dev/null +++ b/app/models/patron/query_store.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module Patron + class QueryStore < ApplicationRecord + include Patron::Scope::Store::Accessor + include Patron::Scope::Store::Validation + + # search + include PgSearch + pg_search_scope( + :search, + against: %i[name scope], + using: { tsearch: { prefix: true } } + ) + + # relations + has_many :scope_assignmets, dependent: :destroy + has_many :users, through: :scope_assignmets + + # stores + store :parameters, coder: JSON + + # validations + validates :name, uniqueness: true, presence: true, length: { maximum: 255 } + validates :scope_name, length: { maximum: 255 }, inclusion: { in: Patron.scope_names } + validates :parameters, presence: true + + def scope_klass + scope_name.to_s.safe_constantize + end + end +end diff --git a/app/models/patron/role.rb b/app/models/patron/role.rb new file mode 100644 index 000000000..ea68a7d52 --- /dev/null +++ b/app/models/patron/role.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Patron + class Role < ApplicationRecord + # search + include PgSearch + pg_search_scope( + :search, + against: %i[name identifier], + using: { tsearch: { prefix: true } } + ) + + # relations + has_many :role_assignments, dependent: :destroy + has_many :users, through: :role_assignments + has_many :role_permissions, dependent: :destroy + has_many :permissions, through: :role_permissions + + # validations + validates :name, uniqueness: true, presence: true, length: { maximum: 255 } + validates :identifier, uniqueness: true, presence: true, length: { maximum: 255 } + validates :locked, inclusion: { in: [true, false] } + end +end diff --git a/app/models/patron/role_assignment.rb b/app/models/patron/role_assignment.rb new file mode 100644 index 000000000..fae11d427 --- /dev/null +++ b/app/models/patron/role_assignment.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Patron + class RoleAssignment < ApplicationRecord + # relations + belongs_to :role + belongs_to :user + + # validations + validates :role_id, uniqueness: { scope: :user_id } + end +end diff --git a/app/models/patron/role_permission.rb b/app/models/patron/role_permission.rb new file mode 100644 index 000000000..b3cb5992d --- /dev/null +++ b/app/models/patron/role_permission.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Patron + class RolePermission < ApplicationRecord + # relations + belongs_to :role + belongs_to :permission + + # validations + validates :permission_id, uniqueness: { scope: :role_id } + end +end diff --git a/app/models/patron/scope_assignment.rb b/app/models/patron/scope_assignment.rb new file mode 100644 index 000000000..4906cded0 --- /dev/null +++ b/app/models/patron/scope_assignment.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Patron + class ScopeAssignment < ApplicationRecord + # relations + belongs_to :query_store + belongs_to :user + end +end From d36c644e406916f47ba823a620d959dbe675ebab Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:25:40 +0300 Subject: [PATCH 154/279] =?UTF-8?q?Yetkilendirme=20i=C5=9Flemleri=20i?= =?UTF-8?q?=C3=A7in=20model=20migrasyonlar=C4=B1n=C4=B1=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190422103239_create_query_stores.rb | 19 + .../20190422103754_create_permissions.rb | 20 + db/migrate/20190422104033_create_roles.rb | 22 + .../20190422104410_create_role_assignments.rb | 15 + .../20190422104613_create_role_permissions.rb | 14 + ...20190422141252_create_scope_assignments.rb | 10 + db/structure.sql | 439 +++++++++++++++++- 7 files changed, 538 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20190422103239_create_query_stores.rb create mode 100644 db/migrate/20190422103754_create_permissions.rb create mode 100644 db/migrate/20190422104033_create_roles.rb create mode 100644 db/migrate/20190422104410_create_role_assignments.rb create mode 100644 db/migrate/20190422104613_create_role_permissions.rb create mode 100644 db/migrate/20190422141252_create_scope_assignments.rb diff --git a/db/migrate/20190422103239_create_query_stores.rb b/db/migrate/20190422103239_create_query_stores.rb new file mode 100644 index 000000000..67f426df5 --- /dev/null +++ b/db/migrate/20190422103239_create_query_stores.rb @@ -0,0 +1,19 @@ +class CreateQueryStores < ActiveRecord::Migration[6.0] + def change + create_table :query_stores do |t| + t.string :name + t.string :scope_name + t.jsonb :parameters + + t.timestamps + end + + add_index :query_stores, %I[scope_name] + + add_presence_constraint :query_stores, :name + add_presence_constraint :query_stores, :scope_name + + add_length_constraint :query_stores, :name, less_than_or_equal_to: 255 + add_length_constraint :query_stores, :scope_name, less_than_or_equal_to: 255 + end +end diff --git a/db/migrate/20190422103754_create_permissions.rb b/db/migrate/20190422103754_create_permissions.rb new file mode 100644 index 000000000..4b535f9c2 --- /dev/null +++ b/db/migrate/20190422103754_create_permissions.rb @@ -0,0 +1,20 @@ +class CreatePermissions < ActiveRecord::Migration[6.0] + def change + create_table :permissions do |t| + t.string :name + t.string :identifier + t.text :description + + t.timestamps + end + + add_index :permissions, :name, unique: true + + add_presence_constraint :permissions, :name + add_presence_constraint :permissions, :identifier + + add_length_constraint :permissions, :name, less_than_or_equal_to: 255 + add_length_constraint :permissions, :identifier, less_than_or_equal_to: 255 + add_length_constraint :permissions, :description, less_than_or_equal_to: 65_535 + end +end diff --git a/db/migrate/20190422104033_create_roles.rb b/db/migrate/20190422104033_create_roles.rb new file mode 100644 index 000000000..3def3084f --- /dev/null +++ b/db/migrate/20190422104033_create_roles.rb @@ -0,0 +1,22 @@ +class CreateRoles < ActiveRecord::Migration[6.0] + def change + create_table :roles do |t| + t.string :name + t.string :identifier + t.boolean :locked, default: false + + t.timestamps + end + + add_index :roles, :name, unique: true + add_index :roles, :identifier, unique: true + + add_presence_constraint :roles, :name + add_presence_constraint :roles, :identifier + + add_length_constraint :roles, :name, less_than_or_equal_to: 255 + add_length_constraint :roles, :identifier, less_than_or_equal_to: 255 + + add_null_constraint :roles, :locked + end +end diff --git a/db/migrate/20190422104410_create_role_assignments.rb b/db/migrate/20190422104410_create_role_assignments.rb new file mode 100644 index 000000000..dfb1819f9 --- /dev/null +++ b/db/migrate/20190422104410_create_role_assignments.rb @@ -0,0 +1,15 @@ +class CreateRoleAssignments < ActiveRecord::Migration[6.0] + def change + create_table :role_assignments do |t| + t.references :role, null: false, foreign_key: true + t.references :user, null: false, foreign_key: true + + t.timestamps + end + + add_index :role_assignments, + %i[user_id role_id], + unique: true, + name: 'role_assignments_rolable_role' + end +end diff --git a/db/migrate/20190422104613_create_role_permissions.rb b/db/migrate/20190422104613_create_role_permissions.rb new file mode 100644 index 000000000..45d22cfe2 --- /dev/null +++ b/db/migrate/20190422104613_create_role_permissions.rb @@ -0,0 +1,14 @@ +class CreateRolePermissions < ActiveRecord::Migration[6.0] + def change + create_table :role_permissions do |t| + t.references :role, null: false, foreign_key: true + t.references :permission, null: false, foreign_key: true + + t.timestamps + end + + add_index :role_permissions, + %i[role_id permission_id], + unique: true + end +end diff --git a/db/migrate/20190422141252_create_scope_assignments.rb b/db/migrate/20190422141252_create_scope_assignments.rb new file mode 100644 index 000000000..2e77a5297 --- /dev/null +++ b/db/migrate/20190422141252_create_scope_assignments.rb @@ -0,0 +1,10 @@ +class CreateScopeAssignments < ActiveRecord::Migration[6.0] + def change + create_table :scope_assignments do |t| + t.references :query_store, null: false, foreign_key: true + t.references :user, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/structure.sql b/db/structure.sql index 93c42fadd..43bbf5c2c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1779,6 +1779,44 @@ CREATE SEQUENCE public.meeting_agendas_id_seq ALTER SEQUENCE public.meeting_agendas_id_seq OWNED BY public.meeting_agendas.id; +-- +-- Name: permissions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.permissions ( + id bigint NOT NULL, + name character varying, + identifier character varying, + description text, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL, + CONSTRAINT permissions_description_length CHECK ((length(description) <= 65535)), + CONSTRAINT permissions_identifier_length CHECK ((length((identifier)::text) <= 255)), + CONSTRAINT permissions_identifier_presence CHECK (((identifier IS NOT NULL) AND ((identifier)::text !~ '^\s*$'::text))), + CONSTRAINT permissions_name_length CHECK ((length((name)::text) <= 255)), + CONSTRAINT permissions_name_presence CHECK (((name IS NOT NULL) AND ((name)::text !~ '^\s*$'::text))) +); + + +-- +-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.permissions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.permissions_id_seq OWNED BY public.permissions.id; + + -- -- Name: positions; Type: TABLE; Schema: public; Owner: - -- @@ -1985,6 +2023,43 @@ CREATE SEQUENCE public.prospective_students_id_seq ALTER SEQUENCE public.prospective_students_id_seq OWNED BY public.prospective_students.id; +-- +-- Name: query_stores; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.query_stores ( + id bigint NOT NULL, + name character varying, + scope_name character varying, + parameters jsonb, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL, + CONSTRAINT query_stores_name_length CHECK ((length((name)::text) <= 255)), + CONSTRAINT query_stores_name_presence CHECK (((name IS NOT NULL) AND ((name)::text !~ '^\s*$'::text))), + CONSTRAINT query_stores_scope_name_length CHECK ((length((scope_name)::text) <= 255)), + CONSTRAINT query_stores_scope_name_presence CHECK (((scope_name IS NOT NULL) AND ((scope_name)::text !~ '^\s*$'::text))) +); + + +-- +-- Name: query_stores_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.query_stores_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: query_stores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.query_stores_id_seq OWNED BY public.query_stores.id; + + -- -- Name: registration_documents; Type: TABLE; Schema: public; Owner: - -- @@ -2020,6 +2095,108 @@ CREATE SEQUENCE public.registration_documents_id_seq ALTER SEQUENCE public.registration_documents_id_seq OWNED BY public.registration_documents.id; +-- +-- Name: role_assignments; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.role_assignments ( + id bigint NOT NULL, + role_id bigint NOT NULL, + user_id bigint NOT NULL, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL +); + + +-- +-- Name: role_assignments_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.role_assignments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: role_assignments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.role_assignments_id_seq OWNED BY public.role_assignments.id; + + +-- +-- Name: role_permissions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.role_permissions ( + id bigint NOT NULL, + role_id bigint NOT NULL, + permission_id bigint NOT NULL, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL +); + + +-- +-- Name: role_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.role_permissions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: role_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.role_permissions_id_seq OWNED BY public.role_permissions.id; + + +-- +-- Name: roles; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.roles ( + id bigint NOT NULL, + name character varying, + identifier character varying, + locked boolean DEFAULT false, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL, + CONSTRAINT roles_identifier_length CHECK ((length((identifier)::text) <= 255)), + CONSTRAINT roles_identifier_presence CHECK (((identifier IS NOT NULL) AND ((identifier)::text !~ '^\s*$'::text))), + CONSTRAINT roles_locked_null CHECK ((locked IS NOT NULL)), + CONSTRAINT roles_name_length CHECK ((length((name)::text) <= 255)), + CONSTRAINT roles_name_presence CHECK (((name IS NOT NULL) AND ((name)::text !~ '^\s*$'::text))) +); + + +-- +-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.roles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id; + + -- -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - -- @@ -2029,6 +2206,38 @@ CREATE TABLE public.schema_migrations ( ); +-- +-- Name: scope_assignments; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.scope_assignments ( + id bigint NOT NULL, + query_store_id bigint NOT NULL, + user_id bigint NOT NULL, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL +); + + +-- +-- Name: scope_assignments_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.scope_assignments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: scope_assignments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.scope_assignments_id_seq OWNED BY public.scope_assignments.id; + + -- -- Name: student_disability_types; Type: TABLE; Schema: public; Owner: - -- @@ -3049,6 +3258,13 @@ ALTER TABLE ONLY public.languages ALTER COLUMN id SET DEFAULT nextval('public.la ALTER TABLE ONLY public.meeting_agendas ALTER COLUMN id SET DEFAULT nextval('public.meeting_agendas_id_seq'::regclass); +-- +-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass); + + -- -- Name: positions id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3070,6 +3286,13 @@ ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.pro ALTER TABLE ONLY public.prospective_students ALTER COLUMN id SET DEFAULT nextval('public.prospective_students_id_seq'::regclass); +-- +-- Name: query_stores id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.query_stores ALTER COLUMN id SET DEFAULT nextval('public.query_stores_id_seq'::regclass); + + -- -- Name: registration_documents id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3077,6 +3300,34 @@ ALTER TABLE ONLY public.prospective_students ALTER COLUMN id SET DEFAULT nextval ALTER TABLE ONLY public.registration_documents ALTER COLUMN id SET DEFAULT nextval('public.registration_documents_id_seq'::regclass); +-- +-- Name: role_assignments id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_assignments ALTER COLUMN id SET DEFAULT nextval('public.role_assignments_id_seq'::regclass); + + +-- +-- Name: role_permissions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_permissions ALTER COLUMN id SET DEFAULT nextval('public.role_permissions_id_seq'::regclass); + + +-- +-- Name: roles id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass); + + +-- +-- Name: scope_assignments id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.scope_assignments ALTER COLUMN id SET DEFAULT nextval('public.scope_assignments_id_seq'::regclass); + + -- -- Name: student_disability_types id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3642,6 +3893,14 @@ ALTER TABLE ONLY public.meeting_agendas ADD CONSTRAINT meeting_agendas_pkey PRIMARY KEY (id); +-- +-- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.permissions + ADD CONSTRAINT permissions_pkey PRIMARY KEY (id); + + -- -- Name: positions positions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -3666,6 +3925,14 @@ ALTER TABLE ONLY public.prospective_students ADD CONSTRAINT prospective_students_pkey PRIMARY KEY (id); +-- +-- Name: query_stores query_stores_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.query_stores + ADD CONSTRAINT query_stores_pkey PRIMARY KEY (id); + + -- -- Name: registration_documents registration_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -3674,6 +3941,30 @@ ALTER TABLE ONLY public.registration_documents ADD CONSTRAINT registration_documents_pkey PRIMARY KEY (id); +-- +-- Name: role_assignments role_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT role_assignments_pkey PRIMARY KEY (id); + + +-- +-- Name: role_permissions role_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_permissions + ADD CONSTRAINT role_permissions_pkey PRIMARY KEY (id); + + +-- +-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.roles + ADD CONSTRAINT roles_pkey PRIMARY KEY (id); + + -- -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -3682,6 +3973,14 @@ ALTER TABLE ONLY public.schema_migrations ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); +-- +-- Name: scope_assignments scope_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.scope_assignments + ADD CONSTRAINT scope_assignments_pkey PRIMARY KEY (id); + + -- -- Name: student_disability_types student_disability_types_code_unique; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -4464,6 +4763,13 @@ CREATE INDEX index_meeting_agendas_on_agenda_id ON public.meeting_agendas USING CREATE INDEX index_meeting_agendas_on_committee_meeting_id ON public.meeting_agendas USING btree (committee_meeting_id); +-- +-- Name: index_permissions_on_name; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_permissions_on_name ON public.permissions USING btree (name); + + -- -- Name: index_positions_on_administrative_function_id; Type: INDEX; Schema: public; Owner: - -- @@ -4527,6 +4833,13 @@ CREATE INDEX index_prospective_students_on_student_entrance_type_id ON public.pr CREATE INDEX index_prospective_students_on_unit_id ON public.prospective_students USING btree (unit_id); +-- +-- Name: index_query_stores_on_scope_name; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_query_stores_on_scope_name ON public.query_stores USING btree (scope_name); + + -- -- Name: index_registration_documents_on_academic_term_id; Type: INDEX; Schema: public; Owner: - -- @@ -4548,6 +4861,69 @@ CREATE INDEX index_registration_documents_on_document_type_id ON public.registra CREATE INDEX index_registration_documents_on_unit_id ON public.registration_documents USING btree (unit_id); +-- +-- Name: index_role_assignments_on_role_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_role_assignments_on_role_id ON public.role_assignments USING btree (role_id); + + +-- +-- Name: index_role_assignments_on_user_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_role_assignments_on_user_id ON public.role_assignments USING btree (user_id); + + +-- +-- Name: index_role_permissions_on_permission_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_role_permissions_on_permission_id ON public.role_permissions USING btree (permission_id); + + +-- +-- Name: index_role_permissions_on_role_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_role_permissions_on_role_id ON public.role_permissions USING btree (role_id); + + +-- +-- Name: index_role_permissions_on_role_id_and_permission_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_role_permissions_on_role_id_and_permission_id ON public.role_permissions USING btree (role_id, permission_id); + + +-- +-- Name: index_roles_on_identifier; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_roles_on_identifier ON public.roles USING btree (identifier); + + +-- +-- Name: index_roles_on_name; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_roles_on_name ON public.roles USING btree (name); + + +-- +-- Name: index_scope_assignments_on_query_store_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_scope_assignments_on_query_store_id ON public.scope_assignments USING btree (query_store_id); + + +-- +-- Name: index_scope_assignments_on_user_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_scope_assignments_on_user_id ON public.scope_assignments USING btree (user_id); + + -- -- Name: index_students_on_unit_id; Type: INDEX; Schema: public; Owner: - -- @@ -4646,6 +5022,13 @@ CREATE UNIQUE INDEX index_users_on_id_number ON public.users USING btree (id_num CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING btree (reset_password_token); +-- +-- Name: role_assignments_rolable_role; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX role_assignments_rolable_role ON public.role_assignments USING btree (user_id, role_id); + + -- -- Name: calendar_events fk_rails_0011c39cc3; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -4830,6 +5213,14 @@ ALTER TABLE ONLY public.curriculum_courses ADD CONSTRAINT fk_rails_4181a1584a FOREIGN KEY (curriculum_semester_id) REFERENCES public.curriculum_semesters(id); +-- +-- Name: role_permissions fk_rails_439e640a3f; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_permissions + ADD CONSTRAINT fk_rails_439e640a3f FOREIGN KEY (permission_id) REFERENCES public.permissions(id); + + -- -- Name: committee_decisions fk_rails_44d9592deb; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -4918,6 +5309,14 @@ ALTER TABLE ONLY public.calendar_committee_decisions ADD CONSTRAINT fk_rails_5d6264c4f2 FOREIGN KEY (committee_decision_id) REFERENCES public.committee_decisions(id); +-- +-- Name: role_permissions fk_rails_60126080bd; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_permissions + ADD CONSTRAINT fk_rails_60126080bd FOREIGN KEY (role_id) REFERENCES public.roles(id); + + -- -- Name: calendar_events fk_rails_64d7b22524; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -4950,6 +5349,14 @@ ALTER TABLE ONLY public.positions ADD CONSTRAINT fk_rails_78999e7b17 FOREIGN KEY (administrative_function_id) REFERENCES public.administrative_functions(id); +-- +-- Name: scope_assignments fk_rails_796253dfbd; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.scope_assignments + ADD CONSTRAINT fk_rails_796253dfbd FOREIGN KEY (query_store_id) REFERENCES public.query_stores(id); + + -- -- Name: units fk_rails_83a021318e; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -4998,6 +5405,14 @@ ALTER TABLE ONLY public.positions ADD CONSTRAINT fk_rails_8d264a5cbc FOREIGN KEY (duty_id) REFERENCES public.duties(id); +-- +-- Name: role_assignments fk_rails_8ddd873ee0; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT fk_rails_8ddd873ee0 FOREIGN KEY (user_id) REFERENCES public.users(id); + + -- -- Name: available_course_lecturers fk_rails_917e7d3603; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -5038,6 +5453,14 @@ ALTER TABLE ONLY public.certifications ADD CONSTRAINT fk_rails_99ad041748 FOREIGN KEY (user_id) REFERENCES public.users(id); +-- +-- Name: scope_assignments fk_rails_9d2d00a9ee; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.scope_assignments + ADD CONSTRAINT fk_rails_9d2d00a9ee FOREIGN KEY (user_id) REFERENCES public.users(id); + + -- -- Name: prospective_students fk_rails_a6111d55a4; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -5158,6 +5581,14 @@ ALTER TABLE ONLY public.employees ADD CONSTRAINT fk_rails_dcfd3d4fc3 FOREIGN KEY (user_id) REFERENCES public.users(id); +-- +-- Name: role_assignments fk_rails_e4bfc1cd2c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT fk_rails_e4bfc1cd2c FOREIGN KEY (role_id) REFERENCES public.roles(id); + + -- -- Name: curriculum_courses fk_rails_e756d4597e; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -5309,6 +5740,12 @@ INSERT INTO "schema_migrations" (version) VALUES ('20190321163816'), ('20190321213030'), ('20190321213059'), -('20190325051222'); +('20190325051222'), +('20190422103239'), +('20190422103754'), +('20190422104033'), +('20190422104410'), +('20190422104613'), +('20190422141252'); From d98797de775b29de8cba470b7bf92cf01e3c7b54 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:27:17 +0300 Subject: [PATCH 155/279] =?UTF-8?q?Yetkilendirme=20sayfalar=C4=B1=20i?= =?UTF-8?q?=C3=A7in=20routes'lar=C4=B1=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 8 ++++---- config/routes/patron.rb | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 config/routes/patron.rb diff --git a/config/routes.rb b/config/routes.rb index b42d09415..62cb6ad28 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,13 +11,13 @@ root to: 'home#index' draw :account + draw :calendar_management + draw :course_management + draw :first_registration draw :location + draw :patron draw :reference draw :yoksis - draw :calendar_management - draw :first_registration - - draw :course_management resources :units do member do diff --git a/config/routes/patron.rb b/config/routes/patron.rb new file mode 100644 index 000000000..be1e34a9f --- /dev/null +++ b/config/routes/patron.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +namespace :patron do + resources :roles + resources :permissions, only: %i[index show] + resources :query_stores do + get :preview, on: :member + end + + get '/', to: 'dashboard#index' +end From b4eafb48f7009aa66ed3edb6f31213033882b491 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:28:28 +0300 Subject: [PATCH 156/279] Locales eklemeleri yap --- config/locales/layouts/shared/sidebar_en.yml | 1 + config/locales/layouts/shared/sidebar_tr.yml | 3 ++- config/locales/patron/en.yml | 27 ++++++++++++++++++++ config/locales/patron/tr.yml | 24 +++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 config/locales/patron/en.yml create mode 100644 config/locales/patron/tr.yml diff --git a/config/locales/layouts/shared/sidebar_en.yml b/config/locales/layouts/shared/sidebar_en.yml index 44b0a843c..22381d060 100644 --- a/config/locales/layouts/shared/sidebar_en.yml +++ b/config/locales/layouts/shared/sidebar_en.yml @@ -5,6 +5,7 @@ en: academic_calendars: Academic Calendars administration: Administration agenda_types: Agenda Types + authorizations: Authorizations available_courses: Available Courses calendar_event_types: Event Types calendar_management: Calendar Management diff --git a/config/locales/layouts/shared/sidebar_tr.yml b/config/locales/layouts/shared/sidebar_tr.yml index d44dfb2c3..42f3e3716 100644 --- a/config/locales/layouts/shared/sidebar_tr.yml +++ b/config/locales/layouts/shared/sidebar_tr.yml @@ -5,16 +5,17 @@ tr: academic_calendars: Akademik Takvimler administration: Yönetim agenda_types: Gündem Türleri + authorizations: Yetkilemdirmeler available_courses: Açılan Dersler calendar_event_types: Olay Türleri calendar_management: Takvim Yönetimi calendars: Takvimler committee_units: Kurul ve Komisyonlar committees: Kurullar/Komisyonlar - courses: Dersler course_groups: Ders Grupları course_management: Ders İşlemleri course_unit_groups: Ders Grupları + courses: Dersler curriculums: Müfredatlar first_registration: İlk Kayıt high_school_types: Lise Türleri diff --git a/config/locales/patron/en.yml b/config/locales/patron/en.yml new file mode 100644 index 000000000..566e97eb4 --- /dev/null +++ b/config/locales/patron/en.yml @@ -0,0 +1,27 @@ +en: + patron: + boolean: + 'true': 'Yes' + 'false': 'No' + suffixes: + value: Value + query_type: Query Type + skip_empty: Ignore If Value Is Empty + query_types: + in: In + not_in: Not In + equal: Equal + not_equal: Not Equal + greater_than: Greater Than + greater_than_to_equal: Greater Than to Equal + less_than: Less Than + less_than_to_equal: Less Than to Equal + start_with: Start With + end_with: End With + contain: Contain + not_start_with: Not Start With + not_end_with: Not End With + not_contain: Not Contain + book_scope: + id: ID + desc: Description diff --git a/config/locales/patron/tr.yml b/config/locales/patron/tr.yml new file mode 100644 index 000000000..1e5868ab4 --- /dev/null +++ b/config/locales/patron/tr.yml @@ -0,0 +1,24 @@ +tr: + patron: + boolean: + 'true': 'Evet' + 'false': 'Hayır' + suffixes: + value: Değeri + query_type: Sorgulama Türü + skip_empty: Değeri Boşsa Yoksay + query_types: + in: Seçilenler + not_in: Seçilenler Dışında Kalanlar + equal: Eşit + not_equal: Eşit Değil + greater_than: Büyük + greater_than_to_equal: Büyük Eşit + less_than: Küçük + less_than_to_equal: Küçük Eşit + start_with: İle Başlayan + end_with: İle Sonlanan + contain: İçeren + not_start_with: İle Başlamayan + not_end_with: İle Sonlanmayan + not_contain: İçermeyen From 82a792e1be9aaa8522e50431753f49d72be7035d Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:29:59 +0300 Subject: [PATCH 157/279] =?UTF-8?q?Yetkilendirme=20modellerinin=20testleri?= =?UTF-8?q?ni=20olu=C5=9Ftur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/fixtures/patron/permissions.yml | 9 +++++++ test/fixtures/patron/query_stores.yml | 9 +++++++ test/fixtures/patron/role_assignments.yml | 7 ++++++ test/fixtures/patron/role_permissions.yml | 7 ++++++ test/fixtures/patron/roles.yml | 14 +++++++++++ test/fixtures/patron/scope_assignments.yml | 7 ++++++ test/models/patron/permission_test.rb | 27 ++++++++++++++++++++ test/models/patron/query_store_test.rb | 25 ++++++++++++++++++ test/models/patron/role_assignment_test.rb | 17 +++++++++++++ test/models/patron/role_permission_test.rb | 17 +++++++++++++ test/models/patron/role_test.rb | 28 +++++++++++++++++++++ test/models/patron/scope_assignment_test.rb | 14 +++++++++++ 12 files changed, 181 insertions(+) create mode 100644 test/fixtures/patron/permissions.yml create mode 100644 test/fixtures/patron/query_stores.yml create mode 100644 test/fixtures/patron/role_assignments.yml create mode 100644 test/fixtures/patron/role_permissions.yml create mode 100644 test/fixtures/patron/roles.yml create mode 100644 test/fixtures/patron/scope_assignments.yml create mode 100644 test/models/patron/permission_test.rb create mode 100644 test/models/patron/query_store_test.rb create mode 100644 test/models/patron/role_assignment_test.rb create mode 100644 test/models/patron/role_permission_test.rb create mode 100644 test/models/patron/role_test.rb create mode 100644 test/models/patron/scope_assignment_test.rb diff --git a/test/fixtures/patron/permissions.yml b/test/fixtures/patron/permissions.yml new file mode 100644 index 000000000..055572823 --- /dev/null +++ b/test/fixtures/patron/permissions.yml @@ -0,0 +1,9 @@ +unit_management: + name: Birim Yöneti + identifier: unit_management + description: Description + +course_management: + name: Ders Yönetimi + identifier: course_management + description: Description diff --git a/test/fixtures/patron/query_stores.yml b/test/fixtures/patron/query_stores.yml new file mode 100644 index 000000000..280a85301 --- /dev/null +++ b/test/fixtures/patron/query_stores.yml @@ -0,0 +1,9 @@ +unit_scope_muhendislik: + name: Mühendislik Bölümleri + scope_name: "UnitScope" + parameters: "{}" + +unit_scope_egitim: + name: Eğitim Bölümleri + scope_name: "UnitScope" + parameters: "{}" diff --git a/test/fixtures/patron/role_assignments.yml b/test/fixtures/patron/role_assignments.yml new file mode 100644 index 000000000..5d0938009 --- /dev/null +++ b/test/fixtures/patron/role_assignments.yml @@ -0,0 +1,7 @@ +one: + role: admin + user: serhat + +two: + role: student + user: mine diff --git a/test/fixtures/patron/role_permissions.yml b/test/fixtures/patron/role_permissions.yml new file mode 100644 index 000000000..b894ddd74 --- /dev/null +++ b/test/fixtures/patron/role_permissions.yml @@ -0,0 +1,7 @@ +one: + role: admin + permission: unit_management + +two: + role: admin + permission: course_management diff --git a/test/fixtures/patron/roles.yml b/test/fixtures/patron/roles.yml new file mode 100644 index 000000000..dcd7befad --- /dev/null +++ b/test/fixtures/patron/roles.yml @@ -0,0 +1,14 @@ +admin: + name: Admin + identifier: admin + locked: true + +student: + name: Student + identifier: student + locked: true + +custom: + name: Custom + identifier: custom + locked: false diff --git a/test/fixtures/patron/scope_assignments.yml b/test/fixtures/patron/scope_assignments.yml new file mode 100644 index 000000000..e7c7b0506 --- /dev/null +++ b/test/fixtures/patron/scope_assignments.yml @@ -0,0 +1,7 @@ +one: + query_store: unit_scope_muhendislik + user: serhat + +two: + query_store: unit_scope_egitim + user: serhat diff --git a/test/models/patron/permission_test.rb b/test/models/patron/permission_test.rb new file mode 100644 index 000000000..64d41ba87 --- /dev/null +++ b/test/models/patron/permission_test.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class PermissionTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + has_many :role_permissions, dependent: :destroy + has_many :roles, through: :role_permissions + + # validations: presence + validates_presence_of :name + validates_presence_of :identifier + + # validations: uniqueness + validates_uniqueness_of :name + validates_uniqueness_of :identifier + + # validations: length + validates_length_of :name + validates_length_of :identifier + validates_length_of :description, maximum: 65_535 + end +end diff --git a/test/models/patron/query_store_test.rb b/test/models/patron/query_store_test.rb new file mode 100644 index 000000000..c0fb5c136 --- /dev/null +++ b/test/models/patron/query_store_test.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class QueryStoreTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + has_many :scope_assignmets, dependent: :destroy + has_many :users, through: :scope_assignmets + + # validations: presence + validates_presence_of :name + validates_presence_of :scope_name + + # validations: uniqueness + validates_uniqueness_of :name + + # validations: length + validates_length_of :name + validates_length_of :scope_name + end +end diff --git a/test/models/patron/role_assignment_test.rb b/test/models/patron/role_assignment_test.rb new file mode 100644 index 000000000..91e62ca51 --- /dev/null +++ b/test/models/patron/role_assignment_test.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class RoleAssignmentTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + belongs_to :role + belongs_to :user + + # validations: uniqueness + validates_uniqueness_of :role_id + end +end diff --git a/test/models/patron/role_permission_test.rb b/test/models/patron/role_permission_test.rb new file mode 100644 index 000000000..1a3797e13 --- /dev/null +++ b/test/models/patron/role_permission_test.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class RolePermissionTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + belongs_to :role + belongs_to :permission + + # validations: uniqueness + validates_uniqueness_of :permission_id + end +end diff --git a/test/models/patron/role_test.rb b/test/models/patron/role_test.rb new file mode 100644 index 000000000..adc709153 --- /dev/null +++ b/test/models/patron/role_test.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class RoleTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + has_many :role_assignments, dependent: :destroy + has_many :users, through: :role_assignments + has_many :role_permissions, dependent: :destroy + has_many :permissions, through: :role_permissions + + # validations: presence + validates_presence_of :name + validates_presence_of :identifier + + # validations: uniqueness + validates_uniqueness_of :name + validates_uniqueness_of :identifier + + # validations: length + validates_length_of :name + validates_length_of :identifier + end +end diff --git a/test/models/patron/scope_assignment_test.rb b/test/models/patron/scope_assignment_test.rb new file mode 100644 index 000000000..1c58aa499 --- /dev/null +++ b/test/models/patron/scope_assignment_test.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Patron + class ScopeAssignmentTest < ActiveSupport::TestCase + extend Support::Minitest::AssociationHelper + extend Support::Minitest::ValidationHelper + + # relations + belongs_to :query_store + belongs_to :user + end +end From bbf1e5c079afd3713c153b0d90f17beac3161610 Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 22 Apr 2019 20:30:40 +0300 Subject: [PATCH 158/279] =?UTF-8?q?Sidebar'a=20yetkilendirme=20men=C3=BCs?= =?UTF-8?q?=C3=BC=20ekle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/shared/_sidebar.html.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/layouts/shared/_sidebar.html.erb b/app/views/layouts/shared/_sidebar.html.erb index bb99978af..86a7ac1a9 100644 --- a/app/views/layouts/shared/_sidebar.html.erb +++ b/app/views/layouts/shared/_sidebar.html.erb @@ -104,6 +104,11 @@ <%= fa_icon('superpowers', class: 'nav-icon') %><%= t('.administration') %>
    diff --git a/app/views/patron/permissions/_permissions.html.erb b/app/views/patron/components/_permissions.html.erb similarity index 74% rename from app/views/patron/permissions/_permissions.html.erb rename to app/views/patron/components/_permissions.html.erb index fb7699b03..4ce3a4a6a 100644 --- a/app/views/patron/permissions/_permissions.html.erb +++ b/app/views/patron/components/_permissions.html.erb @@ -1,8 +1,8 @@ - - + + <% if actions_visible %> <% end %> diff --git a/app/views/patron/query_stores/_preview.html.erb b/app/views/patron/components/_preview.html.erb similarity index 100% rename from app/views/patron/query_stores/_preview.html.erb rename to app/views/patron/components/_preview.html.erb diff --git a/app/views/patron/query_stores/_query_stores.html.erb b/app/views/patron/components/_query_stores.html.erb similarity index 79% rename from app/views/patron/query_stores/_query_stores.html.erb rename to app/views/patron/components/_query_stores.html.erb index 0f571cc88..43dd155a3 100644 --- a/app/views/patron/query_stores/_query_stores.html.erb +++ b/app/views/patron/components/_query_stores.html.erb @@ -1,9 +1,9 @@
    <%= t('.name') %><%= t('.identifier') %><%= t('name', scope: %i[activerecord attributes patron/permission]) %><%= t('identifier', scope: %i[activerecord attributes patron/permission]) %><%= t('actions') %>
    - - - + + + <% if actions_visible %> <% end %> diff --git a/app/views/patron/roles/_roles.html.erb b/app/views/patron/components/_roles.html.erb similarity index 68% rename from app/views/patron/roles/_roles.html.erb rename to app/views/patron/components/_roles.html.erb index e10c6c064..234e4166f 100644 --- a/app/views/patron/roles/_roles.html.erb +++ b/app/views/patron/components/_roles.html.erb @@ -1,9 +1,9 @@
    <%= t('.name') %><%= t('.scope_name') %><%= t('.type') %><%= t('name', scope: %i[activerecord attributes patron/query_store]) %><%= t('scope_name', scope: %i[activerecord attributes patron/query_store]) %><%= t('type', scope: %i[activerecord attributes patron/query_store]) %><%= t('actions') %>
    - - - + + + <% if actions_visible %> <% end %> diff --git a/app/views/patron/components/_users.html.erb b/app/views/patron/components/_users.html.erb new file mode 100644 index 000000000..79a0976c7 --- /dev/null +++ b/app/views/patron/components/_users.html.erb @@ -0,0 +1,29 @@ +
    <%= t('.name') %><%= t('.identifier') %><%= t('.locked') %><%= t('name', scope: %i[activerecord attributes patron/role]) %><%= t('identifier', scope: %i[activerecord attributes patron/role]) %><%= t('locked', scope: %i[activerecord attributes patron/role]) %><%= t('actions') %>
    + + + + + + + <% if actions_visible %> + + <% end %> + + + + <% @users.each do |user| %> + + + + + + <% if actions_visible %> + + <% end %> + + <% end %> + +
    <%= t('id_number', scope: %i[activerecord attributes user]) %><%= t('email', scope: %i[activerecord attributes user]) %><%= t('first_name', scope: %i[activerecord attributes identity]) %><%= t('last_name', scope: %i[activerecord attributes identity]) %><%= t('actions') %>
    <%= user.id_number %><%= user.email %><%= user.identities.user_identity.try(:first_name) %><%= user.identities.user_identity.try(:last_name) %> + <%= link_to_show patron_assignment_path(user) %> + <%= link_to_edit t('.assignment'), edit_patron_assignment_path(user) %> +
    diff --git a/app/views/patron/permissions/index.html.erb b/app/views/patron/permissions/index.html.erb index 3783d60a4..6b11ffc0f 100644 --- a/app/views/patron/permissions/index.html.erb +++ b/app/views/patron/permissions/index.html.erb @@ -14,7 +14,7 @@ <%= render 'layouts/shared/smart_search_form', path: patron_permissions_path, placeholder: t('.smart_search_placeholder') %> - <%= render 'permissions', + <%= render 'patron/components/permissions', permissions: @permissions, actions_visible: true %>
    diff --git a/app/views/patron/permissions/show.html.erb b/app/views/patron/permissions/show.html.erb index b409d2ecc..ac327b256 100644 --- a/app/views/patron/permissions/show.html.erb +++ b/app/views/patron/permissions/show.html.erb @@ -25,7 +25,7 @@ <%= render 'layouts/shared/smart_search_form', path: patron_permission_path(@permission), placeholder: t('.smart_search_placeholder') %> - <%= render 'patron/roles/roles', + <%= render 'patron/components/roles', roles: @roles, actions_visible: false %>
    diff --git a/app/views/patron/query_stores/index.html.erb b/app/views/patron/query_stores/index.html.erb index 1a734b72f..8cbba2649 100644 --- a/app/views/patron/query_stores/index.html.erb +++ b/app/views/patron/query_stores/index.html.erb @@ -31,7 +31,7 @@ <%= render 'layouts/shared/smart_search_form', path: patron_query_stores_path, placeholder: t('.smart_search_placeholder') %> - <%= render 'query_stores', + <%= render 'patron/components/query_stores', query_stores: @query_stores, actions_visible: true %>
    diff --git a/app/views/patron/query_stores/preview.html.erb b/app/views/patron/query_stores/preview.html.erb index ea38edf42..8ce75f283 100644 --- a/app/views/patron/query_stores/preview.html.erb +++ b/app/views/patron/query_stores/preview.html.erb @@ -3,5 +3,5 @@ <%= link_to_edit [:edit, @query_store] %> <% end %> -<%= render 'preview', +<%= render 'patron/components/preview', search_path: [:preview, @query_store] %> diff --git a/app/views/patron/roles/index.html.erb b/app/views/patron/roles/index.html.erb index 9750f3c5a..f9bed6a8d 100644 --- a/app/views/patron/roles/index.html.erb +++ b/app/views/patron/roles/index.html.erb @@ -18,7 +18,7 @@ <%= render 'layouts/shared/smart_search_form', path: patron_roles_path, placeholder: t('.smart_search_placeholder') %> - <%= render 'roles', + <%= render 'patron/components/roles', roles: @roles, actions_visible: true %>
diff --git a/app/views/patron/roles/show.html.erb b/app/views/patron/roles/show.html.erb index 44a2ed110..98d18bd51 100644 --- a/app/views/patron/roles/show.html.erb +++ b/app/views/patron/roles/show.html.erb @@ -13,7 +13,7 @@ <%= render 'layouts/shared/smart_search_form', path: patron_role_path(@role), placeholder: t('.smart_search_placeholder') %> - <%= render 'patron/permissions/permissions', + <%= render 'patron/components/permissions', permissions: @permissions, actions_visible: false %> diff --git a/config/locales/controllers/patron/assignments.en.yml b/config/locales/controllers/patron/assignments.en.yml index 05232dbe4..0d3883b86 100644 --- a/config/locales/controllers/patron/assignments.en.yml +++ b/config/locales/controllers/patron/assignments.en.yml @@ -1,22 +1,14 @@ en: patron: assignments: - user: &user_attributes - assignment: Assign Role and Scope - email: E-mail - first_name: First Name - id_number: ID Number - last_name: Last Name edit: form_title: Update the Assignment index: - <<: *user_attributes card_header: Users smart_search_placeholder: TC/YU number, e-mail address, first of last name preview_scope: error: An error occurred when preview the scope. show: - <<: *user_attributes permissions: Permissions query_stores: Scope Queries roles: Roles diff --git a/config/locales/controllers/patron/assignments.tr.yml b/config/locales/controllers/patron/assignments.tr.yml index 8f9ca8f8e..72fc18568 100644 --- a/config/locales/controllers/patron/assignments.tr.yml +++ b/config/locales/controllers/patron/assignments.tr.yml @@ -1,22 +1,14 @@ tr: patron: assignments: - user: &user_attributes - assignment: Rol ve Kapsam Ata - email: E-mail Adresi - first_name: Adı - id_number: Kimlik Numarası - last_name: Soyadı edit: form_title: Atamayı Güncelle index: - <<: *user_attributes card_header: Kullanıcılar smart_search_placeholder: TC/YU numarası, e-mail adresi, ad veya soyad preview_scope: error: Kapsam ön izlemesi sırasında bir hata oluştu. show: - <<: *user_attributes permissions: İzinler query_stores: Kapsam Sorguları roles: Roller diff --git a/config/locales/controllers/patron/components.en.yml b/config/locales/controllers/patron/components.en.yml new file mode 100644 index 000000000..af0bc1a3d --- /dev/null +++ b/config/locales/controllers/patron/components.en.yml @@ -0,0 +1,8 @@ +en: + patron: + components: + preview: + smart_search_placeholder: Search with Model-Specific Keyword + total_number_of_records: Total Number of Records + users: + assignment: Assign Role and Scope diff --git a/config/locales/controllers/patron/components.tr.yml b/config/locales/controllers/patron/components.tr.yml new file mode 100644 index 000000000..be9bcd3d0 --- /dev/null +++ b/config/locales/controllers/patron/components.tr.yml @@ -0,0 +1,8 @@ +tr: + patron: + components: + preview: + smart_search_placeholder: Modele Özel Anahtar Kelime ile Arama + total_number_of_records: Toplam Kayıt Sayısı + users: + assignment: Rol ve Kapsam Ata diff --git a/config/locales/controllers/patron/permissions.en.yml b/config/locales/controllers/patron/permissions.en.yml index af367dccf..98a06b660 100644 --- a/config/locales/controllers/patron/permissions.en.yml +++ b/config/locales/controllers/patron/permissions.en.yml @@ -10,8 +10,6 @@ en: index: card_header: Permissions smart_search_placeholder: Permission Name or Identifier - permissions: - <<: *permission_attributes show: <<: *permission_attributes roles: Roles diff --git a/config/locales/controllers/patron/permissions.tr.yml b/config/locales/controllers/patron/permissions.tr.yml index ab8d93626..502d07ecb 100644 --- a/config/locales/controllers/patron/permissions.tr.yml +++ b/config/locales/controllers/patron/permissions.tr.yml @@ -10,8 +10,6 @@ tr: index: card_header: İzinler smart_search_placeholder: İzin Adı veya Tanımlayıcısı - permissions: - <<: *permission_attributes show: <<: *permission_attributes roles: Roller diff --git a/config/locales/controllers/patron/query_stores.en.yml b/config/locales/controllers/patron/query_stores.en.yml index d37c8ebb5..7b1277fb9 100644 --- a/config/locales/controllers/patron/query_stores.en.yml +++ b/config/locales/controllers/patron/query_stores.en.yml @@ -18,8 +18,6 @@ en: update: Update Scope Query patron: query_stores: - query_stores: - <<: *query_stores_attributes create: success: Scope query successfully created. destroy: @@ -28,16 +26,12 @@ en: edit: form_title: Update the Scope Query index: - <<: *query_stores_attributes card_header: Scope Queries new_query_store_link: Add a New Scope Query new_query_store_link_for_scope: Add for %{scope_name} smart_search_placeholder: Scope Query Name or Scope Name new: form_title: Create a Scope Query - preview: - smart_search_placeholder: Search with Model-Specific Keyword - total_number_of_records: Total Number of Records show: <<: *query_stores_attributes update: diff --git a/config/locales/controllers/patron/query_stores.tr.yml b/config/locales/controllers/patron/query_stores.tr.yml index 5690371c0..5bc5a08f1 100644 --- a/config/locales/controllers/patron/query_stores.tr.yml +++ b/config/locales/controllers/patron/query_stores.tr.yml @@ -18,8 +18,6 @@ tr: update: Kapsam Sorgusunu Güncelle patron: query_stores: - query_stores: - <<: *query_stores_attributes create: success: Kapsam sorgusu başarıyla oluşturuldu. destroy: @@ -28,16 +26,12 @@ tr: edit: form_title: Kapsam Sorgusunu Güncelle index: - <<: *query_stores_attributes card_header: Kapsam Sorguları new_query_store_link: Yeni Kapsam Sorgusu Ekle new_query_store_link_for_scope: "%{scope_name} için Ekle" smart_search_placeholder: Kapsam Sorgu Adı veya Kapsam Adı new: form_title: Kapsam Sorgusu Oluştur - preview: - smart_search_placeholder: Modele Özel Anahtar Kelime ile Arama - total_number_of_records: Toplam Kayıt Sayısı show: <<: *query_stores_attributes update: diff --git a/config/locales/controllers/patron/roles.en.yml b/config/locales/controllers/patron/roles.en.yml index d568a75af..7a819e20b 100644 --- a/config/locales/controllers/patron/roles.en.yml +++ b/config/locales/controllers/patron/roles.en.yml @@ -26,10 +26,8 @@ en: smart_search_placeholder: Role Name or Identifier new: form_title: Create a Role - roles: - <<: *role_attributes show: - <<: *role_attributes + permissions: Permissions smart_search_placeholder: Permission Name or Identifier update: success: Role successfully updated. diff --git a/config/locales/controllers/patron/roles.tr.yml b/config/locales/controllers/patron/roles.tr.yml index 67a0ce642..d8be07e9c 100644 --- a/config/locales/controllers/patron/roles.tr.yml +++ b/config/locales/controllers/patron/roles.tr.yml @@ -26,10 +26,8 @@ tr: smart_search_placeholder: Rol Adı veya Tanımlayıcısı new: form_title: Yeni Rol Oluştur - roles: - <<: *role_attributes show: - <<: *role_attributes + permissions: İzinler smart_search_placeholder: İzin Adı veya Tanımlayıcısı update: success: Rol başarıyla güncellendi. From 0142cbd29c28a56717a358c8130501f35bce262b Mon Sep 17 00:00:00 2001 From: isubas Date: Mon, 29 Apr 2019 18:26:27 +0300 Subject: [PATCH 232/279] =?UTF-8?q?Sayfa=20d=C3=BCzenlerini=20iyile=C5=9Ft?= =?UTF-8?q?ir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../concerns/patron/searchable_module.rb | 17 ++++++ .../patron/assignments_controller.rb | 22 +++---- .../patron/permissions_controller.rb | 10 +++- .../patron/query_stores_controller.rb | 22 +++---- app/controllers/patron/roles_controller.rb | 9 ++- app/lib/patron/rolable.rb | 4 +- app/views/patron/assignments/_form.html.erb | 2 +- app/views/patron/assignments/index.html.erb | 1 + app/views/patron/assignments/show.html.erb | 4 ++ app/views/patron/components/_preview.html.erb | 6 +- app/views/patron/components/_users.html.erb | 6 +- app/views/patron/permissions/show.html.erb | 54 ++++++++++++----- app/views/patron/query_stores/show.html.erb | 23 +++++++ app/views/patron/roles/show.html.erb | 60 +++++++++++++------ .../controllers/patron/assignments.en.yml | 1 + .../controllers/patron/assignments.tr.yml | 1 + .../controllers/patron/permissions.en.yml | 4 +- .../controllers/patron/permissions.tr.yml | 4 +- .../controllers/patron/query_stores.en.yml | 2 + .../controllers/patron/query_stores.tr.yml | 2 + .../locales/controllers/patron/roles.en.yml | 3 +- .../locales/controllers/patron/roles.tr.yml | 3 +- 22 files changed, 189 insertions(+), 71 deletions(-) create mode 100644 app/controllers/concerns/patron/searchable_module.rb diff --git a/app/controllers/concerns/patron/searchable_module.rb b/app/controllers/concerns/patron/searchable_module.rb new file mode 100644 index 000000000..53c974851 --- /dev/null +++ b/app/controllers/concerns/patron/searchable_module.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Patron + module SearchableModule + extend ActiveSupport::Concern + include Pagy::Backend + + def pagy_by_search(collection, page_param: :page, pagy_name: :pagy) + term = params[:term] + collection = term.present? && collection.respond_to?(:search) ? collection.search(term) : collection + pagination = pagy(collection, page_param: page_param) + + instance_variable_set("@#{pagy_name}", pagination.first) + pagination.last + end + end +end diff --git a/app/controllers/patron/assignments_controller.rb b/app/controllers/patron/assignments_controller.rb index 1dbd84f60..263e050b3 100644 --- a/app/controllers/patron/assignments_controller.rb +++ b/app/controllers/patron/assignments_controller.rb @@ -2,7 +2,7 @@ module Patron class AssignmentsController < ApplicationController - include SearchableModule + include Patron::SearchableModule before_action :set_user, only: %i[edit show update preview_scope] before_action :authorized? @@ -12,14 +12,14 @@ def index end def show - @pagy_roles, @roles = pagy( - @user.roles.order(:name), page_param: 'page_role' - ) - @pagy_permissions, @permissions = pagy( - @user.permissions.order(:name), page_param: 'page_permission' - ) - @pagy_query_stores, @query_stores = pagy( - @user.query_stores.order(:name, :scope_name), page_param: 'page_query_store' + @roles = pagy_by_search( + @user.roles, page_param: 'page_role', pagy_name: 'pagy_roles' + ).uniq + @permissions = pagy_by_search( + @user.permissions, page_param: 'page_permission', pagy_name: 'pagy_permissions' + ).uniq + @query_stores = pagy_by_search( + @user.query_stores, page_param: 'page_query_store', pagy_name: 'pagy_query_stores' ) end @@ -38,8 +38,8 @@ def preview_scope if query_stores.present? @scope = query_stores.first.scope_klass - @results = @scope.preview_for_records(query_stores) - @collection = pagy_by_search(@results) + @records = @scope.preview_for_records(query_stores) + @collection = pagy_by_search(@records) else redirect_to([:patron, :assignment, id: @user], alert: t('.error')) end diff --git a/app/controllers/patron/permissions_controller.rb b/app/controllers/patron/permissions_controller.rb index dd64610ca..e6ca0a65c 100644 --- a/app/controllers/patron/permissions_controller.rb +++ b/app/controllers/patron/permissions_controller.rb @@ -2,7 +2,7 @@ module Patron class PermissionsController < ApplicationController - include SearchableModule + include Patron::SearchableModule def index @permissions = pagy_by_search(Patron::Permission.order(:name)) @@ -12,7 +12,13 @@ def index def show @permission = Patron::Permission.find(params[:id]) - @roles = pagy_by_search(@permission.roles) + + @roles = pagy_by_search( + @permission.roles.order(:name), page_param: 'page_role', pagy_name: :pagy_roles + ) + @users = pagy_by_search( + @permission.users, page_param: 'page_users', pagy_name: :pagy_users + ) authorize @permission end diff --git a/app/controllers/patron/query_stores_controller.rb b/app/controllers/patron/query_stores_controller.rb index 667de30c2..60037b062 100644 --- a/app/controllers/patron/query_stores_controller.rb +++ b/app/controllers/patron/query_stores_controller.rb @@ -2,25 +2,27 @@ module Patron class QueryStoresController < ApplicationController - include SearchableModule + include Patron::SearchableModule before_action :set_query_store, only: %i[show edit update destroy preview] before_action :authorized? def index - @query_stores = pagy_by_search(Patron::QueryStore.order(:name, :scope_name)) + @query_stores = pagy_by_search(Patron::QueryStore.active.order(:name, :scope_name)) end - def show; end + def show + @users = pagy_by_search(@query_store.users) + end def new - @query_store = init_query_scope(params[:scope]) + @query_store = initialize_query_scope(params[:scope]) end def edit; end def create - @query_store = init_query_scope(query_store_params[:scope_name]) + @query_store = initialize_query_scope(query_store_params[:scope_name]) @query_store.assign_attributes(query_store_params) @query_store.save ? redirect_to(@query_store, notice: t('.success')) : render(:new) end @@ -39,8 +41,8 @@ def destroy def preview @scope = @query_store.scope_klass - @results = @scope.preview_for_records(@query_store) - @collection = pagy_by_search(@results) + @records = @scope.preview_for_records(@query_store) + @collection = pagy_by_search(@records) end private @@ -49,16 +51,16 @@ def authorized? authorize(@role || Patron::QueryStore) end - def init_query_scope(scope_name) + def initialize_query_scope(scope_name) Patron::QueryStore.new(scope_name: scope_name) end def set_query_store - @query_store = Patron::QueryStore.find(params[:id]) + @query_store = Patron::QueryStore.active.find(params[:id]) end def query_store_params - @query_store ||= init_query_scope(params[:patron_query_store][:scope_name]) + @query_store ||= initialize_query_scope(params[:patron_query_store][:scope_name]) params.require(:patron_query_store).permit( :name, :scope_name, :type, *@query_store.permitted_attributes.to_a diff --git a/app/controllers/patron/roles_controller.rb b/app/controllers/patron/roles_controller.rb index 9879f5757..97facbc26 100644 --- a/app/controllers/patron/roles_controller.rb +++ b/app/controllers/patron/roles_controller.rb @@ -2,7 +2,7 @@ module Patron class RolesController < ApplicationController - include SearchableModule + include Patron::SearchableModule before_action :set_role, only: %i[show edit update destroy] before_action :authorized? @@ -12,7 +12,12 @@ def index end def show - @permissions = pagy_by_search(@role.permissions) + @permissions = pagy_by_search( + @role.permissions.order(:name), page_param: 'page_permission', pagy_name: :pagy_permissions + ) + @users = pagy_by_search( + @role.users, page_param: 'page_users', pagy_name: :pagy_users + ) end def new diff --git a/app/lib/patron/rolable.rb b/app/lib/patron/rolable.rb index 3cda54108..9354c99a6 100644 --- a/app/lib/patron/rolable.rb +++ b/app/lib/patron/rolable.rb @@ -6,8 +6,8 @@ module Rolable included do has_many :role_assignments, class_name: 'Patron::RoleAssignment', dependent: :destroy - has_many :roles, class_name: 'Patron::Role', through: :role_assignments - has_many :permissions, class_name: 'Patron::Permission', through: :roles + has_many :roles, -> { distinct }, class_name: 'Patron::Role', through: :role_assignments + has_many :permissions, -> { distinct }, class_name: 'Patron::Permission', through: :roles end def roles?(*identifiers) diff --git a/app/views/patron/assignments/_form.html.erb b/app/views/patron/assignments/_form.html.erb index b92240555..20e547dec 100644 --- a/app/views/patron/assignments/_form.html.erb +++ b/app/views/patron/assignments/_form.html.erb @@ -31,7 +31,7 @@ -