wovnrb 0.1.41 → 0.1.42

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: e718f3627ce1a5b799648a0c99c41a9deb53d0cc
4
- data.tar.gz: ee0bb7b06d3fda174cc6dcf4b5ef31ecd77acdd2
3
+ metadata.gz: e95bb60cf9db8b7a6f4ecff105c17f6404b4ec03
4
+ data.tar.gz: 7c5a408ee16e89b91570383d6dc85c599066f48c
5
5
  SHA512:
6
- metadata.gz: ecc932eec107b3c4f614c165e0be8046ffde4c7011be7fa104d32847be9799b891f0ef5b532cb8b44cbfcb9d8d5f86ac3e01f59bead1aceb7c0658da7fdc0f43
7
- data.tar.gz: 1f006d66b0c14270eaa3ee7f476302a4a38ca2958717a61d9cd85d9c6817659b3a40b44d0fddd2d729352e36c2f653f827f5c188d2be2d7a1d9904d6b7448031
6
+ metadata.gz: 2cee078d28b14e29014d431a47cbfe25dffa9e7a2a5e6a928ba6e2e9be07ac86137d1b94eb9282005d1e2c9aa703ebc02fddc50fe85fd6729e13db303f9d600b
7
+ data.tar.gz: c69d1285c4ef3578438509070c9348fbe0ce217b9f62c6185df680d3bf01f57b190224ad9ece030308bd95e8e939aaa2c0705bc4098a9fc02705e56c27e63f22
data/lib/wovnrb.rb CHANGED
@@ -17,7 +17,6 @@ module Wovnrb
17
17
  end
18
18
 
19
19
  def call(env)
20
- Rails.logger.info("IN CALL")
21
20
  unless STORE.valid_settings?
22
21
  return @app.call(env)
23
22
  end
@@ -33,21 +32,25 @@ module Wovnrb
33
32
  end
34
33
  lang = headers.lang_code
35
34
 
36
- Rails.logger.info("PASSING FORWARD REQUEST")
37
35
  # pass to application
38
36
  status, res_headers, body = @app.call(headers.request_out)
39
- Rails.logger.info("REQUEST RECEIVED")
40
37
  return [status, res_headers, body]
41
38
 
42
39
  if res_headers["Content-Type"] =~ /html/ && !body[0].nil?
40
+ Rails.logger.info("HTML REQUEST")
43
41
 
44
42
  values = STORE.get_values(headers.redis_url)
43
+ Rails.logger.info("VALUES: #{values.count}")
45
44
  url = {
46
45
  :protocol => headers.protocol,
47
46
  :host => headers.host,
48
47
  :pathname => headers.pathname
49
48
  }
49
+ Rails.logger.info("SWITCH LANG")
50
+ Rails.logger.info("BODY: #{body}")
50
51
  body = switch_lang(body, values, url, lang, headers) unless status.to_s =~ /^1|302/
52
+ Rails.logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SWITCHED~~~~~~~~~~~~~~~~~~~~~~~~~")
53
+ Rails.logger.info("BODY: #{body}")
51
54
 
52
55
  content_length = 0
53
56
  body.each { |b| content_length += b.respond_to?(:bytesize) ? b.bytesize : 0 }
@@ -1,3 +1,3 @@
1
1
  module Wovnrb
2
- VERSION = "0.1.41"
2
+ VERSION = "0.1.42"
3
3
  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.41
4
+ version: 0.1.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Sandford