eventhub-processor2 1.4.1 → 1.10.0

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
- SHA1:
3
- metadata.gz: 01fe69989bb7b05f2649d954c2ec955eeb2c3081
4
- data.tar.gz: f6e8850e46eaad5b681b21b2ab0e99cc49d81094
2
+ SHA256:
3
+ metadata.gz: bf33bf376e804fd54bc99b3a538c6ce148325d3954344d5ca6fa853b1621ffd7
4
+ data.tar.gz: 60083e2300ae7d0bf41ca09cb6efafe2665561d323089b58aa342c69412c0d49
5
5
  SHA512:
6
- metadata.gz: 7f9d51d624b8dc823d9710e9e7fec3b04180c3299f2e4b56395539aee1519e4133e9146c9895984a158b7ecbd15d9133a3c1c0bb48c8a62649d4d7691a84818b
7
- data.tar.gz: 9d1e1d68da6e10cb82ffa72203d5c12d3d10d8f7903c1b4741676e3178d8a4addffe1d3e762ecb2262266904eb30db1b8f38b8beb7a61a5843498f1dabd2ca66
6
+ metadata.gz: 66f88f2c77e2bbd6140ddc02d95c59af8045804ca10262b367cafd13de12045c28b341bc3655d31f6c9d78fbb990c4e63d7265db50def7075f15b90122d27d8c
7
+ data.tar.gz: 6133d08b08b596fc95e657fbb6e81ebdfa2c2ee52d2064f83a214a2e84b4acf428e20f7d99e7ec930a9e2e4fd72bbea0d8e6e5184202bd482c926be989162c72
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
+ --format documentation
1
2
  --color
2
3
  --require spec_helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.6
data/.travis.yml CHANGED
@@ -9,9 +9,10 @@ os:
9
9
  - linux
10
10
 
11
11
  rvm:
12
- - 2.5.0
13
- - 2.4.3
14
- - 2.3.6
12
+ - 3.0.0
13
+ - 2.7.2
14
+ - 2.6.6
15
+ - 2.5.8
15
16
 
16
17
  env:
17
18
  - secure: R0rBtWClmnJKO+zyAncF6+1qDpZ6JQR+Z6VXzUmWw8MuxUXv732XTNYulY/tTeDW876GofAsOF9QfX/jhF+2ubV8SzM6rKTZS09feATuOWRPtECEaBOPcb0JGYouBNg/Lv4onuXb8KS/9U093sRqiJMfib82iY7QK9bnDPsYoQXtMnI7KBeQNrTV0H4nby3lvbjcpMDhmyg+anOmCP5yepZeS53Qq+C5GHguYivisvhSPmCfONrT303XxFLDo/aOkMDlceeZBDhtcpm5Px3GIwybSI9xRtAnpT73oL1Piazda6mRN7VHoT7YAHKqcJNZDB48HYuTj3Pt3oVVw0v78Cf25caBqXttXflXfB8U3qfVt+94uF0icH34NAnpW9l1B8GXHi6CTr27Hg2ZatWkQCN1rCpcCaW0eM/NoAG6snwTIwr1VvjLWpSW5wwhQgHPyMl+MRlTmCn/UM+eQSwPVhflKpMS1+ah6cbhDrQQF1jDt3dRaLqSnVE4APrafdT90SA3SCG2MGOE+pp+DX528gEsRB34UdX2V67dlwXeRu1eU5vZBR7jZrqwuwTAgSvxEF0eJWC0kgvEfouzuVHhVmmSAcNNHlg2kd0/oyQELyXTsklJghwAupcy4X/GEAyfLW9GAxItjATyV7XyfjmaBmdzHl/5JWeXicoyZ/4+8iE=
@@ -23,7 +24,7 @@ before_install:
23
24
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
24
25
  > ./cc-test-reporter
25
26
  - chmod +x ./cc-test-reporter
26
- - gem install bundler --version '~> 1.16.0'
27
+ - gem install bundler --version '~> 2.1.2'
27
28
 
28
29
  before_script:
29
30
  - "./cc-test-reporter before-build"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog of EventHub::Processor2
2
2
 
3
+ ## 1.9.0 / 2021-02-26
4
+
5
+ * Updated gem dependencies
6
+ * Appply ruby style guides
7
+ * Reduce log noice
8
+
9
+ ## 1.8.0 / 2020-05-05
10
+
11
+ * Increase watchdog cycle time to 60s
12
+ * Upgrade gem and gem dev dependencies
13
+ * Upgrade travis ruby version to test
14
+
15
+ ## 1.7.0 / 2020-02-28
16
+
17
+ * Upgrade dependencies: bundler 2.1, rake 13.0, rspec 3.9, simplecov 0.18
18
+ * status_message always as string for general exception handling
19
+ * fix rspec tests
20
+
21
+ ## 1.6.0 / 2019-02-20
22
+
23
+ * Upgrade dependencies: bunny 2.14, bundler 2.0
24
+
25
+ ## 1.5.0 / 2018-12-20
26
+
27
+ * Upgrade dependencies: rspec 3.8, bunny 2.12, bundler 1.17, simplecov 0.16
28
+
3
29
  ## 1.4.1 / 2018-02-27
4
30
 
5
31
  * Upgrade to eventhub-components 0.2.2
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
data/Gemfile.lock CHANGED
@@ -1,76 +1,88 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventhub-processor2 (1.4.1)
5
- bunny (~> 2.9)
6
- celluloid (~> 0.17)
4
+ eventhub-processor2 (1.10.0)
5
+ bunny (~> 2.15)
6
+ celluloid (~> 0.18)
7
7
  eventhub-components (~> 0.2)
8
8
  uuidtools (~> 2.1)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- amq-protocol (2.3.0)
14
- bunny (2.9.2)
15
- amq-protocol (~> 2.3.0)
16
- celluloid (0.17.3)
17
- celluloid-essentials
18
- celluloid-extras
19
- celluloid-fsm
20
- celluloid-pool
21
- celluloid-supervision
22
- timers (>= 4.1.1)
23
- celluloid-essentials (0.20.5)
24
- timers (>= 4.1.1)
25
- celluloid-extras (0.20.5)
26
- timers (>= 4.1.1)
27
- celluloid-fsm (0.20.5)
28
- timers (>= 4.1.1)
29
- celluloid-pool (0.20.5)
30
- timers (>= 4.1.1)
31
- celluloid-supervision (0.20.6)
32
- timers (>= 4.1.1)
33
- diff-lcs (1.3)
34
- docile (1.1.5)
13
+ amq-protocol (2.3.2)
14
+ ast (2.4.2)
15
+ bunny (2.17.0)
16
+ amq-protocol (~> 2.3, >= 2.3.1)
17
+ celluloid (0.18.0)
18
+ timers (~> 4)
19
+ diff-lcs (1.4.4)
20
+ docile (1.3.5)
35
21
  eventhub-components (0.2.2)
36
22
  logstash-logger (~> 0.26)
37
- hitimes (1.2.6)
38
- json (2.1.0)
39
23
  logstash-event (1.2.02)
40
24
  logstash-logger (0.26.1)
41
25
  logstash-event (~> 1.2)
42
- rake (12.3.0)
43
- rspec (3.7.0)
44
- rspec-core (~> 3.7.0)
45
- rspec-expectations (~> 3.7.0)
46
- rspec-mocks (~> 3.7.0)
47
- rspec-core (3.7.0)
48
- rspec-support (~> 3.7.0)
49
- rspec-expectations (3.7.0)
26
+ parallel (1.20.1)
27
+ parser (3.0.0.0)
28
+ ast (~> 2.4.1)
29
+ rainbow (3.0.0)
30
+ rake (13.0.3)
31
+ regexp_parser (2.0.3)
32
+ rexml (3.2.4)
33
+ rspec (3.10.0)
34
+ rspec-core (~> 3.10.0)
35
+ rspec-expectations (~> 3.10.0)
36
+ rspec-mocks (~> 3.10.0)
37
+ rspec-core (3.10.1)
38
+ rspec-support (~> 3.10.0)
39
+ rspec-expectations (3.10.1)
50
40
  diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.7.0)
52
- rspec-mocks (3.7.0)
41
+ rspec-support (~> 3.10.0)
42
+ rspec-mocks (3.10.2)
53
43
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.7.0)
55
- rspec-support (3.7.0)
56
- simplecov (0.15.1)
57
- docile (~> 1.1.0)
58
- json (>= 1.8, < 3)
59
- simplecov-html (~> 0.10.0)
60
- simplecov-html (0.10.2)
61
- timers (4.1.2)
62
- hitimes
63
- uuidtools (2.1.5)
44
+ rspec-support (~> 3.10.0)
45
+ rspec-support (3.10.2)
46
+ rubocop (1.10.0)
47
+ parallel (~> 1.10)
48
+ parser (>= 3.0.0.0)
49
+ rainbow (>= 2.2.2, < 4.0)
50
+ regexp_parser (>= 1.8, < 3.0)
51
+ rexml
52
+ rubocop-ast (>= 1.2.0, < 2.0)
53
+ ruby-progressbar (~> 1.7)
54
+ unicode-display_width (>= 1.4.0, < 3.0)
55
+ rubocop-ast (1.4.1)
56
+ parser (>= 2.7.1.5)
57
+ rubocop-performance (1.9.2)
58
+ rubocop (>= 0.90.0, < 2.0)
59
+ rubocop-ast (>= 0.4.0)
60
+ ruby-progressbar (1.11.0)
61
+ simplecov (0.21.2)
62
+ docile (~> 1.1)
63
+ simplecov-html (~> 0.11)
64
+ simplecov_json_formatter (~> 0.1)
65
+ simplecov-html (0.12.3)
66
+ simplecov_json_formatter (0.1.2)
67
+ standard (0.13.0)
68
+ rubocop (= 1.10.0)
69
+ rubocop-performance (= 1.9.2)
70
+ standardrb (1.0.0)
71
+ standard
72
+ timers (4.3.3)
73
+ unicode-display_width (2.0.0)
74
+ uuidtools (2.2.0)
64
75
 
65
76
  PLATFORMS
66
77
  ruby
67
78
 
68
79
  DEPENDENCIES
69
- bundler (~> 1.16)
80
+ bundler (~> 2.1)
70
81
  eventhub-processor2!
71
- rake (~> 12.3)
72
- rspec (~> 3.7)
73
- simplecov (~> 0.15)
82
+ rake (~> 13.0)
83
+ rspec (~> 3.9)
84
+ simplecov (~> 0.21)
85
+ standardrb (~> 1.0)
74
86
 
75
87
  BUNDLED WITH
76
- 1.16.1
88
+ 2.1.4
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/eventhub-processor2.svg)](https://badge.fury.io/rb/eventhub-processor2)
2
- [![Dependency Status](https://gemnasium.com/badges/github.com/thomis/eventhub-processor2.svg)](https://gemnasium.com/github.com/thomis/eventhub-processor2)
3
2
  [![Maintainability](https://api.codeclimate.com/v1/badges/9112358562f0614e0e02/maintainability)](https://codeclimate.com/github/thomis/eventhub-processor2/maintainability)
4
3
  [![Test Coverage](https://api.codeclimate.com/v1/badges/9112358562f0614e0e02/test_coverage)](https://codeclimate.com/github/thomis/eventhub-processor2/test_coverage)
5
4
  [![Build Status](https://travis-ci.org/thomis/eventhub-processor2.svg?branch=master)](https://travis-ci.org/thomis/eventhub-processor2)
@@ -174,7 +173,19 @@ Processor2 symbolizes keys and sub-keys from configuration files automatically.
174
173
 
175
174
  ## Development
176
175
 
177
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
176
+ ```
177
+ # Get the source code
178
+ git clone https://github.com/thomis/eventhub-processor2.git
179
+
180
+ # Install dependencies
181
+ bundle
182
+
183
+ # Setup rabbitmq docker container with initial definitions. This can be run multiple times to get your container back into an initial state
184
+ bundle exec rake init
185
+
186
+ # Run all rspec tests
187
+ bundle exec rake
188
+ ```
178
189
 
179
190
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
180
191
 
data/Rakefile CHANGED
@@ -1,6 +1,15 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "standard/rake"
3
4
 
4
- RSpec::Core::RakeTask.new(:spec)
5
+ RSpec::Core::RakeTask.new(:spec) do |t|
6
+ t.verbose = false
7
+ end
5
8
 
6
- task default: :spec
9
+ desc "Initialize or reset rabbitmq docker container (run before rspec)"
10
+ task :init do
11
+ sh "cd docker && ./reset"
12
+ puts "You may need to give rabbitmq container a bit time to startup properly..."
13
+ end
14
+
15
+ task default: [:spec, :standard]
data/docker/Dockerfile CHANGED
@@ -1,6 +1,8 @@
1
- FROM rabbitmq:3.7.3-management
1
+ FROM rabbitmq:3.8.14-management
2
+
3
+ LABEL maintainer="thomas.steiner@ikey.ch"
4
+
2
5
  ADD definitions.json /etc/rabbitmq/
3
6
  ADD rabbitmq.config /etc/rabbitmq/
4
7
  RUN chown rabbitmq:rabbitmq /etc/rabbitmq/rabbitmq.config /etc/rabbitmq/definitions.json
5
-
6
- EXPOSE 5672 15672
8
+ RUN rabbitmq-plugins enable rabbitmq_web_stomp
data/docker/README.md CHANGED
@@ -5,8 +5,8 @@ Please follow these steps to build and run a docker container with a predefined
5
5
 
6
6
  * Have latest docker community edition installed (https://www.docker.com)
7
7
  * cd into the docker folder
8
- * docker build -t processor-rabbitmq .
9
- * docker run -d -p 5672:5672 -p 15672:15672 --name processor-rabbitmq processor-rabbitmq
8
+ * docker-compose up --no-start
9
+ * docker-compose start
10
10
 
11
11
  Is the docker container running fine?
12
12
  Go to http://localhost:15672 and login to RabbitMQ Management Console with guest/guest
@@ -1,5 +1,7 @@
1
1
  {
2
- "rabbit_version": "3.6.14",
2
+ "rabbitmq_version": "3.8.14",
3
+ "product_name": "RabbitMQ",
4
+ "product_version": "3.8.14",
3
5
  "users": [
4
6
  {
5
7
  "name": "guest",
@@ -51,6 +53,13 @@
51
53
  "durable": true,
52
54
  "auto_delete": false,
53
55
  "arguments": {}
56
+ },
57
+ {
58
+ "name": "processor2",
59
+ "vhost": "event_hub",
60
+ "durable": true,
61
+ "auto_delete": false,
62
+ "arguments": {}
54
63
  }
55
64
  ],
56
65
  "exchanges": [
@@ -80,6 +89,24 @@
80
89
  "auto_delete": false,
81
90
  "internal": false,
82
91
  "arguments": {}
92
+ },
93
+ {
94
+ "name": "an_exchange",
95
+ "vhost": "event_hub",
96
+ "type": "direct",
97
+ "durable": true,
98
+ "auto_delete": false,
99
+ "internal": false,
100
+ "arguments": {}
101
+ },
102
+ {
103
+ "name": "processor2",
104
+ "vhost": "event_hub",
105
+ "type": "direct",
106
+ "durable": true,
107
+ "auto_delete": false,
108
+ "internal": false,
109
+ "arguments": {}
83
110
  }
84
111
  ],
85
112
  "bindings": [
@@ -106,6 +133,22 @@
106
133
  "destination_type": "queue",
107
134
  "routing_key": "",
108
135
  "arguments": {}
136
+ },
137
+ {
138
+ "source": "an_exchange",
139
+ "vhost": "event_hub",
140
+ "destination": "example.outbound",
141
+ "destination_type": "queue",
142
+ "routing_key": "",
143
+ "arguments": {}
144
+ },
145
+ {
146
+ "source": "processor2",
147
+ "vhost": "event_hub",
148
+ "destination": "processor2",
149
+ "destination_type": "queue",
150
+ "routing_key": "",
151
+ "arguments": {}
109
152
  }
110
153
  ]
111
154
  }
@@ -0,0 +1,11 @@
1
+ version: '3.3'
2
+
3
+ services:
4
+ rabbitmq:
5
+ build: .
6
+ container_name: eventhub.rabbitmq
7
+ image: eventhub.rabbitmq:3.8.14
8
+ ports:
9
+ - "5672:5672"
10
+ - "15672:15672"
11
+ - "15674:15674"
data/docker/reset ADDED
@@ -0,0 +1,5 @@
1
+ # stopping, deleting an rebuilding rabbitmq docker container
2
+ docker-compose stop
3
+ docker rm eventhub.rabbitmq
4
+ docker rmi $(docker images 'eventhub.rabbitmq' -q)
5
+ docker-compose up -d
@@ -1,37 +1,38 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'eventhub/version'
3
+ require "eventhub/version"
4
4
 
5
- note = 'Next generation gem to build ruby based eventhub processor'
5
+ note = "Next generation gem to build ruby based eventhub processor"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'eventhub-processor2'
9
- spec.version = EventHub::VERSION
10
- spec.authors = ['Steiner, Thomas']
11
- spec.email = ['thomas.steiner@ikey.ch']
8
+ spec.name = "eventhub-processor2"
9
+ spec.version = EventHub::VERSION
10
+ spec.authors = ["Steiner, Thomas"]
11
+ spec.email = ["thomas.steiner@ikey.ch"]
12
12
 
13
- spec.summary = note
14
- spec.description = note
15
- spec.homepage = 'https://github.com/thomis/eventhub-processor2'
16
- spec.license = 'MIT'
13
+ spec.summary = note
14
+ spec.description = note
15
+ spec.homepage = "https://github.com/thomis/eventhub-processor2"
16
+ spec.license = "MIT"
17
17
 
18
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
19
  f.match(%r{^(test|spec|features)/})
20
20
  end
21
- spec.bindir = 'exe'
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
- spec.require_paths = ['lib']
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
24
 
25
25
  # required by celluloid and bunny (-> amq-protocol)
26
26
  # spec.required_ruby_version = '~> 2.2.6'
27
27
 
28
- spec.add_dependency 'celluloid', '~> 0.17'
29
- spec.add_dependency 'bunny', '~> 2.9'
30
- spec.add_dependency 'eventhub-components', '~> 0.2'
31
- spec.add_dependency 'uuidtools', '~> 2.1'
28
+ spec.add_dependency "celluloid", "~> 0.18"
29
+ spec.add_dependency "bunny", "~> 2.15"
30
+ spec.add_dependency "eventhub-components", "~> 0.2"
31
+ spec.add_dependency "uuidtools", "~> 2.1"
32
32
 
33
- spec.add_development_dependency 'bundler', '~> 1.16'
34
- spec.add_development_dependency 'rake', '~> 12.3'
35
- spec.add_development_dependency 'rspec', '~> 3.7'
36
- spec.add_development_dependency 'simplecov', '~> 0.15'
33
+ spec.add_development_dependency "bundler", "~> 2.1"
34
+ spec.add_development_dependency "rake", "~> 13.0"
35
+ spec.add_development_dependency "rspec", "~> 3.9"
36
+ spec.add_development_dependency "simplecov", "~> 0.21"
37
+ spec.add_development_dependency "standardrb", "~> 1.0"
37
38
  end