webs 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('webs', '0.1.25') do |p|
6
+ Echoe.new('webs', '0.1.26') do |p|
7
7
  p.description = "Reusable webs stuff."
8
8
  p.url = "https://colczak@github.com/websdev/websgem.git"
9
9
  p.author = "Chuck Olczak"
@@ -138,6 +138,15 @@ module Webs
138
138
  def set_fw_params
139
139
  params.merge!( FW_PARAMS ) if defined?( FW_PARAMS )
140
140
  end
141
+
142
+ # NOTE: bots & perl scripts are getting bad format in the request headers
143
+ # generally in the form: :formats=>["charset=iso-8859-1"]
144
+ # Just force those to html
145
+ # ex: https://freewebs.hoptoadapp.com/errors/4334788
146
+ # ex mime type inspection: #<Mime::Type:0x765a7159 @synonyms=[], @string="charset=iso-8859-1", @symbol=nil>
147
+ def fix_request_format
148
+ request.format = :html if request.format.blank? || request.format.to_s =~ /^charset/i
149
+ end
141
150
  end
142
151
  end
143
152
  end
data/lib/webs.rb CHANGED
@@ -7,7 +7,7 @@ require dir + 'helper/params'
7
7
  require dir + 'helper/tags'
8
8
 
9
9
  module Webs
10
- VERSION = '0.1.25'.freeze
10
+ VERSION = '0.1.26'.freeze
11
11
 
12
12
  def self.app_title
13
13
  APP_NAME.titleize
data/webs.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{webs}
5
- s.version = "0.1.25"
5
+ s.version = "0.1.26"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chuck Olczak"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: webs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.25
5
+ version: 0.1.26
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chuck Olczak