Permalink
Browse files

Also pickup keys in lookups in javascript files assuming the babilu p…

…lugin is used, i.e. that the I18n.t('key') syntax is used. Changed Rakefile and spec_helper.rb to reflect whas the rspec-plugin-generator generates, assuming that is best practice
  • Loading branch information...
1 parent cbbc29e commit 9f0260762a912c01a7970d35255a3cc016ef437e Peter Marklund committed Mar 19, 2009
Showing with 611 additions and 23 deletions.
  1. +4 −14 Rakefile
  2. +2 −1 lib/translate/keys.rb
  3. +595 −0 spec/debug.log
  4. +1 −0 spec/files/translate/public/javascripts/application.js
  5. +1 −1 spec/keys_spec.rb
  6. +8 −7 spec/spec_helper.rb
View
@@ -1,21 +1,11 @@
require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
+require 'spec/rake/spectask'
-desc 'Default: run specs'
+desc 'Default: run specs.'
task :default => :spec
-require File.dirname(__FILE__) + '/../rspec/lib/spec/rake/spectask'
-desc "Run all specs in spec directory"
+desc 'Run the specs'
Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
t.spec_files = FileList['spec/**/*_spec.rb']
end
-
-desc 'Generate documentation for the translate plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'Translate'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
@@ -76,7 +76,8 @@ def i18n_lookup_pattern
end
def files_to_scan
- Dir.glob(File.join(files_root_dir, "{app,config,lib}", "**","*.{rb,erb,rhtml}"))
+ Dir.glob(File.join(files_root_dir, "{app,config,lib}", "**","*.{rb,erb,rhtml}")) +
+ Dir.glob(File.join(files_root_dir, "public", "javascripts", "**","*.js"))
end
def files_root_dir
Oops, something went wrong.

0 comments on commit 9f02607

Please sign in to comment.