formify 0.23.5 → 0.23.6

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: a36b101d0bce77f4ebfd5c9d3a91b00db23bc5b0e30e3191f2276c884a08a014
4
- data.tar.gz: 31312b0d1d3e387345995805702c404c0ea5299b5975193931195264281719f8
3
+ metadata.gz: be446cfe7d7bcc02e877464ab52153e2824bc3f2fc34c3954a2ba6cf28263163
4
+ data.tar.gz: 9764f9e092f37500c57afacfb009284dc58f84b42d30abb3d6ad31448ed4019f
5
5
  SHA512:
6
- metadata.gz: cf0666340b1c3c186c07df6daa1a01b1842a94a0c7c3620967bc5471a3eebc8b71fabf781d2d9524d1134235f95c0ab7dad47cd15b27765dc926525ccc03fbce
7
- data.tar.gz: 1df7f02c3e0ce664128fa0ff89cac23e6fbc47b8748a7e2ea268fe1d5dbc15a3f12cb9a8eb26420ccf95a63f08465c5468c75ccc1678e62a3c1a6c77f947b051
6
+ metadata.gz: 839336f05b09b7b4831405ea32217276603df7d3fdf055a3220db06f25d3796576cc41639a47a7130f5e91e291585241e147b8e01cd5da7aedf691be42c86750
7
+ data.tar.gz: ff3c76d007e9f4aea98c9001455f710a20247a96b6073c61a16f2757f43be6add69fd2ee82f2b9dc9c9eaf2282befaacb198fee5276107058259f5bc81e2f5b9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- formify (0.23.5)
4
+ formify (0.23.6)
5
5
  rails
6
6
  resonad
7
7
  with_advisory_lock
@@ -125,7 +125,7 @@ GEM
125
125
  method_source
126
126
  rake (>= 0.8.7)
127
127
  thor (>= 0.20.3, < 2.0)
128
- rake (10.5.0)
128
+ rake (13.0.1)
129
129
  resonad (1.2.0)
130
130
  rspec (3.8.0)
131
131
  rspec-core (~> 3.8.0)
@@ -173,7 +173,7 @@ DEPENDENCIES
173
173
  bundler (~> 2.0)
174
174
  coveralls
175
175
  formify!
176
- rake (~> 10.0)
176
+ rake (~> 13.0)
177
177
  rspec (~> 3.0)
178
178
 
179
179
  BUNDLED WITH
data/formify.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 2.0'
26
26
  spec.add_development_dependency 'coveralls', '>= 0'
27
- spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rake', '~> 13.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.0'
29
29
  spec.add_runtime_dependency 'rails'
30
30
  spec.add_runtime_dependency 'resonad'
data/lib/formify/form.rb CHANGED
@@ -112,19 +112,23 @@ module Formify
112
112
  end
113
113
 
114
114
  def with_advisory_lock_transaction(*keys)
115
- with_advisory_lock_transaction_result = Resonad.Failure
116
-
117
115
  with_advisory_lock(*keys, transaction: true) do
118
- ActiveRecord::Base.transaction do
119
- with_advisory_lock_transaction_result = begin
120
- yield
121
- end
116
+ with_transaction { yield }
117
+ end
118
+ end
122
119
 
123
- raise ActiveRecord::Rollback if with_advisory_lock_transaction_result.failure?
120
+ def with_transaction
121
+ with_transaction_result = Resonad.Failure
122
+
123
+ ActiveRecord::Base.transaction do
124
+ with_transaction_result = begin
125
+ yield
124
126
  end
127
+
128
+ raise ActiveRecord::Rollback if with_transaction_result.failure?
125
129
  end
126
130
 
127
- with_advisory_lock_transaction_result
131
+ with_transaction_result
128
132
  end
129
133
  end
130
134
 
@@ -1,3 +1,3 @@
1
1
  module Formify
2
- VERSION = '0.23.5'.freeze
2
+ VERSION = '0.23.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.5
4
+ version: 0.23.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-22 00:00:00.000000000 Z
11
+ date: 2020-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement