rimless 1.5.0 → 1.5.1

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: ca11e9cb748578dec4408dc0feb03a614e880ed4246b00fcf4a35a1fd50fc94a
4
- data.tar.gz: e0eeb43e9d108b3fc597c444d495e3dc5dc5ae8c409742197c80524ab10a4f92
3
+ metadata.gz: c49d6db3a548187e76ca5ee01121a91543c13a2a98ed7afe0a22d299f1869b88
4
+ data.tar.gz: ca412431753486b42b92c952c30bd24a2104cca1fc9ad2eb7e6672893bbedb93
5
5
  SHA512:
6
- metadata.gz: d321ea014b0f430f7abfdb237fb25b9cc038096d4bdd08418c60b6860639978257b01174c3771a7ff1ad5c3a6ecd93195f019cdebaf0985a6292594b01405aeb
7
- data.tar.gz: de2422512c170072d535318de20922f1a47f80d6f75c9425d1ef847b61ae82c42b0e34b9c4593b0f613f309fda49aeb201dfae7fca8db4bb7f5ea428dee176fb
6
+ metadata.gz: 664037e7791bed603c7426bf59f26f1164cb6e3344457e3956361e5bac5bfd58efc57272072e0dc2a20205827271e4c8eb5d17c83fe2dd59cde8423932c9ae30
7
+ data.tar.gz: ae577c63363a7903509ee8d5428c2328c278b4a6dd6c6c9a061d4bbde60eb73b46f45986da0fa0651260435f01dbe201d64713ddf268111929abc2f196f4b1c9
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-22.04
13
13
  timeout-minutes: 5
14
14
  steps:
15
- - uses: actions/checkout@v3
15
+ - uses: actions/checkout@v4
16
16
 
17
17
  - name: Install the correct Ruby version
18
18
  uses: ruby/setup-ruby@v1
@@ -18,7 +18,7 @@ jobs:
18
18
  runs-on: ubuntu-22.04
19
19
  timeout-minutes: 5
20
20
  steps:
21
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
22
22
 
23
23
  - name: Install Ruby 2.5
24
24
  uses: ruby/setup-ruby@v1
@@ -23,7 +23,7 @@ jobs:
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
25
  steps:
26
- - uses: actions/checkout@v3
26
+ - uses: actions/checkout@v4
27
27
 
28
28
  - name: Install the correct Ruby version
29
29
  uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.5.1
6
+
7
+ * Added a retry to write compiled schema files as this may fail on parallel
8
+ execution (#33)
9
+
5
10
  ### 1.5.0
6
11
 
7
12
  * Do not extend the `Rimless.logger` to write to stdout by default when running
data/Gemfile CHANGED
@@ -11,7 +11,9 @@ gemspec
11
11
  gem 'appraisal', '~> 2.4'
12
12
  gem 'bundler', '~> 2.3'
13
13
  gem 'countless', '~> 1.1'
14
- gem 'factory_bot', '~> 6.2'
14
+ # TODO: Remove the upper lock when
15
+ # https://github.com/thoughtbot/factory_bot/issues/1614 is solved.
16
+ gem 'factory_bot', '~> 6.2', '< 6.4.5'
15
17
  gem 'guard-rspec', '~> 4.7'
16
18
  gem 'railties', '>= 5.2'
17
19
  gem 'rake', '~> 13.0'
data/Makefile CHANGED
@@ -25,6 +25,7 @@ ID ?= id
25
25
  MKDIR ?= mkdir
26
26
  RM ?= rm
27
27
  XARGS ?= xargs
28
+ TEST ?= test
28
29
 
29
30
  # Container binaries
30
31
  APPRAISAL ?= appraisal
@@ -35,6 +36,7 @@ RAKE ?= rake
35
36
  RSPEC ?= rspec
36
37
  RUBOCOP ?= rubocop
37
38
  YARD ?= yard
39
+ RUBY_VERSION := ruby-version
38
40
 
39
41
  # Files
40
42
  GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
@@ -113,7 +115,8 @@ test-style: \
113
115
 
114
116
  test-style-ruby:
115
117
  # Run the static code analyzer (rubocop)
116
- @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
118
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
119
+ || ($(TEST) $$($(RUBY_VERSION)) != '2.5' && true))
117
120
 
118
121
  clean:
119
122
  # Clean the dependencies
@@ -5,7 +5,7 @@ MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
5
5
  RUN gem update --system
6
6
 
7
7
  # Add backports repository
8
- RUN echo 'deb http://ftp.debian.org/debian buster-backports main' \
8
+ RUN echo 'deb http://archive.debian.org/debian buster-backports main' \
9
9
  >> /etc/apt/sources.list
10
10
 
11
11
  # Install nodejs 16
@@ -5,7 +5,7 @@ source "https://rubygems.org"
5
5
  gem "appraisal", "~> 2.4"
6
6
  gem "bundler", "~> 2.3"
7
7
  gem "countless", "~> 1.1"
8
- gem "factory_bot", "~> 6.2"
8
+ gem "factory_bot", "~> 6.2", "< 6.4.5"
9
9
  gem "guard-rspec", "~> 4.7"
10
10
  gem "railties", "~> 5.2.0"
11
11
  gem "rake", "~> 13.0"
@@ -34,10 +34,15 @@ module Rimless
34
34
  def render_file(src)
35
35
  # Convert the template path to the destination path
36
36
  dest = schema_path(src)
37
- # Create the deep path when not yet existing
38
- FileUtils.mkdir_p(File.dirname(dest))
39
- # Write the rendered file contents to the destination
40
- File.write(dest, ERB.new(File.read(src)).result(binding))
37
+
38
+ # Allow parallel cleanups and execution
39
+ with_retries(max_tries: 3, rescue: Errno::ENOENT) do
40
+ # Create the deep path when not yet existing
41
+ FileUtils.mkdir_p(File.dirname(dest))
42
+ # Write the rendered file contents to the destination
43
+ File.write(dest, ERB.new(File.read(src)).result(binding))
44
+ end
45
+
41
46
  # Check the written file for correct JSON
42
47
  validate_file(dest)
43
48
  end
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Rimless
5
5
  # The version of the +rimless+ gem
6
- VERSION = '1.5.0'
6
+ VERSION = '1.5.1'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/rimless.rb CHANGED
@@ -14,6 +14,7 @@ require 'avro_turf/messaging'
14
14
  require 'karafka'
15
15
  require 'karafka-sidekiq-backend'
16
16
  require 'sparsify'
17
+ require 'retries'
17
18
  require 'erb'
18
19
 
19
20
  # The top level namespace for the rimless gem.
data/rimless.gemspec CHANGED
@@ -40,6 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_runtime_dependency 'karafka', '~> 1.4', '< 1.4.15'
41
41
  spec.add_runtime_dependency 'karafka-sidekiq-backend', '~> 1.4'
42
42
  spec.add_runtime_dependency 'karafka-testing', '~> 1.4'
43
+ spec.add_runtime_dependency 'retries', '>= 0.0.5'
43
44
  spec.add_runtime_dependency 'sinatra', '~> 2.2'
44
45
  spec.add_runtime_dependency 'sparsify', '~> 1.1'
45
46
  spec.add_runtime_dependency 'waterdrop', '~> 1.4'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rimless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-04 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -86,6 +86,20 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.4'
89
+ - !ruby/object:Gem::Dependency
90
+ name: retries
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 0.0.5
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 0.0.5
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: sinatra
91
105
  requirement: !ruby/object:Gem::Requirement