modulorails 1.0.1 → 1.0.2

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: d9c1a33ace09742eb134cb8f41cf1aaac6f6687c8e9df97c91190aec0ca23034
4
- data.tar.gz: 22e48b8dd51a0f187abc8a76f95af35224b6666b41b55851ef77a5a8a98d2450
3
+ metadata.gz: 9b121fa34b63e6fbbfdf692179220af29060c9b0efc74f1979add163f88fb4b1
4
+ data.tar.gz: d88cf22d0ab3638b2c3e9816efbbcfc7560ef182e049a553901cc46d9c00a076
5
5
  SHA512:
6
- metadata.gz: '08b2eb1496c1c61f30674449f5f0c56c773203851559b83b38c2c0cbf2dc55b88e89fcdece0f9d0b4a8264cc6baeef50d9b42f5bd2b67ad953bfb6d884e15881'
7
- data.tar.gz: e21f3ac1ba44ebfc00776ca0f04541bf97e505f0773f5f47a8c2e5299909f0339f2769c1478ebce043935751a282373a0940bef910fb96bd271e857a7155e6c5
6
+ metadata.gz: 9a343a8f832ef6c6e3461140c1d4bcca427610424a0dfb81d582503b44b1a37b955c5a6c614166df18870bde41372dabe6658b3d7a57971b8548ed8ba02b2986
7
+ data.tar.gz: 132aebb2697f088e6a528647b24ef577291eac1796b5d72ea77b3eebd4ac20d2ea32166ece2cf2f0cafb9a483948a024562d8a4f2ad00af055307f2021855021
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.gem
13
13
  gemfiles/*.lock
14
14
  /config/database.yml
15
+ .idea
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file is used to list changes made in each version of the gem.
4
4
 
5
+ # 1.0.2
6
+
7
+ Fix error in with_transaction: `uninitialized constant Modulorails::BaseService::ErrorData`.
8
+
5
9
  # 1.0.1
6
10
 
7
11
  First Rubocop rules.
@@ -58,10 +58,10 @@ class Modulorails::BaseService
58
58
  data = yield
59
59
  end
60
60
 
61
- SuccessData.new(data)
61
+ ::Modulorails::SuccessData.new(data)
62
62
  rescue ActiveRecord::RecordInvalid => e
63
63
  # Known error, no need for a log, it just needs to be returned
64
- ErrorData.new(e.message, exception: e)
64
+ ::Modulorails::ErrorData.new(e.message, exception: e)
65
65
  rescue StandardError => e
66
66
  # Unknown error, log the error
67
67
  Rails.logger.error("#{self}: #{e.message}")
@@ -69,7 +69,7 @@ class Modulorails::BaseService
69
69
  Rails.logger.error(e.backtrace&.join("\n"))
70
70
 
71
71
  # Return the error
72
- ErrorData.new(e.message, exception: e)
72
+ ::Modulorails::ErrorData.new(e.message, exception: e)
73
73
  end
74
74
 
75
75
  # Cast the date/datetime parameters to time with zones.
@@ -1,5 +1,5 @@
1
1
  module Modulorails
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
 
4
4
  # Useful to compare the current Ruby version
5
5
  COMPARABLE_RUBY_VERSION = Gem::Version.new(RUBY_VERSION)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulorails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Ciappara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  - !ruby/object:Gem::Version
243
243
  version: '0'
244
244
  requirements: []
245
- rubygems_version: 3.0.3
245
+ rubygems_version: 3.0.3.1
246
246
  signing_key:
247
247
  specification_version: 4
248
248
  summary: Common base for Ruby on Rails projects at Modulotech