Skip to content

Commit

Permalink
complete copiying of files
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail Akbudak committed Jun 21, 2016
1 parent 6babcef commit b8e1f1a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
21 changes: 13 additions & 8 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,6 @@ def setup_namespaces
copy_file 'app/controllers/hq/sessions_controller.rb', 'app/controllers/hq/sessions_controller.rb'
directory 'app/views/hq/sessions', 'app/views/hq/sessions'

remove_file 'app/views/layouts/hq/application.html.haml'
template 'app/views/layouts/hq/application.html.haml.erb', 'app/views/layouts/hq/application.html.haml', force: true

remove_file 'app/views/layouts/hq/login.html.haml'
template 'app/views/layouts/hq/login.html.haml.erb', 'app/views/layouts/hq/login.html.haml', force: true

# User
copy_file 'app/controllers/user/user_application_controller.rb', 'app/controllers/user/user_application_controller.rb'

Expand Down Expand Up @@ -405,8 +399,8 @@ def add_seeds
end
end

# Copy locale files
def copy_locales
# Copy files
def copy_files
say 'Coping files..'
copy_file 'config/locales/models.tr.yml', 'config/locales/models.tr.yml'
copy_file 'config/locales/show_for.tr.yml', 'config/locales/show_for.tr.yml'
Expand All @@ -423,6 +417,17 @@ def copy_locales
say 'Restore routes.rb'
remove_file 'config/routes.rb'
template 'config/routes.erb', 'config/routes.rb'

say 'Set hq layouts'
remove_file 'app/views/layouts/hq/application.html.haml'
template 'app/views/layouts/hq/application.html.haml.erb', 'app/views/layouts/hq/application.html.haml', force: true

remove_file 'app/views/layouts/login.html.haml'
template 'app/views/layouts/hq/login.html.haml.erb', 'app/views/layouts/hq/login.html.haml', force: true

copy_file 'app/views/layouts/partials/_warnings.html.haml', 'app/views/layouts/partials/_warnings.html.haml'
copy_file 'cybele_version.txt', 'VERSION.txt'

end

private
Expand Down
6 changes: 3 additions & 3 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ def setup_namespaces
build :setup_namespaces
end

def copy_locales
say 'Copy config/locale files'
build :copy_locales
def copy_all_files
say 'Copy files'
build :copy_files
end

def goodbye
Expand Down
6 changes: 6 additions & 0 deletions templates/app/views/layouts/partials/_warnings.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- if Rails.env.staging?
#warnings.alert.alert-warning.panel-reset.text-center{style: "margin-bottom: 0px;" }
%strong Dikkat!
Lütfen yapacağınız işlemlerde dikkatli olunuz. Şuan da
%strong test
sunucusu üzerinde işlem yapıyorsunuz.
1 change: 1 addition & 0 deletions templates/cybele_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0

0 comments on commit b8e1f1a

Please sign in to comment.