bobot 3.0.1 → 3.0.2

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: 640a621bd564127ef1480e17a4c2359d177503b6
4
- data.tar.gz: 66e4fa77192b46535e5329652ea6a7e75d68d1cf
3
+ metadata.gz: 4243e6fe0959fe5be8e9f7f3f64b7a73df0bc672
4
+ data.tar.gz: 4d63329d52c8732e103cd8019f5600def9cc99a7
5
5
  SHA512:
6
- metadata.gz: 0954163b016234b5efd7c5344281a81a2c6c873574db790be3e33a5abb85d51696c9124baa03838681e859294780d0c559d17e0f183b19f928f3bfeb130b0d0a
7
- data.tar.gz: 1f7592dadac8b0125648a01c98b7bf3d9789a3e8bbacbb53c450109810ee5f96589662ad2280518ced9611a0b200a14fa79afb7bcbd1dd4bd43d4fbe43d09692
6
+ metadata.gz: 5819b30952a09f40fe0d0f9c569866c75cbc1ead328057d2be8223870faea1d0ae97f79fb7f01cb46cd579ac48a63582dd61c2c76d02577326dacbccd43c112b
7
+ data.tar.gz: 9e5accdc641392ae7fff0aa8d90ccc1fbb2844a801af4b3c091df5e8d355258bd0b294ecc698ad531958207a10603db51488d3a15e214fc7daffd6f219a6eed8
data/README.md CHANGED
@@ -22,6 +22,7 @@ gem 'bobot'
22
22
  verify_token: "your token"
23
23
  domains: "whitelisted-domain.com,second-whitelisted-domain.com"
24
24
  async: false
25
+ commander_queue_name: "default"
25
26
  pages:
26
27
  - slug: "facebook_1"
27
28
  language: "fr"
@@ -1,6 +1,13 @@
1
1
  module Bobot
2
2
  class CommanderJob < ApplicationJob
3
- queue_as :default
3
+
4
+ queue_as do
5
+ if Bobot.config.commander_queue_name.present?
6
+ Bobot.config.commander_queue_name
7
+ else
8
+ :default
9
+ end
10
+ end
4
11
 
5
12
  def perform(payload:)
6
13
  Bobot::Commander.trigger(payload)
@@ -1,6 +1,13 @@
1
1
  module Bobot
2
2
  class DeliverJob < ApplicationJob
3
- queue_as :default
3
+
4
+ queue_as do
5
+ if Bobot.config.commander_queue_name.present?
6
+ Bobot.config.commander_queue_name
7
+ else
8
+ :default
9
+ end
10
+ end
4
11
 
5
12
  def perform(target_facebook_uid:, access_token:, payload_template:)
6
13
  Bobot::Commander.deliver(
@@ -1,6 +1,6 @@
1
1
  module Bobot
2
2
  class Configuration
3
- attr_accessor :app_id, :app_secret, :verify_token, :domains, :async, :pages
3
+ attr_accessor :app_id, :app_secret, :verify_token, :domains, :async, :commander_queue_name, :pages
4
4
 
5
5
  def domains=(rhs)
6
6
  if rhs.nil?
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 = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  class << self
@@ -6,11 +6,12 @@ if bobot_config.present?
6
6
  raise "Bobot: #{bobot_config_path} required an array key :pages (cf. https://github.com/navidemad/bobot)"
7
7
  end
8
8
  Bobot.configure do |config|
9
- config.app_id = bobot_config["app_id"],
10
- config.app_secret = bobot_config["app_secret"],
11
- config.verify_token = bobot_config["verify_token"],
12
- config.domains = bobot_config["domains"],
13
- config.async = bobot_config["async"],
9
+ config.app_id = bobot_config["app_id"],
10
+ config.app_secret = bobot_config["app_secret"],
11
+ config.verify_token = bobot_config["verify_token"],
12
+ config.domains = bobot_config["domains"],
13
+ config.async = bobot_config["async"],
14
+ config.commander_queue_name = bobot_config["commander_queue_name"],
14
15
  bobot_config["pages"].each do |page|
15
16
  config.pages << Bobot::Page.new(
16
17
  slug: page["slug"],
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.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Navid EMAD