happn 1.1.6 → 1.1.7

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: 63d6c46bb2d768801f6c5391d84122dea75f093686ca0435f707be5b06c04f77
4
- data.tar.gz: 18df636fedb057452deed96f0e771290d78577b6035bc22352faf353ff1a4b71
3
+ metadata.gz: 69a473282e160c8ae5a0f8eea7615bae2700e63e2b458ae59c0e221a36824a26
4
+ data.tar.gz: 19140eaf6bac43db02fb65fbfdd1b6ffaa8eb95bb29307d0a2be561649ff11e5
5
5
  SHA512:
6
- metadata.gz: 68d34bb4d5788a9190949028f6b151f51c78a8d16e87ed0966c04e542689aa304a223f44607a8c3ee57c715e581ee147054ad1588449a2163f3330e8ec60659f
7
- data.tar.gz: bf2478e793629583060b67e3a7a5398031346417e7a68e7734b9b61cb4dc83c0345d96ef64e59b1a970858b239d50ad8d5ac9d761a6f5306bfb7a5e30ffd8e6f
6
+ metadata.gz: 8bb235e0cf250362916c7f399829248eaef752e2e4772178c7690896901aa763eb9dc9f2741bf12ff18caad3f925bbb151edd8109ea056b64cafa7f69494327d
7
+ data.tar.gz: 1b30f2f49e6450d670c903f16096d42bc188ac279154a8d4d256795e446274ca0dc3424118e6a8b494611ab3773992c69afd6d59629bb9cc5620a5be087670fa
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ### [1.1.7] - 2026-08-01
9
+
10
+ * **Breaking**: `required_ruby_version` is raised from `>= 3.0` to `>= 3.2`.
11
+ * `Happn::EventConsumer` now requires `json` explicitly.
12
+ * `Happn::Event#timestamp` returns `nil` again for an empty or blank timestamp, as it did up to 1.0.3 through `String#to_datetime`.
13
+ * Integration tests with RabbitMQ.
14
+
8
15
  ### [1.1.6] - 2026-07-31
9
16
 
10
17
  * Suite of tests
data/README.md CHANGED
@@ -7,7 +7,7 @@ This gem connects a single RabbitMQ queue and bind it automatically to its excha
7
7
 
8
8
  ## Requirements
9
9
 
10
- * Ruby >= 3.0
10
+ * Ruby >= 3.2
11
11
  * Tested with RabbitMQ 3.5.8
12
12
  * `happn-ruby` works with or without Rails (tested with Rails 4 and 5).
13
13
 
@@ -114,6 +114,18 @@ The test suite is written with [RSpec](https://rspec.info) and needs no running
114
114
  bundle exec rake # or: bundle exec rspec
115
115
  ```
116
116
 
117
+ ## Running the integration tests
118
+
119
+ The test suite above needs no running RabbitMQ. A second suite, under `spec_integration/`, exercises `Happn`
120
+ against a real broker instead: queue and binding lifecycle, message routing, consumption and acknowledgement,
121
+ and the reject-and-exit contract when a projector handler raises.
122
+
123
+ ```bash
124
+ docker compose up -d --wait # starts RabbitMQ with the management plugin
125
+ bundle exec rake integration # or: bundle exec rspec spec_integration
126
+ docker compose down
127
+ ```
128
+
117
129
  ## Overall configuration options
118
130
 
119
131
  All options have a default value. However, all of them can be changed in your `Happn.configure` block.
@@ -145,12 +157,12 @@ no API key is stored in this repository, the workflow exchanges a short-lived Gi
145
157
  scoped RubyGems credential.
146
158
 
147
159
  1. Update `Happn::VERSION` in `lib/happn/version.rb` and the `CHANGELOG.md`
148
- 2. Commit and push these changes to `master`
160
+ 2. Commit and push these changes to `main`
149
161
  3. Tag the commit and push the tag:
150
162
 
151
163
  ```
152
- $ git tag -a v1.1.6 -m "Version 1.1.6"
153
- $ git push origin v1.1.6
164
+ $ git tag -a v1.1.7 -m "Version 1.1.7"
165
+ $ git push origin v1.1.7
154
166
  ```
155
167
 
156
168
  The workflow then checks that the tag matches `Happn::VERSION`, runs the tests, builds the gem
data/happn.gemspec CHANGED
@@ -15,20 +15,16 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = "https://github.com/crepesourcing/happn-ruby"
16
16
  spec.license = "MIT"
17
17
 
18
- spec.required_ruby_version = ">= 3.0"
18
+ spec.required_ruby_version = ">= 3.2"
19
19
 
20
20
  spec.metadata = {
21
21
  "source_code_uri" => spec.homepage,
22
- "changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md",
22
+ "changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
23
23
  "bug_tracker_uri" => "#{spec.homepage}/issues",
24
24
  "rubygems_mfa_required" => "true"
25
25
  }
26
26
 
27
- spec.files = `git ls-files -z`.split("\x0").reject do |file|
28
- file.start_with?("spec/", ".github/", ".claude/") ||
29
- [".gitignore", ".rspec", "Gemfile", "Rakefile"].include?(file)
30
- end
31
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
+ spec.files = Dir.glob(["lib/**/*.rb", "CHANGELOG.md", "MIT-LICENSE", "README.md", "happn.gemspec"]).sort
32
28
  spec.require_paths = ["lib"]
33
29
 
34
30
  spec.add_development_dependency "bundler", ">=1.17"
data/lib/happn/event.rb CHANGED
@@ -38,7 +38,12 @@ module Happn
38
38
  end
39
39
 
40
40
  def timestamp
41
- DateTime.parse(@meta[:timestamp])
41
+ raw_timestamp = @meta[:timestamp]
42
+ if raw_timestamp.nil? || raw_timestamp.to_s.strip.empty?
43
+ nil
44
+ else
45
+ DateTime.parse(raw_timestamp)
46
+ end
42
47
  end
43
48
 
44
49
  def id
@@ -1,4 +1,5 @@
1
1
  require "bunny"
2
+ require "json"
2
3
  require "rabbitmq/http/client"
3
4
 
4
5
  module Happn
data/lib/happn/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Happn
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
data/lib/happn.rb CHANGED
@@ -54,7 +54,6 @@ module Happn
54
54
  config.on_error = nil
55
55
  config.bunny_options = {}
56
56
  config.management_options = {}
57
- config.on_error = nil
58
57
  end
59
58
 
60
59
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: happn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Commuty
@@ -106,7 +106,7 @@ licenses:
106
106
  - MIT
107
107
  metadata:
108
108
  source_code_uri: https://github.com/crepesourcing/happn-ruby
109
- changelog_uri: https://github.com/crepesourcing/happn-ruby/blob/master/CHANGELOG.md
109
+ changelog_uri: https://github.com/crepesourcing/happn-ruby/blob/main/CHANGELOG.md
110
110
  bug_tracker_uri: https://github.com/crepesourcing/happn-ruby/issues
111
111
  rubygems_mfa_required: 'true'
112
112
  rdoc_options: []
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: '3.0'
119
+ version: '3.2'
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="