contour 2.0.0.beta.2 → 2.0.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDk3MDAwMmM4ZjEyMDYyYzk5NzJhYTdmMjNmZGQ1NzBjM2U3OTE1Mg==
4
+ YjRjZmRmNzFkYzU5ZTNkZDNmNzI3ZWVmOGNmYjRlNjY0ZDk5ZmZmMA==
5
5
  data.tar.gz: !binary |-
6
- MDRmYzdiMjEwYmEwZGZkNzk3ZTkxYTBjMDQwNDY0OTYxZmJhNjNlYg==
6
+ MWNmZmFiOWY3YjhmYTFlNWRjYzZmOGI3YWVhMDgzMjNlMzBkNTVkZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NGRhY2ZkYmY2M2IyOWRmZTMyMjU4YjRlNWU0ZmMyZGMyNjcwYWI5N2E2ZmUx
10
- MzJiYWRjN2VjZGY5YzMxYWViYTNjMzc4M2M3M2NjNTgxYzMxZTc4M2UyYWVh
11
- MjQ3NjFhMTU5ODVkOWY2OGYyOGQyMzc2NGRkNDJmOTM0Zjk4MzA=
9
+ Yzg0ZjM3ZTZkYTJmZTI5MjBmNWE2YTkyOTJlMWM4OWYwYWI0NDUyOTA1MDFm
10
+ ZTg4ODc4ZjZmZDg0ODlmNmIxYzFhYTRjN2VkZTI0YzUzOWExNjgyZjM3MDc2
11
+ Yjk5MGQwZTEyMjRjZDM4YThkY2U5ZjNiZTk4MzJhYmM4MWIyNjY=
12
12
  data.tar.gz: !binary |-
13
- NzFjNjI1Njg1NDljMjI1M2NhMzFlNzE5YTY1NDdjZDBmM2M4Y2M2MWRhN2Ri
14
- ZWRlZDYxZmFlNTBhOTU1YjQxYzFiOWQ5ZmRmZGUxMjE0NWRiNjdiNjhiZDFj
15
- YTEyZjgzMjM4NDE5YzkyYTk1ZGQ4YmVjMzEwMzFiNGQ3YTdhYjA=
13
+ ODg5OGY1MzlhNWI3Y2QzMzU4MjhhODRmZTA0NGQzZjQyMjM1NDg4ZmFiZTdj
14
+ NmZjMDFiZDhkYjczMWY3NzlhNzdmM2VlZmQ4MmNiMDY2NjYzODMzZDZlYWE5
15
+ OTkwZmI5MGM3MGY4OTQ4NzA3OTg2NzhhOTIwYWFiN2QxMDdjNmI=
@@ -4,6 +4,11 @@
4
4
  - **Gem Changes**
5
5
  - Updated to Rails 4.0.0.beta1
6
6
 
7
+ ### Refactoring
8
+ - Added a fix for Rack that respecifies the Content-Type as "text/html"
9
+ - This fixes the OmniAuth-LDAP form from returning as "text/plain"
10
+ - Removed an temporary fix that allowed OmniAuth to interact properly with Rack
11
+
7
12
  ## 1.3.0 (February 26, 2013)
8
13
 
9
14
  ### Breaking Changes
@@ -1,45 +1,45 @@
1
1
  require 'omniauth'
2
2
  require 'omniauth-ldap'
3
3
 
4
- # Overwriting methods from Rack
5
- # While OmniAuth 1.0.2 fixes the Builder setup, Rack 1.4.0 still responds incorrectly to it's release version.
6
- # Wait for Rack 1.4.1 or updated version before removing the Builder fixes
7
- module OmniAuth
8
-
9
- # class Builder updates for Rack 1.4.0
10
- class Builder
11
- def initialize(app = nil,&block)
12
- @use, @map, @run = [], nil, app
13
- instance_eval(&block) if block_given?
14
- end
15
-
16
- def on_failure(&block)
17
- OmniAuth.config.on_failure = block
18
- end
19
-
20
- def configure(&block)
21
- OmniAuth.configure(&block)
22
- end
23
-
24
- def provider(klass, *args, &block)
25
- if klass.is_a?(Class)
26
- middleware = klass
27
- else
28
- begin
29
- middleware = OmniAuth::Strategies.const_get("#{OmniAuth::Utils.camelize(klass.to_s)}")
30
- rescue NameError
31
- raise LoadError, "Could not find matching strategy for #{klass.inspect}. You may need to install an additional gem (such as omniauth-#{klass})."
32
- end
33
- end
34
-
35
- use middleware, *args, &block
36
- end
37
-
38
- def call(env)
39
- to_app.call(env)
40
- end
41
- end
42
- end
4
+ # # Overwriting methods from Rack
5
+ # # While OmniAuth 1.0.2 fixes the Builder setup, Rack 1.4.0 still responds incorrectly to it's release version.
6
+ # # Wait for Rack 1.4.1 or updated version before removing the Builder fixes
7
+ # module OmniAuth
8
+
9
+ # # class Builder updates for Rack 1.4.0
10
+ # class Builder
11
+ # def initialize(app = nil,&block)
12
+ # @use, @map, @run = [], nil, app
13
+ # instance_eval(&block) if block_given?
14
+ # end
15
+
16
+ # def on_failure(&block)
17
+ # OmniAuth.config.on_failure = block
18
+ # end
19
+
20
+ # def configure(&block)
21
+ # OmniAuth.configure(&block)
22
+ # end
23
+
24
+ # def provider(klass, *args, &block)
25
+ # if klass.is_a?(Class)
26
+ # middleware = klass
27
+ # else
28
+ # begin
29
+ # middleware = OmniAuth::Strategies.const_get("#{OmniAuth::Utils.camelize(klass.to_s)}")
30
+ # rescue NameError
31
+ # raise LoadError, "Could not find matching strategy for #{klass.inspect}. You may need to install an additional gem (such as omniauth-#{klass})."
32
+ # end
33
+ # end
34
+
35
+ # use middleware, *args, &block
36
+ # end
37
+
38
+ # def call(env)
39
+ # to_app.call(env)
40
+ # end
41
+ # end
42
+ # end
43
43
 
44
44
  # Fix for LDAP Authentication with Domains
45
45
  module OmniAuth
@@ -107,4 +107,4 @@ module OmniAuth
107
107
  end
108
108
  end
109
109
  end
110
- end
110
+ end
@@ -13,4 +13,33 @@ module Rack
13
13
  end
14
14
  end
15
15
  end
16
+
17
+
18
+ # Required as Rack 1.5.x series removed the default content type of text/html for some unknown reason, something about "adhering to standards for HTTP 1.0 and 1.1 protocols"
19
+ # Was removed in this commit: https://github.com/rack/rack/commit/3623d04526b953a63bfb3e72de2d6920a042563f#L2L21
20
+ class Response
21
+ def initialize(body=[], status=200, header={})
22
+ @status = status.to_i
23
+ @header = Utils::HeaderHash.new("Content-Type" => "text/html").merge(header) # This is the modified line that requires Content-Type set to text/html.
24
+
25
+ @chunked = "chunked" == @header['Transfer-Encoding']
26
+ @writer = lambda { |x| @body << x }
27
+ @block = nil
28
+ @length = 0
29
+
30
+ @body = []
31
+
32
+ if body.respond_to? :to_str
33
+ write body.to_str
34
+ elsif body.respond_to?(:each)
35
+ body.each { |part|
36
+ write part.to_s
37
+ }
38
+ else
39
+ raise TypeError, "stringable or iterable required"
40
+ end
41
+
42
+ yield self if block_given?
43
+ end
44
+ end
16
45
  end
@@ -3,7 +3,7 @@ module Contour
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
5
  TINY = 0
6
- BUILD = "beta.2" # nil, "pre", "rc", "rc2"
6
+ BUILD = "beta.3" # nil, "pre", "rc", "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contour
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.2
4
+ version: 2.0.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remo Mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-07 00:00:00.000000000 Z
11
+ date: 2013-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails