Domain_Handler 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/domain_handler.rb +5 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d79a2dff9b9b2e938dd63a0b909a5d85cf01969c941f34500989b3b9b58e08e6
|
4
|
+
data.tar.gz: 725edf6b3c9f1edef09db3745c68345467d9e57d641d61d99113318583b232d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91e104080c6075c3da6ffa46c18de476bb87a606334710c5449fb5b747dccadb040479f48eb54b9cba2f47e1cb95b8c963b2eaea1735904da327039af5a405f5
|
7
|
+
data.tar.gz: 8d926133458a87e5fb33be4fea98688362a2702159baf83f1491d6c843d6a79c155cc9e79ac66cf9262268bfb5b364501972adb0cf5b61c7a219aee10f753ff7
|
data/lib/domain_handler.rb
CHANGED
@@ -76,20 +76,16 @@ class DomainHandler
|
|
76
76
|
database: ENV['DB_NAME'],
|
77
77
|
username: ENV['DB_USER'],
|
78
78
|
password: ENV['DB_PWD'],
|
79
|
-
host:
|
79
|
+
host: 'localhost',
|
80
80
|
adapter: ENV['DB_ADAPTER']
|
81
81
|
)
|
82
82
|
|
83
|
-
# Define your migration class
|
84
|
-
migration = CreateDomains.new
|
85
|
-
|
86
|
-
# Create an instance of your migration class
|
87
|
-
migration = CreateDomains.new
|
88
|
-
# Generate the migration file
|
89
83
|
timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S")
|
90
84
|
migration_file = "db/migrate/#{timestamp}_create_domains.rb"
|
91
|
-
|
92
|
-
generator.
|
85
|
+
# Use the MigrationGenerator class to generate the migration file
|
86
|
+
generator = Rails::Generators::MigrationGenerator.new(['create_domains'])
|
87
|
+
generator.create_migration_file(migration_file)
|
88
|
+
puts "Migration file generated: #{migration_file}"
|
93
89
|
end
|
94
90
|
end
|
95
91
|
|