active_transaction 0.1.0 → 0.1.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: e767cc2869f3db483bb789eab508d6ff68c453954995bbdcd2798bff02fafea7
4
- data.tar.gz: 2cb557eb10a6c11ca3a22b7860260285beb11707fcdac108fb6d4069ad8ffa0e
3
+ metadata.gz: a16cca2503e2bb8c8428d116a5397782eaeb80836dddc6c18745f2ee7dca9697
4
+ data.tar.gz: 57a52045ec0e8acee9d94204dde41b869b62e0c170f3fac666836be0343db22f
5
5
  SHA512:
6
- metadata.gz: 61288b022ea4dd2eca8ebb617dd14707a25a4925635ce727f30c416a2508447ad93e91470ce8e640f9823ae66999014b5fcc04aa44e2d37d93ccf68deb813f85
7
- data.tar.gz: e402334e95a2a9766e51cee1d45e2d92f2e19d37345bf2f040419ed252ba332841a0832205ee21833ef9882e1fb80c6a1084ad13f91e82140d3fa0cfb4355a16
6
+ metadata.gz: 56ce74aadd5caf625d3c29e489c3a7a0bea5efeb63cc88cc9e00516c1bdb82f7ef4795d2b56cfa9101a86b649bd44928e0a387edf12b6f2a5af88349267fdcc1
7
+ data.tar.gz: 12d745ead7612a8161fc3affa71d66bfe2d756ee85a7ffe130e8f2815779cf3a7e452c4df30ad8953b79d81d19dc9d9c2d31cd3c040c0675c005c18493719e1e
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveTransaction
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module <%= class_name %>
4
- class <%= file_name.camelize %>Contract < ActiveTransaction::ApplicationContract
5
- params do
6
- <% fields.each do |field| %>
7
- <% params = field.split(':') %>
8
- <% if params[1] == 'optional' %>
9
- optional(:<%= params[0] %>).maybe(:<%= params[2] %>)
3
+ class <%= class_name %>Contract < ActiveTransaction::ApplicationContract
4
+ params do
5
+ <% fields.each do |field| %>
6
+ <% params = field.split(':') %>
7
+ <% if params[1] == 'optional' %>
8
+ optional(:<%= params[0] %>).maybe(:<%= params[2] %>)
10
9
  <% else %>
11
- required(:<%= params[0] %>).filled(:<%= params[1] %>)
12
- <% end %>
13
- <% end %>
14
- end
10
+ required(:<%= params[0] %>).filled(:<%= params[1] %>)
11
+ <% end %>
12
+ <% end %>
15
13
  end
16
- end
14
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  require 'rails_helper'
4
4
 
5
- RSpec.describe <%= class_name %>::<%= file_name.camelize %>Contract, type: :contract do
5
+ RSpec.describe <%= class_name %>Contract, type: :contract do
6
6
  # Add your tests here
7
7
  end
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module <%= class_name %>
4
- class <%= file_name.camelize %> < ActiveTransaction::ApplicationTransaction
5
- <% steps.each do |step| %>
6
- step :<%= step %>
3
+ class <%= class_name %>Transaction < ActiveTransaction::ApplicationTransaction
4
+ <% steps.each do |step| %>
5
+ step : <%= step %>
7
6
  <% end %>
8
7
 
9
8
  private
10
9
 
11
10
  <% steps.each do |step| %>
12
- def <%= step %>(input)
13
- end
14
- <% end %>
15
- end
16
- end
11
+
12
+ def <%= step %>(input); end
13
+ <% end %>
14
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  require 'rails_helper'
4
4
 
5
- RSpec.describe <%= class_name %>::<%= file_name.camelize %>, type: :transaction do
5
+ RSpec.describe <%= class_name %>Transaction, type: :transaction do
6
6
  # Add your tests here
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_transaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aram
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-23 00:00:00.000000000 Z
11
+ date: 2024-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-transaction