webs 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/config/initializers/http_accept_patch.rb +20 -0
- data/lib/webs.rb +1 -1
- data/webs.gemspec +2 -1
- metadata +3 -1
data/Rakefile
CHANGED
@@ -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
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.
|
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.
|
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
|