wovnrb 0.1.26 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wovnrb/railtie.rb +6 -6
- data/lib/wovnrb/version.rb +1 -1
- data/lib/wovnrb.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b6386a4f3d8ddd657dc1cdc33a3da56852fd1b4
|
4
|
+
data.tar.gz: 29e4babbc211eff8ad675e210b17499ead2406a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc4517116af4a3bb82a926144d61553ee07249d9a6dbc168650f53a16948a49904a59661e550193824d769a86a10114bb476819681ee25da3c1a3f754e64d6d6
|
7
|
+
data.tar.gz: a63d9c6673abd8a2ae77054dd6f3ea2a66002d0e77e83ef97a8219912cbd9e13a6fc015101686b2c1d4e1e5a3d7dd6a08231ed47a13418352a85de60c98839fb
|
data/lib/wovnrb/railtie.rb
CHANGED
@@ -2,12 +2,12 @@ module Wovnrb
|
|
2
2
|
|
3
3
|
class Railtie < Rails::Railtie
|
4
4
|
initializer 'wovnrb.configure_rails_initialization' do |app|
|
5
|
-
|
6
|
-
begin
|
7
|
-
|
8
|
-
rescue
|
9
|
-
|
10
|
-
end
|
5
|
+
app.middleware.insert_before(0, Wovnrb::Interceptor)
|
6
|
+
#begin
|
7
|
+
# app.middleware.insert_before(Rack::Runtime, Wovnrb::Interceptor)
|
8
|
+
#rescue
|
9
|
+
# app.middleware.insert_before(0, Wovnrb::Interceptor)
|
10
|
+
#end
|
11
11
|
|
12
12
|
#if Rails.env.development? && config.respond_to?(:wovnrb)
|
13
13
|
# config.after_initialize do
|
data/lib/wovnrb/version.rb
CHANGED
data/lib/wovnrb.rb
CHANGED
@@ -39,6 +39,7 @@ module Wovnrb
|
|
39
39
|
|
40
40
|
# pass to application
|
41
41
|
status, res_headers, body = @app.call(headers.request_out)
|
42
|
+
#binding.pry if res_headers["Content-Type"] =~ /html/ && !body[0].nil?
|
42
43
|
|
43
44
|
if res_headers["Content-Type"] =~ /html/ && !body[0].nil?
|
44
45
|
# Can we make this request beforehand?
|
@@ -50,10 +51,15 @@ module Wovnrb
|
|
50
51
|
}
|
51
52
|
switch_lang(body, values, url, lang) unless status.to_s =~ /^1|302/
|
52
53
|
#d = Dom.new(storage.get_values, body, lang)
|
54
|
+
#res_headers["Content-Length"] = body.each.first.length.to_s
|
55
|
+
content_length = 0
|
56
|
+
body.each { |b| content_length += b.respond_to?(:length) ? b.length : 0 }
|
57
|
+
res_headers["Content-Length"] = content_length.to_s
|
53
58
|
end
|
54
59
|
|
55
60
|
headers.out(res_headers)
|
56
61
|
# res_headers['Content-Length'] = body.each {|b| break b.length.to_s }
|
62
|
+
#binding.pry if res_headers["Content-Type"] =~ /html/ && !body[0].nil?
|
57
63
|
[status, res_headers, body]
|
58
64
|
#[status, res_headers, d.transform()]
|
59
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wovnrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Sandford
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogumbo
|