rails_locale_detection 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+ gem 'http_accept_language'
6
+
7
+ # Add dependencies to develop your gem here.
8
+ # Include everything needed to run rake, tests, features, etc.
9
+ group :development do
10
+ gem 'i18n'
11
+ gem 'timecop'
12
+ gem 'actionpack', '~> 3.1.1'
13
+ gem 'activesupport', '~> 3.1.1'
14
+ gem "rspec", "~> 2.3.0"
15
+ gem "bundler", "~> 1.0.0"
16
+ gem "jeweler", "~> 1.6.4"
17
+ gem "rcov", ">= 0"
18
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,69 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionpack (3.1.3)
5
+ activemodel (= 3.1.3)
6
+ activesupport (= 3.1.3)
7
+ builder (~> 3.0.0)
8
+ erubis (~> 2.7.0)
9
+ i18n (~> 0.6)
10
+ rack (~> 1.3.5)
11
+ rack-cache (~> 1.1)
12
+ rack-mount (~> 0.8.2)
13
+ rack-test (~> 0.6.1)
14
+ sprockets (~> 2.0.3)
15
+ activemodel (3.1.3)
16
+ activesupport (= 3.1.3)
17
+ builder (~> 3.0.0)
18
+ i18n (~> 0.6)
19
+ activesupport (3.1.3)
20
+ multi_json (~> 1.0)
21
+ builder (3.0.0)
22
+ diff-lcs (1.1.3)
23
+ erubis (2.7.0)
24
+ git (1.2.5)
25
+ hike (1.2.1)
26
+ http_accept_language (1.0.2)
27
+ i18n (0.6.0)
28
+ jeweler (1.6.4)
29
+ bundler (~> 1.0)
30
+ git (>= 1.2.5)
31
+ rake
32
+ multi_json (1.0.3)
33
+ rack (1.3.5)
34
+ rack-cache (1.1)
35
+ rack (>= 0.4)
36
+ rack-mount (0.8.3)
37
+ rack (>= 1.0.0)
38
+ rack-test (0.6.1)
39
+ rack (>= 1.0)
40
+ rake (0.9.2.2)
41
+ rcov (0.9.11)
42
+ rspec (2.3.0)
43
+ rspec-core (~> 2.3.0)
44
+ rspec-expectations (~> 2.3.0)
45
+ rspec-mocks (~> 2.3.0)
46
+ rspec-core (2.3.1)
47
+ rspec-expectations (2.3.0)
48
+ diff-lcs (~> 1.1.2)
49
+ rspec-mocks (2.3.0)
50
+ sprockets (2.0.3)
51
+ hike (~> 1.2)
52
+ rack (~> 1.0)
53
+ tilt (~> 1.1, != 1.3.0)
54
+ tilt (1.3.3)
55
+ timecop (0.3.5)
56
+
57
+ PLATFORMS
58
+ ruby
59
+
60
+ DEPENDENCIES
61
+ actionpack (~> 3.1.1)
62
+ activesupport (~> 3.1.1)
63
+ bundler (~> 1.0.0)
64
+ http_accept_language
65
+ i18n
66
+ jeweler (~> 1.6.4)
67
+ rcov
68
+ rspec (~> 2.3.0)
69
+ timecop
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Mateo Murphy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,40 @@
1
+ = rails_locale_detection
2
+
3
+ Sets the current locale of a request using a combination of params, cookies, and http headers.
4
+
5
+ In turn, it checks the value of params[:locale], cookies[:locale] and finally HTTP_ACCEPT_LANGUAGE headers to find a locale that
6
+ corresponds to the available locales, then stores the set locale in a cookie for future requests.
7
+
8
+ == Usage
9
+
10
+ Include the gem in your Gemfile
11
+
12
+ gem 'rails_locale_detection'
13
+
14
+ Set your default and available locales
15
+
16
+ I18n.default_locale = :en
17
+ I18n.available_locales = [:en, :fr]
18
+
19
+ Call set_locale as a filter in your controllers
20
+
21
+ class ApplicationController < ActionController::Base
22
+ before_filter :set_locale
23
+
24
+ end
25
+
26
+ == Contributing to rails_locale_detection
27
+
28
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
29
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
30
+ * Fork the project
31
+ * Start a feature/bugfix branch
32
+ * Commit and push until you are happy with your contribution
33
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
34
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
35
+
36
+ == Copyright
37
+
38
+ Copyright (c) 2011 Mateo Murphy. See LICENSE.txt for
39
+ further details.
40
+
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "rails_locale_detection"
18
+ gem.homepage = "http://github.com/mateomurphy/rails_locale_detection"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{locale setting for rails project}
21
+ gem.description = %Q{Sets the current locale of a request using a combination of params, cookies, and http headers}
22
+ gem.email = "mateo.murphy@gmail.com"
23
+ gem.authors = ["Mateo Murphy"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
35
+ spec.pattern = 'spec/**/*_spec.rb'
36
+ spec.rcov = true
37
+ end
38
+
39
+ task :default => :spec
40
+
41
+ require 'rake/rdoctask'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "rails_locale_detection #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,45 @@
1
+ module Rails
2
+ module LocaleDetection
3
+ mattr_accessor :locale_expiry
4
+ @@locale_expiry = 3.months
5
+
6
+ def available_locales
7
+ I18n.available_locales
8
+ end
9
+
10
+ def default_locale
11
+ I18n.default_locale
12
+ end
13
+
14
+ # returns the (symbolized) value passed if it's in the available_locales
15
+ def validate_locale(locale)
16
+ locale.to_sym if locale && available_locales.include?(locale.to_sym)
17
+ end
18
+
19
+ def locale_from_param
20
+ validate_locale(params[:locale])
21
+ end
22
+
23
+ def locale_from_cookies
24
+ validate_locale(cookies[:locale])
25
+ end
26
+
27
+ def locale_from_request
28
+ validate_locale(request.preferred_language_from(available_locales))
29
+ end
30
+
31
+ def get_locale
32
+ locale_from_param || locale_from_cookies || locale_from_request || default_locale
33
+ end
34
+
35
+ # set I18n.locale, default_url_options[:locale] and cookies[:locale] to the value returned by
36
+ # get_locale
37
+ def set_locale
38
+ default_url_options[:locale] = I18n.locale = get_locale
39
+
40
+ cookies[:locale] = { :value => I18n.locale, :expires => locale_expiry.from_now }
41
+
42
+ I18n.locale
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,4 @@
1
+ require 'http_accept_language'
2
+ require 'rails/locale_detection'
3
+
4
+ ActionController::Base.send :include, Rails::LocaleDetection if defined?(ActionController)
@@ -0,0 +1,77 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails_locale_detection}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Mateo Murphy"]
12
+ s.date = %q{2011-12-16}
13
+ s.description = %q{Sets the current locale of a request using a combination of params, cookies, and http headers}
14
+ s.email = %q{mateo.murphy@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/rails/locale_detection.rb",
29
+ "lib/rails_locale_detection.rb",
30
+ "rails_locale_detection.gemspec",
31
+ "spec/rails_locale_detection_spec.rb",
32
+ "spec/spec_helper.rb",
33
+ "spec/support/mock.rb"
34
+ ]
35
+ s.homepage = %q{http://github.com/mateomurphy/rails_locale_detection}
36
+ s.licenses = ["MIT"]
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = %q{1.5.2}
39
+ s.summary = %q{locale setting for rails project}
40
+
41
+ if s.respond_to? :specification_version then
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
+ s.add_runtime_dependency(%q<http_accept_language>, [">= 0"])
46
+ s.add_development_dependency(%q<i18n>, [">= 0"])
47
+ s.add_development_dependency(%q<timecop>, [">= 0"])
48
+ s.add_development_dependency(%q<actionpack>, ["~> 3.1.1"])
49
+ s.add_development_dependency(%q<activesupport>, ["~> 3.1.1"])
50
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
51
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
52
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
53
+ s.add_development_dependency(%q<rcov>, [">= 0"])
54
+ else
55
+ s.add_dependency(%q<http_accept_language>, [">= 0"])
56
+ s.add_dependency(%q<i18n>, [">= 0"])
57
+ s.add_dependency(%q<timecop>, [">= 0"])
58
+ s.add_dependency(%q<actionpack>, ["~> 3.1.1"])
59
+ s.add_dependency(%q<activesupport>, ["~> 3.1.1"])
60
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
61
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
62
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
63
+ s.add_dependency(%q<rcov>, [">= 0"])
64
+ end
65
+ else
66
+ s.add_dependency(%q<http_accept_language>, [">= 0"])
67
+ s.add_dependency(%q<i18n>, [">= 0"])
68
+ s.add_dependency(%q<timecop>, [">= 0"])
69
+ s.add_dependency(%q<actionpack>, ["~> 3.1.1"])
70
+ s.add_dependency(%q<activesupport>, ["~> 3.1.1"])
71
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
72
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
73
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
74
+ s.add_dependency(%q<rcov>, [">= 0"])
75
+ end
76
+ end
77
+
@@ -0,0 +1,126 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ I18n.available_locales = [:en, :fr]
4
+ Timecop.freeze
5
+
6
+ describe Rails::LocaleDetection do
7
+ let(:request) { MockRequest.new }
8
+ let(:controller) { MockController.new(request) }
9
+
10
+ describe '.locale_expiry' do
11
+ it "should be set to 3 months be default" do
12
+ Rails::LocaleDetection.locale_expiry.should eq(3.months)
13
+ end
14
+ end
15
+
16
+ describe '#available_locales' do
17
+ it "should shadow I18n available_locales" do
18
+ controller.available_locales.should eq([:en, :fr])
19
+ end
20
+ end
21
+
22
+ describe '#default_locale' do
23
+ it "should shadow I18n default locale" do
24
+ I18n.default_locale = :en
25
+ controller.default_locale.should eq(:en)
26
+ end
27
+ end
28
+
29
+ describe '#validate_locale' do
30
+ it "should return the passed locale if it's valid" do
31
+ controller.validate_locale(:en).should eq(:en)
32
+ end
33
+
34
+ it "should return nil if the passed locale isn't valid" do
35
+ controller.validate_locale(:es).should be_nil
36
+ end
37
+ end
38
+
39
+ describe '#locale_from_param' do
40
+ it "should return en if the param set was valid" do
41
+ controller.params[:locale] = 'en'
42
+ controller.locale_from_param.should eq(:en)
43
+ end
44
+
45
+ it "should return nil if the param set was not" do
46
+ controller.params[:locale] = 'es'
47
+ controller.locale_from_param.should be_nil
48
+ end
49
+
50
+ it "should return nil if not locale was set" do
51
+ controller.locale_from_param.should be_nil
52
+ end
53
+ end
54
+
55
+ describe '#locale_from_cookie' do
56
+ it "should return en if the param set was valid" do
57
+ controller.cookies[:locale] = 'en'
58
+ controller.locale_from_cookies.should eq(:en)
59
+ end
60
+
61
+ it "should return nil if the param set was not" do
62
+ controller.cookies[:locale] = 'es'
63
+ controller.locale_from_cookies.should be_nil
64
+ end
65
+
66
+ it "should return nil if not locale was set" do
67
+ controller.locale_from_cookies.should be_nil
68
+ end
69
+ end
70
+
71
+ describe '#locale_from_request' do
72
+ it "should return en if the param set was valid" do
73
+ request.env['HTTP_ACCEPT_LANGUAGE'] = 'en-us,en-gb;q=0.8,en;q=0.6'
74
+ controller.locale_from_request.should eq(:en)
75
+ end
76
+
77
+ it "should return nil if the param set was not" do
78
+ request.env['HTTP_ACCEPT_LANGUAGE'] = 'es'
79
+ controller.locale_from_request.should be_nil
80
+ end
81
+
82
+ it "should return nil if not locale was set" do
83
+ controller.locale_from_request.should be_nil
84
+ end
85
+ end
86
+
87
+ describe '#get_locale' do
88
+ it "should return nil if nothing is set" do
89
+ controller.get_locale.should eq(:en)
90
+ end
91
+
92
+ it "should return en if the params is set to en" do
93
+ controller.params[:locale] = "en"
94
+ controller.get_locale.should eq(:en)
95
+ end
96
+
97
+ it "should return fr if the cookie is set to fr" do
98
+ controller.cookies[:locale] = "fr"
99
+ controller.get_locale.should eq(:fr)
100
+ end
101
+
102
+ it "should return en if the request is set to en" do
103
+ request.env['HTTP_ACCEPT_LANGUAGE'] = 'en-us,en-gb;q=0.8,en;q=0.6'
104
+ controller.get_locale.should eq(:en)
105
+ end
106
+ end
107
+
108
+ describe '#set_locale' do
109
+ before :all do
110
+ controller.params[:locale] = "fr"
111
+ controller.set_locale
112
+ end
113
+
114
+ it "should set the current locale to the locale param" do
115
+ I18n.locale.should eq(:fr)
116
+ end
117
+
118
+ it "should set the language" do
119
+ controller.cookies[:locale].should eq(:fr)
120
+ end
121
+
122
+ it "should set the default_url_options" do
123
+ controller.default_url_options[:locale].should eq(:fr)
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require 'rspec'
5
+ require 'i18n'
6
+ require 'active_support/core_ext'
7
+ require 'action_dispatch/middleware/cookies'
8
+ require 'timecop'
9
+
10
+ require 'rails_locale_detection'
11
+
12
+ # Requires supporting files with custom matchers and macros, etc,
13
+ # in ./support/ and its subdirectories.
14
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
15
+
16
+ RSpec.configure do |config|
17
+
18
+ end
@@ -0,0 +1,21 @@
1
+ class MockRequest
2
+ include HttpAcceptLanguage
3
+
4
+ attr_accessor :env
5
+
6
+ def initialize
7
+ @env = {'HTTP_ACCEPT_LANGUAGE' => ''}
8
+ end
9
+ end
10
+
11
+ class MockController
12
+ include Rails::LocaleDetection
13
+
14
+ attr_accessor :request, :params, :cookies, :default_url_options
15
+
16
+ def initialize(request)
17
+ @request = request
18
+ @cookies = ActionDispatch::Cookies::CookieJar.new
19
+ @default_url_options = @params = {}
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,216 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_locale_detection
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Mateo Murphy
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-12-16 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: http_accept_language
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ prerelease: false
33
+ type: :runtime
34
+ requirement: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: i18n
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ prerelease: false
47
+ type: :development
48
+ requirement: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: timecop
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ prerelease: false
61
+ type: :development
62
+ requirement: *id003
63
+ - !ruby/object:Gem::Dependency
64
+ name: actionpack
65
+ version_requirements: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ hash: 1
71
+ segments:
72
+ - 3
73
+ - 1
74
+ - 1
75
+ version: 3.1.1
76
+ prerelease: false
77
+ type: :development
78
+ requirement: *id004
79
+ - !ruby/object:Gem::Dependency
80
+ name: activesupport
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ~>
85
+ - !ruby/object:Gem::Version
86
+ hash: 1
87
+ segments:
88
+ - 3
89
+ - 1
90
+ - 1
91
+ version: 3.1.1
92
+ prerelease: false
93
+ type: :development
94
+ requirement: *id005
95
+ - !ruby/object:Gem::Dependency
96
+ name: rspec
97
+ version_requirements: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ~>
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 2
105
+ - 3
106
+ - 0
107
+ version: 2.3.0
108
+ prerelease: false
109
+ type: :development
110
+ requirement: *id006
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ version_requirements: &id007 !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ hash: 23
119
+ segments:
120
+ - 1
121
+ - 0
122
+ - 0
123
+ version: 1.0.0
124
+ prerelease: false
125
+ type: :development
126
+ requirement: *id007
127
+ - !ruby/object:Gem::Dependency
128
+ name: jeweler
129
+ version_requirements: &id008 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ~>
133
+ - !ruby/object:Gem::Version
134
+ hash: 7
135
+ segments:
136
+ - 1
137
+ - 6
138
+ - 4
139
+ version: 1.6.4
140
+ prerelease: false
141
+ type: :development
142
+ requirement: *id008
143
+ - !ruby/object:Gem::Dependency
144
+ name: rcov
145
+ version_requirements: &id009 !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ hash: 3
151
+ segments:
152
+ - 0
153
+ version: "0"
154
+ prerelease: false
155
+ type: :development
156
+ requirement: *id009
157
+ description: Sets the current locale of a request using a combination of params, cookies, and http headers
158
+ email: mateo.murphy@gmail.com
159
+ executables: []
160
+
161
+ extensions: []
162
+
163
+ extra_rdoc_files:
164
+ - LICENSE.txt
165
+ - README.rdoc
166
+ files:
167
+ - .document
168
+ - .rspec
169
+ - Gemfile
170
+ - Gemfile.lock
171
+ - LICENSE.txt
172
+ - README.rdoc
173
+ - Rakefile
174
+ - VERSION
175
+ - lib/rails/locale_detection.rb
176
+ - lib/rails_locale_detection.rb
177
+ - rails_locale_detection.gemspec
178
+ - spec/rails_locale_detection_spec.rb
179
+ - spec/spec_helper.rb
180
+ - spec/support/mock.rb
181
+ has_rdoc: true
182
+ homepage: http://github.com/mateomurphy/rails_locale_detection
183
+ licenses:
184
+ - MIT
185
+ post_install_message:
186
+ rdoc_options: []
187
+
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ none: false
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ hash: 3
196
+ segments:
197
+ - 0
198
+ version: "0"
199
+ required_rubygems_version: !ruby/object:Gem::Requirement
200
+ none: false
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ hash: 3
205
+ segments:
206
+ - 0
207
+ version: "0"
208
+ requirements: []
209
+
210
+ rubyforge_project:
211
+ rubygems_version: 1.5.2
212
+ signing_key:
213
+ specification_version: 3
214
+ summary: locale setting for rails project
215
+ test_files: []
216
+