simple_action 2.0.4 → 2.0.5

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: 944f2bbe219621c486d4b86b702e34f39596b25fc1c883cd81e23874b7d0c10a
4
- data.tar.gz: d18fc7220fef77f9c4fab2b2d3d616154e2bbd4061b2d0a344566b275693eb44
3
+ metadata.gz: 251fe5dd84800b8479a11280c5f70e9c9307e307c8ca7e0039f44c62d7a7c0da
4
+ data.tar.gz: 805924d30301d49f594d9c991512142c98a8c4a54612d155641745384d9f0551
5
5
  SHA512:
6
- metadata.gz: 9644cdc6d8a5be7a8abf5ad304836f5a22660352ce76ce244d141da6e1ce2b737f698bd217e7eaeb3f1364544feec35ce3dee0bde6ed79b2469494d52f1878a5
7
- data.tar.gz: 3864e69ac24ee0749d7666bbd24b44d02437d118ec8fe7540e7a5162ea1b31a1eeb5f97cca02d5dc922d2d764cc79207b46903b514b6ae47d6e9308dd6694f54
6
+ metadata.gz: 103e62593fd15e4a0418854928ae581e51df5842e112c8959854a1f9d11c5c70d45e1573b2574f19d917d7da677000c2bf7697776bdaf3a2e06a35b03ffe47c1
7
+ data.tar.gz: f1d78302fe40ed31f856daf3daf392266f6237825698cf525f678bed965e115c79789c489c0c42b84586187d3c5bada337b036d4aa282b4bbac92063fa92da21
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_action (2.0.3)
4
+ simple_action (2.0.4)
5
5
  simple_params
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -107,6 +107,14 @@ params.dog.name #=> "Bailey"
107
107
  params.dog.breed #=> "Shiba Inu"
108
108
  ```
109
109
 
110
+ # Using Transactions
111
+
112
+ By default, SimpleAction via SimpleParams will run the `execute` method inside of an ActiveRecord transaction. You can modify this setting inside an initializer file.
113
+
114
+ ```ruby
115
+ SimpleAction::Service.transaction = false
116
+ ```
117
+
110
118
  # ApiPie Documentation
111
119
 
112
120
  If your project is using [apipie-rails](http://example.com/ "apipie-rails"),
@@ -32,9 +32,13 @@ module SimpleAction
32
32
  end
33
33
  end
34
34
 
35
+ def transaction=(bool)
36
+ @transaction = !!bool
37
+ end
38
+
35
39
  # @return [Boolean]
36
40
  def transaction?
37
- true
41
+ defined?(@transaction) ? @transaction : true
38
42
  end
39
43
 
40
44
  # @return [Hash]
@@ -42,4 +46,4 @@ module SimpleAction
42
46
  {}
43
47
  end
44
48
  end
45
- end
49
+ end
@@ -1,3 +1,3 @@
1
1
  module SimpleAction
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_action
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - brycesenz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-19 00:00:00.000000000 Z
11
+ date: 2021-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_params
@@ -140,7 +140,7 @@ homepage: https://github.com/brycesenz/simple_action
140
140
  licenses:
141
141
  - MIT
142
142
  metadata: {}
143
- post_install_message:
143
+ post_install_message:
144
144
  rdoc_options: []
145
145
  require_paths:
146
146
  - lib
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubygems_version: 3.0.0
159
- signing_key:
159
+ signing_key:
160
160
  specification_version: 4
161
161
  summary: A DSL for specifying services objects, including parameters and execution
162
162
  test_files: