zaikio-loom 1.1.1 → 1.2.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: 3786a2308fe8e476ff4ac2d238c5dcbf77bb9858ac30e974e2a3e188685dfb3a
4
- data.tar.gz: 8e1a5e7dbdc412299b4210f31752ea1ca6113e060c1eb15495766e90d6981aea
3
+ metadata.gz: a25fa4c17a5eba51db6793cd20d875b6cedc279e98cd9dd69efbe5839c992446
4
+ data.tar.gz: dbc90fefb4b417af5412cfa788e4aea1ea8c48f52f272b5e31ae86271bbcda9e
5
5
  SHA512:
6
- metadata.gz: eaf76e4bf467e1842f4d1c2d45d4ad231ee5c8a38d80c0dbba0c601e25c5e0848ac8898757aa0a00f11b889a5d48c39e5ba97c21a32c6da93f6670dc3f9aab64
7
- data.tar.gz: a58d8aaf7489ed78422fdfcbc631b0a3cb292d134c64f039965b169da4101ea50417d2f9838cbc152a7734b642b9fd93fd8db552b3997e8ca021051ea24338de
6
+ metadata.gz: 94458de7ec87e5ecec1f1171a1c2df1a679fd183926fd5059546f637e4e72b17bf2732ae543cbc9f51759c471d39e0cf1a2fc42d02dbee7e8d881bf7b46cd8f9
7
+ data.tar.gz: b2a7ca51992630ea9088872ac8d786004432b6a6c610213e6f352a288b9b91337177e800d9a25200021d06a82a3d0d592496919e162f561192e793cdb8e373ba
@@ -0,0 +1,11 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: bundler
5
+ directory: "/"
6
+ reviewers:
7
+ - jalyna
8
+ schedule:
9
+ interval: daily
10
+ time: "04:00"
11
+ open-pull-requests-limit: 10
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Zaikio Loom Ruby Gem Changelog
2
2
 
3
- ## master
3
+ ## [Unreleased]
4
+
5
+ ## 1.2.0 - 2021-10-18
6
+
7
+ - **BREAKING** Fixed: Throw new `Zaikio::Loom::Error` when posting events fails (e.g. 422)
4
8
 
5
9
  ## 1.1.1 - 2021-03-25
6
10
 
data/README.md CHANGED
@@ -136,7 +136,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
136
136
 
137
137
  ## Contributing
138
138
 
139
- Bug reports and pull requests are welcome on GitHub at https://github.com/zaikio/zai-loom-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
139
+ Bug reports and pull requests are welcome on GitHub at https://github.com/zaikio/zaikio-loom-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
140
140
 
141
141
  ## License
142
142
 
@@ -144,4 +144,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
144
144
 
145
145
  ## Code of Conduct
146
146
 
147
- Everyone interacting in the Zaikio Loom Ruby gem project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/zaikio/zai-loom-ruby/blob/master/CODE_OF_CONDUCT.md).
147
+ Everyone interacting in the Zaikio Loom Ruby gem project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/zaikio/zaikio-loom-ruby/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,14 @@
1
+ module Zaikio
2
+ module Loom
3
+ class Error < StandardError
4
+ attr_reader :body, :status_code
5
+
6
+ def initialize(message = nil, body:, status_code:)
7
+ super(message)
8
+
9
+ @body = body
10
+ @status_code = status_code
11
+ end
12
+ end
13
+ end
14
+ end
@@ -37,6 +37,14 @@ module Zaikio
37
37
  @status_code = response.code.to_i
38
38
  @response_body = response.body
39
39
 
40
+ unless response.is_a?(Net::HTTPSuccess)
41
+ raise Zaikio::Loom::Error.new(
42
+ "Sending event failed (#{@status_code}): #{@response_body}",
43
+ body: @response_body,
44
+ status_code: @status_code
45
+ )
46
+ end
47
+
40
48
  response.is_a?(Net::HTTPSuccess)
41
49
  end
42
50
 
@@ -1,5 +1,5 @@
1
1
  module Zaikio
2
2
  module Loom
3
- VERSION = "1.1.1".freeze
3
+ VERSION = "1.2.0".freeze
4
4
  end
5
5
  end
data/lib/zaikio/loom.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "zaikio/loom/app_configuration"
2
2
  require "zaikio/loom/configuration"
3
+ require "zaikio/loom/error"
3
4
  require "zaikio/loom/event"
4
5
  require "zaikio/loom/event_serializer"
5
6
  require "zaikio/loom/railtie"
data/zaikio-loom.gemspec CHANGED
@@ -8,11 +8,11 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.authors = ["crispymtn", "Martin Spickermann"]
10
10
  spec.email = ["op@crispymtn.com", "spickermann@gmail.com"]
11
- spec.homepage = "https://github.com/zaikio/zai-loom-ruby"
11
+ spec.homepage = "https://github.com/zaikio/zaikio-loom-ruby"
12
12
  spec.license = "MIT"
13
13
  spec.summary = "The Zaikio Loom Ruby Gem simplifies publishing events on the Zaikio Loom event system."
14
14
 
15
- spec.metadata["changelog_uri"] = "https://github.com/zaikio/zai-loom-ruby/blob/master/CHANGELOG.md"
15
+ spec.metadata["changelog_uri"] = "https://github.com/zaikio/zaikio-loom-ruby/blob/master/CHANGELOG.md"
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = spec.homepage
18
18
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaikio-loom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - crispymtn
8
8
  - Martin Spickermann
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-29 00:00:00.000000000 Z
12
+ date: 2021-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activejob
@@ -199,7 +199,7 @@ dependencies:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
- description:
202
+ description:
203
203
  email:
204
204
  - op@crispymtn.com
205
205
  - spickermann@gmail.com
@@ -208,6 +208,7 @@ extensions: []
208
208
  extra_rdoc_files: []
209
209
  files:
210
210
  - ".circleci/config.yml"
211
+ - ".github/dependabot.yml"
211
212
  - ".gitignore"
212
213
  - ".rubocop.yml"
213
214
  - CHANGELOG.md
@@ -224,19 +225,20 @@ files:
224
225
  - lib/zaikio/loom/app_configuration.rb
225
226
  - lib/zaikio/loom/configuration.rb
226
227
  - lib/zaikio/loom/engine.rb
228
+ - lib/zaikio/loom/error.rb
227
229
  - lib/zaikio/loom/event.rb
228
230
  - lib/zaikio/loom/event_serializer.rb
229
231
  - lib/zaikio/loom/railtie.rb
230
232
  - lib/zaikio/loom/version.rb
231
233
  - zaikio-loom.gemspec
232
- homepage: https://github.com/zaikio/zai-loom-ruby
234
+ homepage: https://github.com/zaikio/zaikio-loom-ruby
233
235
  licenses:
234
236
  - MIT
235
237
  metadata:
236
- changelog_uri: https://github.com/zaikio/zai-loom-ruby/blob/master/CHANGELOG.md
237
- homepage_uri: https://github.com/zaikio/zai-loom-ruby
238
- source_code_uri: https://github.com/zaikio/zai-loom-ruby
239
- post_install_message:
238
+ changelog_uri: https://github.com/zaikio/zaikio-loom-ruby/blob/master/CHANGELOG.md
239
+ homepage_uri: https://github.com/zaikio/zaikio-loom-ruby
240
+ source_code_uri: https://github.com/zaikio/zaikio-loom-ruby
241
+ post_install_message:
240
242
  rdoc_options: []
241
243
  require_paths:
242
244
  - lib
@@ -251,8 +253,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
253
  - !ruby/object:Gem::Version
252
254
  version: '0'
253
255
  requirements: []
254
- rubygems_version: 3.2.3
255
- signing_key:
256
+ rubygems_version: 3.1.4
257
+ signing_key:
256
258
  specification_version: 4
257
259
  summary: The Zaikio Loom Ruby Gem simplifies publishing events on the Zaikio Loom
258
260
  event system.