bobot 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1604e92019fb451807c99f8a6ecaf3ba969a53a5
4
- data.tar.gz: 62de9467eec07cdeb073421d9f7c212581d62348
3
+ metadata.gz: 6242f80c9f259f76b1cf42f8f60640334c953dce
4
+ data.tar.gz: 864e52849f19a3f0b0632d69ca9dff57d9ed547b
5
5
  SHA512:
6
- metadata.gz: f8733aef1551529ee91a8869e510676a36ae79e6b3c331317fbf34420dc273ab2fd385d744ebe919d04c6d2b69354a8625c1d5769777439f98b940076959d8de
7
- data.tar.gz: b640a5c455189c74aca047303b907f37f1262b20f160a9e3de9308c8c67f9510852e97e17e43b05017a8bcfb8a8d344615cce3edad6db8dedca4f0cefbaa9b63
6
+ metadata.gz: 4c2d76f522226c7449d57553dd1992139358b6029506f735e46b3d49407ab5df110007ccf74fd297a2110684b98a794d67adb97a49aaf23850bfd4d27ba53817
7
+ data.tar.gz: 5d1a0357b9bbcc4d06646d0543d1789b22de492fee212374ab9aeb5820b7a21c36b861c823d112e059523fb1247839d345a2bf45b79a8215e5dbf0eec69f8f80
@@ -1,20 +1,21 @@
1
- require "Typhoeus"
1
+ require "typhoeus"
2
2
  require "uri"
3
3
 
4
4
  module Bobot
5
5
  module GraphFacebook
6
- GRAPH_FB_URL = 'https://graph.facebook.com/v2.11/'.freeze
6
+ GRAPH_FB_URL = 'https://graph.facebook.com/v2.11'.freeze
7
7
  GRAPH_HEADERS = { Accept: "application/json", "Content-Type" => "application/json; charset=utf-8" }.freeze
8
8
 
9
9
  module ClassMethods
10
10
  def graph_get(path, query: {})
11
11
  url = "#{GRAPH_FB_URL}#{path}".freeze
12
- req = Typhoeus::Request.new(
12
+ req = ::Typhoeus::Request.new(
13
13
  url,
14
14
  method: :get,
15
15
  params: URI.encode_www_form(query.reverse_merge(include_headers: false)),
16
16
  headers: GRAPH_HEADERS,
17
17
  ssl_verifypeer: false,
18
+ verbose: false,
18
19
  ).run
19
20
  response = req.run
20
21
  json = ActiveSupport::JSON.decode(response.send(:body) || '{}')
@@ -27,13 +28,14 @@ module Bobot
27
28
 
28
29
  def graph_post(path, query: {}, body: {})
29
30
  url = "#{GRAPH_FB_URL}#{path}".freeze
30
- req = Typhoeus::Request.new(
31
+ req = ::Typhoeus::Request.new(
31
32
  url,
32
33
  method: :post,
33
34
  params: URI.encode_www_form(query.reverse_merge(include_headers: false)),
34
35
  body: ActiveSupport::JSON.encode(body),
35
36
  headers: GRAPH_HEADERS,
36
37
  ssl_verifypeer: false,
38
+ verbose: false,
37
39
  )
38
40
  response = req.run
39
41
  json = ActiveSupport::JSON.decode(response.send(:body) || '{}')
@@ -46,13 +48,14 @@ module Bobot
46
48
 
47
49
  def graph_delete(path, query: {}, body: {})
48
50
  url = "#{GRAPH_FB_URL}#{path}".freeze
49
- req = Typhoeus::Request.new(
51
+ req = ::Typhoeus::Request.new(
50
52
  url,
51
53
  method: :delete,
52
54
  params: URI.encode_www_form(query.reverse_merge(include_headers: false)),
53
55
  body: ActiveSupport::JSON.encode(body),
54
56
  headers: GRAPH_HEADERS,
55
57
  ssl_verifypeer: false,
58
+ verbose: false,
56
59
  )
57
60
  response = req.run
58
61
  json = ActiveSupport::JSON.decode(response.send(:body) || '{}')
data/lib/bobot/version.rb CHANGED
@@ -2,7 +2,7 @@ module Bobot
2
2
  class Version
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- PATCH = 5
5
+ PATCH = 6
6
6
  PRE = nil
7
7
 
8
8
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Navid EMAD