rack-wwwhisper 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,12 +61,7 @@ class WWWhisper
61
61
  # In addition, the current site url is passed in the Site-Url header.
62
62
  @@FORWARDED_HEADERS = ['Accept', 'Accept-Language', 'Cookie', 'Origin',
63
63
  'X-CSRFToken', 'X-Requested-With']
64
- @@DEFAULT_IFRAME = \
65
- %Q[<iframe id="wwwhisper-iframe" src="%s" width="340" height="29"
66
- frameborder="0" scrolling="no" style="position:fixed; overflow:hidden;
67
- border:0px; bottom:0px; right:0px; z-index:11235;
68
- background-color:transparent;">
69
- </iframe>
64
+ @@DEFAULT_IFRAME = %Q[<script type="text/javascript" src="%s"> </script>
70
65
  ]
71
66
 
72
67
  # Following environment variables are recognized:
@@ -79,8 +74,8 @@ class WWWhisper
79
74
  # the sites are treated as one: access control rules defined for
80
75
  # one site, apply to the other site.
81
76
  #
82
- # 3. WWWHISPER_IFRAME: an HTML snippet that should be injected to
83
- # returned HTML documents (has a default value).
77
+ # 3. WWWHISPER_IFRAME: an HTML snippet to be injected into returned
78
+ # HTML documents (has a default value).
84
79
  def initialize(app)
85
80
  @app = app
86
81
  if ENV['WWWHISPER_DISABLE'] == "1"
@@ -100,7 +95,7 @@ class WWWhisper
100
95
  @wwwhisper_uri = parse_uri(ENV['WWWHISPER_URL'])
101
96
 
102
97
  @wwwhisper_iframe = ENV['WWWHISPER_IFRAME'] ||
103
- sprintf(@@DEFAULT_IFRAME, wwwhisper_path('auth/overlay.html'))
98
+ sprintf(@@DEFAULT_IFRAME, wwwhisper_path('auth/iframe.js'))
104
99
  @wwwhisper_iframe_bytesize = Rack::Utils::bytesize(@wwwhisper_iframe)
105
100
  end
106
101
 
@@ -126,7 +126,7 @@ class TestWWWhisper < Test::Unit::TestCase
126
126
 
127
127
  get path
128
128
  assert last_response.ok?
129
- assert_match(/.*<iframe id="wwwhisper-iframe".*/, last_response.body)
129
+ assert_match(/.*<script.*src="\/wwwhisper.*/, last_response.body)
130
130
  assert_requested :get, full_url(@wwwhisper.auth_query(path))
131
131
  end
132
132
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-wwwhisper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-14 00:00:00.000000000 Z
12
+ date: 2013-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: -3079132124466735415
134
+ hash: 4077151302499284124
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: -3079132124466735415
143
+ hash: 4077151302499284124
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.24