pushyd 0.4.0 → 0.4.1

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: da7515bbd91875e7d4d0c28edcd7b1222ddeb8a2
4
- data.tar.gz: 633a9271a1359e036a00d94cf800ad458744f1da
3
+ metadata.gz: 6187816c52f8d16877b1ff45e89684ae1f79e300
4
+ data.tar.gz: 67840bfe4704db522707e49693435ceee6b0d509
5
5
  SHA512:
6
- metadata.gz: faf3ee6045545e77dc262d0b1b73469ea4531bf690ec3536cd367b33a02c5a9c765b23dcc3e615636a5eca47225a485cd80b54ad052b35ec2ee6d35207225269
7
- data.tar.gz: ad8edf30c5fa35fc447ad0e51347ad7479d24ca6533457d597701e6dbb46d8ef695f21413be049baad855314dcaeafb963a5d6a9cd97bcddda98989aba507c84
6
+ metadata.gz: 661830baf4bc0a8ec97a0d531cd0dfccf6712fba5b67ef7ee99622705d83ee581f52fcf126a02b7228b61e105fe4e7fea519f9a0a1ac57f722b12662036878c1
7
+ data.tar.gz: 6d2ea12997f58430294722eb9ab521074d96552aa3118841fc2c101e08666c427eaecd8e249d44220c6fa70c58aa1ef0a843bb77a44896e220d263000b45992f
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pushyd (0.4.0)
5
- bunny
6
- chamber
4
+ pushyd (0.4.1)
5
+ bunny (~> 2.3)
6
+ chamber (~> 2.9)
7
7
  daemons
8
8
  json
9
9
  newrelic_rpm
10
- rest-client
10
+ rest-client (~> 1.8)
11
11
  terminal-table
12
12
 
13
13
  GEM
@@ -28,7 +28,7 @@ GEM
28
28
  domain_name (0.5.20160310)
29
29
  unf (>= 0.0.5, < 1.0.0)
30
30
  hashie (3.4.4)
31
- http (0.9.9)
31
+ http (2.0.1)
32
32
  addressable (~> 2.3)
33
33
  http-cookie (~> 1.0)
34
34
  http-form_data (~> 1.0.1)
@@ -81,7 +81,7 @@ PLATFORMS
81
81
 
82
82
  DEPENDENCIES
83
83
  bundler (~> 1.6)
84
- http (~> 0.8)
84
+ http
85
85
  pushyd!
86
86
  rake
87
87
  rspec
data/bin/pushyd CHANGED
@@ -44,10 +44,10 @@ end
44
44
 
45
45
  # Display final configuration
46
46
  puts "--- #{Conf.name} #{Conf.version}"
47
- puts "YAML Parser \t #{YAML.name}"
48
47
  puts "Environment \t #{Conf.env}"
49
48
  puts "Config files \t #{Conf.files}"
50
49
  puts "Loging to file \t #{Conf.log.logfile}"
50
+ puts "YAML Parser \t #{YAML.name}"
51
51
 
52
52
  # Quit if config dump requested
53
53
  if cmd_dump
data/lib/pushyd/conf.rb CHANGED
@@ -47,7 +47,7 @@ module PushyDaemon
47
47
  # Override some values
48
48
  self[:log] ||= {}
49
49
  if args[:logfile]
50
- self[:log][:file] = logfile
50
+ self[:log][:file] = args[:logfile].to_s
51
51
  end
52
52
 
53
53
  # Init New Relic
@@ -74,11 +74,11 @@ module PushyDaemon
74
74
 
75
75
  def self.prepare_newrelic section
76
76
  unless section.is_a?(Hash)
77
- puts "prepare_newrelic: no config"
77
+ # puts "prepare_newrelic: no config found"
78
78
  ENV["NEWRELIC_AGENT_ENABLED"] = "false"
79
79
  return
80
80
  end
81
- puts "prepare_newrelic: config ok"
81
+ # puts "prepare_newrelic: #{section.inspect}"
82
82
 
83
83
  # Enable GC profiler
84
84
  GC::Profiler.enable
@@ -11,7 +11,10 @@ PROXY_USE_ACK = false
11
11
  LOG_ROTATION = "daily"
12
12
  LOG_TRIM_LINE = 200
13
13
  LOG_FORMAT_TIME = "%Y-%m-%d %H:%M:%S"
14
- LOG_FORMAT_LINE = "%s\t%-8s\t%-10s\t%s\n"
15
- LOG_FORMAT_ARRAY = "%s\t%-8s\t%-10s\t %s\n"
16
- LOG_FORMAT_HASH = "%s\t%-8s\t%-10s\t %-17s %s\n"
14
+ LOG_FORMAT_HEADER = "%s\t%-8s\t%-30s"
15
+ LOG_FORMAT_LINE = LOG_FORMAT_HEADER+" %s\n"
16
+ LOG_FORMAT_ARRAY = LOG_FORMAT_HEADER+" %s\n"
17
+ LOG_FORMAT_HASH = LOG_FORMAT_HEADER+" %-17s %s\n"
18
+ LOG_FORMAT_PROGNAME = "%d\t%s"
19
+
17
20
 
@@ -37,7 +37,7 @@ module PushyDaemon
37
37
  @logger.formatter = Formatter
38
38
 
39
39
  # Set progname
40
- @logger.progname = me.split('::').last
40
+ @logger.progname = sprintf(LOG_FORMAT_PROGNAME, Process.pid, me.split('::').last)
41
41
 
42
42
  # Set expected level
43
43
  @logger.level = case loglevel
data/lib/pushyd/proxy.rb CHANGED
@@ -14,7 +14,7 @@ module PushyDaemon
14
14
  # Init ASCII table
15
15
  @table = Terminal::Table.new
16
16
  @table.title = "Propagation rules"
17
- @table.headings = ["rule", "topic", "route", "relay", "queue", "description"]
17
+ @table.headings = ["rule", "topic", "route", "relay", "created queue", "description"]
18
18
  @table.align_column(5, :right)
19
19
 
20
20
  # Start connexion to RabbitMQ and create channel
data/lib/pushyd.rb CHANGED
@@ -2,8 +2,8 @@
2
2
  require "rubygems"
3
3
  require "yaml"
4
4
  require "json"
5
- require "thread"
6
- require "singleton"
5
+ #require "thread"
6
+ #require "singleton"
7
7
  require "newrelic_rpm"
8
8
 
9
9
  # Project libs
@@ -14,7 +14,3 @@ require_relative "pushyd/endpoint"
14
14
  require_relative "pushyd/proxy"
15
15
  require_relative "pushyd/shouter"
16
16
  require_relative "pushyd/daemon"
17
-
18
-
19
-
20
-
data/pushyd.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  # Project version
4
- spec.version = "0.4.0"
4
+ spec.version = "0.4.1"
5
5
 
6
6
  # Project description
7
7
  spec.name = "pushyd"
8
8
  spec.authors = ["Bruno MEDICI"]
9
9
  spec.email = "pushyd@bmconseil.com"
10
- spec.description = "(description to be written)"
11
- spec.summary = "(summary to be written)"
10
+ spec.description = "A nice proxy listenning to a RabbitMQ bus, repeating selected messages in POST requests when filters match routing patterns"
11
+ spec.summary = spec.description
12
12
  spec.homepage = "http://github.com/bmedici/pushyd"
13
13
  spec.licenses = ["MIT"]
14
14
  spec.date = Time.now.strftime("%Y-%m-%d")
@@ -23,16 +23,16 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency "rspec"
26
- spec.add_development_dependency "http", "~> 0.8"
26
+ spec.add_development_dependency "http", "~> 2.0"
27
27
  spec.add_development_dependency "rubocop", "~> 0.32.0"
28
28
  # spec.add_development_dependency "pry"
29
29
 
30
30
  # Runtime dependencies
31
31
  spec.add_runtime_dependency "daemons"
32
- spec.add_runtime_dependency "chamber"
32
+ spec.add_runtime_dependency "chamber", "~> 2.9"
33
33
  spec.add_runtime_dependency "json"
34
- spec.add_runtime_dependency "bunny"
35
- spec.add_runtime_dependency "rest-client"
34
+ spec.add_runtime_dependency "bunny", "~> 2.3"
35
+ spec.add_runtime_dependency "rest-client", "~> 1.8"
36
36
  spec.add_runtime_dependency "terminal-table"
37
37
  spec.add_runtime_dependency "newrelic_rpm"
38
38
  end
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.8'
61
+ version: '2.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.8'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: chamber
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '2.9'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '2.9'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: json
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -126,30 +126,30 @@ dependencies:
126
126
  name: bunny
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '2.3'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '2.3'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rest-client
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '1.8'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '1.8'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: terminal-table
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +178,8 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
- description: "(description to be written)"
181
+ description: A nice proxy listenning to a RabbitMQ bus, repeating selected messages
182
+ in POST requests when filters match routing patterns
182
183
  email: pushyd@bmconseil.com
183
184
  executables:
184
185
  - pushyd
@@ -225,5 +226,6 @@ rubyforge_project:
225
226
  rubygems_version: 2.5.1
226
227
  signing_key:
227
228
  specification_version: 4
228
- summary: "(summary to be written)"
229
+ summary: A nice proxy listenning to a RabbitMQ bus, repeating selected messages in
230
+ POST requests when filters match routing patterns
229
231
  test_files: []