muck-engine 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
@@ -34,9 +34,11 @@ module ActionController
34
34
  end
35
35
 
36
36
  def extract_locale_from_headers
37
- preferred_locales = request.headers['HTTP_ACCEPT_LANGUAGE'].split(',').map { |l| l.split(';').first }
38
- accepted_locales = preferred_locales.select { |l| I18n.available_locales.include?(l.to_sym) }
39
- accepted_locales.empty? ? nil : accepted_locales.first
37
+ if http_lang = request.headers["HTTP_ACCEPT_LANGUAGE"] and ! http_lang.blank?
38
+ preferred_locales = http_lang.split(',').map { |l| l.split(';').first }
39
+ accepted_locales = preferred_locales.select { |l| I18n.available_locales.include?(l.to_sym) }
40
+ accepted_locales.empty? ? nil : accepted_locales.first.to_sym
41
+ end
40
42
  end
41
43
 
42
44
  # Get locale from top-level domain or return nil if such locale is not available
data/muck-engine.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-engine}
5
- s.version = "0.1.10"
5
+ s.version = "0.1.11"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Ball"]
@@ -147,6 +147,7 @@ Gem::Specification.new do |s|
147
147
  "locales/zh.yml",
148
148
  "locales/zh.yml",
149
149
  "muck-engine.gemspec",
150
+ "pkg/muck-engine-0.1.10.gem",
150
151
  "public/images/arrow_down.gif",
151
152
  "public/images/arrow_left.gif",
152
153
  "public/images/arrow_right.gif",
Binary file
@@ -130,13 +130,13 @@ Module <a href="MuckApplication/InstanceMethods.html" class="link">ActionControl
130
130
  onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
131
131
  <div class="method-source-code" id="M000002-source">
132
132
  <pre>
133
- <span class="ruby-comment cmt"># File lib/action_controller/muck_application.rb, line 83</span>
134
- 83: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">receiver</span>)
135
- 84: <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
136
- 85: <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
137
- 86: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
138
- 87: <span class="ruby-keyword kw">end</span>
139
- 88: <span class="ruby-keyword kw">end</span>
133
+ <span class="ruby-comment cmt"># File lib/action_controller/muck_application.rb, line 87</span>
134
+ 87: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">receiver</span>)
135
+ 88: <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
136
+ 89: <span class="ruby-identifier">receiver</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
137
+ 90: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
138
+ 91: <span class="ruby-keyword kw">end</span>
139
+ 92: <span class="ruby-keyword kw">end</span>
140
140
  </pre>
141
141
  </div>
142
142
  </div>
data/rdoc/created.rid CHANGED
@@ -1 +1 @@
1
- Thu, 25 Jun 2009 01:05:05 -0600
1
+ Thu, 25 Jun 2009 01:26:44 -0600
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Jun 25 01:00:26 -0600 2009</td>
59
+ <td>Thu Jun 25 01:21:19 -0600 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -101,6 +101,7 @@ files:
101
101
  - locales/zh-TW.yml
102
102
  - locales/zh.yml
103
103
  - muck-engine.gemspec
104
+ - pkg/muck-engine-0.1.10.gem
104
105
  - public/images/arrow_down.gif
105
106
  - public/images/arrow_left.gif
106
107
  - public/images/arrow_right.gif