active_outbox 0.0.4 → 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: 1b6c2d51498f61533b935cb0d210cbed4c6159eeee4ae9d142e08564c43a7362
4
- data.tar.gz: f12ce116296edaf0100e39e927b3a264fac24cc8c66f778a49a7b5ebe2b008fe
3
+ metadata.gz: 02a042f881cb19c06477a5ef29a58f3a1b5ee799b554856300cf5cf19e730e4d
4
+ data.tar.gz: 11146bb605b2d5add3f114e5ffbb034a9e1593409bf955cb8d0ad2e2f2ef1dd7
5
5
  SHA512:
6
- metadata.gz: 5b0583688cda8d0a641e3ff22624d6ae11976bd664a35ff393bd6fa5b1afe4206acda7bb1f9e6cd66b6c0cd6bde77d5ab57920c5ce07be40425f652571ea9fc1
7
- data.tar.gz: 252a0cea22365fdb05527ce7fbe9dd59c63e8560cb6d655d07b81e26f4b95af25b424e8d0f28fe5ae9611731a30c980d44c11145450f8501479b96a82ae3c225
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.4
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-23 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
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '6.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '6.1'
41
41
  description: