sideralclient 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec1dc0bd89711102e112938fcb74ca1c6be035fe
4
- data.tar.gz: e4677ed9ddff8c8c21afa0db779cec0dfd1717b6
3
+ metadata.gz: eb3cb9e3d23329fbd7f132eded1a6f12b94d87ee
4
+ data.tar.gz: a4c42b5fc350134ead7246f15b65928fd7e994aa
5
5
  SHA512:
6
- metadata.gz: 45959c93b16a2c60eb2a8982f108a323642d08d36c2e67842a2d064558fe34302ea47b4d054daea624ffb92c873e4780cc9816e74d2a0eee8b9a12aa61644f28
7
- data.tar.gz: 9108290acbd88b4baaffadea5c7e40a7f74651659f42033df491bc8a4fbea3549d1ebe043da4af1cfcfe79ecb8c35afa9aa3d5dd355bb89ec26570ca0afaa11f
6
+ metadata.gz: 52a9b8187bc51771de79207982f8c64b7d5a15e11e961d72398640addee92dbc55fdac6cd92d45764b9eafd6af35b58e12af5fd40ef06d34759ce88c2d1e83b2
7
+ data.tar.gz: 98f7532c4d24bea646926aaf559d07d772c72577a4458d11afa066f5e099a6b93adfa22633303cdf7ab11b0d20dfc017abc180e839fa08688a14f50ce143bf39
@@ -0,0 +1,24 @@
1
+ class CreateClientProfiles < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :client_profiles do |t|
4
+ t.string :first_name, null: false
5
+ t.string :last_name, null: false
6
+ t.string :phone
7
+ t.string :email, null: false
8
+ t.string :address
9
+ t.string :document, null: false
10
+ t.string :document_type, null: false
11
+ t.date :birthday
12
+ t.boolean :active, null: false, default: true
13
+ t.string :country, null: false, default: "Argentina"
14
+ t.string :city
15
+ t.string :locality
16
+ t.string :iva_category, null: false, default: "Responsable Monotributo"
17
+
18
+ t.timestamps
19
+ end
20
+
21
+ add_index :client_profiles, :email, unique: true
22
+ add_index :client_profiles, :document, unique: true
23
+ end
24
+ end
@@ -0,0 +1,18 @@
1
+ class ProfileGenerator < Rails::Generators::Base
2
+ include Rails::Generators::Migration
3
+ source_root File.expand_path('../templates', __FILE__)
4
+ desc "add the migrations"
5
+
6
+ def self.next_migration_number(path)
7
+ unless @prev_migration_nr
8
+ @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
9
+ else
10
+ @prev_migration_nr += 1
11
+ end
12
+ @prev_migration_nr.to_s
13
+ end
14
+
15
+ def copy_migrations
16
+ migration_template "create_client_profile.rb", "db/migrate/create_client_profile.rb"
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sideralclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez
@@ -127,6 +127,8 @@ files:
127
127
  - lib/client.rb
128
128
  - lib/client/engine.rb
129
129
  - lib/client/version.rb
130
+ - lib/generators/db/create_client_profiles.rb
131
+ - lib/generators/profile_generator.rb
130
132
  - lib/tasks/client_tasks.rake
131
133
  homepage: https://www.desideral.com
132
134
  licenses: