Commit 12fdb928b25e6dd8ecefa5c6bb148c8eb4ee83da
1 parent
34268f13
Exists in
master
and in
23 other branches
noosfero-load: avoid multiple loads of noosfero module
Showing
8 changed files
with
10 additions
and
9 deletions
Show diff stats
config/environment.rb
| ... | ... | @@ -120,7 +120,8 @@ Noosfero.default_locale = nil |
| 120 | 120 | Tag.hierarchical = true |
| 121 | 121 | |
| 122 | 122 | # several local libraries |
| 123 | -require 'noosfero' | |
| 123 | + | |
| 124 | +require_dependency 'noosfero' | |
| 124 | 125 | require 'sqlite_extension' |
| 125 | 126 | |
| 126 | 127 | # load a local configuration if present, but not under test environment. | ... | ... |
config/routes.rb
lib/noosfero/plugin.rb
lib/tasks/doc.rake
| ... | ... | @@ -92,7 +92,7 @@ namespace :noosfero do |
| 92 | 92 | |
| 93 | 93 | po4a_conf = 'tmp/po4a.conf' |
| 94 | 94 | file po4a_conf => english_xhtml do |
| 95 | - require 'noosfero' | |
| 95 | + require_dependency 'noosfero' | |
| 96 | 96 | begin |
| 97 | 97 | File.open(po4a_conf, 'w') do |file| |
| 98 | 98 | file.puts "[po4a_langs] #{(Noosfero.locales.keys - ['en']).join(' ')}" |
| ... | ... | @@ -136,7 +136,7 @@ namespace :noosfero do |
| 136 | 136 | desc "Translates Noosfero online documentation (does not touch PO files)" |
| 137 | 137 | task :translate => [:link_plugins_textiles, :do_translation] |
| 138 | 138 | task :do_translation => english_xhtml do |
| 139 | - require 'noosfero' | |
| 139 | + require_dependency 'noosfero' | |
| 140 | 140 | languages = Noosfero.locales.keys - ['en'] |
| 141 | 141 | languages.each do |lang| |
| 142 | 142 | po = "po/#{lang}/noosfero-doc.po" | ... | ... |
lib/tasks/gettext.rake
| ... | ... | @@ -39,7 +39,7 @@ end |
| 39 | 39 | desc "Update pot/po files to match new version." |
| 40 | 40 | task :updatepo do |
| 41 | 41 | require 'gettext_rails/tools' |
| 42 | - require 'noosfero' | |
| 42 | + require_dependency 'noosfero' | |
| 43 | 43 | |
| 44 | 44 | GetText::RubyParser::ID << '__' |
| 45 | 45 | GetText::RubyParser::PLURAL_ID << 'n__' | ... | ... |
lib/tasks/package.rake
lib/tasks/release.rake