Domain_Handler 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/domain_handler.rb +4 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ee540d8829e90f5e28a6917814d4a65b3a3c9c314da41e954c884a712b8f36a
4
- data.tar.gz: d69547f34418e1d857e26c28873779ae791a61276564ce4b667be001122a3c12
3
+ metadata.gz: b2288d19503f34db2e033f33a9222e8801266819b48dfdedd9ce275cc10f7cf0
4
+ data.tar.gz: 95e1181df5de19cd4b44c759b4511df189145bde4a90ad29b3310279a3613489
5
5
  SHA512:
6
- metadata.gz: 5959e0dfbb15b79924e83fb73d8a00430da87683ebf28952382677c374b568aa04bac8e4412caa567d182c84b5ac3d02823c0792e7ccc8fcc99760add609677f
7
- data.tar.gz: ce2dff122fa0d4a3ce0b989ad44ac1ed3d1a5928850f45aa2c790788d09d431486c5ac33860cad4f4e3481a71573beeb4025d59a1be503dbcc53df69b7d202cb
6
+ metadata.gz: bb354e63e7ff8001f9681dbf55c1900032608332deb9d21d280e36a2157efe8ba0ed75eb6c025e9c74edb51ef833f5b3f938313648b956810b723a6ca2c4e84c
7
+ data.tar.gz: 1b357125d933a46e0a2d47fc9869f0195f77a0d9c40ec765c5ba0925af291e76b5da840eaae1cd44ed0143ac96f2c716bf11a250be59f9ab8a23aa1ada0f126e
@@ -82,12 +82,11 @@ class DomainHandler
82
82
 
83
83
  timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S")
84
84
  migration_file = "db/migrate/#{timestamp}_create_domains.rb"
85
- # Use the MigrationGenerator class to generate the migration file
86
- Rails::Generators.invoke('active_record:migration', ['create_domains'], behavior: :invoke, destination_root: Rails.root)
87
85
 
88
- # generator = Rails::Generators.invoke('active_record:migration', ['create_domains'], destination_root: Rails.root)
89
- # generator.invoke_all
90
- # generator.write_migration(migration_file)
86
+ migration_context = ActiveRecord::MigrationContext.new("db/migrate")
87
+
88
+ # Generate the migration file using the create_table method
89
+ migration_context.migrate("CreateDomains", nil, target_version: nil)
91
90
  end
92
91
  end
93
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Domain_Handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arun Sahu