webs 0.1.24 → 0.1.25

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.24') do |p|
6
+ Echoe.new('webs', '0.1.25') 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"
@@ -0,0 +1,20 @@
1
+ module ActionDispatch
2
+ module Http
3
+ module MimeNegotiation
4
+ # Patched to always accept at least HTML
5
+ # https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6022-content-negotiation-fails-for-some-headers-regression#ticket-6022-10
6
+ def accepts
7
+ @env["action_dispatch.request.accepts"] ||= begin
8
+ header = @env['HTTP_ACCEPT'].to_s.strip
9
+
10
+ if header.empty?
11
+ [content_mime_type]
12
+ else
13
+ Mime::Type.parse(header) << Mime::HTML
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+
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.24'.freeze
10
+ VERSION = '0.1.25'.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.24"
5
+ s.version = "0.1.25"
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"]
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
  "lib/cache/cache.rb",
16
16
  "lib/config/webs_constants.rb",
17
17
  "lib/config/webs_initializer.rb",
18
+ "lib/config/initializers/http_accept_patch.rb",
18
19
  "lib/controller/url_for_context_path.rb",
19
20
  "lib/controller/alive_controller.rb",
20
21
  "lib/controller/info_controller.rb",
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: webs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.24
5
+ version: 0.1.25
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chuck Olczak
@@ -26,6 +26,7 @@ extra_rdoc_files:
26
26
  - lib/cache/cache.rb
27
27
  - lib/config/webs_constants.rb
28
28
  - lib/config/webs_initializer.rb
29
+ - lib/config/initializers/http_accept_patch.rb
29
30
  - lib/controller/url_for_context_path.rb
30
31
  - lib/controller/alive_controller.rb
31
32
  - lib/controller/info_controller.rb
@@ -44,6 +45,7 @@ files:
44
45
  - lib/cache/cache.rb
45
46
  - lib/config/webs_constants.rb
46
47
  - lib/config/webs_initializer.rb
48
+ - lib/config/initializers/http_accept_patch.rb
47
49
  - lib/controller/url_for_context_path.rb
48
50
  - lib/controller/alive_controller.rb
49
51
  - lib/controller/info_controller.rb