granite 0.17.0 → 0.17.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: e7386ad6c830bf8d1ad241d61df3d6436983973a44d3b978fa86f03cec964e44
4
- data.tar.gz: 738e3d71934a7a71fe93f3822f29ef112f858c76e75b8f59cf93ce6531e5cd58
3
+ metadata.gz: 9e0ea5a4829a8f42ea8d86fa3ad0c8ae3e0e15bf4b0b92824b2268bc4be9489b
4
+ data.tar.gz: a40be02b1b8cef2bfa329c1f33415b78142d497a9d20f10d4ae7b3adc060bdf5
5
5
  SHA512:
6
- metadata.gz: dea9877020857c853c04ca9a45e6efdfe0cc0be98a451e450cb0bf2ecc0631eb2387f68d5324bad1280ff2c3cb2ae2f8d17a61f56a5e3c7016d1d47ef02766ea
7
- data.tar.gz: ad643c6e20ac1e0ff1369d7090fdd767ede22401ac35e0f2bc16d9b5697572f51eefa3621490ba8c5aba360db7655b4a959fabab734521259433d472916ffdb8
6
+ metadata.gz: 37d3fe242ac9ea96ec2b4bf4aa8f55e97086a12634600e3d474558319a143cbe0a718bbd1f76a77514a9ca98fac39c0ae39439ede746ead6a8c08f3ec2e85b1e
7
+ data.tar.gz: 34a452491cc98a5c650ffb513684e5f8ab1dd12407cddaadcc7a3905ece4eaab5dc40c27ab93ee99ae3f55381ebee9f510abf8a31e2d3d1d9929ab695b743aeb
@@ -2,13 +2,13 @@ module Granite
2
2
  class Action
3
3
  class SubjectNotFoundError < ArgumentError
4
4
  def initialize(action_class)
5
- super "Unable to initialize #{action_class} without subject provided"
5
+ super("Unable to initialize #{action_class} without subject provided")
6
6
  end
7
7
  end
8
8
 
9
9
  class SubjectTypeMismatchError < ArgumentError
10
10
  def initialize(action_class, candidate, expected)
11
- super "Unable to initialize #{action_class} with #{candidate} as subject, expecting instance of #{expected}"
11
+ super("Unable to initialize #{action_class} with #{candidate} as subject, expecting instance of #{expected}")
12
12
  end
13
13
  end
14
14
 
@@ -48,7 +48,7 @@ module Granite
48
48
  subject_attributes = extract_subject_attributes!(attributes, reflection)
49
49
  assign_subject(args, subject_attributes, reflection)
50
50
 
51
- super attributes
51
+ super(attributes)
52
52
  end
53
53
 
54
54
  private
@@ -13,21 +13,21 @@ module Granite
13
13
  def run_callbacks(event)
14
14
  if event.to_s == 'commit'
15
15
  begin
16
- super event
16
+ super(event)
17
17
  rescue *handled_exceptions => e
18
18
  handle_exception(e)
19
19
  end
20
20
  else
21
- super event
21
+ super(event)
22
22
  end
23
23
  end
24
24
 
25
25
  private
26
26
 
27
- attr_accessor :in_transaction
27
+ attr_accessor :granite_in_transaction
28
28
 
29
29
  def transaction(&block)
30
- if in_transaction
30
+ if granite_in_transaction
31
31
  yield
32
32
  else
33
33
  run_in_transaction(&block)
@@ -35,14 +35,14 @@ module Granite
35
35
  end
36
36
 
37
37
  def run_in_transaction
38
- self.in_transaction = true
38
+ self.granite_in_transaction = true
39
39
 
40
40
  TransactionManager.transaction do
41
41
  TransactionManager.after_commit(self)
42
42
  yield
43
43
  end
44
44
  ensure
45
- self.in_transaction = false
45
+ self.granite_in_transaction = false
46
46
  end
47
47
  end
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module Granite
2
- VERSION = '0.17.0'.freeze
2
+ VERSION = '0.17.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: granite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toptal Engineering
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2024-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -134,20 +134,6 @@ dependencies:
134
134
  - - ">="
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
- - !ruby/object:Gem::Dependency
138
- name: capybara
139
- requirement: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: '2.18'
144
- type: :development
145
- prerelease: false
146
- version_requirements: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - "~>"
149
- - !ruby/object:Gem::Version
150
- version: '2.18'
151
137
  - !ruby/object:Gem::Dependency
152
138
  name: fuubar
153
139
  requirement: !ruby/object:Gem::Requirement
@@ -252,14 +238,14 @@ dependencies:
252
238
  requirements:
253
239
  - - "~>"
254
240
  - !ruby/object:Gem::Version
255
- version: '5.0'
241
+ version: '6.0'
256
242
  type: :development
257
243
  prerelease: false
258
244
  version_requirements: !ruby/object:Gem::Requirement
259
245
  requirements:
260
246
  - - "~>"
261
247
  - !ruby/object:Gem::Version
262
- version: '5.0'
248
+ version: '6.0'
263
249
  - !ruby/object:Gem::Dependency
264
250
  name: rspec_junit_formatter
265
251
  requirement: !ruby/object:Gem::Requirement
@@ -330,8 +316,8 @@ dependencies:
330
316
  - - "~>"
331
317
  - !ruby/object:Gem::Version
332
318
  version: '0.15'
333
- description:
334
- email:
319
+ description:
320
+ email:
335
321
  executables: []
336
322
  extensions: []
337
323
  extra_rdoc_files: []
@@ -407,7 +393,7 @@ homepage: https://github.com/toptal/granite
407
393
  licenses:
408
394
  - MIT
409
395
  metadata: {}
410
- post_install_message:
396
+ post_install_message:
411
397
  rdoc_options: []
412
398
  require_paths:
413
399
  - lib
@@ -422,8 +408,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
422
408
  - !ruby/object:Gem::Version
423
409
  version: '0'
424
410
  requirements: []
425
- rubygems_version: 3.4.6
426
- signing_key:
411
+ rubygems_version: 3.1.6
412
+ signing_key:
427
413
  specification_version: 4
428
414
  summary: Another business actions architecture for Rails apps
429
415
  test_files: []