umlaut 3.0.0alpha7 → 3.0.0alpha8
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ class ResolveController < UmlautController
|
|
20
20
|
def index
|
21
21
|
self.service_dispatch()
|
22
22
|
|
23
|
-
# check for menu skipping configuration. link is a
|
23
|
+
# check for menu skipping configuration. link is a ServiceResponse
|
24
24
|
link = should_skip_menu
|
25
25
|
if ( ! link.nil? )
|
26
26
|
|
@@ -15,8 +15,8 @@ class ResourceController < UmlautController
|
|
15
15
|
# the whole image in memory for a second while it delivers it, oh well.
|
16
16
|
# doesn't seem to effect speed much, even though it's not optimal.
|
17
17
|
def proxy
|
18
|
-
|
19
|
-
url_str =
|
18
|
+
svc_resp = ServiceResponse.find(params[:id])
|
19
|
+
url_str = svc_resp.view_data[:url]
|
20
20
|
uri = nil
|
21
21
|
begin
|
22
22
|
uri = URI(url_str)
|
@@ -27,9 +27,11 @@ class ResourceController < UmlautController
|
|
27
27
|
proxied_headers = proxy_headers( request, uri.host )
|
28
28
|
remote_response = open(uri, 'rb', proxied_headers)
|
29
29
|
|
30
|
-
# copy certain headers to our proxied response
|
31
|
-
["
|
32
|
-
|
30
|
+
# copy certain headers to our proxied response
|
31
|
+
["Content-Type", "Cache-Control", "Expires", "Content-Length", "Last-Modified", "Etag", "Date"].each do |key|
|
32
|
+
value = remote_response.meta[key.downcase] # for some reason open-uri lowercases em
|
33
|
+
# rack doens't like it if we set a nil value here.
|
34
|
+
response.headers[key] = value unless value.blank?
|
33
35
|
end
|
34
36
|
response.headers["X-Original-Url"] = url_str
|
35
37
|
|
@@ -4,19 +4,34 @@ module Umlaut
|
|
4
4
|
class AssetHooks < Rails::Generators::Base
|
5
5
|
|
6
6
|
def add_to_stylesheet_manifest
|
7
|
-
|
8
|
-
|
7
|
+
existing = IO.read("app/assets/stylesheets/application.css")
|
8
|
+
unless existing.include?('Umlaut')
|
9
|
+
after =
|
10
|
+
if existing.include?("require_self")
|
11
|
+
"require_self"
|
12
|
+
else
|
13
|
+
"/*"
|
14
|
+
end
|
15
|
+
|
16
|
+
insert_into_file "app/assets/stylesheets/application.css", :after => after do
|
9
17
|
%q{
|
18
|
+
*
|
10
19
|
* The base Umlaut styles:
|
11
|
-
*= require 'umlaut'
|
12
|
-
|
20
|
+
*= require 'umlaut'
|
21
|
+
*}
|
13
22
|
end
|
14
23
|
append_to_file("app/assets/stylesheets/application.css") do
|
15
24
|
%q{
|
16
25
|
|
17
|
-
/*
|
18
|
-
|
19
|
-
|
26
|
+
/* Umlaut needs a jquery-ui theme CSS. Here's an easy way to get one,
|
27
|
+
* you can replace with another theme.
|
28
|
+
*
|
29
|
+
* Note, CSS @import needs to be the first line in a CSS file. This will
|
30
|
+
* become so if 'require_self' is included above, as the FIRST sprockets
|
31
|
+
* require, and this @import line is the first non-comment line in this
|
32
|
+
* file.
|
33
|
+
*/
|
34
|
+
@import url(//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-lightness/jquery-ui.css);
|
20
35
|
}
|
21
36
|
end
|
22
37
|
else
|
data/lib/umlaut/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umlaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -3702664404
|
5
5
|
prerelease: 5
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 3.0.
|
11
|
+
- 8
|
12
|
+
version: 3.0.0alpha8
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Jonathan Rochkind, et al
|