ears 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: d7ced4073b5d4beac7df3fc68d26131335bddcecdbe707d2b3ab548f82e05738
4
- data.tar.gz: 29f85b6a5ba0358626e32eae1edea5957c7f7f8755c723cdf3120cd1f8a40f1e
3
+ metadata.gz: 743f599a9aaa80f40f33e883330c2c0c4e6e83f9216f73283a88051128b062ee
4
+ data.tar.gz: 022ba933c602fd7eb32becc3c51bc167ad7fb06c58e47262a0721c18ec59882f
5
5
  SHA512:
6
- metadata.gz: '0620694b22f202853e77388c7a37df1774cc38a19bf96826b13230bdbbe78cae9e61cf6b8c2ebdd6a26a789679020a02988ca6313a607d91f7f7c3de3209eae1'
7
- data.tar.gz: 8158bf44c5a7be8fff426b02d4f3f5918f388e2c643d8b877c75f9b4b178340b7be0395a075251e7ebdd24928b8acea394e5006e54519a185292c37014bbaf79
6
+ metadata.gz: c56e69f9fba37b8ad45aad230a29552f70aa45e3f664ca84bc7578e839fd894489b4eac7988b0c091605cf293b26ba93cf9c2257fe79239f15f97eea40537131
7
+ data.tar.gz: 97ab3dafcc607405472e794bd7ca791ede20e3d39ff1ae4f433042eca34a3c77e97ce847f785a961c47792e0c194e66c5d210073d061e2cff527990d4385dbea
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.2.0
3
+ ## 0.2.1 (2021-05-07)
4
+
5
+ ### Changes
6
+
7
+ - you can now call `Ears.configure` to set a custom RabbitMQ URL to connect to
8
+
9
+ ## 0.2.0 (2021-05-07)
4
10
 
5
11
  ### Breaking
6
12
 
@@ -11,6 +17,6 @@
11
17
  - middlewares can now accept options
12
18
  - added an Appsignal middleware to monitor consumers
13
19
 
14
- ## 0.1.0
20
+ ## 0.1.0 (2021-04-23)
15
21
 
16
22
  Initial release.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ears (0.2.0)
4
+ ears (0.2.1)
5
5
  bunny
6
6
  multi_json
7
7
 
data/lib/ears.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'bunny'
2
+ require 'ears/configuration'
2
3
  require 'ears/consumer'
3
4
  require 'ears/setup'
4
5
  require 'ears/version'
@@ -8,6 +9,14 @@ module Ears
8
9
  end
9
10
 
10
11
  class << self
12
+ def configuration
13
+ @configuration ||= Ears::Configuration.new
14
+ end
15
+
16
+ def configure
17
+ yield(configuration)
18
+ end
19
+
11
20
  def connection
12
21
  @connection ||= Bunny.new.tap { |conn| conn.start }
13
22
  end
@@ -0,0 +1,11 @@
1
+ module Ears
2
+ class Configuration
3
+ DEFAULT_RABBITMQ_URL = 'amqp://guest:guest@localhost:5672'
4
+
5
+ attr_accessor :rabbitmq_url
6
+
7
+ def initialize
8
+ @rabbitmq_url = DEFAULT_RABBITMQ_URL
9
+ end
10
+ end
11
+ end
data/lib/ears/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ears
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ears
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Mainz
@@ -129,6 +129,7 @@ files:
129
129
  - Rakefile
130
130
  - ears.gemspec
131
131
  - lib/ears.rb
132
+ - lib/ears/configuration.rb
132
133
  - lib/ears/consumer.rb
133
134
  - lib/ears/middlewares/appsignal.rb
134
135
  - lib/ears/middlewares/json.rb