emque-consuming 1.8.0 → 1.9.0

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
  SHA256:
3
- metadata.gz: a33e1cb0ba1688a3afd735ee7aee23a8b331e744cd0453056b96c4552f51dd02
4
- data.tar.gz: c380412c8831d5ffa843d56da14a4ed45647d9c4fd075fe6a2aace2a1ee9ea29
3
+ metadata.gz: 4c743d09735f9d7cef0e9afd1c352159e1502abceed3d05fc1132a33597401a5
4
+ data.tar.gz: c22b17e397c032fc2251393b93feb39558a996258d5c27382b9b3397416a5f61
5
5
  SHA512:
6
- metadata.gz: de3eb3ea8e8deb9ec9917df070c2559c5b2857fc996e59abaff091756d33c1b65603c310ea586dd744daae9224cf801405201beeff5426b7e28924ba2695de79
7
- data.tar.gz: 78ebf244f57a11f99b3fe5cca252647e37a67179b863d031243d6ff636d3e8b2f076e2ab60992c932f52d6f9a21ee2e9f1c0d7619d107741d2a668cd973bcc8c
6
+ metadata.gz: ea654910256e56c42cf3ef77d88ae0f3f4f57e304b99b54097f36695321dc2a74d2010436ec97b115d1f52895fe25412aeeaa1f49ad8b4e95c0cebf651b730c5
7
+ data.tar.gz: c5f32b23b28004f8d5ba6f9aafedda6a99ce75b5fe1c136cbea5aea74152b9ef99b01ac8b797eeae5a0f30d60189db39a3e0643251b0a90e2adc76a8a1d54ac5
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ ruby: [ '2.3.8', '2.4.10', '2.5.9', '2.6.7', '2.7.3' ]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ - name: Install dependencies
25
+ run: bundle install
26
+ - name: Run tests
27
+ run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Emque Consuming CHANGELOG
2
2
 
3
+ - [Add support for running in Kubernetes](https://github.com/emque/emque-consuming/pull/84) (1.9.0)
4
+ - [Migrate to GitHub Actions](https://github.com/emque/emque-consuming/pull/82) (1.8.1)
3
5
  - [Add prefetch for DelayedMessageWorker](https://github.com/emque/emque-consuming/pull/81) (1.8.0)
4
6
  - [Update Rake to fix CVE-2020-8130](https://github.com/emque/emque-consuming/pull/80) (1.7.1)
5
7
  - [Update pipe-ruby to remove error handling](https://github.com/emque/emque-consuming/pull/78) 1.7.0
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
- [![Build Status](https://travis-ci.org/emque/emque-consuming.png)](https://travis-ci.org/emque/emque-consuming)
2
-
3
1
  # Emque::Consuming
4
2
 
3
+ ![CI](https://github.com/emque/emque-consuming/workflows/CI/badge.svg)
4
+ [![Gem Version](https://badge.fury.io/rb/emque-consuming.svg)](https://badge.fury.io/rb/emque-consuming)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+
5
7
  Emque Consuming is a Ruby application framework that includes everything needed
6
8
  to create and run application capable of consuming messages from a message
7
9
  broker in a Pub/sub architecture. Messages can be produced with the
@@ -10,7 +12,7 @@ broker in a Pub/sub architecture. Messages can be produced with the
10
12
  ## Adapters
11
13
 
12
14
  We currently only support RabbitMQ. If you would like to add your own adapter,
13
- take a look at [the adapters directory](https://github.com/emque/emque-consuming/tree/master/lib/emque/consuming/adapters).
15
+ take a look at [the adapters directory](https://github.com/emque/emque-consuming/tree/main/lib/emque/consuming/adapters).
14
16
 
15
17
  ## Installation
16
18
 
@@ -135,7 +137,7 @@ class EventsConsumer
135
137
 
136
138
  def new_event(message)
137
139
  # NOTE: message is an immutable Virtus (https://github.com/solnic/virtus) Value Object.
138
- # Check it out here: https://github.com/emque/emque-consuming/blob/master/lib/emque/consuming/message.rb
140
+ # Check it out here: https://github.com/emque/emque-consuming/blob/main/lib/emque/consuming/message.rb
139
141
 
140
142
  # You don't have to use pipe (https://github.com/teamsnap/pipe-ruby), but we love it!
141
143
  pipe(message, :through => [
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "pipe-ruby", "~> 1.0"
28
28
  spec.add_dependency "inflecto", "~> 0.0.2"
29
29
 
30
- spec.add_development_dependency "bundler", "~> 1.7"
31
- spec.add_development_dependency "rake", ">= 12.3.3"
30
+ spec.add_development_dependency "bundler", ">= 1.17.3"
31
+ spec.add_development_dependency "rake", ">= 12.3.3"
32
32
  spec.add_development_dependency "rspec", "~> 3.3"
33
33
  spec.add_development_dependency "bunny", "~> 2.11.0"
34
34
  spec.add_development_dependency "timecop", "~> 0.7.1"
@@ -8,7 +8,7 @@ module Emque
8
8
  :error_limit, :error_expiration, :retryable_errors,
9
9
  :retryable_error_limit, :status, :status_port, :status_host,
10
10
  :socket_path, :shutdown_handlers
11
- attr_writer :env, :log_level
11
+ attr_writer :env, :log_level, :log_formatter
12
12
 
13
13
  def initialize
14
14
  @app_name = ""
@@ -19,6 +19,7 @@ module Emque
19
19
  @error_limit = 5
20
20
  @error_expiration = 3600 # 60 minutes
21
21
  @log_level = nil
22
+ @log_formatter = nil
22
23
  @retryable_errors = []
23
24
  @retryable_error_limit = 3
24
25
  @status_port = 10000
@@ -40,6 +41,10 @@ module Emque
40
41
  @log_level ||= Logger::INFO
41
42
  end
42
43
 
44
+ def log_formatter
45
+ @log_formatter ||= ::Logger::Formatter.new
46
+ end
47
+
43
48
  def set_adapter(name, options = {})
44
49
  @adapter = Emque::Consuming::Adapter.new(name, options)
45
50
  end
@@ -50,9 +50,11 @@ module Emque
50
50
  )
51
51
  end
52
52
 
53
- def initialize_logger
54
- Emque::Consuming::Logging.initialize_logger(logfile)
53
+ def initialize_logger(daemonized: false)
54
+ target = daemonized ? logfile : STDOUT
55
+ Emque::Consuming::Logging.initialize_logger(target)
55
56
  Emque::Consuming.logger.level = config.log_level
57
+ Emque::Consuming.logger.formatter = config.log_formatter
56
58
  Celluloid.logger = Emque::Consuming.logger
57
59
  end
58
60
 
@@ -82,7 +84,7 @@ module Emque
82
84
  end
83
85
 
84
86
  def emque_env
85
- config.env_var || ENV["EMQUE_ENV"] || ENV["RACK_ENV"] || "development"
87
+ config.env_var || ENV["EMQUE_ENV"] || "development"
86
88
  end
87
89
  end
88
90
  end
@@ -23,7 +23,9 @@ module Emque
23
23
  self.receivers = []
24
24
  self.status = Emque::Consuming::Status.new
25
25
  apply_options
26
- Emque::Consuming.application.initialize_logger
26
+ Emque::Consuming
27
+ .application
28
+ .initialize_logger(daemonized: options.fetch(:daemon) { false })
27
29
  self.class.instance = self
28
30
  self.pidfile = options.fetch(:pidfile, default_pidfile)
29
31
  self.pid = Emque::Consuming::Pidfile.new(pidfile)
@@ -1,5 +1,5 @@
1
1
  module Emque
2
2
  module Consuming
3
- VERSION = "1.8.0"
3
+ VERSION = "1.9.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emque-consuming
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Williams
8
8
  - Dan Matthews
9
9
  - Paul Hanyzewski
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-16 00:00:00.000000000 Z
13
+ date: 2021-06-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: celluloid
@@ -114,16 +114,16 @@ dependencies:
114
114
  name: bundler
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: '1.7'
119
+ version: 1.17.3
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - "~>"
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
- version: '1.7'
126
+ version: 1.17.3
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: rake
129
129
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  - - "~>"
195
195
  - !ruby/object:Gem::Version
196
196
  version: 1.2.0
197
- description:
197
+ description:
198
198
  email:
199
199
  - oss@teamsnap.com
200
200
  executables:
@@ -202,8 +202,8 @@ executables:
202
202
  extensions: []
203
203
  extra_rdoc_files: []
204
204
  files:
205
+ - ".github/workflows/ci.yml"
205
206
  - ".gitignore"
206
- - ".travis.yml"
207
207
  - CHANGELOG.md
208
208
  - Gemfile
209
209
  - LICENSE.txt
@@ -275,7 +275,7 @@ homepage: https://github.com/teamsnap/emque-consuming
275
275
  licenses:
276
276
  - MIT
277
277
  metadata: {}
278
- post_install_message:
278
+ post_install_message:
279
279
  rdoc_options: []
280
280
  require_paths:
281
281
  - lib
@@ -290,8 +290,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.0.3
294
- signing_key:
293
+ rubygems_version: 3.0.3.1
294
+ signing_key:
295
295
  specification_version: 4
296
296
  summary: Microservices framework for Ruby
297
297
  test_files:
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.8
4
- - 2.4.10
5
- - 2.5.8
6
- - 2.6.6
7
- script: bundle exec rake
8
- notifications:
9
- recipients:
10
- - shane@teamsnap.com
11
- - ryan.williams@teamsnap.com