tramway-user 2.1.1.1 → 2.1.2

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: 89ee85c0e82aa23acc0d9cd7489e1e020cee17de41b1265067b55ce5928ee4d0
4
- data.tar.gz: a06bd67135f261c74fb0204735eca4b2dfb1d8fce8478c83c61f43e4e8b3c617
3
+ metadata.gz: 4c4c3e4491f8bf09b03dd8e7d8e8f42c818aa4a89f515e0f8b640bf797986632
4
+ data.tar.gz: 53d0883e613a9031541734c47006a3ae108598742137d7004ab84a99dd6c7844
5
5
  SHA512:
6
- metadata.gz: 0135baa0941a9f219ca28442330bea94216345b85a04f89ff8bd61c95d56ce6474cb4c87d8cdd853eba449645037a6dcb1a870e734d52a3e3bc530e5614cca7d
7
- data.tar.gz: 1b98f8a741edaf60043d0037d148a7d91ccabda861f247fd618cf4c5ca8031aa8bc8483b43e28a153a2f64d2e956d51a6a40878c86e3ed25585d242e1058942a
6
+ metadata.gz: 46c1aca9f8b97823e7439e5aaffe5fdc146577d39cec30b659270887189bbae6c0484028d8b0887be1598330b3ea555b706208c3620eed0b8a110a034adc81c0
7
+ data.tar.gz: ea30de2a287014f22da83aaba388f8de43acefc6b7cfe176f4ac6ecbb040a13863e2972b1fa17f182988f6eb3990a90325e95d496b3ab068f2a6bb32f713ed6a
@@ -11,13 +11,14 @@ class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
11
11
  end
12
12
 
13
13
  def show_attributes
14
- [:email, :first_name, :last_name, :role, :created_at, :updated_at]
14
+ [:email, :first_name, :last_name, :phone, :role, :created_at, :updated_at]
15
15
  end
16
16
  end
17
17
 
18
18
  delegate :first_name, to: :object
19
19
  delegate :last_name, to: :object
20
20
  delegate :email, to: :object
21
+ delegate :phone, to: :object
21
22
  delegate :role, to: :object
22
23
  delegate :created_at, to: :object
23
24
  delegate :updated_at, to: :object
@@ -25,6 +26,4 @@ class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
25
26
  def name
26
27
  "#{object.first_name} #{object.last_name}"
27
28
  end
28
-
29
- delegate :email, to: :object
30
29
  end
@@ -3,7 +3,7 @@
3
3
  class Admin::Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
4
4
  self.model_class = Tramway::User::User
5
5
 
6
- properties :email, :password, :first_name, :last_name, :role
6
+ properties :email, :password, :first_name, :last_name, :role, :phone
7
7
 
8
8
  validates :email, email: true
9
9
 
@@ -13,6 +13,7 @@ class Admin::Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
13
13
  password: :string,
14
14
  first_name: :string,
15
15
  last_name: :string,
16
+ phone: :string,
16
17
  role: :default
17
18
  end
18
19
  end
@@ -20,7 +20,14 @@ module Tramway::User::Generators
20
20
  end
21
21
 
22
22
  def copy_migrations
23
- migration_template 'create_tramway_user_users.rb', 'db/migrate/create_tramway_user_users.rb'
23
+ migrations = %i[
24
+ create_tramway_user_users
25
+ add_phone_to_tramway_user_users
26
+ ]
27
+
28
+ migrations.each do |migration|
29
+ migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
30
+ end
24
31
  end
25
32
  end
26
33
  end
@@ -0,0 +1,5 @@
1
+ class AddPhoneToTramwayUserUsers < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :tramway_user_users, :phone, :text
4
+ end
5
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module User
5
- VERSION = '2.1.1.1'
5
+ VERSION = '2.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-user
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt
@@ -75,6 +75,7 @@ files:
75
75
  - lib/tramway/user.rb
76
76
  - lib/tramway/user/engine.rb
77
77
  - lib/tramway/user/generators/install_generator.rb
78
+ - lib/tramway/user/generators/templates/add_phone_to_tramway_user_users.rb
78
79
  - lib/tramway/user/generators/templates/create_tramway_user_users.rb
79
80
  - lib/tramway/user/generators/templates/tramway_user.rb
80
81
  - lib/tramway/user/version.rb