lib/generators/titler/locales/locales_generator.rb in titler-1.2.0 vs lib/generators/titler/locales/locales_generator.rb in titler-1.3.0
- old
+ new
@@ -1,6 +1,6 @@
-require 'rails/generators/base'
+require "rails/generators/base"
module Titler
module Generators
class LocalesGenerator < Rails::Generators::Base
source_root File.expand_path("../../../../..", __FILE__)
@@ -12,17 +12,17 @@
end
private
def locales
- files_within_root('.', 'config/locales/**/*.*')
+ files_within_root(".", "config/locales/**/*.*")
end
def files_within_root(prefix, glob)
root = "#{self.class.source_root}/#{prefix}"
Dir["#{root}/#{glob}"].sort.map do |full_path|
- full_path.sub(root, '.').gsub('/./', '/')
+ full_path.sub(root, ".").gsub("/./", "/")
end
end
end
end
end