From 822cbf396124c33220d3cbf14578f0b18db32091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20=C3=96zg=C3=BCr=20=C3=96ZKAN?= Date: Sat, 19 Jul 2014 06:11:37 +0300 Subject: [PATCH 01/23] Update GEM version. --- templates/cybele_Gemfile | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/templates/cybele_Gemfile b/templates/cybele_Gemfile index 73ec369..9eea613 100644 --- a/templates/cybele_Gemfile +++ b/templates/cybele_Gemfile @@ -1,20 +1,20 @@ source 'https://rubygems.org' -gem 'rails', '~> 4.1.1' -gem 'pg', '~> 0.16.0' -gem 'sass-rails', '~> 4.0.0' +gem 'rails', '~> 4.1.4' +gem 'pg', '~> 0.17.1' +gem 'sass-rails', '~> 4.0.3' gem 'uglifier', '>= 1.3.0' -gem 'coffee-rails', '~> 4.0.0' -gem 'jquery-rails', '~> 3.0.4' -gem 'turbolinks', '~> 1.3.0' -gem 'haml', '~> 4.0.2' +gem 'coffee-rails', '~> 4.0.1' +gem 'jquery-rails', '~> 3.1.1' +gem 'turbolinks', '~> 2.2.2' +gem 'haml', '~> 4.0.5' gem 'haml-rails' -gem 'bootstrap-sass', '~> 3.0.3.0' -gem 'responders', '~> 1.0.0' +gem 'bootstrap-sass', '~> 3.2.0.0' +gem 'responders', '~> 1.1.0' gem 'exception_notification', '~> 4.0.1' -gem 'simple_form', '~> 3.0.1' -gem 'show_for', '~> 0.3.0.rc' -gem 'rails_config', '~> 0.3.3' +gem 'simple_form', '~> 3.0.2' +gem 'show_for', '~> 0.3.0' +gem 'rails_config', '~> 0.4.2' gem 'compass-rails', '~> 1.1.2' gem 'devise', '~> 3.2.4' gem 'devise-i18n', '~> 0.9.0' @@ -24,19 +24,18 @@ gem 'will-paginate-i18n', '~> 0.1.13' gem 'paperclip', '~> 3.5.1' gem 'kangal', '~> 1.2.3' gem 'rack-timeout', '~> 0.0.4' -gem 'annotate', '>=2.5.0' +gem 'annotate', '~> 2.6.5' gem 'recipient_interceptor', '~> 0.1.2' gem 'rails-i18n', '~> 4.0.1' gem 'ransack', '~> 1.2.3' gem 'capistrano', '~> 2.15.5' gem 'capistrano-ext', '~> 1.2.1' -gem 'unicorn', '~> 4.8.2' -gem 'recipes_matic', '~> 1.0.0' +gem 'unicorn', '~> 4.8.3' +gem 'recipes_matic', '~> 1.1.0' gem 'aws-sdk', '~> 1.29.0' gem 'polyamorous', '~> 1.0.0' # gem 'rails-observers' -gem 'rails_best_practices', '~> 1.15.1' gem 'hierapolis-rails', '~> 1.1.0' gem 'breadcrumbs_on_rails', '~> 2.3.0' @@ -51,11 +50,12 @@ group :development, :test do gem 'binding_of_caller' gem 'letter_opener' gem 'katip' - gem 'rspec-rails', '~> 2.14.0' - gem 'capybara', '~> 2.1.0' + gem 'rspec-rails', '~> 3.0.1' + gem 'capybara', '~> 2.4.1' gem 'minitest', '~> 5.3.3' - gem 'shoulda-matchers', '~> 2.2.0' - gem 'shoulda-context', '~> 1.1.5' - gem 'factory_girl_rails', '~> 4.0' + gem 'shoulda-matchers', '~> 2.6.2' + gem 'shoulda-context', '~> 1.2.1' + gem 'factory_girl_rails', '~> 4.4.1' gem 'bullet' + gem 'rails_best_practices', '~> 1.15.4' end From 4bde1636da4c3ab912fc6f2623fe20c8e2ce7177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Kemal=20BAYG=C3=9CN?= Date: Thu, 15 Jan 2015 15:10:51 +0200 Subject: [PATCH 02/23] TB-65 Fix contributor link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 27522e3..bc0dbc1 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Let's look the [Gemfile](https://raw.github.com/kebab-project/cybele/develop/tem If you discover any bugs or want to drop a line, feel free to create an issue on GitHub. -http://github.com/kebab-project/cybele/issues +http://github.com/lab2023/cybele/issues ## Contributing @@ -58,7 +58,7 @@ Once you've made your great commits: ![lab2023](http://lab2023.com/assets/images/named-logo.png) - Cybele is maintained and funded by [lab2023 - information technologies](http://lab2023.com/) -- Thank you to all the [contributors!](https://github.com/kebab-project/cybele/graphs/contributors) +- Thank you to all the [contributors!](../../graphs/contributors) - This gem is inspired from [suspender](https://github.com/thoughtbot/suspenders) - The names and logos for lab2023 are trademarks of lab2023, inc. From 44cfd061affbb2b6d0fa37f90be229bc5c955a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Kemal=20BAYG=C3=9CN?= Date: Thu, 15 Jan 2015 15:17:30 +0200 Subject: [PATCH 03/23] TB-65 Fix link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc0dbc1..5a79d4e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ rake db:migrate ## What cybele do and included? -Let's look the [Gemfile](https://raw.github.com/kebab-project/cybele/develop/templates/cybele_Gemfile) which created by cybele. +Let's look the [Gemfile](https://raw.github.com/lab2023/cybele/develop/templates/cybele_Gemfile) which created by cybele. ## Bugs and Feedback From e7fd5687087188572fd1dd57eebfabde8a0afcbc Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:27:35 +0300 Subject: [PATCH 04/23] update gems version --- templates/cybele_Gemfile | 76 +++++++++++++++++++--------------------- templates/ruby-version | 2 +- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/templates/cybele_Gemfile b/templates/cybele_Gemfile index 9eea613..8ca6c8d 100644 --- a/templates/cybele_Gemfile +++ b/templates/cybele_Gemfile @@ -1,61 +1,57 @@ source 'https://rubygems.org' -gem 'rails', '~> 4.1.4' -gem 'pg', '~> 0.17.1' -gem 'sass-rails', '~> 4.0.3' -gem 'uglifier', '>= 1.3.0' -gem 'coffee-rails', '~> 4.0.1' -gem 'jquery-rails', '~> 3.1.1' -gem 'turbolinks', '~> 2.2.2' -gem 'haml', '~> 4.0.5' -gem 'haml-rails' -gem 'bootstrap-sass', '~> 3.2.0.0' -gem 'responders', '~> 1.1.0' -gem 'exception_notification', '~> 4.0.1' -gem 'simple_form', '~> 3.0.2' -gem 'show_for', '~> 0.3.0' +gem 'rails', '~> 4.2.3' +gem 'pg', '~> 0.18.2' gem 'rails_config', '~> 0.4.2' -gem 'compass-rails', '~> 1.1.2' -gem 'devise', '~> 3.2.4' +gem 'devise', '~> 3.4.1' gem 'devise-i18n', '~> 0.9.0' -gem 'will_paginate', '~> 3.0.4' -gem 'will_paginate-bootstrap', '~> 0.2.3' -gem 'will-paginate-i18n', '~> 0.1.13' -gem 'paperclip', '~> 3.5.1' +gem 'paperclip', '~> 4.3.0' gem 'kangal', '~> 1.2.3' -gem 'rack-timeout', '~> 0.0.4' -gem 'annotate', '~> 2.6.5' +gem 'rack-timeout', '~> 0.2.4' +gem 'annotate', '~> 2.6.0' gem 'recipient_interceptor', '~> 0.1.2' -gem 'rails-i18n', '~> 4.0.1' -gem 'ransack', '~> 1.2.3' +gem 'rails-i18n', '~> 4.0.4' +gem 'ransack', '~> 1.6.6' +gem 'polyamorous', '~> 1.2.0' gem 'capistrano', '~> 2.15.5' -gem 'capistrano-ext', '~> 1.2.1' -gem 'unicorn', '~> 4.8.3' -gem 'recipes_matic', '~> 1.1.0' -gem 'aws-sdk', '~> 1.29.0' -gem 'polyamorous', '~> 1.0.0' - -# gem 'rails-observers' +gem 'unicorn', '~> 4.9.0' +gem 'exception_notification', '~> 4.1.1' +gem 'responders', '~> 2.1.0' +gem 'will_paginate', '~> 3.0.4' +gem 'will_paginate-bootstrap', '~> 0.2.3' +gem 'will-paginate-i18n', '~> 0.1.13' +gem 'rails_best_practices', '~> 1.15.1' +gem 'simple_form', '~> 3.1.0' +gem 'show_for', '~> 0.4.0' +gem 'uglifier', '~> 2.7.1' +gem 'coffee-rails', '~> 4.1.0' +gem 'jquery-rails', '~> 4.0.4' +gem 'turbolinks', '~> 2.5.3' +gem 'haml', '~> 4.0.2' +gem 'haml-rails', '0.9.0' gem 'hierapolis-rails', '~> 1.1.0' -gem 'breadcrumbs_on_rails', '~> 2.3.0' +gem 'breadcrumbs_on_rails', '~> 2.3.1' gem 'blankable', '~> 0.2.0' +gem 'sass-rails', '~> 5.0.3' +gem 'compass-rails', '~> 2.0.5' +gem 'bootstrap-sass', '~> 3.3.4' +# gem 'sass-rails', '~> 4.0.0' +# gem 'compass-rails', '~> 1.1' +# gem 'bootstrap-sass', '~> 3.3.4' +# gem 'chosen-rails', '1.4.1' +# gem 'chosen-sass-bootstrap-rails', '0.0.2' + group :doc do gem 'sdoc', require: false end group :development, :test do gem 'better_errors' - gem 'binding_of_caller' gem 'letter_opener' + gem 'rspec-rails' gem 'katip' - gem 'rspec-rails', '~> 3.0.1' - gem 'capybara', '~> 2.4.1' - gem 'minitest', '~> 5.3.3' - gem 'shoulda-matchers', '~> 2.6.2' - gem 'shoulda-context', '~> 1.2.1' - gem 'factory_girl_rails', '~> 4.4.1' + gem 'capybara' gem 'bullet' - gem 'rails_best_practices', '~> 1.15.4' end diff --git a/templates/ruby-version b/templates/ruby-version index eca07e4..b1b25a5 100644 --- a/templates/ruby-version +++ b/templates/ruby-version @@ -1 +1 @@ -2.1.2 +2.2.2 From 388cee068114141b878b6b0edf478cc224b896ac Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:28:17 +0300 Subject: [PATCH 05/23] add new methods and remove old methods --- lib/cybele/app_builder.rb | 40 ++++++++++++++++++++++---- lib/cybele/generators/app_generator.rb | 38 ++++++++++++++++++------ 2 files changed, 63 insertions(+), 15 deletions(-) diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index 10c5f46..f2558e2 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -81,7 +81,7 @@ def setup_asset_precompile config = <<-RUBY - + config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif) config.sass.preferred_syntax = :sass RUBY @@ -180,7 +180,7 @@ def generate_factory_girl end def generate_simple_form - generate 'simple_form:install --bootstrap' + generate 'simple_form:install --bootstrap --force' copy_file 'config/locales/simple_form.tr.yml', 'config/locales/simple_form.tr.yml' copy_file 'config/locales/tr.yml', 'config/locales/tr.yml' end @@ -224,7 +224,7 @@ def generate_rails_config def generate_devise_settings generate 'devise:install' gsub_file 'config/initializers/filter_parameter_logging.rb', /:password/, ':password, :password_confirmation' - gsub_file 'config/initializers/devise.rb', /please-change-me-at-config-initializers-devise@example.com/, 'CHANGEME@example.com' + gsub_file 'config/initializers/devise.rb', /please-change-me-at-config-initializers-devise@example.com/, 'Settings.mail.sender.email' end def generate_devise_model(model_name) @@ -254,7 +254,7 @@ def generate_hq_namespace path_names: {sign_in: 'login', sign_out: 'logout', password: 'secret', confirmation: 'verification'}" gsub_file 'app/models/admin.rb', /:registerable,/, '' - + say 'Configuring profile editors...' setup_profile_editors end @@ -269,7 +269,7 @@ def setup_profile_editors inject_into_file 'config/routes.rb', :after => "to: 'welcome#index'\n" do <<-RUBY -resource :user_profile, except: [:destroy], path: 'profile' + resource :user_profile, except: [:destroy], path: 'profile' RUBY end @@ -300,10 +300,12 @@ def replace_simple_form_wrapper copy_file 'config/initializers/simple_form_bootstrap.rb', 'config/initializers/simple_form_bootstrap.rb' end + # Nor using def setup_capistrano run 'capify .' end + # Nor using def setup_recipes run 'rm config/deploy.rb' generate 'recipes_matic:install' @@ -326,7 +328,7 @@ def custom_exception_page copy_file 'app/views/errors/internal_server_error.html.haml', 'app/views/errors/internal_server_error.html.haml' inject_into_file 'app/controllers/application_controller.rb', :before => 'protected' do <<-CODE - rescue_from Exception, :with => :server_error + # rescue_from Exception, :with => :server_error def server_error(exception) ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver respond_to do |format| @@ -354,6 +356,30 @@ def page_not_found end end + # Add default admin user and admin profile seeder + def add_seeds + say 'Add seeds' + inject_into_file 'db/seeds.rb', :after => "# Mayor.create(name: 'Emanuel', city: cities.first)\n" do <<-RUBY + +admin = Admin.create(email: "admin@app.com", password: '12341234', password_confirmation: '12341234') +admin.admin_profile = AdminProfile.create(first_name: 'Admin', last_name: "App") + + RUBY + end + end + + # Copy locale files + def copy_locales + say 'Coping files..' + copy_file 'config/locales/models.en.yml', 'config/locales/models.en.yml' + copy_file 'config/locales/models.tr.yml', 'config/locales/models.tr.yml' + copy_file 'config/locales/show_for.en.yml', 'config/locales/show_for.en.yml' + copy_file 'config/locales/show_for.tr.yml', 'config/locales/show_for.tr.yml' + copy_file 'config/locales/simple_form.tr.yml', 'config/locales/simple_form.tr.yml' + copy_file 'config/locales/view.en.yml', 'config/locales/view.en.yml' + copy_file 'config/locales/view.tr.yml', 'config/locales/view.tr.yml' + end + private def action_mailer_host(rails_env, host) @@ -399,6 +425,7 @@ def create_sanitizer_initializer(model_name) def devise_parameter_sanitizer(model_name) inject_into_file 'app/controllers/application_controller.rb', :after => 'protect_from_forgery with: :exception' do <<-CODE + protected def devise_parameter_sanitizer @@ -473,5 +500,6 @@ def add_profile_views RUBY end end + end end diff --git a/lib/cybele/generators/app_generator.rb b/lib/cybele/generators/app_generator.rb index 173b905..6951fbe 100644 --- a/lib/cybele/generators/app_generator.rb +++ b/lib/cybele/generators/app_generator.rb @@ -42,7 +42,7 @@ def customization invoke :setup_time_zone invoke :setup_bullet_config invoke :setup_hq_namespace - invoke :setup_profiles + invoke :setup_profiles end def customize_gemfile @@ -181,53 +181,73 @@ def setup_profiles build :create_profile end - def run_bundle - end + # def run_bundle + # say 'Run bundle' + # end def setup_hierapolis + say 'Setup hierapolis' build :create_hierapolis_theme end def setup_sipmle_form_wrapper + say 'Setup sipmle form wrapper' build :replace_simple_form_wrapper end def setup_exception_notification_to_environments + say 'Setup exception notification for environments' build :add_exception_notification_to_environments end - def install_capistrano - build :setup_capistrano - end + # def install_capistrano + # build :setup_capistrano + # end - def setup_recipes - build :setup_recipes - end + # def setup_recipes + # build :setup_recipes + # end def setup_secret_token + say 'Setup secret token' build :update_secret_token end def setup_bullet_config + say 'Setup bullet config' build :configure_bullet end def install_show_for + say 'Setup show_for' build :setup_show_for end def create_dev_rake + say 'Create dev_rake' build :create_dev_rake end def custom_exception_page + say 'Setup custom exception pages' build :custom_exception_page end def custom_404 + say 'Setup 404 page' build :custom_404 end + def add_seeds + say 'Add seeds main' + build :add_seeds + end + + def copy_locales + say 'Copy config/locale files' + build :copy_locales + end + def goodbye say 'Congratulations! That\'s all...' end From 693c179ed97afc3da7b1960cb12a623f5847b3c6 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:29:05 +0300 Subject: [PATCH 06/23] add localization files --- templates/config/locales/en.yml | 2 + templates/config/locales/models.en.yml | 54 ++++++++++++++++++++ templates/config/locales/models.tr.yml | 56 +++++++++++++++++++++ templates/config/locales/responders.tr.yml | 1 + templates/config/locales/show_for.en.yml | 7 +++ templates/config/locales/show_for.tr.yml | 8 +++ templates/config/locales/simple_form.en.yml | 30 +++++++++++ templates/config/locales/simple_form.tr.yml | 7 ++- templates/config/locales/tr.yml | 32 +----------- templates/config/locales/view.en.yml | 51 +++++++++++++++++++ templates/config/locales/view.tr.yml | 52 +++++++++++++++++++ 11 files changed, 268 insertions(+), 32 deletions(-) create mode 100644 templates/config/locales/en.yml create mode 100644 templates/config/locales/models.en.yml create mode 100644 templates/config/locales/models.tr.yml create mode 100644 templates/config/locales/show_for.en.yml create mode 100644 templates/config/locales/show_for.tr.yml create mode 100644 templates/config/locales/simple_form.en.yml create mode 100644 templates/config/locales/view.en.yml create mode 100644 templates/config/locales/view.tr.yml diff --git a/templates/config/locales/en.yml b/templates/config/locales/en.yml new file mode 100644 index 0000000..ae09dd9 --- /dev/null +++ b/templates/config/locales/en.yml @@ -0,0 +1,2 @@ +en: + hello: "Hello world" \ No newline at end of file diff --git a/templates/config/locales/models.en.yml b/templates/config/locales/models.en.yml new file mode 100644 index 0000000..0b1bc82 --- /dev/null +++ b/templates/config/locales/models.en.yml @@ -0,0 +1,54 @@ +en: + activerecord: + models: + schemamigration: Schemamigration + user: User + user_profiles: User Profile + admin: Admin + admin_profiles: Admin Profile + attributes: + user: + id: Id + email: Email + password: Password + password_confirmation: Password Confirmation + current_password: Current Password + encrypted_password: Encrypted_password + reset_password_token: Reset_password_token + reset_password_sent_at: Reset_password_sent_at + remember_created_at: Remember_created_at + sign_in_count: Sign_in_count + current_sign_in_at: Current_sign_in_at + last_sign_in_at: Last_sign_in_at + current_sign_in_ip: Current_sign_in_ip + last_sign_in_ip: Last_sign_in_ip + active: Active + created_at: Created_at + updated_at: Updated_at + active: Active + user_profile: + first_name: Name + last_name: Surname + gsm: Phone + admin: + id: Id + email: Email + password: Password + password_confirmation: Password Confirmation + current_password: Current Password + encrypted_password: Encrypted_password + reset_password_token: Reset_password_token + reset_password_sent_at: Reset_password_sent_at + remember_created_at: Remember_created_at + sign_in_count: Sign_in_count + current_sign_in_at: Current_sign_in_at + last_sign_in_at: Last_sign_in_at + current_sign_in_ip: Current_sign_in_ip + last_sign_in_ip: Last_sign_in_ip + created_at: Created_at + updated_at: Updated_at + active: Active + admin_profile: + first_name: Name + last_name: Surname + gsm: Phone \ No newline at end of file diff --git a/templates/config/locales/models.tr.yml b/templates/config/locales/models.tr.yml new file mode 100644 index 0000000..310f3de --- /dev/null +++ b/templates/config/locales/models.tr.yml @@ -0,0 +1,56 @@ +# encoding: utf-8 +tr: + activerecord: + models: + schemamigration: Schemamigration + user: Kullanıcı + user_profiles: Kullanıcı Profili + user_profile: Kullanıcı Profili + admin: Yönetici + admin_profiles: Yönetici Profili + admin_profile: Yönetici Profili + attributes: + user: + id: Id + email: E-posta + password: Şifre + password_confirmation: Şifre Onayı + current_password: Şuan ki şifreniz + encrypted_password: Şifrelenmiş şifre + reset_password_token: Şifre sıfırlama token'ı + reset_password_sent_at: Şifre sıfırlama gönderilme zamanı + remember_created_at: Beni hatırla oluşturulma zamanı + sign_in_count: Giriş sayısı + current_sign_in_at: Güncel giriş zamanı + last_sign_in_at: Enson giriş zamanı + current_sign_in_ip: Güncel giriş ip'si + last_sign_in_ip: Enson giriş ip'si + created_at: Oluşturulma Zamanı + updated_at: Güncellenme Zamanı + active: Aktif + user_profile: + first_name: İsim + last_name: Soyisim + gsm: Telefon + admin: + id: Id + email: E-posta + password: Şifre + password_confirmation: Şifre Onayı + current_password: Şuan ki şifreniz + encrypted_password: Şifrelenmiş şifre + reset_password_token: Şifre sıfırlama token'ı + reset_password_sent_at: Şifre sıfırlama gönderilme zamanı + remember_created_at: Beni hatırla oluşturulma zamanı + sign_in_count: Giriş sayısı + current_sign_in_at: Güncel giriş zamanı + last_sign_in_at: Enson giriş zamanı + current_sign_in_ip: Güncel giriş ip'si + last_sign_in_ip: Enson giriş ip'si + created_at: Oluşturulma Zamanı + updated_at: Güncellenme Zamanı + active: Aktif + admin_profile: + first_name: İsim + last_name: Soyisim + gsm: Telefon \ No newline at end of file diff --git a/templates/config/locales/responders.tr.yml b/templates/config/locales/responders.tr.yml index 497ddb8..ae8fbf9 100644 --- a/templates/config/locales/responders.tr.yml +++ b/templates/config/locales/responders.tr.yml @@ -1,3 +1,4 @@ +# encoding: utf-8 tr: flash: actions: diff --git a/templates/config/locales/show_for.en.yml b/templates/config/locales/show_for.en.yml new file mode 100644 index 0000000..ed08650 --- /dev/null +++ b/templates/config/locales/show_for.en.yml @@ -0,0 +1,7 @@ +en: + show_for: + blank: "Not specified" + # If you want to use html tags with blank value use blank html translation + # blank_html: "Not specified" + "yes": "Yes" + "no": "No" \ No newline at end of file diff --git a/templates/config/locales/show_for.tr.yml b/templates/config/locales/show_for.tr.yml new file mode 100644 index 0000000..8cf8697 --- /dev/null +++ b/templates/config/locales/show_for.tr.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +tr: + show_for: + blank: "Belirtilmedi" + # If you want to use html tags with blank value use blank html translation + # blank_html: "Not specified" + "yes": "Evet" + "no": "Hayır" \ No newline at end of file diff --git a/templates/config/locales/simple_form.en.yml b/templates/config/locales/simple_form.en.yml new file mode 100644 index 0000000..f07eb3e --- /dev/null +++ b/templates/config/locales/simple_form.en.yml @@ -0,0 +1,30 @@ +en: + simple_form: + "yes": 'Yes' + "no": 'No' + required: + text: 'required' + mark: '*' + # You can uncomment the line below if you need to overwrite the whole required html. + # When using html, text and mark won't be used. + # html: '*' + error_notification: + default_message: "Please review the problems below:" + # Labels and hints examples + # labels: + # defaults: + # password: 'Password' + # user: + # new: + # email: 'E-mail to sign in.' + # edit: + # email: 'E-mail.' + # hints: + # defaults: + # username: 'User name to sign in.' + # password: 'No special characters, please.' + # user: + # new: + # email: 'E-mail to sign in.' + # edit: + # email: 'E-mail.' \ No newline at end of file diff --git a/templates/config/locales/simple_form.tr.yml b/templates/config/locales/simple_form.tr.yml index 8c662e5..95389d0 100644 --- a/templates/config/locales/simple_form.tr.yml +++ b/templates/config/locales/simple_form.tr.yml @@ -23,4 +23,9 @@ tr: # hints: # defaults: # username: 'User name to sign in.' - # password: 'No special characters, please.' \ No newline at end of file + # password: 'No special characters, please.' + # user: + # new: + # email: 'E-mail to sign in.' + # edit: + # email: 'E-mail.' \ No newline at end of file diff --git a/templates/config/locales/tr.yml b/templates/config/locales/tr.yml index bb5e3bb..2ebb62c 100644 --- a/templates/config/locales/tr.yml +++ b/templates/config/locales/tr.yml @@ -1,33 +1,3 @@ # encoding: utf-8 -# -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - tr: - hello: "Merhaba Dünya" - number: - currency: - format: - format: "%u %n" - unit: "₺" - - internal_server_error: "Üzgünüz. Şu anda bir hata var. Mühendislerimiz bu hata üzerinde çalışma yapıyorlar. En kısa sürede çözeceğiz." - not_found: "Üzgünüz. Bu sayfa bulunamadı. Taşınmış olabilir. Buraya gitmek istediğinizden emin olun." + hello: "Hello world" \ No newline at end of file diff --git a/templates/config/locales/view.en.yml b/templates/config/locales/view.en.yml new file mode 100644 index 0000000..5e6e9e4 --- /dev/null +++ b/templates/config/locales/view.en.yml @@ -0,0 +1,51 @@ +en: + btn: + back: Back + update: Update + view: + select: Please choose! + navbar: + settings: Settings + signout: Sign Out + signin: Sign In + dock: + dashboard: Dashboard + number: + currency: + format: + format: "%u %n" + unit: "₺" + internal_server_error: "Sory! Error an occurred.." + not_found: "Sory! Page not found. This page should be moved!" + devise: + session: + title: Giriş + button: Giriş Yap + remember_me: Beni Hatırla + registration: + title: '%{model} Giriş Bilgilerini Güncelle' + waiting_confirmation: 'E-posta addresi onayı için bekleniyor: %{email}' + hint_password: Değiştirmek istemiyorsanız boş bırakınız + hint_current_password: Değişiklikleri onaylamak için şuan ki şifrenizi girmelisiniz + new: + title: '%{model} New Registration' + character_hint: '%{length} characters minimum' + button: Register + shared: + links: + signup: Sign Up + signin: Sign In + forgot_password: Forgot your password? + confirmation_instructions: Didn't receive confirmation instructions? + unlock_instructions: Didn't receive unlock instructions? + signin_with: 'Sign in with %{name}' + signin_with: 'Sign up with %{name}' + password: + reset: + title: Forgot Your Password? + instructions: Send my password reset instructions + edit: + title: Change Your Password + new_password: New password + confirmation: New password confirmation + button: Change My Password \ No newline at end of file diff --git a/templates/config/locales/view.tr.yml b/templates/config/locales/view.tr.yml new file mode 100644 index 0000000..4d842b9 --- /dev/null +++ b/templates/config/locales/view.tr.yml @@ -0,0 +1,52 @@ +# encoding: utf-8 +tr: + btn: + back: Geri + update: Güncelle + view: + select: Lütfen seçiniz! + navbar: + settings: Ayarlar + signout: Çıkış + signin: Giriş Yap + dock: + dashboard: Kontrol Paneli + number: + currency: + format: + format: "%u %n" + unit: "₺" + internal_server_error: "Üzgünüz. Şu anda bir hata var. Mühendislerimiz bu hata üzerinde çalışma yapıyorlar. En kısa sürede çözeceğiz." + not_found: "Üzgünüz. Bu sayfa bulunamadı. Taşınmış olabilir. Buraya gitmek istediğinizden emin olun." + devise: + session: + title: '%{model} Girişi' + button: Giriş Yap + remember_me: Beni Hatırla + registration: + title: '%{model} Giriş Bilgilerini Güncelle' + waiting_confirmation: 'E-posta addresi onayı için bekleniyor: %{email}' + hint_password: Değiştirmek istemiyorsanız boş bırakınız + hint_current_password: Değişiklikleri onaylamak için şuan ki şifrenizi girmelisiniz + new: + title: '%{model} Kayıt İşlemi' + character_hint: 'Minimum %{length} karakter' + button: Kayıt Ol + shared: + links: + signup: Kayıt Ol + signin: Giriş Yap + forgot_password: Şifrenizi mi unuttunuz? + confirmation_instructions: Onaylama yönergesini mi almadınız? + unlock_instructions: Kapatma yönergesini mi almadınız? + signin_with: '%{name} ile Giriş Yap' + signup_with: '%{name} ile Kayıt Ol' + password: + reset: + title: Şifrenizi mi unuttunuz? + instructions: Şifre sıfırlama talimatlarını gönder + edit: + title: Şifrenizi Değiştriniz + new_password: Yeni şifre + confirmation: Yeni şifre doğrulması + button: Şifremi Değiştir \ No newline at end of file From 0102c3bc3f799ef38642629312d26428de0a3461 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:29:39 +0300 Subject: [PATCH 07/23] add missing file --- templates/config/settings.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 templates/config/settings.yml diff --git a/templates/config/settings.yml b/templates/config/settings.yml new file mode 100644 index 0000000..e69de29 From 16c87806920b6683b55e2fe0b861ab6a4b640b9e Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:30:29 +0300 Subject: [PATCH 08/23] implement localizations to view --- .../reset_password_instructions.html.haml | 13 ++++++++----- .../app/views/devise/passwords/edit.html.haml | 10 +++++----- .../app/views/devise/passwords/new.html.haml | 7 ++++--- .../views/devise/registrations/edit.html.haml | 10 +++++----- .../views/devise/registrations/new.html.haml | 5 +++-- .../app/views/devise/sessions/new.html.haml | 13 +++++++------ templates/app/views/devise/shared/_links.haml | 17 +++++++++-------- templates/app/views/hq/sessions/new.html.haml | 7 ++++--- 8 files changed, 45 insertions(+), 37 deletions(-) diff --git a/templates/app/views/devise/mailer/reset_password_instructions.html.haml b/templates/app/views/devise/mailer/reset_password_instructions.html.haml index bc9e196..5d73427 100644 --- a/templates/app/views/devise/mailer/reset_password_instructions.html.haml +++ b/templates/app/views/devise/mailer/reset_password_instructions.html.haml @@ -1,6 +1,9 @@ %p - Hello #{@resource.email}! -%p Someone has requested a link to change your password. You can do this through the link below. -%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) -%p If you didn't request this, please ignore this email. -%p Your password won't change until you access the link above and create a new one. + = t( 'email.salut', email: @resource.email ) +%p + = t( 'email.devise.reset_password.desc1') +%p= link_to t( 'email.devise.reset_password.change'), edit_password_url(@resource, :reset_password_token => @token) +%p + = t( 'email.devise.reset_password.desc2') +%p + = t( 'email.devise.reset_password.desc3') \ No newline at end of file diff --git a/templates/app/views/devise/passwords/edit.html.haml b/templates/app/views/devise/passwords/edit.html.haml index 53aa7b6..8d7efa5 100644 --- a/templates/app/views/devise/passwords/edit.html.haml +++ b/templates/app/views/devise/passwords/edit.html.haml @@ -1,11 +1,11 @@ -%h2 Change your password +%h2= t('devise.password.edit.title') = simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| = f.error_notification = f.input :reset_password_token, :as => :hidden = f.full_error :reset_password_token .form-inputs - = f.input :password, :label => "New password", :required => true, :autofocus => true - = f.input :password_confirmation, :label => "Confirm your new password", :required => true + = f.input :password, label: t('devise.password.edit.new_password'), required: true, autofocus: true + = f.input :password_confirmation, label: t('devise.password.edit.confirmation'), required: true .form-actions - = f.button :submit, "Change my password" -= render "devise/shared/links" + = f.button :submit, t('devise.password.edit.button'), class: 'btn btn-primary' += render "devise/shared/links" \ No newline at end of file diff --git a/templates/app/views/devise/passwords/new.html.haml b/templates/app/views/devise/passwords/new.html.haml index 83408b1..a15a411 100644 --- a/templates/app/views/devise/passwords/new.html.haml +++ b/templates/app/views/devise/passwords/new.html.haml @@ -1,8 +1,9 @@ -%h2 Forgot your password? +%h2= t('devise.password.reset.title') = simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| = f.error_notification .form-inputs = f.input :email, :required => true, :autofocus => true .form-actions - = f.button :submit, "Send me reset password instructions" -= render "devise/shared/links" + = f.button :submit, t('devise.password.reset.instructions'), class: 'btn btn-primary' +%br += render "devise/shared/links" \ No newline at end of file diff --git a/templates/app/views/devise/registrations/edit.html.haml b/templates/app/views/devise/registrations/edit.html.haml index 48b0a13..0512a14 100644 --- a/templates/app/views/devise/registrations/edit.html.haml +++ b/templates/app/views/devise/registrations/edit.html.haml @@ -1,5 +1,5 @@ %h2 - Edit #{resource_name.to_s.humanize} + = t('devise.registration.title', model: resource.class.model_name.human ) = simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| = f.error_notification .form-inputs @@ -7,12 +7,12 @@ - if devise_mapping.confirmable? && resource.pending_reconfirmation? %p Currently waiting confirmation for: #{resource.unconfirmed_email} - = f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false + = f.input :password, :autocomplete => "off", hint: t('devise.registration.hint_password'), :required => false = f.input :password_confirmation, :required => false - = f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true + = f.input :current_password, hint: t('devise.registration.hint_current_password'), :required => true .form-actions - = f.button :submit, "Update" + = f.button :submit, t('btn.update'), class: 'btn btn-primary' %h3 Cancel my account %p Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete} -= link_to "Back", :back += link_to t('btn.back'), :back diff --git a/templates/app/views/devise/registrations/new.html.haml b/templates/app/views/devise/registrations/new.html.haml index 1c4fa25..29504fe 100644 --- a/templates/app/views/devise/registrations/new.html.haml +++ b/templates/app/views/devise/registrations/new.html.haml @@ -1,4 +1,5 @@ -%h2 Sign up +%h2 + = t('devise.registration.new.title', model: resource.class.model_name.human) = simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| = f.error_notification .form-inputs @@ -7,5 +8,5 @@ = f.input :password, :required => true = f.input :password_confirmation, :required => true .form-actions - = f.button :submit, "Sign up" + = f.button :submit, t('devise.registration.new.button'), class: 'btn btn-primary' = render "devise/shared/links" diff --git a/templates/app/views/devise/sessions/new.html.haml b/templates/app/views/devise/sessions/new.html.haml index 4008e35..6b0e838 100644 --- a/templates/app/views/devise/sessions/new.html.haml +++ b/templates/app/views/devise/sessions/new.html.haml @@ -1,9 +1,10 @@ -%h2 Sign in -= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| +%h2 + = t('devise.session.title', model: resource.class.model_name.human ) += simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| .form-inputs - = f.input :email, :required => false, :autofocus => true - = f.input :password, :required => false - = f.input :remember_me, :as => :boolean if devise_mapping.rememberable? + = f.input :email, required: false, autofocus: true + = f.input :password, required: false + = f.input :remember_me, label: t('devise.session.remember_me'), as: :boolean if devise_mapping.rememberable? .form-actions - = f.button :submit, "Sign in" + = f.button :submit, t('devise.session.button'), class: 'btn btn-primary' = render "devise/shared/links" diff --git a/templates/app/views/devise/shared/_links.haml b/templates/app/views/devise/shared/_links.haml index 35d07ec..d73f22b 100644 --- a/templates/app/views/devise/shared/_links.haml +++ b/templates/app/views/devise/shared/_links.haml @@ -1,19 +1,20 @@ +%br - if controller_name != 'sessions' - = link_to "Sign in", new_session_path(resource_name) + = link_to t('devise.shared.links.signin'), new_session_path(resource_name) %br/ - if devise_mapping.registerable? && controller_name != 'registrations' - = link_to "Sign up", new_registration_path(resource_name) + = link_to t('devise.shared.links.signup'), new_registration_path(resource_name) %br/ -- if devise_mapping.recoverable? && controller_name != 'passwords' - = link_to "Forgot your password?", new_password_path(resource_name) +- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' + = link_to t('devise.shared.links.forgot_password'), new_password_path(resource_name) %br/ - if devise_mapping.confirmable? && controller_name != 'confirmations' - = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) + = link_to t('devise.shared.links.confirmation_instructions'), new_confirmation_path(resource_name) %br/ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) + = link_to t('devise.shared.links.unlock_instructions'), new_unlock_path(resource_name) %br/ - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| - = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) - %br/ + = link_to t('devise.shared.links.signin_with', name: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) + %br/ \ No newline at end of file diff --git a/templates/app/views/hq/sessions/new.html.haml b/templates/app/views/hq/sessions/new.html.haml index 2cdb090..1f1df71 100644 --- a/templates/app/views/hq/sessions/new.html.haml +++ b/templates/app/views/hq/sessions/new.html.haml @@ -1,8 +1,9 @@ -%h2 Admin Sign in +%h2 + = t('devise.session.title', model: resource.class.model_name.human ) = simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| .form-inputs = f.input :email, :required => false, :autofocus => true = f.input :password, :required => false - = f.input :remember_me, :as => :boolean if devise_mapping.rememberable? + = f.input :remember_me, :as => :boolean,label: t('devise.session.remember_me') if devise_mapping.rememberable? .form-actions - = f.button :submit, "Sign in" \ No newline at end of file + = f.button :submit, t('devise.session.button') \ No newline at end of file From 4930faa2ba42e0a970251256c702cf17bb966131 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Tue, 18 Aug 2015 17:54:22 +0300 Subject: [PATCH 09/23] add notification messages view --- templates/app/views/layouts/application.html.haml.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/app/views/layouts/application.html.haml.erb b/templates/app/views/layouts/application.html.haml.erb index daaca7b..81ab1e1 100644 --- a/templates/app/views/layouts/application.html.haml.erb +++ b/templates/app/views/layouts/application.html.haml.erb @@ -15,6 +15,7 @@ %a{:href => "/rails/routes"} Routes %h3.muted= link_to "<%= app_name %>", root_path %hr/ + = render partial: 'layouts/partials/messages' = yield %hr/ .footer From 7c55b0e243d52d09d214ce39b1872e77852992e8 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Wed, 19 Aug 2015 10:26:43 +0300 Subject: [PATCH 10/23] add capistrano 3.4 with settings --- lib/cybele/app_builder.rb | 40 +++++++++++++++---- lib/cybele/generators/app_generator.rb | 12 ++++-- templates/config/deploy.rb | 53 ++++++++++++++++++++++++++ templates/cybele_Gemfile | 6 ++- 4 files changed, 100 insertions(+), 11 deletions(-) create mode 100644 templates/config/deploy.rb diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index f2558e2..0e455dc 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -224,7 +224,7 @@ def generate_rails_config def generate_devise_settings generate 'devise:install' gsub_file 'config/initializers/filter_parameter_logging.rb', /:password/, ':password, :password_confirmation' - gsub_file 'config/initializers/devise.rb', /please-change-me-at-config-initializers-devise@example.com/, 'Settings.mail.sender.email' + gsub_file 'config/initializers/devise.rb', /please-change-me-at-config-initializers-devise@example.com/, "no-reply@#{app_name}.com" end def generate_devise_model(model_name) @@ -299,10 +299,36 @@ def replace_simple_form_wrapper copy_file 'config/initializers/simple_form.rb', 'config/initializers/simple_form.rb' copy_file 'config/initializers/simple_form_bootstrap.rb', 'config/initializers/simple_form_bootstrap.rb' end - - # Nor using + def setup_capistrano - run 'capify .' + run 'bundle exec cap install' + end + + def setup_capistrano_settings + run 'rm config/deploy.rb' + # Copy teplates/config/deploy.rb to app directory + copy_file 'config/deploy.rb', 'config/deploy.rb' + # Change my_app_name string in the deploy.rb file with app_name that is created + gsub_file 'config/deploy.rb', /my_app_name/, "#{app_name}" + + inject_into_file 'Capfile', :after => "require 'capistrano/deploy'\n" do <<-RUBY +require 'capistrano/rails' +require 'capistrano/bundler' + RUBY + end + + append_to_file 'config/deploy/production.rb' do + 'server "example.com", user: "#{local_user}", roles: %w{app db web}, primary: true +#set :port, 2222 +set :rails_env, "production" +set :branch, "master"' + end + append_to_file 'config/deploy/staging.rb' do + 'server "staging.example.com", user: "#{local_user}", roles: %w{app db web}, primary: true +#set :port, 2222 +set :rails_env, "staging" +set :branch, "develop"' + end end # Nor using @@ -330,7 +356,7 @@ def custom_exception_page # rescue_from Exception, :with => :server_error def server_error(exception) - ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver + # ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver respond_to do |format| format.html { render template: 'errors/internal_server_error', layout: 'layouts/application', status: 500 } format.all { render nothing: true, status: 500} @@ -361,8 +387,8 @@ def add_seeds say 'Add seeds' inject_into_file 'db/seeds.rb', :after => "# Mayor.create(name: 'Emanuel', city: cities.first)\n" do <<-RUBY -admin = Admin.create(email: "admin@app.com", password: '12341234', password_confirmation: '12341234') -admin.admin_profile = AdminProfile.create(first_name: 'Admin', last_name: "App") +admin = Admin.create(email: "admin@#{app_name}.com", password: '12341234', password_confirmation: '12341234') +admin.admin_profile = AdminProfile.create(first_name: 'Admin', last_name: "#{app_name}") RUBY end diff --git a/lib/cybele/generators/app_generator.rb b/lib/cybele/generators/app_generator.rb index 6951fbe..3cedcc2 100644 --- a/lib/cybele/generators/app_generator.rb +++ b/lib/cybele/generators/app_generator.rb @@ -200,9 +200,15 @@ def setup_exception_notification_to_environments build :add_exception_notification_to_environments end - # def install_capistrano - # build :setup_capistrano - # end + def install_capistrano + say 'Setup capistrano' + build :setup_capistrano + end + + def setup_capistrano_settings + say 'Setup capistrano settings' + build :setup_capistrano_settings + end # def setup_recipes # build :setup_recipes diff --git a/templates/config/deploy.rb b/templates/config/deploy.rb new file mode 100644 index 0000000..b17dcab --- /dev/null +++ b/templates/config/deploy.rb @@ -0,0 +1,53 @@ +# config valid only for current version of Capistrano +lock '3.4.0' + +set :application, 'my_app_name' +set :local_user, 'deploy' +set :stages, %w(staging production) +set :default_stage, 'production' +set :repo_url, 'git@example.com:me/my_repo.git' + +# Default branch is :master +# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp + +# Default deploy_to directory is /var/www/blog2 +# set :deploy_to, '/var/www/blog2' +set :deploy_to, "/home/#{local_user}/apps/#{fetch(:application)}" + +# Default value for :scm is :git +# set :scm, :git + +# Default value for :format is :pretty +# set :format, :pretty + +# Default value for :log_level is :debug +# set :log_level, :debug + +# Default value for :pty is false +# set :pty, true + +# Default value for :linked_files is [] +# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml') + +# Default value for linked_dirs is [] +# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') + +# Default value for default_env is {} +# set :default_env, { path: "/opt/ruby/bin:$PATH" } +set :default_env, { path: '$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH' } + +# Default value for keep_releases is 5 +# set :keep_releases, 5 + +namespace :deploy do + + after :restart, :clear_cache do + on roles(:web), in: :groups, limit: 3, wait: 10 do + # Here we can do anything such as: + # within release_path do + # execute :rake, 'cache:clear' + # end + end + end + +end diff --git a/templates/cybele_Gemfile b/templates/cybele_Gemfile index 8ca6c8d..1a4b2ea 100644 --- a/templates/cybele_Gemfile +++ b/templates/cybele_Gemfile @@ -13,7 +13,11 @@ gem 'recipient_interceptor', '~> 0.1.2' gem 'rails-i18n', '~> 4.0.4' gem 'ransack', '~> 1.6.6' gem 'polyamorous', '~> 1.2.0' -gem 'capistrano', '~> 2.15.5' +gem 'capistrano', '~> 3.4.0' +group :development do + gem 'capistrano-rails', '~> 1.1', require: false + gem 'capistrano-bundler', '~> 1.1', require: false +end gem 'unicorn', '~> 4.9.0' gem 'exception_notification', '~> 4.1.1' gem 'responders', '~> 2.1.0' From 952a035386ba0f896cc64453840d592c7eb4e57d Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Wed, 19 Aug 2015 11:06:56 +0300 Subject: [PATCH 11/23] add devise return path --- .../app/controllers/hq/sessions_controller.rb | 13 +++++++++++++ templates/config/locales/view.en.yml | 14 +++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/templates/app/controllers/hq/sessions_controller.rb b/templates/app/controllers/hq/sessions_controller.rb index 576a777..3da444d 100644 --- a/templates/app/controllers/hq/sessions_controller.rb +++ b/templates/app/controllers/hq/sessions_controller.rb @@ -1,3 +1,16 @@ class Hq::SessionsController < Devise::SessionsController layout 'login' + + private + + # Overwriting the sign_out redirect path method + def after_sign_in_path_for(resource_or_scope) + hq_root_path + end + + # Overwriting the sign_out redirect path method + def after_sign_out_path_for(resource_or_scope) + new_admin_session_path + end + end \ No newline at end of file diff --git a/templates/config/locales/view.en.yml b/templates/config/locales/view.en.yml index 5e6e9e4..209eb26 100644 --- a/templates/config/locales/view.en.yml +++ b/templates/config/locales/view.en.yml @@ -19,14 +19,14 @@ en: not_found: "Sory! Page not found. This page should be moved!" devise: session: - title: Giriş - button: Giriş Yap - remember_me: Beni Hatırla + title: Login + button: Login + remember_me: Remember Me registration: - title: '%{model} Giriş Bilgilerini Güncelle' - waiting_confirmation: 'E-posta addresi onayı için bekleniyor: %{email}' - hint_password: Değiştirmek istemiyorsanız boş bırakınız - hint_current_password: Değişiklikleri onaylamak için şuan ki şifrenizi girmelisiniz + title: '%{model} Update Login Information' + waiting_confirmation: 'Currently waiting confirmation for: %{email}' + hint_password: Leave it blank if you don't want to change it + hint_current_password: We need your current password to confirm your changes new: title: '%{model} New Registration' character_hint: '%{length} characters minimum' From 5ade7e4101d05d8bd8a88cb9022c6ea7604299d4 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Fri, 21 Aug 2015 11:27:59 +0300 Subject: [PATCH 12/23] add new features --- lib/cybele/app_builder.rb | 11 +++++++---- lib/cybele/generators/app_generator.rb | 6 +++--- templates/config/database.yml.erb | 10 +++++++++- templates/config/deploy.rb | 17 ++++++++++------- templates/cybele_Gemfile | 6 +++++- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index 0e455dc..9cc021f 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -314,6 +314,8 @@ def setup_capistrano_settings inject_into_file 'Capfile', :after => "require 'capistrano/deploy'\n" do <<-RUBY require 'capistrano/rails' require 'capistrano/bundler' +require 'sshkit/sudo' +require 'capistrano/maintenance' RUBY end @@ -321,19 +323,20 @@ def setup_capistrano_settings 'server "example.com", user: "#{local_user}", roles: %w{app db web}, primary: true #set :port, 2222 set :rails_env, "production" -set :branch, "master"' +set :branch, "master" +set :project_domain, "example.com"' end append_to_file 'config/deploy/staging.rb' do 'server "staging.example.com", user: "#{local_user}", roles: %w{app db web}, primary: true #set :port, 2222 set :rails_env, "staging" -set :branch, "develop"' +set :branch, "develop" +set :project_domain, "staging.example.com"' end end # Nor using - def setup_recipes - run 'rm config/deploy.rb' + def setup_recipes generate 'recipes_matic:install' end diff --git a/lib/cybele/generators/app_generator.rb b/lib/cybele/generators/app_generator.rb index 3cedcc2..2332f95 100644 --- a/lib/cybele/generators/app_generator.rb +++ b/lib/cybele/generators/app_generator.rb @@ -210,9 +210,9 @@ def setup_capistrano_settings build :setup_capistrano_settings end - # def setup_recipes - # build :setup_recipes - # end + def setup_recipes + build :setup_recipes + end def setup_secret_token say 'Setup secret token' diff --git a/templates/config/database.yml.erb b/templates/config/database.yml.erb index db478d5..ecf6e1e 100644 --- a/templates/config/database.yml.erb +++ b/templates/config/database.yml.erb @@ -10,4 +10,12 @@ development: &default test: <<: *default - database: <%= app_name %>_test \ No newline at end of file + database: <%= app_name %>_test + +production: + <<: *default + database: <%= app_name %>_production + +staging: + <<: *default + database: <%= app_name %>_staging \ No newline at end of file diff --git a/templates/config/deploy.rb b/templates/config/deploy.rb index b17dcab..b3266aa 100644 --- a/templates/config/deploy.rb +++ b/templates/config/deploy.rb @@ -10,12 +10,11 @@ # Default branch is :master # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp -# Default deploy_to directory is /var/www/blog2 -# set :deploy_to, '/var/www/blog2' +# Default deploy_to directory is /var/www/blog2 set :deploy_to, "/home/#{local_user}/apps/#{fetch(:application)}" # Default value for :scm is :git -# set :scm, :git +set :scm, :git # Default value for :format is :pretty # set :format, :pretty @@ -24,13 +23,13 @@ # set :log_level, :debug # Default value for :pty is false -# set :pty, true +set :pty, true # Default value for :linked_files is [] -# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml') +set :linked_files, fetch(:linked_files, []).push('config/database.yml') # Default value for linked_dirs is [] -# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') +set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } @@ -39,7 +38,11 @@ # Default value for keep_releases is 5 # set :keep_releases, 5 -namespace :deploy do +# Look our recipes +# https://github.com/lab2023/recipes_matic +load 'config/deploy/recipes/base.rb' + +namespace :deploy do after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do diff --git a/templates/cybele_Gemfile b/templates/cybele_Gemfile index 1a4b2ea..a7c636e 100644 --- a/templates/cybele_Gemfile +++ b/templates/cybele_Gemfile @@ -17,6 +17,9 @@ gem 'capistrano', '~> 3.4.0' group :development do gem 'capistrano-rails', '~> 1.1', require: false gem 'capistrano-bundler', '~> 1.1', require: false + gem 'sshkit-sudo', require: false + gem 'capistrano-maintenance', '~> 1.0', require: false + gem 'recipes_matic', git: 'git@github.com:lab2023/recipes_matic.git', branch: 'feature/upgrade' end gem 'unicorn', '~> 4.9.0' gem 'exception_notification', '~> 4.1.1' @@ -34,7 +37,7 @@ gem 'jquery-rails', '~> 4.0.4' gem 'turbolinks', '~> 2.5.3' gem 'haml', '~> 4.0.2' gem 'haml-rails', '0.9.0' -gem 'hierapolis-rails', '~> 1.1.0' +gem 'hierapolis-rails', git: 'git@github.com:lab2023/recipes_matic.git', branch: 'feature/improvement' gem 'breadcrumbs_on_rails', '~> 2.3.1' gem 'blankable', '~> 0.2.0' @@ -55,6 +58,7 @@ group :development, :test do gem 'better_errors' gem 'letter_opener' gem 'rspec-rails' + gem 'binding_of_caller' gem 'katip' gem 'capybara' gem 'bullet' From a5158f0de8ad06402c36339d4e3b92333378924b Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Fri, 21 Aug 2015 12:08:18 +0300 Subject: [PATCH 13/23] fix errors --- .../app/controllers/hq/admin_profiles_controller.rb | 10 +++++++++- templates/app/controllers/user_profiles_controller.rb | 9 ++++++++- templates/cybele_Gemfile | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/templates/app/controllers/hq/admin_profiles_controller.rb b/templates/app/controllers/hq/admin_profiles_controller.rb index 1708a1a..40a0a02 100644 --- a/templates/app/controllers/hq/admin_profiles_controller.rb +++ b/templates/app/controllers/hq/admin_profiles_controller.rb @@ -1,6 +1,8 @@ # encoding: UTF-8 class Hq::AdminProfilesController < Hq::ApplicationController - before_action :profile_controller, except: [:new] + + before_action :check_profile, only: [:new, :create] + before_action :profile_controller, except: [:new, :create] before_action :set_admin_profile, only: [:show, :edit, :update, :destroy] add_breadcrumb I18n.t('activerecord.models.admin_profiles'), :hq_admin_profile_path @@ -38,6 +40,12 @@ def profile_controller end end + def check_profile + if current_admin.admin_profile.present? + redirect_to user_profile_path + end + end + def set_admin_profile @admin_profile = current_admin.admin_profile end diff --git a/templates/app/controllers/user_profiles_controller.rb b/templates/app/controllers/user_profiles_controller.rb index 191da77..6dce5c9 100644 --- a/templates/app/controllers/user_profiles_controller.rb +++ b/templates/app/controllers/user_profiles_controller.rb @@ -1,7 +1,8 @@ # encoding: UTF-8 class UserProfilesController < ApplicationController before_action :authenticate_user! - before_action :profile_controller, except: [:new] + before_action :check_profile, only: [:new, :create] + before_action :profile_controller, except: [:new, :create] before_action :set_user_profile, only: [:show, :edit, :update, :destroy] add_breadcrumb I18n.t('activerecord.models.user_profiles'), :user_profile_path @@ -39,6 +40,12 @@ def profile_controller end end + def check_profile + if current_user.user_profile.present? + redirect_to user_profile_path + end + end + def set_user_profile @user_profile = current_user.user_profile end diff --git a/templates/cybele_Gemfile b/templates/cybele_Gemfile index a7c636e..707ed8e 100644 --- a/templates/cybele_Gemfile +++ b/templates/cybele_Gemfile @@ -19,7 +19,7 @@ group :development do gem 'capistrano-bundler', '~> 1.1', require: false gem 'sshkit-sudo', require: false gem 'capistrano-maintenance', '~> 1.0', require: false - gem 'recipes_matic', git: 'git@github.com:lab2023/recipes_matic.git', branch: 'feature/upgrade' + gem 'recipes_matic', git: 'https://github.com/lab2023/recipes_matic.git', branch: 'feature/upgrade' end gem 'unicorn', '~> 4.9.0' gem 'exception_notification', '~> 4.1.1' @@ -37,7 +37,7 @@ gem 'jquery-rails', '~> 4.0.4' gem 'turbolinks', '~> 2.5.3' gem 'haml', '~> 4.0.2' gem 'haml-rails', '0.9.0' -gem 'hierapolis-rails', git: 'git@github.com:lab2023/recipes_matic.git', branch: 'feature/improvement' +gem 'hierapolis-rails', git: 'https://github.com/lab2023/hierapolis-rails.git', branch: 'feature/improvement' gem 'breadcrumbs_on_rails', '~> 2.3.1' gem 'blankable', '~> 0.2.0' From 1433ad697c35cab58b09320a578188dbfcec951d Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Fri, 21 Aug 2015 12:49:56 +0300 Subject: [PATCH 14/23] improvement --- lib/cybele/app_builder.rb | 33 ++++++++++--------- .../hq/admin_profiles_controller.rb | 2 +- .../controllers/user_profiles_controller.rb | 4 +-- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index 9cc021f..e079cbd 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -106,8 +106,15 @@ def configure_smtp config = <<-RUBY config.action_mailer.delivery_method = :smtp -config.action_mailer.raise_delivery_errors = false - config.action_mailer.smtp_settings = Settings.smtp.mandrill + config.action_mailer.raise_delivery_errors = false + config.action_mailer.smtp_settings = { + address: Settings.smtp.mandrill.address, + port: Settings.smtp.mandrill.port, + enable_starttls_auto: Settings.smtp.mandrill.enable_starttls_auto, + user_name: Settings.smtp.mandrill.user_name, + password: Settings.smtp.mandrill.password, + authentication: Settings.smtp.mandrill.authentication + } RUBY configure_environment 'production', config @@ -134,14 +141,14 @@ def setup_staging_environment config = <<-YML email: - noreply: noreply@appname.org + noreply: no-reply@#{app_name}.com YML prepend_file 'config/settings.yml', config end def configure_action_mailer - action_mailer_host 'development', "#{app_name}.dev" - action_mailer_host 'test', "#{app_name}.com" + action_mailer_host 'development', "localhost:3000" + action_mailer_host 'staging', "staging.#{app_name}.com" action_mailer_host 'production', "#{app_name}.com" end @@ -191,12 +198,12 @@ def generate_exception_notification def add_exception_notification_to_environments config = <<-CODE - config.middleware.use ExceptionNotification::Rack, - :email => { - :email_prefix => "[Whatever] ", - :sender_address => %{"notifier" }, - :exception_recipients => %w{exceptions@example.com} - } +config.middleware.use ExceptionNotification::Rack, + :email => { + :email_prefix => "[#{app_name}]", + :sender_address => %{"Notifier" }, + :exception_recipients => %w{your_email@address.com} + } CODE configure_environment('production', config) @@ -453,10 +460,7 @@ def create_sanitizer_initializer(model_name) def devise_parameter_sanitizer(model_name) inject_into_file 'app/controllers/application_controller.rb', :after => 'protect_from_forgery with: :exception' do <<-CODE - - protected - def devise_parameter_sanitizer if resource_class == #{model_name.classify} #{model_name.classify}::ParameterSanitizer.new(#{model_name.classify}, :#{model_name.parameterize}, params) @@ -496,7 +500,6 @@ def add_set_user_time_zone_method_to_application_controller def set_user_time_zone Time.zone = current_user.time_zone if user_signed_in? && current_user.time_zone.present? end - CODE end inject_into_file 'app/controllers/application_controller.rb', :after => 'class ApplicationController < ActionController::Base' do <<-CODE diff --git a/templates/app/controllers/hq/admin_profiles_controller.rb b/templates/app/controllers/hq/admin_profiles_controller.rb index 40a0a02..8d01eeb 100644 --- a/templates/app/controllers/hq/admin_profiles_controller.rb +++ b/templates/app/controllers/hq/admin_profiles_controller.rb @@ -3,7 +3,7 @@ class Hq::AdminProfilesController < Hq::ApplicationController before_action :check_profile, only: [:new, :create] before_action :profile_controller, except: [:new, :create] - before_action :set_admin_profile, only: [:show, :edit, :update, :destroy] + before_action :set_admin_profile, only: [:show, :edit, :update] add_breadcrumb I18n.t('activerecord.models.admin_profiles'), :hq_admin_profile_path def show diff --git a/templates/app/controllers/user_profiles_controller.rb b/templates/app/controllers/user_profiles_controller.rb index 6dce5c9..4b75cce 100644 --- a/templates/app/controllers/user_profiles_controller.rb +++ b/templates/app/controllers/user_profiles_controller.rb @@ -3,7 +3,7 @@ class UserProfilesController < ApplicationController before_action :authenticate_user! before_action :check_profile, only: [:new, :create] before_action :profile_controller, except: [:new, :create] - before_action :set_user_profile, only: [:show, :edit, :update, :destroy] + before_action :set_user_profile, only: [:show, :edit, :update] add_breadcrumb I18n.t('activerecord.models.user_profiles'), :user_profile_path def show @@ -45,7 +45,7 @@ def check_profile redirect_to user_profile_path end end - + def set_user_profile @user_profile = current_user.user_profile end From 171e45f4b3fcd70366581ad9e68a0a2237c034d1 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Fri, 21 Aug 2015 16:45:06 +0300 Subject: [PATCH 15/23] add first deploy task for capistrano --- lib/cybele/app_builder.rb | 4 ++-- templates/config/deploy.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index e079cbd..c751f22 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -327,14 +327,14 @@ def setup_capistrano_settings end append_to_file 'config/deploy/production.rb' do - 'server "example.com", user: "#{local_user}", roles: %w{app db web}, primary: true + 'server "example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true #set :port, 2222 set :rails_env, "production" set :branch, "master" set :project_domain, "example.com"' end append_to_file 'config/deploy/staging.rb' do - 'server "staging.example.com", user: "#{local_user}", roles: %w{app db web}, primary: true + 'server "staging.example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true #set :port, 2222 set :rails_env, "staging" set :branch, "develop" diff --git a/templates/config/deploy.rb b/templates/config/deploy.rb index b3266aa..74bfb21 100644 --- a/templates/config/deploy.rb +++ b/templates/config/deploy.rb @@ -29,7 +29,7 @@ set :linked_files, fetch(:linked_files, []).push('config/database.yml') # Default value for linked_dirs is [] -set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') +set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/upload', 'public/images') # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } From e0a7b20121178b6400aa6810d1d8492c49b1e1d3 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Mon, 24 Aug 2015 11:52:26 +0300 Subject: [PATCH 16/23] add ssh port for capistrano --- lib/cybele/app_builder.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index c751f22..1f0e0d0 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -327,15 +327,13 @@ def setup_capistrano_settings end append_to_file 'config/deploy/production.rb' do - 'server "example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true -#set :port, 2222 + 'server "example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true, port: 22 set :rails_env, "production" set :branch, "master" set :project_domain, "example.com"' end append_to_file 'config/deploy/staging.rb' do - 'server "staging.example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true -#set :port, 2222 + 'server "staging.example.com", user: "#{fetch(:local_user)}", roles: %w{app db web}, primary: true, port: 22 set :rails_env, "staging" set :branch, "develop" set :project_domain, "staging.example.com"' From cf14f9ee7aff3f9fdfbcf34ea9265ebc7b4525b0 Mon Sep 17 00:00:00 2001 From: Ismail Akbudak Date: Mon, 24 Aug 2015 14:56:51 +0300 Subject: [PATCH 17/23] fix user --- templates/config/deploy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/config/deploy.rb b/templates/config/deploy.rb index 74bfb21..357ff76 100644 --- a/templates/config/deploy.rb +++ b/templates/config/deploy.rb @@ -11,7 +11,7 @@ # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp # Default deploy_to directory is /var/www/blog2 -set :deploy_to, "/home/#{local_user}/apps/#{fetch(:application)}" +set :deploy_to, "/home/#{fetch(:local_user)}/apps/#{fetch(:application)}" # Default value for :scm is :git set :scm, :git From f5b99e916e9e3727b53681d81d09b7b35a52102f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 14:37:41 +0300 Subject: [PATCH 18/23] Improvements were done - Ruby 2.2.3 version was added - Rails 4.2.3 version was added - Gemfile.lock was removed - Gemspec was improved --- .gitignore | 3 ++- .ruby-version | 1 + MIT-LICENSE => LICENSE | 0 cybele.gemspec | 32 +++++++++++++++++--------------- lib/cybele/version.rb | 5 +++-- 5 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 .ruby-version rename MIT-LICENSE => LICENSE (100%) diff --git a/.gitignore b/.gitignore index 93e54b2..439e494 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.gem *.log .bundle/ -*.bundle/install.log \ No newline at end of file +*.bundle/install.log +Gemfile.lock \ No newline at end of file diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..5859406 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.2.3 diff --git a/MIT-LICENSE b/LICENSE similarity index 100% rename from MIT-LICENSE rename to LICENSE diff --git a/cybele.gemspec b/cybele.gemspec index 2bbb372..a987b5e 100644 --- a/cybele.gemspec +++ b/cybele.gemspec @@ -1,26 +1,28 @@ -# coding: utf-8 +# encoding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require File.expand_path('../lib/cybele/version', __FILE__) +require 'date' Gem::Specification.new do |spec| - spec.name = 'cybele' - spec.version = Cybele::VERSION - spec.authors = %w[lab2023] - spec.email = %w[info@lab2023.com] - spec.description = %q{Rails 4.x template with responder, simple form, haml, exception notification, etc etc ...} - spec.summary = %q{Rails 4.x template with responder, simple form, haml, exception notification, etc etc ...} - spec.homepage = 'https://github.com/kebab-project/cybele' - spec.license = 'MIT' + spec.name = 'cybele' + spec.version = Cybele::VERSION + spec.authors = %w[lab2023] + spec.email = %w[info@lab2023.com] + spec.description = %q{Rails 4.x template with responder, simple form, haml, exception notification, etc etc ...} + spec.summary = %q{Rails 4.x template with responder, simple form, haml, exception notification, etc etc ...} + spec.homepage = 'https://github.com/kebab-project/cybele' + spec.license = 'MIT' + spec.date = Date.today.strftime('%Y-%m-%d') - spec.required_ruby_version = '>= 2.0.0' + spec.required_ruby_version = ">= #{Cybele::RUBY_VERSION}" spec.add_dependency 'bundler', '~> 1.5' - spec.add_dependency 'rails', '~> 4.0' + spec.add_dependency 'rails', Cybele::RAILS_VERSION - spec.files = `git ls-files`.split($/) - spec.executables = %w[cybele] - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) - spec.require_paths = %w[lib] + spec.files = `git ls-files`.split($/) + spec.executables = %w[cybele] + spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.require_paths= %w[lib] spec.add_development_dependency 'rake' diff --git a/lib/cybele/version.rb b/lib/cybele/version.rb index e0ce4d5..bbb701c 100644 --- a/lib/cybele/version.rb +++ b/lib/cybele/version.rb @@ -1,4 +1,5 @@ module Cybele + RAILS_VERSION = '~> 4.2.3' + RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip VERSION = '1.6.2'.freeze -end - +end \ No newline at end of file From c4cb51cac7e37ffa467d14b0d59b3d78eebfc4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 14:45:31 +0300 Subject: [PATCH 19/23] License and version files were updated --- LICENSE | 4 ++-- lib/cybele/version.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index a08f6bf..7108a05 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 lab2023 - information technologies +Copyright © 2013-2015 [lab2023 - information technologies](http://lab2023.com) MIT License @@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/lib/cybele/version.rb b/lib/cybele/version.rb index bbb701c..b88df43 100644 --- a/lib/cybele/version.rb +++ b/lib/cybele/version.rb @@ -1,5 +1,5 @@ module Cybele RAILS_VERSION = '~> 4.2.3' RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip - VERSION = '1.6.2'.freeze + VERSION = '1.6.2' end \ No newline at end of file From 648ed0a00e03cca5970e35834f904cae25e8aca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 14:45:58 +0300 Subject: [PATCH 20/23] File name was changed --- LICENSE => MIT-LICENSE | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => MIT-LICENSE (100%) diff --git a/LICENSE b/MIT-LICENSE similarity index 100% rename from LICENSE rename to MIT-LICENSE From 0918eb6002780baab4df7df374e1d860af3347ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 14:47:06 +0300 Subject: [PATCH 21/23] Gemfile.lock was removed --- Gemfile.lock | 92 ---------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index d5f5835..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,92 +0,0 @@ -PATH - remote: . - specs: - cybele (1.6.0) - bundler (~> 1.5) - rails (~> 4.0) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.1.4) - actionpack (= 4.1.4) - actionview (= 4.1.4) - mail (~> 2.5.4) - actionpack (4.1.4) - actionview (= 4.1.4) - activesupport (= 4.1.4) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.4) - activesupport (= 4.1.4) - builder (~> 3.1) - erubis (~> 2.7.0) - activemodel (4.1.4) - activesupport (= 4.1.4) - builder (~> 3.1) - activerecord (4.1.4) - activemodel (= 4.1.4) - activesupport (= 4.1.4) - arel (~> 5.0.0) - activesupport (4.1.4) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - arel (5.0.1.20140414130214) - builder (3.2.2) - erubis (2.7.0) - hike (1.2.3) - i18n (0.6.11) - json (1.8.1) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) - minitest (5.4.0) - multi_json (1.10.1) - polyglot (0.3.5) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - rails (4.1.4) - actionmailer (= 4.1.4) - actionpack (= 4.1.4) - actionview (= 4.1.4) - activemodel (= 4.1.4) - activerecord (= 4.1.4) - activesupport (= 4.1.4) - bundler (>= 1.3.0, < 2.0) - railties (= 4.1.4) - sprockets-rails (~> 2.0) - railties (4.1.4) - actionpack (= 4.1.4) - activesupport (= 4.1.4) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.0.4) - sprockets (2.12.1) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (~> 2.8) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (1.2.1) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - cybele! - rake From 81358eb1f8f8c09b59b95699baa52eaf887c648a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 14:50:10 +0300 Subject: [PATCH 22/23] Some typos were fixed --- MIT-LICENSE | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MIT-LICENSE b/MIT-LICENSE index 7108a05..7203d8f 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright © 2013-2015 [lab2023 - information technologies](http://lab2023.com) +Copyright © 2013-2015 lab2023 - information technologies MIT License diff --git a/README.md b/README.md index 5a79d4e..861e4dd 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ western colonies from around the 6th century BCE. Before generating your application, you will need: -* Ruby ~> 2.0 -* Rails ~> 4.0 +* Ruby ~> 2.2 +* Rails ~> 4.2 ## Usage @@ -64,4 +64,4 @@ Once you've made your great commits: ## License -Copyright 2014 lab2023 - information technologies \ No newline at end of file +Copyright © 2013-2015 [lab2023 - information technologies](http://lab2023.com) \ No newline at end of file From d31374dcabca28c09538980e12cb567a767de775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20O=CC=88zis=CC=A7=20ERI=CC=87KAN?= Date: Tue, 25 Aug 2015 15:03:22 +0300 Subject: [PATCH 23/23] Bump version v1.7.0 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ lib/cybele/version.rb | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e24568..79cd715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ #### [Current] + * [81358eb](../../commit/81358eb) - __(Tayfun Öziş ERİKAN)__ Some typos were fixed + * [0918eb6](../../commit/0918eb6) - __(Tayfun Öziş ERİKAN)__ Gemfile.lock was removed + * [648ed0a](../../commit/648ed0a) - __(Tayfun Öziş ERİKAN)__ File name was changed + * [c4cb51c](../../commit/c4cb51c) - __(Tayfun Öziş ERİKAN)__ License and version files were updated + * [f5b99e9](../../commit/f5b99e9) - __(Tayfun Öziş ERİKAN)__ Improvements were done - Ruby 2.2.3 version was added - Rails 4.2.3 version was added - Gemfile.lock was removed - Gemspec was improved + * [cf14f9e](../../commit/cf14f9e) - __(Ismail Akbudak)__ fix user + * [e0a7b20](../../commit/e0a7b20) - __(Ismail Akbudak)__ add ssh port for capistrano + * [171e45f](../../commit/171e45f) - __(Ismail Akbudak)__ add first deploy task for capistrano + * [1433ad6](../../commit/1433ad6) - __(Ismail Akbudak)__ improvement + * [a5158f0](../../commit/a5158f0) - __(Ismail Akbudak)__ fix errors + * [5ade7e4](../../commit/5ade7e4) - __(Ismail Akbudak)__ add new features + * [952a035](../../commit/952a035) - __(Ismail Akbudak)__ add devise return path + * [7c55b0e](../../commit/7c55b0e) - __(Ismail Akbudak)__ add capistrano 3.4 with settings + * [4930faa](../../commit/4930faa) - __(Ismail Akbudak)__ add notification messages view + * [16c8780](../../commit/16c8780) - __(Ismail Akbudak)__ implement localizations to view + * [0102c3b](../../commit/0102c3b) - __(Ismail Akbudak)__ add missing file + * [693c179](../../commit/693c179) - __(Ismail Akbudak)__ add localization files + * [388cee0](../../commit/388cee0) - __(Ismail Akbudak)__ add new methods and remove old methods + * [e7fd568](../../commit/e7fd568) - __(Ismail Akbudak)__ update gems version + * [44cfd06](../../commit/44cfd06) - __(Murat Kemal BAYGÜN)__ TB-65 Fix link + * [4bde163](../../commit/4bde163) - __(Murat Kemal BAYGÜN)__ TB-65 Fix contributor link + * [e0a97bd](../../commit/e0a97bd) - __(Ahmet Sezgin Duran)__ Merge tag '1.6.2' into develop + +#### 1.6.2 + * [822cbf3](../../commit/822cbf3) - __(Onur Özgür ÖZKAN)__ Update GEM version. + * [eb6a510](../../commit/eb6a510) - __(Ahmet Sezgin Duran)__ Merge tag '1.6.1' into develop + * [584eb94](../../commit/584eb94) - __(Ahmet Sezgin Duran)__ TB-60 #time 1m Bump version 1.6.2 and dump changelog * [653ad04](../../commit/653ad04) - __(Ahmet Sezgin Duran)__ TB-60 #time 30m Fix profile controller errors #### 1.6.1 diff --git a/lib/cybele/version.rb b/lib/cybele/version.rb index b88df43..b60333c 100644 --- a/lib/cybele/version.rb +++ b/lib/cybele/version.rb @@ -1,5 +1,5 @@ module Cybele RAILS_VERSION = '~> 4.2.3' RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip - VERSION = '1.6.2' + VERSION = '1.7.0' end \ No newline at end of file