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 CHANGED
@@ -1 +1 @@
1
- 0.0.2
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
@@ -101,6 +101,7 @@ module Merb
101
101
  return lang if lang && Merb::Global::Locale.support?(lang)
102
102
  end
103
103
  end
104
+ return nil
104
105
  end
105
106
 
106
107
  # Returns current locale
@@ -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'])
@@ -1,4 +1,6 @@
1
1
  require 'rubygems'
2
+ lib_dir = File.join(File.dirname(__FILE__), '..', 'lib')
3
+ $:.unshift(lib_dir);
2
4
 
3
5
  # Providers
4
6
  def load_provider_lib(*libs)
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.2
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-10-06 00:00:00 -07:00
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.4
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