msgr 1.5.0 → 1.6.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: d505941f2c4bf678a5d8c5185b2d65c510fcc08aa818eca251e83e8f0225b178
4
- data.tar.gz: 3f78955ee1074190d7fa63384294ae1b09802fcb362645b2aa52b79062ab9057
3
+ metadata.gz: b69f99b675987fb9acd292af1603a5806167aac39e49a98cd629a18cb03ef8f5
4
+ data.tar.gz: 41c53127e3fb1aee3efa28a107fd5d3b08baf99754582aef2415f6ee227676e0
5
5
  SHA512:
6
- metadata.gz: e421518963ac9b653faaab3da418687a96b4a7b91dfd931e7afc8d3166b247c711a2e6eb199bcef6fc0e83d970308b2998a152b80e32b3bc1d7f248af5fd161d
7
- data.tar.gz: 776b325f75779d39ad2c254020082da70ef4bf5a0dc1ec601c392546472315b29cfc0821718f94491d023077d1d84c7617b15ed808b9fa3f9b2aef1de56dd151
6
+ metadata.gz: 94753aaa39cb6be26a78962cd29fe0ad2fe922d117b85718b3a523fff032868f4b0e3ec9ac66d00e60cd0d561a2ba412cdf693c1eb736cf05201881d0e44664e
7
+ data.tar.gz: af7cc8d4e7d0ece9c03c673587797ed9d26412e83e3d96af1b41da872105dced4c7b2ad1a30d4dd95a91d3315b90cc2bb17845dba178fa51f76507665fb62c4a
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: maintenance-cache-clear
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 1 * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ cache-clear:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: easimon/wipe-cache@v2
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: maintenance-workflow-cleanup
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 1 * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ delete-workflow-runs:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: Mattraks/delete-workflow-runs@v2
13
+ with:
14
+ token: ${{ github.token }}
15
+ repository: ${{ github.repository }}
16
+ retain_days: 180
17
+ keep_minimum_runs: 50
@@ -0,0 +1,36 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*
7
+
8
+ jobs:
9
+ rubygems:
10
+ if: github.repository == 'jgraichen/msgr'
11
+ runs-on: ubuntu-24.04
12
+
13
+ permissions:
14
+ contents: write
15
+ id-token: write
16
+
17
+ env:
18
+ BUNDLE_JOBS: 4
19
+ BUNDLE_RETRY: 10
20
+ BUNDLE_WITHOUT: development test
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ruby
28
+ bundler-cache: true
29
+
30
+ - uses: rubygems/release-gem@v1
31
+
32
+ - uses: taiki-e/create-gh-release-action@v1
33
+ with:
34
+ changelog: CHANGELOG.md
35
+ draft: true
36
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -3,31 +3,30 @@ on: [push]
3
3
  jobs:
4
4
  test:
5
5
  name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
6
- runs-on: ubuntu-22.04
6
+ runs-on: ubuntu-24.04
7
7
 
8
8
  strategy:
9
9
  matrix:
10
10
  ruby:
11
+ - "3.3"
11
12
  - "3.2"
12
13
  - "3.1"
13
14
  - "3.0"
14
15
  - "2.7"
15
16
  gemfile:
16
- - rails_5.2.gemfile
17
- - rails_6.0.gemfile
18
- - rails_6.1.gemfile
17
+ - rails_7.2.gemfile
18
+ - rails_7.1.gemfile
19
19
  - rails_7.0.gemfile
20
+ - rails_6.1.gemfile
20
21
  exclude:
21
- - ruby: "3.2"
22
- gemfile: rails_5.2.gemfile
23
- - ruby: "3.2"
24
- gemfile: rails_6.0.gemfile
25
- - ruby: "3.1"
26
- gemfile: rails_5.2.gemfile
27
- - ruby: "3.1"
28
- gemfile: rails_6.0.gemfile
29
- - ruby: "3.0"
30
- gemfile: rails_5.2.gemfile
22
+ - gemfile: rails_7.2.gemfile
23
+ ruby: "3.0"
24
+ - gemfile: rails_7.2.gemfile
25
+ ruby: "2.7"
26
+ - gemfile: rails_7.1.gemfile
27
+ ruby: "3.0"
28
+ - gemfile: rails_7.1.gemfile
29
+ ruby: "2.7"
31
30
  fail-fast: False
32
31
 
33
32
  services:
@@ -63,9 +62,14 @@ jobs:
63
62
  - name: Run integration tests
64
63
  run: bundle exec rspec -Ispec/integration --color spec/integration
65
64
 
65
+ - uses: codecov/codecov-action@v4
66
+ with:
67
+ fail_ci_if_error: true
68
+ token: ${{ secrets.CODECOV_TOKEN }}
69
+
66
70
  rubocop:
67
71
  name: rubocop
68
- runs-on: ubuntu-22.04
72
+ runs-on: ubuntu-24.04
69
73
 
70
74
  env:
71
75
  BUNDLE_JOBS: 4
@@ -76,7 +80,7 @@ jobs:
76
80
  - uses: actions/checkout@master
77
81
  - uses: ruby/setup-ruby@v1
78
82
  with:
79
- ruby-version: 3.0
83
+ ruby-version: "3.3"
80
84
  bundler-cache: true
81
85
 
82
86
  - name: Run rubocop
data/.gitignore CHANGED
@@ -21,7 +21,7 @@ spec/integration/dummy/.generators
21
21
  spec/integration/dummy/.rakeTasks
22
22
  spec/integration/dummy/.sass-cache
23
23
  spec/integration/dummy/db/*.sqlite3
24
- spec/integration/dummy/db/*.sqlite3-journal
24
+ spec/integration/dummy/db/*.sqlite3*
25
25
  spec/integration/dummy/tmp
26
26
  spec/reports
27
27
  test/tmp
data/Appraisals CHANGED
@@ -2,22 +2,22 @@
2
2
 
3
3
  # vim: ft=ruby
4
4
 
5
- # appraise 'rails-5.2' do
6
- # gem 'rails', '~> 5.2.0'
7
- # end
8
-
9
- # appraise 'rails-6.0' do
10
- # gem 'rails', '~> 6.0.0'
11
- # end
12
-
13
5
  appraise 'rails-6.1' do
14
6
  gem 'rails', '~> 6.1.0'
7
+ gem 'sqlite3', '~> 1.4'
15
8
  end
16
9
 
17
10
  appraise 'rails-7.0' do
18
- gem 'rails', '~> 6.1.0'
11
+ gem 'rails', '~> 7.0.0'
12
+ gem 'sqlite3', '~> 1.4'
13
+ end
14
+
15
+ appraise 'rails-7.1' do
16
+ gem 'rails', '~> 7.1.0'
17
+ gem 'sqlite3', '~> 2.0'
19
18
  end
20
19
 
21
- appraise 'rails-head' do
22
- gem 'rails', git: 'https://github.com/rails/rails', require: 'rails'
20
+ appraise 'rails-7.2' do
21
+ gem 'rails', '~> 7.2.0'
22
+ gem 'sqlite3', '~> 2.0'
23
23
  end
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.6.0] - 2024-10-04
10
+
11
+ ### Added
12
+
13
+ - Support for Ruby 3.3
14
+
9
15
  ## [1.5.0] - 2023-08-16
10
16
 
11
17
  ### Added
@@ -193,7 +199,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
193
199
 
194
200
  - Improve rails initializer code
195
201
 
196
- [Unreleased]: https://github.com/jgraichen/msgr/compare/v1.5.0...HEAD
202
+ [Unreleased]: https://github.com/jgraichen/msgr/compare/v1.6.0...HEAD
203
+ [1.6.0]: https://github.com/jgraichen/msgr/compare/v1.5.0...v1.6.0
197
204
  [1.5.0]: https://github.com/jgraichen/msgr/compare/v1.4.0...v1.5.0
198
205
  [1.4.0]: https://github.com/jgraichen/msgr/compare/v1.3.2...v1.4.0
199
206
  [1.3.2]: https://github.com/jgraichen/msgr/compare/v1.3.1...v1.3.2
data/Gemfile CHANGED
@@ -3,15 +3,18 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gem 'appraisal'
6
- gem 'coveralls'
7
6
  gem 'rake'
8
7
  gem 'rake-release', '~> 1.1'
8
+
9
9
  gem 'rspec', '~> 3.0'
10
10
  gem 'rspec-rails'
11
- gem 'rubocop-config', github: 'jgraichen/rubocop-config', ref: 'v11', require: false
11
+
12
+ gem 'simplecov', require: false
13
+ gem 'simplecov-cobertura', require: false
14
+
15
+ gem 'rubocop-config', github: 'jgraichen/rubocop-config', ref: 'v12', require: false
12
16
 
13
17
  gem 'rails'
14
- gem 'sqlite3'
15
18
 
16
19
  # Specify your gem's dependencies in acfs.gemspec
17
20
  gemspec
@@ -3,13 +3,14 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "coveralls"
7
- gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v4"
8
6
  gem "rake"
9
7
  gem "rake-release", "~> 1.1"
10
8
  gem "rspec", "~> 3.0"
11
9
  gem "rspec-rails"
10
+ gem "simplecov", require: false
11
+ gem "simplecov-cobertura", require: false
12
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12", require: false
12
13
  gem "rails", "~> 6.1.0"
13
- gem "sqlite3"
14
+ gem "sqlite3", "~> 1.4"
14
15
 
15
16
  gemspec path: "../"
@@ -3,13 +3,14 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "coveralls"
7
- gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v4"
8
6
  gem "rake"
9
7
  gem "rake-release", "~> 1.1"
10
8
  gem "rspec", "~> 3.0"
11
9
  gem "rspec-rails"
12
- gem "rails", "~> 6.1.0"
13
- gem "sqlite3"
10
+ gem "simplecov", require: false
11
+ gem "simplecov-cobertura", require: false
12
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12", require: false
13
+ gem "rails", "~> 7.0.0"
14
+ gem "sqlite3", "~> 1.4"
14
15
 
15
16
  gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "rake-release", "~> 1.1"
8
+ gem "rspec", "~> 3.0"
9
+ gem "rspec-rails"
10
+ gem "simplecov", require: false
11
+ gem "simplecov-cobertura", require: false
12
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12", require: false
13
+ gem "rails", "~> 7.1.0"
14
+ gem "sqlite3", "~> 2.0"
15
+
16
+ gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "rake-release", "~> 1.1"
8
+ gem "rspec", "~> 3.0"
9
+ gem "rspec-rails"
10
+ gem "simplecov", require: false
11
+ gem "simplecov-cobertura", require: false
12
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12", require: false
13
+ gem "rails", "~> 7.2.0"
14
+ gem "sqlite3", "~> 2.0"
15
+
16
+ gemspec path: "../"
@@ -57,7 +57,7 @@ module Msgr
57
57
 
58
58
  class << self
59
59
  def new(*args)
60
- @instance ||= super(*args) # rubocop:disable Naming/MemoizedInstanceVariableName
60
+ @instance ||= super # rubocop:disable Naming/MemoizedInstanceVariableName
61
61
  end
62
62
 
63
63
  def run(**kwargs)
data/lib/msgr/version.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Msgr
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 5
6
+ MINOR = 6
7
7
  PATCH = 0
8
8
  STAGE = nil
9
9
  STRING = [MAJOR, MINOR, PATCH, STAGE].compact.join('.')
@@ -8,7 +8,7 @@ class TestConsumer < ApplicationConsumer
8
8
  def index
9
9
  data = {fuubar: 'abc'}
10
10
 
11
- publish data, to: 'local.test.another_action'
11
+ publish(data, to: 'local.test.another_action')
12
12
  end
13
13
 
14
14
  def another_action
@@ -4,10 +4,17 @@
4
4
  require 'bundler'
5
5
  Bundler.require :rails, :test
6
6
 
7
- # Coverage
8
- require 'coveralls'
9
- Coveralls.wear! do
7
+ require 'simplecov'
8
+ require 'simplecov-cobertura'
9
+
10
+ SimpleCov.start do
11
+ command_name 'rspec:integration'
10
12
  add_filter 'spec'
13
+
14
+ self.formatters = [
15
+ SimpleCov::Formatter::HTMLFormatter,
16
+ SimpleCov::Formatter::CoberturaFormatter,
17
+ ]
11
18
  end
12
19
 
13
20
  ENV['RAILS_ENV'] ||= 'test'
@@ -19,9 +26,9 @@ require 'rspec/rails'
19
26
  # in spec/support/ and its subdirectories.
20
27
  Dir[File.expand_path('support/**/*.rb', __dir__)].sort.each {|f| require f }
21
28
 
22
- # Checks for pending migrations before tests are run.
23
- # If you are not using ActiveRecord, you can remove this line.
24
- if defined?(ActiveRecord::Migration) && Rails::VERSION::MAJOR >= 4
29
+ if ActiveRecord::Migration.respond_to?(:check_all_pending!)
30
+ ActiveRecord::Migration.check_all_pending!
31
+ else
25
32
  ActiveRecord::Migration.check_pending!
26
33
  end
27
34
 
@@ -47,10 +54,6 @@ RSpec.configure do |config|
47
54
  c.syntax = :expect
48
55
  end
49
56
 
50
- config.before do
51
- Msgr.logger = false
52
- end
53
-
54
57
  config.after do
55
58
  # Flush the consumer queue
56
59
  Msgr.client.stop delete: true
@@ -4,10 +4,17 @@
4
4
  require 'bundler'
5
5
  Bundler.setup :default, :test
6
6
 
7
- # Coverage
8
- require 'coveralls'
9
- Coveralls.wear! do
7
+ require 'simplecov'
8
+ require 'simplecov-cobertura'
9
+
10
+ SimpleCov.start do
11
+ command_name 'rspec:unit'
10
12
  add_filter 'spec'
13
+
14
+ self.formatters = [
15
+ SimpleCov::Formatter::HTMLFormatter,
16
+ SimpleCov::Formatter::CoberturaFormatter,
17
+ ]
11
18
  end
12
19
 
13
20
  require 'msgr'
@@ -20,8 +27,4 @@ RSpec.configure do |config|
20
27
  # Only allow expect syntax
21
28
  c.syntax = :expect
22
29
  end
23
-
24
- config.before do
25
- Msgr.logger = false
26
- end
27
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -53,6 +53,9 @@ extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
55
  - ".editorconfig"
56
+ - ".github/workflows/maintenance-cache-wipe.yml"
57
+ - ".github/workflows/maintenance-workflow-cleanup.yml"
58
+ - ".github/workflows/release.yml"
56
59
  - ".github/workflows/test.yml"
57
60
  - ".gitignore"
58
61
  - ".markdownlint.yml"
@@ -65,11 +68,10 @@ files:
65
68
  - README.md
66
69
  - Rakefile
67
70
  - bin/msgr
68
- - gemfiles/rails_5.2.gemfile
69
- - gemfiles/rails_6.0.gemfile
70
71
  - gemfiles/rails_6.1.gemfile
71
72
  - gemfiles/rails_7.0.gemfile
72
- - gemfiles/rails_head.gemfile
73
+ - gemfiles/rails_7.1.gemfile
74
+ - gemfiles/rails_7.2.gemfile
73
75
  - lib/msgr.rb
74
76
  - lib/msgr/binding.rb
75
77
  - lib/msgr/channel.rb
@@ -135,7 +137,7 @@ licenses:
135
137
  - MIT
136
138
  metadata:
137
139
  rubygems_mfa_required: 'true'
138
- post_install_message:
140
+ post_install_message:
139
141
  rdoc_options: []
140
142
  require_paths:
141
143
  - lib
@@ -150,8 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
152
  - !ruby/object:Gem::Version
151
153
  version: '0'
152
154
  requirements: []
153
- rubygems_version: 3.4.18
154
- signing_key:
155
+ rubygems_version: 3.5.16
156
+ signing_key:
155
157
  specification_version: 4
156
158
  summary: 'Msgr: Rails-like Messaging Framework'
157
159
  test_files: []
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "coveralls"
7
- gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v4"
8
- gem "rake"
9
- gem "rake-release", "~> 1.1"
10
- gem "rspec", "~> 3.0"
11
- gem "rspec-rails"
12
- gem "rails", "~> 5.2.0"
13
- gem "sqlite3"
14
-
15
- gemspec path: "../"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "coveralls"
7
- gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v4"
8
- gem "rake"
9
- gem "rake-release", "~> 1.1"
10
- gem "rspec", "~> 3.0"
11
- gem "rspec-rails"
12
- gem "rails", "~> 6.0.0"
13
- gem "sqlite3"
14
-
15
- gemspec path: "../"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "coveralls"
7
- gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v4"
8
- gem "rake"
9
- gem "rake-release", "~> 1.1"
10
- gem "rspec", "~> 3.0"
11
- gem "rspec-rails"
12
- gem "rails", git: "https://github.com/rails/rails", require: "rails"
13
- gem "sqlite3"
14
-
15
- gemspec path: "../"