From 50e5143e20e8ecb10af17d21a6f18d23f607e433 Mon Sep 17 00:00:00 2001 From: Volmer Soares Date: Wed, 1 Oct 2014 20:18:51 -0400 Subject: [PATCH] Fix locale generator Fixes #95. --- CHANGELOG.md | 1 + config/locales/{en.yml => bootsy.en.yml} | 0 config/locales/{pt-BR.yml => bootsy.pt-BR.yml} | 0 lib/generators/bootsy/install_generator.rb | 8 ++++---- 4 files changed, 5 insertions(+), 4 deletions(-) rename config/locales/{en.yml => bootsy.en.yml} (100%) rename config/locales/{pt-BR.yml => bootsy.pt-BR.yml} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c232214d..02128833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## master * Fix orange color (#94). +* Fix locale generator (#95). ## 2.0.10 diff --git a/config/locales/en.yml b/config/locales/bootsy.en.yml similarity index 100% rename from config/locales/en.yml rename to config/locales/bootsy.en.yml diff --git a/config/locales/pt-BR.yml b/config/locales/bootsy.pt-BR.yml similarity index 100% rename from config/locales/pt-BR.yml rename to config/locales/bootsy.pt-BR.yml diff --git a/lib/generators/bootsy/install_generator.rb b/lib/generators/bootsy/install_generator.rb index ad15befa..21ef380d 100644 --- a/lib/generators/bootsy/install_generator.rb +++ b/lib/generators/bootsy/install_generator.rb @@ -1,14 +1,14 @@ module Bootsy module Generators class InstallGenerator < Rails::Generators::Base - source_root __FILE__ + source_root File.expand_path('../templates', __FILE__) def add_routes - route("mount Bootsy::Engine => '/bootsy', as: 'bootsy'") + route "mount Bootsy::Engine => '/bootsy', as: 'bootsy'" end def copy_locale - copy_file('../../../../config/locales/en.yml', 'config/locales/bootsy.en.yml') + copy_file '../../../../config/locales/bootsy.en.yml', 'config/locales/bootsy.en.yml' end def add_assets @@ -43,7 +43,7 @@ def add_assets end def copy_config - template('../templates/bootsy.rb', 'config/initializers/bootsy.rb') + template 'bootsy.rb', 'config/initializers/bootsy.rb' end end end