pushyd 0.2.0 → 0.2.2

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: c969ee7254c157dc251ed7e2a8608d35ddef72de
4
- data.tar.gz: 746e6b66dcbbecf7c46c11aa89a4e552708d820a
3
+ metadata.gz: 1917e117ce7a5a5b12ba2af39cffd2c40c3e09ac
4
+ data.tar.gz: d5b334b8b2a3cb38c453ff7fa81fd2ad47806624
5
5
  SHA512:
6
- metadata.gz: ab2bb5a1eb46ae1b30b29c76c031331dec347bb54ee028d9d27ffa7d0abe4007baa6ff3e3861f4ef4e6c2fdb05aa287c26292739c6331808d5e22bfb5dfc455e
7
- data.tar.gz: 0b5b868b6315988e49b41b0e52c7fb593d0d7716c396f1aa65edd72920124bc4fb41f7207c4332f03f084a1dc798d578f0f057fe969e0d70f55674a39ea2998d
6
+ metadata.gz: cda75054f168c1e27c1e9c53f58238a3000dae52bd2a76b86371c06f87f3cd1fb7ecfbfa5bb1d67d41b87336819479b7c46b3d542d942fb4db273f9da757f546
7
+ data.tar.gz: 3ddf68fb9dd3e9d4e9f5a09f5c2a62110a465b4ff05d0d12c53a3e092ebe33da1d7e6ab582e533f98b9da1540307c8919d57ecbde524505944d42ed61c098b98
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pushyd (0.2.0)
4
+ pushyd (0.2.2)
5
5
  bunny
6
6
  chamber
7
7
  daemons
data/bin/pushyd CHANGED
@@ -31,15 +31,15 @@ begin
31
31
  end.order!(ARGV)
32
32
 
33
33
  # Build Chamber-based configuration from Gemspec with initial context
34
- Config.prepare root: APP_ROOT, gemspec: "pushyd", env: cmd_env, config: cmd_config
34
+ Conf.prepare root: APP_ROOT, gemspec: "pushyd", env: cmd_env, config: cmd_config
35
35
 
36
36
  # Display final configuration
37
- puts "--- #{Config.name} #{Config.version}"
38
- puts "Environment \t #{Config.env}"
39
- puts "Config files \t #{Config.files}"
37
+ puts "--- #{Conf.name} #{Conf.version}"
38
+ puts "Environment \t #{Conf.env}"
39
+ puts "Config files \t #{Conf.files}"
40
40
  puts
41
- puts "Log file \t #{Config[:log]}"
42
- puts Config.dump if cmd_dump
41
+ puts "Log file \t #{Conf[:log]}"
42
+ puts Conf.dump if cmd_dump
43
43
 
44
44
  rescue OptionParser::InvalidOption => e
45
45
  abort "EXITING: option parser: #{e.message}"
@@ -12,7 +12,7 @@ module PushyDaemon
12
12
 
13
13
  def initialize
14
14
  # Prepare logger (may be NIL > won't output anything)
15
- logfile = Config[:log]
15
+ logfile = Conf[:log]
16
16
 
17
17
  # Create the logger
18
18
  @logger = PushyLogger.new(logfile, LOG_ROTATION)
@@ -95,7 +95,7 @@ module PushyDaemon
95
95
  rule_name = rule[:name].to_s
96
96
  rule_topic = rule[:topic].to_s
97
97
  rule_routes = rule[:routes].to_s.split(' ')
98
- rule_queue = "#{Config.name}-#{PROXY_SCOPE}-#{rule[:name]}"
98
+ rule_queue = "#{Conf.name}-#{PROXY_SCOPE}-#{rule[:name]}"
99
99
  raise PushyDaemon::EndpointSubscribeContext, "rule [#{rule_name}] lacking topic" unless rule_topic
100
100
  raise PushyDaemon::EndpointSubscribeContext, "rule [#{rule_name}] lacking routes" if rule_routes.empty?
101
101
 
data/lib/pushyd/proxy.rb CHANGED
@@ -23,12 +23,12 @@ module PushyDaemon
23
23
  @table.align_column(5, :right)
24
24
 
25
25
  # Start connexion to RabbitMQ and create channel
26
- conn = connect Config.bus
26
+ conn = connect Conf.bus
27
27
  @channel = conn.create_channel
28
28
  info "connected on a channel"
29
29
 
30
30
  # Check config
31
- config_rules = Config[:rules]
31
+ config_rules = Conf[:rules]
32
32
  unless (config_rules.is_a? Enumerable) && !config_rules.empty?
33
33
  error "prepare: empty [rules] section"
34
34
  end
@@ -19,12 +19,12 @@ module PushyDaemon
19
19
  @keys = []
20
20
 
21
21
  # Start connexion to RabbitMQ and create channel
22
- conn = connect Config.bus
22
+ conn = connect Conf.bus
23
23
  @channel = conn.create_channel
24
24
  info "connected on a channel"
25
25
 
26
26
  # Check config
27
- config_shout = Config[:shout]
27
+ config_shout = Conf[:shout]
28
28
  if (config_shout.is_a? Enumerable) && !config_shout.empty?
29
29
  @keys = config_shout[:keys] if config_shout[:keys].is_a? Array
30
30
  @topic = config_shout[:topic]
@@ -75,7 +75,7 @@ module PushyDaemon
75
75
  # Add timestamp
76
76
  headers = {
77
77
  sent_at: DateTime.now.iso8601,
78
- sent_by: Config.name
78
+ sent_by: Conf.name
79
79
  }
80
80
  exchange_name = @exchange.name
81
81
 
@@ -89,7 +89,7 @@ module PushyDaemon
89
89
  @exchange.publish(body.to_json,
90
90
  routing_key: routing_key,
91
91
  headers: headers,
92
- app_id: Config.name,
92
+ app_id: Conf.name,
93
93
  content_type: "application/json",
94
94
  )
95
95
 
data/lib/pushyd.rb CHANGED
@@ -6,7 +6,7 @@ require "singleton"
6
6
  # require "newrelic_rpm"
7
7
 
8
8
  # Project libs
9
- require_relative "pushyd/config"
9
+ require_relative "pushyd/conf"
10
10
  require_relative "pushyd/constants"
11
11
  require_relative "pushyd/pushy_logger"
12
12
  require_relative "pushyd/endpoint"
data/pushyd.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  # Project version
4
- spec.version = "0.2.0"
4
+ spec.version = "0.2.2"
5
5
 
6
6
  # Project description
7
7
  spec.name = "pushyd"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushyd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI
@@ -179,7 +179,7 @@ files:
179
179
  - bin/pushyd
180
180
  - defaults.yml
181
181
  - lib/pushyd.rb
182
- - lib/pushyd/config.rb
182
+ - lib/pushyd/conf.rb
183
183
  - lib/pushyd/constants.rb
184
184
  - lib/pushyd/daemon.rb
185
185
  - lib/pushyd/endpoint.rb
File without changes