Domain_Handler 0.0.0 → 0.0.1

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: bb08676edffe0c9c0528486f6fd5f102389a13839bd375c043f2148cb8d13e17
4
- data.tar.gz: 74702588f5958e59af985cfe05656f73e9f720f6ea9c7b24ac5298b1652c9cd5
3
+ metadata.gz: 118d9b9fd6dfc24c510ef78d185138a3d87affd24cbef2ab5a3174672a3f434c
4
+ data.tar.gz: f2dbd5c0300d417dcb0e6d90de1822edc8c8acb5c6a864846186569c9da80c95
5
5
  SHA512:
6
- metadata.gz: 63a663239cf426653c17cb94d15a40fd7d4c3dd17885441701a95058a096c96e10109300f9967ce16035ce5d7db64a630844c0a61dec39deb2b4d9ee2c7bbf0f
7
- data.tar.gz: 0cff9f77e4ba719dce03d9a71730a276571f56e39f5ac692e9a4572fbc59c18ef991221e0cd03c37581249863538ddf8a7d591995b4ae1259da9fbe5aba9b1b3
6
+ metadata.gz: ddf90a91373f337e7d18e13824b4912d278299c50bfa8f2f99cbeaeb7162ce090e6b05bb3ad8d832213f69493834ed5b030330527849e754590392ef76414b00
7
+ data.tar.gz: 87bdc742f1f1bf05b806fb4acbe3c673e8cdd798c612a5125c8daa6306b59a351ad89fb1914eaa51e8e0d70ed4088c78b2e67f7d4f989b2bcb543beee4606a73
@@ -0,0 +1,13 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module DomainHandler
4
+ module Generators
5
+ class CreateDomainGenerator < ActiveRecord::Generators::Base
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ def create_migration_file
9
+ migration_template 'create_domain.rb', 'db/migrate/create_domain.rb'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ class CreateDomains < ActiveRecord::Migration[6.1]
2
+ def change
3
+ create_table :domains, id: false, primary_key: :domain_id do |t|
4
+ t.references :shop, foreign_key: true
5
+ t.string :host, null: false, default: ''
6
+ t.string :localization
7
+ t.string :market_web_presence
8
+ t.boolean :ssl_enabled, null: false
9
+ t.string :url
10
+ t.string :domain_id
11
+
12
+ # You probably would want `domain_id` to be unique. In that case...
13
+ t.index :domain_id, unique: true
14
+ t.timestamps
15
+ end
16
+ end
17
+ end
18
+
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.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arun Sahu
@@ -31,6 +31,8 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/domain_handler.rb
34
+ - lib/generators/doamin_handler/migration/tempates/create_domain_generator.rb
35
+ - lib/generators/doamin_handler/migration/tempates/create_domain_table.rb
34
36
  homepage: https://rubygems.org/gems/hola
35
37
  licenses:
36
38
  - MIT