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 ServiceType object
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
- svc_type = ServiceType.find(params[:id])
19
- url_str = svc_type.view_data[:url]
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
- ["content-type", "cache-control", "expires", "content-length", "last-modified", "etag", "date"].each do |key|
32
- response.headers[key] = remote_response.meta[key]
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
- unless IO.read("app/assets/stylesheets/application.css").include?('Umlaut')
8
- insert_into_file "app/assets/stylesheets/application.css", :after => "/*" do
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
- /* Umlaut needs a jquery-ui theme CSS. Here's an easy way to get one,
18
- you can replace with another theme. */
19
- @import url(//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-lightness/jquery-ui.css);
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
@@ -1,3 +1,3 @@
1
1
  module Umlaut
2
- VERSION = "3.0.0alpha7"
2
+ VERSION = "3.0.0alpha8"
3
3
  end
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: -3702664398
4
+ hash: -3702664404
5
5
  prerelease: 5
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 0
10
10
  - alpha
11
- - 7
12
- version: 3.0.0alpha7
11
+ - 8
12
+ version: 3.0.0alpha8
13
13
  platform: ruby
14
14
  authors:
15
15
  - Jonathan Rochkind, et al