active_transaction 0.1.0 → 0.1.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: e767cc2869f3db483bb789eab508d6ff68c453954995bbdcd2798bff02fafea7
4
- data.tar.gz: 2cb557eb10a6c11ca3a22b7860260285beb11707fcdac108fb6d4069ad8ffa0e
3
+ metadata.gz: 630c7d1cc5b8674ad0e5525210dd396a96573e5d99a73255acfec94f55e0c26f
4
+ data.tar.gz: e282ac6b745de4b84011f548221545af7430a404e44bd9d2ee56af6f54dc6a62
5
5
  SHA512:
6
- metadata.gz: 61288b022ea4dd2eca8ebb617dd14707a25a4925635ce727f30c416a2508447ad93e91470ce8e640f9823ae66999014b5fcc04aa44e2d37d93ccf68deb813f85
7
- data.tar.gz: e402334e95a2a9766e51cee1d45e2d92f2e19d37345bf2f040419ed252ba332841a0832205ee21833ef9882e1fb80c6a1084ad13f91e82140d3fa0cfb4355a16
6
+ metadata.gz: 1ff12d7ba2b5f7c278151face5c015beeffa684b7e1c19812e1d1b7fc6203f30b35a681e38af8077c7e982e9c57d705ceadac01cc4dd10bb764014b873bb9191
7
+ data.tar.gz: 67049e727d4c8654f45a925ac096d38d804e3c7dc656ed61a46f097ce77b759c31947f90237ea2467f4bfd41edc1e43a13abf6af53d9db7426955527cc209e6f
@@ -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.2"
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] || 'string' %>)
10
9
  <% else %>
11
- required(:<%= params[0] %>).filled(:<%= params[1] %>)
12
- <% end %>
13
- <% end %>
14
- end
10
+ required(:<%= params[0] %>).filled(:<%= params[1] || 'string' %>)
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.2
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