hancock_cms_goto 1.0.1 → 1.0.1.1

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: 521e78d560623c7abee4d147559faa673c55c72f
4
- data.tar.gz: 3ee68ad179c6a17aa5b5d63cfe87a694ee4d9af9
3
+ metadata.gz: 68c7d2016e3b3c6e51a5ab4a166c87827df82d9c
4
+ data.tar.gz: 5e8c479b149b15720fa51e98ca41f9d17851d0b3
5
5
  SHA512:
6
- metadata.gz: e87a3d30d5a0b2b86b7a863da245bf99afec77c1ec19d8e3151fc1341d77e45159c1a990185216f3009037036d1e71d026c1a8e0dec33df763e41a9954a1344d
7
- data.tar.gz: f6a8b1138576e15258bb1692c6425642d4320f998c81af5c10817e0fbe4e5affe56e8b328ff6f9f3f9b539528fbf1ac5bca230f47bc2ca7d08fbf5c2d35fdf21
6
+ metadata.gz: 287aff51b11284a69f262eea6b89985bbe104467c744a6b4c08f27512c9bfa1ac6847a97b7b107097e591ffe7a031305707a6c6145215d77217f85e908ae0d00
7
+ data.tar.gz: e0609a0ca7248a06cd0317fe4b7ac6c62b8b7756ee8ac5827afc44a2b2425feb1fd831b468274a0a3f341ff1fafd342c44643ce4b5717d26063661a39214aee7
@@ -31,7 +31,6 @@ module Hancock::Goto
31
31
 
32
32
  if should_process?(status, headers)
33
33
  begin
34
- _body = response.body
35
34
  content = extract_content(response)
36
35
  doc = ::Nokogiri::HTML(content)
37
36
  array = doc.css(Hancock::Goto.config.css_selector)
@@ -60,8 +59,8 @@ module Hancock::Goto
60
59
  headers['content-length'] = bytesize(content).to_s
61
60
  response = [content]
62
61
  rescue Exception => ex
63
- puts ex.message
64
- puts ex.backtrace
62
+ # puts ex.message
63
+ # puts ex.backtrace
65
64
  end
66
65
  end
67
66
 
@@ -77,7 +76,7 @@ module Hancock::Goto
77
76
  end
78
77
 
79
78
  def extract_content(response)
80
- response.body
79
+ response.is_a?(Array) ? response.first : response.body
81
80
  end
82
81
 
83
82
  def check_attr(a, attr_name)
@@ -1,5 +1,5 @@
1
1
  module Hancock
2
2
  module Goto
3
- VERSION = "1.0.1".freeze
3
+ VERSION = "1.0.1.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hancock_cms_goto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev