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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f110beeffebb50ef5d15b014db223e3e3f2ce35
4
- data.tar.gz: 6b00c9b3e379ab78a1391411a042b673a1228d87
3
+ metadata.gz: 1b6386a4f3d8ddd657dc1cdc33a3da56852fd1b4
4
+ data.tar.gz: 29e4babbc211eff8ad675e210b17499ead2406a0
5
5
  SHA512:
6
- metadata.gz: 48f0b5e691cd34076b55de7717076d0d8ff56701282c94337eadefcc2720f4bf37fba6fe12e02ef6c3f68a6b4e1d043cdbbfbd188217f6c5f01dc13ef22a009c
7
- data.tar.gz: 228fe99dc21a7973fda1851ba4205a6e29b5e5da0270933d19345319e0b54212a96354e7cf04f7bf257ad7fe709a543be9fd1214d5a27983c043262401117241
6
+ metadata.gz: dc4517116af4a3bb82a926144d61553ee07249d9a6dbc168650f53a16948a49904a59661e550193824d769a86a10114bb476819681ee25da3c1a3f754e64d6d6
7
+ data.tar.gz: a63d9c6673abd8a2ae77054dd6f3ea2a66002d0e77e83ef97a8219912cbd9e13a6fc015101686b2c1d4e1e5a3d7dd6a08231ed47a13418352a85de60c98839fb
@@ -2,12 +2,12 @@ module Wovnrb
2
2
 
3
3
  class Railtie < Rails::Railtie
4
4
  initializer 'wovnrb.configure_rails_initialization' do |app|
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
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
@@ -1,3 +1,3 @@
1
1
  module Wovnrb
2
- VERSION = "0.1.26"
2
+ VERSION = "0.1.27"
3
3
  end
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.26
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-26 00:00:00.000000000 Z
12
+ date: 2015-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogumbo