merb_r18n 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/merb_r18n.rb +1 -0
- data/spec/app/controllers/i18n.rb +1 -0
- data/spec/app/slice/application.rb +1 -0
- data/spec/app/slice/lib/slice.rb +2 -1
- data/spec/merb_r18n_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- metadata +3 -4
- data/Rakefile +0 -98
data/README.rdoc
CHANGED
@@ -71,7 +71,7 @@ information.
|
|
71
71
|
=== Merb Slice
|
72
72
|
1. Add merb_r18n to your merb slice in <tt>lib/_YOUR_SLICE_.rb</tt>:
|
73
73
|
|
74
|
-
|
74
|
+
dependency 'merb_r18n'
|
75
75
|
|
76
76
|
2. Create translations file in <tt>app/i18n/</tt>.
|
77
77
|
For example <tt>app/i18n/en.yml</tt>:
|
data/lib/merb_r18n.rb
CHANGED
data/spec/app/slice/lib/slice.rb
CHANGED
data/spec/merb_r18n_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb_r18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey "A.I." Sitnik
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-18 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.2.1
|
34
34
|
version:
|
35
35
|
description: A plugin for the Merb framework that provides i18n support to translate your site in several languages. It is just a wrap for R18n core library. It can format numbers and time to the rules of the user locale, has translation for common words, storage translation in YAML format with pluralization and procedures and has special support for countries with two official languages.
|
36
36
|
email: andrey@sitnik.ru
|
@@ -44,7 +44,6 @@ extra_rdoc_files:
|
|
44
44
|
files:
|
45
45
|
- lib/merb_r18n.rb
|
46
46
|
- LICENSE
|
47
|
-
- Rakefile
|
48
47
|
- README.rdoc
|
49
48
|
has_rdoc: true
|
50
49
|
homepage: http://r18n.rubyforge.org/
|
data/Rakefile
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake/rdoctask'
|
3
|
-
require 'rake/gempackagetask'
|
4
|
-
require 'spec/rake/spectask'
|
5
|
-
|
6
|
-
PKG_NAME = 'merb_r18n'
|
7
|
-
gem 'r18n-core'
|
8
|
-
require 'r18n-core/version'
|
9
|
-
|
10
|
-
##############################################################################
|
11
|
-
# Tests
|
12
|
-
##############################################################################
|
13
|
-
|
14
|
-
desc 'Run all specs'
|
15
|
-
Spec::Rake::SpecTask.new('specs') do |t|
|
16
|
-
t.spec_opts = ['--format', 'specdoc', '--colour']
|
17
|
-
t.spec_files = Dir['spec/**/*_spec.rb'].sort
|
18
|
-
end
|
19
|
-
|
20
|
-
desc 'Run a specific spec with TASK=xxxx'
|
21
|
-
Spec::Rake::SpecTask.new('spec') do |t|
|
22
|
-
t.spec_opts = ['--format', 'specdoc', '--colour']
|
23
|
-
t.libs = ['lib']
|
24
|
-
t.spec_files = ["spec/**/#{ENV['TASK']}_spec.rb"]
|
25
|
-
end
|
26
|
-
|
27
|
-
desc 'Run all specs output html'
|
28
|
-
Spec::Rake::SpecTask.new('specs_html') do |t|
|
29
|
-
t.spec_opts = ['--format', 'html']
|
30
|
-
t.libs = ['lib']
|
31
|
-
t.spec_files = Dir['spec/**/*_spec.rb'].sort
|
32
|
-
end
|
33
|
-
|
34
|
-
desc 'RCov'
|
35
|
-
Spec::Rake::SpecTask.new('rcov') do |t|
|
36
|
-
t.spec_opts = ['--format', 'specdoc', '--colour']
|
37
|
-
t.spec_files = Dir['spec/**/*_spec.rb'].sort
|
38
|
-
t.libs = ['lib']
|
39
|
-
t.rcov = true
|
40
|
-
end
|
41
|
-
|
42
|
-
##############################################################################
|
43
|
-
# Documentation and distribution
|
44
|
-
##############################################################################
|
45
|
-
|
46
|
-
Rake::RDocTask.new do |rdoc|
|
47
|
-
rdoc.main = 'README.rdoc'
|
48
|
-
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'lib/**/*.rb')
|
49
|
-
rdoc.title = 'Merb R18n Plugin Documentation'
|
50
|
-
rdoc.rdoc_dir = 'doc'
|
51
|
-
rdoc.options << '-c utf-8'
|
52
|
-
rdoc.options << '--all'
|
53
|
-
end
|
54
|
-
|
55
|
-
spec = Gem::Specification.new do |s|
|
56
|
-
s.platform = Gem::Platform::RUBY
|
57
|
-
s.name = PKG_NAME
|
58
|
-
s.version = R18n::VERSION
|
59
|
-
s.summary = 'A plugin for the Merb framework that provides i18n support to
|
60
|
-
translate your site.'
|
61
|
-
s.description = <<-EOF
|
62
|
-
A plugin for the Merb framework that provides i18n support to translate your
|
63
|
-
site in several languages. It is just a wrap for R18n core library.
|
64
|
-
It can format numbers and time to the rules of the user locale,
|
65
|
-
has translation for common words, storage translation in YAML format with
|
66
|
-
pluralization and procedures and has special support for countries
|
67
|
-
with two official languages.
|
68
|
-
EOF
|
69
|
-
|
70
|
-
s.files = FileList[
|
71
|
-
'lib/**/*',
|
72
|
-
'LICENSE',
|
73
|
-
'Rakefile',
|
74
|
-
'README.rdoc']
|
75
|
-
s.test_files = FileList[
|
76
|
-
'spec/**/*']
|
77
|
-
s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
|
78
|
-
s.require_path = 'lib'
|
79
|
-
s.has_rdoc = true
|
80
|
-
|
81
|
-
s.add_dependency 'merb-core'
|
82
|
-
s.add_dependency 'r18n-core', R18n::VERSION
|
83
|
-
|
84
|
-
s.author = 'Andrey "A.I." Sitnik'
|
85
|
-
s.email = 'andrey@sitnik.ru'
|
86
|
-
s.homepage = 'http://r18n.rubyforge.org/'
|
87
|
-
s.rubyforge_project = 'r18n'
|
88
|
-
end
|
89
|
-
|
90
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
91
|
-
pkg.gem_spec = spec
|
92
|
-
end
|
93
|
-
|
94
|
-
desc 'Install merb_r18n as a gem'
|
95
|
-
task :install => [:package] do
|
96
|
-
sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
|
97
|
-
sh %{#{sudo} gem install pkg/#{PKG_NAME}-#{R18n::VERSION}}
|
98
|
-
end
|