ruby_rabbitmq_janus 2.2.0.pre.168 → 2.2.0.pre.169

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: bcee5bf099562f3a0a8431e60d7e77fe85e23f16
4
- data.tar.gz: 5a1a65931777107fa7ba4a1d86a1f66257881ab6
3
+ metadata.gz: 7e9e83c4fc2e042570adcb3004a761c5a7c43b18
4
+ data.tar.gz: 67b088eac803fbe61c9101f9bc510d179f08e909
5
5
  SHA512:
6
- metadata.gz: af37711638ebeb26c868faa0f35df474bdddf8e846744847b47f8bef7a0bc7981ccce6926b7955be9e1104cac583185978e507dd9f1ca087a8d44b97e56b694d
7
- data.tar.gz: 9c7c586374e48404ba696e6ae13302530ed931af1947aa94910c8bf6bc57c095b04fa525821157d55d995438af7fb6ca238d095be2b565742bfad73067619b71
6
+ metadata.gz: d84ddb3e7d3a59390630fa22fbeadc36dcf4855faf5e15dfa2e1c8cda974406dc4f1b3f806d4332887feb6d67ce45839d0b1cdf965b36959a66735c23b22df25
7
+ data.tar.gz: bc90278a18be7831409dbdf7f4c98127bcdda2038d5c863bef45243d7502b7288b7344470d4f8d902d0ead71783fba9f3671426b009abe408b1eedd9619643f5
@@ -5,7 +5,8 @@
5
5
  # Fields for JanusInstance model
6
6
  class CreateRubyRabbitmqJanusTables < ActiveRecord::Migration[5.0]
7
7
  def change
8
- create_table :janus_instances do |table|
8
+ create_table :janus_instances, id: false, force: true do |table|
9
+ table.string :id, null: false
9
10
  table.integer :session, limit: 8
10
11
  table.boolean :enable
11
12
  table.integer :thread, limit: 8
@@ -7,8 +7,8 @@ module RubyRabbitmqJanus
7
7
  module Errors
8
8
  # Define a super class for all errors in RRJ Class
9
9
  class BaseRRJTask < RRJError
10
- def initalize(message, level = :fatal)
11
- super "[RRJAdmin] #{message}", level
10
+ def initialize(message, level = :fatal)
11
+ super "[RRJAdmin]#{message}", level
12
12
  end
13
13
  end
14
14
 
@@ -16,15 +16,15 @@ module RubyRabbitmqJanus
16
16
  # Error for RRJTask#initialize
17
17
  class Initialize < BaseRRJTask
18
18
  def initialize
19
- super 'Error in initializer'
19
+ super '[Task] Error in initializer'
20
20
  end
21
21
  end
22
22
 
23
23
  # Error for RRJTask#start_transaction_handle
24
24
  class StartTransactionHandle < BaseRRJTask
25
25
  def initialize(exclu, opts)
26
- super "Transaction admin failed with -- #{opts} in queue #{exclu}",
27
- :fatal
26
+ super '[Task] Transaction admin failed with -- ' \
27
+ "#{opts} in queue #{exclu}", :fatal
28
28
  end
29
29
  end
30
30
  end
@@ -12,6 +12,12 @@ module RubyRabbitmqJanus
12
12
  end
13
13
 
14
14
  module Config
15
+ class Initialize < RubyRabbitmqJanus::Errors::Tools::BaseConfig
16
+ def initialize
17
+ super '[Initialize] Error when initialize configuration to RRJ Gem'
18
+ end
19
+ end
20
+
15
21
  class QueueFrom < RubyRabbitmqJanus::Errors::Tools::BaseConfig
16
22
  def initialize
17
23
  super '[QueueFrom] Error for reading standard queue from'
@@ -10,6 +10,8 @@ module RubyRabbitmqJanus
10
10
  include RubyRabbitmqJanus::Models::JanusInstanceMethods
11
11
  include RubyRabbitmqJanus::Models::JanusInstanceValidations
12
12
 
13
+ self.primary_key = :id
14
+
13
15
  alias_attribute :instance, :id
14
16
  alias_attribute :session_id, :session
15
17
  alias_attribute :thread_id, :thread
@@ -18,8 +20,6 @@ module RubyRabbitmqJanus
18
20
  after_update { callback_update_after }
19
21
  after_destroy { callback_destroy_after }
20
22
 
21
- private
22
-
23
23
  # Update attributes to document
24
24
  #
25
25
  # @param [Hash] List of attribute to update with this value
@@ -35,6 +35,8 @@ module RubyRabbitmqJanus
35
35
  loading_configuration_customize
36
36
  loading_configuration_default
37
37
  Tools::Log.instance.save_level(log_level)
38
+ rescue
39
+ raise Errors::Tools::Config::Initialize
38
40
  end
39
41
 
40
42
  # Get to name queue_from (pattern)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_rabbitmq_janus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0.pre.168
4
+ version: 2.2.0.pre.169
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-04 00:00:00.000000000 Z
11
+ date: 2017-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler