merb_global 0.0.4 → 0.0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/merb_global/merbrake.rb +10 -1
  3. metadata +1 -1
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'spec/rake/spectask'
5
5
 
6
6
  PLUGIN = "merb_global"
7
7
  NAME = "merb_global"
8
- GEM_VERSION = "0.0.4"
8
+ GEM_VERSION = "0.0.4.1"
9
9
  AUTHORS = ["Alex Coles", "Maciej Piechotka"]
10
10
  EMAIL = "alex@alexcolesportfolio.com"
11
11
  HOMEPAGE = "http://trac.ikonoklastik.com/merb_global/"
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  namespace :merb_global do
2
4
  task :merb_start do
3
5
  Merb.start_environment :adapter => 'runner',
@@ -12,7 +14,14 @@ namespace :merb_global do
12
14
  from = Merb::Global.config 'source', 'gettext'
13
15
  into = Merb::Global.config 'provider', 'gettext'
14
16
  if from == 'gettext' and into == 'gettext'
15
- # Change po into mo files
17
+ Dir[Merb::Global::Providers.localedir + '/*.po'] do |file|
18
+ lang = File.basename file, '.po'
19
+ lang_dir = File.join(Merb::Global::Providers.localedir,
20
+ lang, 'LC_MESSAGES')
21
+ FileUtils.mkdir_p lang_dir
22
+ domain = Merb::Global.config([:gettext, :domain], 'merbapp')
23
+ `msgfmt #{file} -o #{lang_dir}/#{domain}.mo`
24
+ end
16
25
  elsif from == into
17
26
  Merb.logger.error 'Tried transfer from and into the same provider'
18
27
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_global
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Coles