emipair-merb_global 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/config/geminstaller.yml +35 -0
- data/lib/merb_global/locale.rb +1 -0
- data/spec/controller_spec.rb +8 -0
- data/spec/spec_helper.rb +2 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
# You don't need all these gems to use merb_global, but you do need them
|
3
|
+
# to run the full test suite. This is incomplete, but it is a start.
|
4
|
+
defaults:
|
5
|
+
install_options: --no-rdoc --no-ri --ignore-dependencies
|
6
|
+
gemcutter_options: &gemcutter_options
|
7
|
+
install_options: --no-rdoc --no-ri --ignore-dependencies --source http://gemcutter.org
|
8
|
+
|
9
|
+
active_support_gems_version: &active_support_gems_version
|
10
|
+
version: 2.3.4
|
11
|
+
data_mapper_gems_version: &data_mapper_gems_version
|
12
|
+
version: 0.9.11
|
13
|
+
gettext_gems_version: &gettext_gems_version
|
14
|
+
version: 2.0.4
|
15
|
+
|
16
|
+
gems:
|
17
|
+
- name: activesupport
|
18
|
+
<<: *active_support_gems_version
|
19
|
+
- name: activerecord
|
20
|
+
<<: *active_support_gems_version
|
21
|
+
- name: locale
|
22
|
+
<<: *gettext_gems_version
|
23
|
+
- name: gettext
|
24
|
+
<<: *gettext_gems_version
|
25
|
+
# The sequel tests are failing; may need an older version?
|
26
|
+
# - name: sequel
|
27
|
+
# version: 3.6.0
|
28
|
+
- name: mocha
|
29
|
+
version: 0.9.8
|
30
|
+
- name: composite_primary_keys
|
31
|
+
version: 2.3.2
|
32
|
+
- name: do_sqlite3
|
33
|
+
<<: *data_mapper_gems_version
|
34
|
+
- name: data_objects
|
35
|
+
<<: *data_mapper_gems_version
|
data/lib/merb_global/locale.rb
CHANGED
data/spec/controller_spec.rb
CHANGED
@@ -37,6 +37,14 @@ describe Merb::Controller do
|
|
37
37
|
Merb::Global::Locale.current.should == Merb::Global::Locale.new('fr')
|
38
38
|
end
|
39
39
|
|
40
|
+
it 'should use default locale when none of the ACCEPT_LANGUAGEs are supported' do
|
41
|
+
Merb::Global::Locale.stubs(:support?).returns(false)
|
42
|
+
controller = dispatch_to(TestController, :index) do |controller|
|
43
|
+
controller.request.env['HTTP_ACCEPT_LANGUAGE'] = 'fr-FR'
|
44
|
+
end
|
45
|
+
Merb::Global::Locale.current.should == Merb::Global::Locale.new('en')
|
46
|
+
end
|
47
|
+
|
40
48
|
it 'should take the weights into account' do
|
41
49
|
de = Merb::Global::Locale.new('de')
|
42
50
|
Merb::Global.stubs(:config).with('locales', ['en']).returns(['de', 'es'])
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emipair-merb_global
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Kent
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-11-02 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -38,6 +38,7 @@ files:
|
|
38
38
|
- activerecord_generators/translations_migration/templates/translations_migration.erb
|
39
39
|
- activerecord_generators/translations_migration/translations_migration_generator.rb
|
40
40
|
- benchmarks/database1.rb
|
41
|
+
- config/geminstaller.yml
|
41
42
|
- examples/active_record_example/README.txt
|
42
43
|
- examples/active_record_example/application.rb
|
43
44
|
- examples/active_record_example/config/database.yml
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
requirements: []
|
145
146
|
|
146
147
|
rubyforge_project:
|
147
|
-
rubygems_version: 1.3.
|
148
|
+
rubygems_version: 1.3.5
|
148
149
|
signing_key:
|
149
150
|
specification_version: 3
|
150
151
|
summary: Localization (L10n) and Internationalization (i18n) support for the Merb MVC Framework
|