boa_vista 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGJmNDE0NmJlYTBkNjRkZTA5YmRiZWQ5Yzc1YmIwNDQwOWY4M2FiNA==
4
+ YTY3NWZiM2IxM2I5MzJlYjNhMGE3NTM4NWVjMGZlNTdjZjQ0OTAzYQ==
5
5
  data.tar.gz: !binary |-
6
- YzNmMDlhODM4ZGZhYjEwZTJkYjQ4MTdhZWM3N2Q0MDA1NmY5NjUwYw==
6
+ N2E1M2ViZDIzNmMwYTQ5ZDVjNDEzNWVhMGQ1NWEyOTRhZTE3ZDIyNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDg5MDkyM2NhZGY0YjM1OGJlYTk5ZTY5MzBkY2Q0YjU3OGI2MDVhMDVlMmNi
10
- Yjk0Y2Y1MzkyNDRmOTAxNjExZDU5ZTQzYzY0YmUxNTlhOTcxOGM5ZjY4MDBl
11
- ODg5MGRkMWNmNzBlNWYzMWY1NjViOTE5YTZlYmUzODIzYzkzMzA=
9
+ MmRlMjAzNmZmOTUwZmZkMmIzNzIyYWRjMzFjMjNjOTUzYzgxYWRlYTc1ZDFh
10
+ OWY2NjkwYjhmNjg3YmZjNjBjZjgyNGQ5NjRhY2JiZTkyNTgwNzFiMDA4YzY1
11
+ MWJiYzUxYWEzMDgxNDUzOGNlN2UwY2JhOWIzZGQxOTQyMWQ1Mjc=
12
12
  data.tar.gz: !binary |-
13
- MjcwMDM5ZGE3ODcxNmJjMmM0MGJhYWZhNjBmYTdlNmYyZjI3MmI4ODhiMzJl
14
- MDYyYjI4OWExNGQ2NzFlNzM5YTQ2ZmQ4ZDBlYTc5YjExZDNhZTg2M2Y5NTNj
15
- NGJiMmYzYmVkYzBkYTRlYmQ4NWIwMmQxZWI0ZDlkNDEzMjhiNWQ=
13
+ YzM3MDg0NWNhZWQxZTk3Nzg5ZGVhZmEzOWEzYjdhY2Q5YTRiNjk5YjQ2ZDA0
14
+ NzAwZDZkMTg3OTYxYmU5Y2Q4NGY3ZThlMTIyMDk0MDYzMDAwY2Q1ZDUzNjI2
15
+ NGVkOWIyYmNmMjUxZmM3ZjUzNGJhNDFkN2FiZGRhNjc0YjkxYTA=
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  boa_vista
2
2
  =========
3
- [![wercker status](https://app.wercker.com/status/08f2a5316ce97f6f16acd51e3c1d3aee/s "wercker status")](https://app.wercker.com/project/bykey/08f2a5316ce97f6f16acd51e3c1d3aee)
4
- [![Code Climate](https://codeclimate.com/github/GabrielMalakias/boa_vista/badges/gpa.svg)](https://codeclimate.com/github/GabrielMalakias/boa_vista)
3
+ [![wercker status](https://app.wercker.com/status/08f2a5316ce97f6f16acd51e3c1d3aee/s "wercker status")](https://app.wercker.com/project/bykey/08f2a5316ce97f6f16acd51e3c1d3aee)[![Code Climate](https://codeclimate.com/github/GabrielMalakias/boa_vista/badges/gpa.svg)](https://codeclimate.com/github/GabrielMalakias/boa_vista)
5
4
  =======
6
5
 
7
6
  Library to do requests and generate layouts for BoaVista SCPC.
@@ -15,9 +15,11 @@ module BoaVista
15
15
  response = nil
16
16
  execute_with_timeout do
17
17
  response = BoaVista::Http.new(uri(create_request)).call.body
18
+ BoaVista.log(:debug, "Response of request: #{response}")
18
19
  end
19
20
  @response.new(parsed_response(response)).read
20
21
  rescue Timeout::Error
22
+ BoaVista.log(:debug, "Request is Timeout")
21
23
  fail Errors::Timeout.new('timed out')
22
24
  end
23
25
  end
@@ -15,6 +15,7 @@ module BoaVista
15
15
  private
16
16
 
17
17
  def execute_request_using_proxy
18
+ BoaVista.log(:debug, "Executing request with proxy #{proxy_uri.host}")
18
19
  request = Net::HTTP::Get.new(@uri.path)
19
20
 
20
21
  proxy.start(@uri.path, @uri.port) do |http|
@@ -23,6 +24,7 @@ module BoaVista
23
24
  end
24
25
 
25
26
  def execute_request
27
+ BoaVista.log(:debug, "Executing request for uri: #{@uri}")
26
28
  Net::HTTP.get_response(@uri)
27
29
  end
28
30
 
@@ -1,3 +1,3 @@
1
1
  module BoaVista
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
data/lib/boa_vista.rb CHANGED
@@ -53,6 +53,12 @@ module BoaVista
53
53
  def self.root
54
54
  File.expand_path '../..', __FILE__
55
55
  end
56
+
57
+ def self.log(level, message)
58
+ @log ||= Logger.new(STDOUT)
59
+ @log.level = Logger::DEBUG
60
+ @log.send(level, "[BoaVista] - #{message}")
61
+ end
56
62
  end
57
63
 
58
64
  require 'boa_vista/request/default'
@@ -1,3 +1,3 @@
1
1
  RSpec.describe BoaVista::VERSION do
2
- specify { expect(BoaVista::VERSION).to eq '0.0.9' }
2
+ specify { expect(BoaVista::VERSION).to eq '0.0.10' }
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boa_vista
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Souza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-18 00:00:00.000000000 Z
12
+ date: 2016-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri