active_outbox 0.0.5 → 0.0.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: 88b2644a74013b8c15f3ce2f4bb270cdb6603c19eba19221fe4cefa1bb0ac859
4
- data.tar.gz: 6ea80cb79adbe607ca93ca5710fce0a5b0fef1a22f24209811082b8ab7993261
3
+ metadata.gz: 02a042f881cb19c06477a5ef29a58f3a1b5ee799b554856300cf5cf19e730e4d
4
+ data.tar.gz: 11146bb605b2d5add3f114e5ffbb034a9e1593409bf955cb8d0ad2e2f2ef1dd7
5
5
  SHA512:
6
- metadata.gz: 6a5bce340343c741fd131938504c2040cdf130c6c8b0e989c2600744501e5ab57e248e373ddc6e16241d0d9967242d9885245b8a2a6252027a048bbede4175ae
7
- data.tar.gz: 3ae68085af021db07572b7d23b81c85b7e7a16f7c80e340e8fd3e1c68c3e0b37314ad1f4eefe37bc44bdf3b8b3f37329c31f83d76703896855ad211e8a0e2636
6
+ metadata.gz: 8dc7d8f525aae6dbe4d455c2708245e3ddc0407efe710085384a1f26f54fc40eff5628efaf641c7d65895756da19c3f0484765a28385adab681951120bd344e6
7
+ data.tar.gz: daf2da25f5013340d33bc50481a653f1c9f37099e0958f8f016137eeb2b37200d2d59856d74712729b5bb1f734c840383f21b09504854ed2a37c8913ccb2cd1c
@@ -8,10 +8,10 @@ class ActiveOutboxGenerator < ActiveRecord::Generators::Base
8
8
  include ActiveOutbox::AdapterHelper
9
9
  source_root File.expand_path('templates', __dir__)
10
10
 
11
- class_option :root_components_path, type: :string, default: Rails.root
11
+ class_option :root_components_path, type: :string
12
12
 
13
13
  def create_migration_files
14
- migration_path = "#{options['root_components_path']}/db/migrate"
14
+ migration_path = "#{root_path}/db/migrate"
15
15
  migration_template(
16
16
  'migration.rb',
17
17
  "#{migration_path}/outbox_create_#{table_name}.rb",
@@ -19,6 +19,10 @@ class ActiveOutboxGenerator < ActiveRecord::Generators::Base
19
19
  )
20
20
  end
21
21
 
22
+ def root_path
23
+ options['root_components_path'] || Rails.root
24
+ end
25
+
22
26
  def migration_version
23
27
  "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
24
28
  end
@@ -3,11 +3,11 @@
3
3
  class OutboxCreate<%= table_name.camelize.singularize %> < ActiveRecord::Migration<%= migration_version %>
4
4
  def change
5
5
  create_table :<%= table_name %> do |t|
6
- t.<%= uuid_type %> :identifier, null: false, index: { unique: true }
6
+ t.<%= ActiveOutbox::AdapterHelper.uuid_type %> :identifier, null: false, index: { unique: true }
7
7
  t.string :event, null: false
8
- t.<%= json_type %> :payload
8
+ t.<%= ActiveOutbox::AdapterHelper.json_type %> :payload
9
9
  t.string :aggregate, null: false
10
- t.<%= uuid_type %> :aggregate_identifier, null: false, index: true
10
+ t.<%= ActiveOutbox::AdapterHelper.uuid_type %> :aggregate_identifier, null: false, index: true
11
11
 
12
12
  t.timestamps
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Aguirre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-24 00:00:00.000000000 Z
11
+ date: 2023-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable