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 +4 -4
- data/app/decorators/tramway/user/user_decorator.rb +2 -3
- data/app/forms/admin/tramway/user/user_form.rb +2 -1
- data/lib/tramway/user/generators/install_generator.rb +8 -1
- data/lib/tramway/user/generators/templates/add_phone_to_tramway_user_users.rb +5 -0
- data/lib/tramway/user/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c4c3e4491f8bf09b03dd8e7d8e8f42c818aa4a89f515e0f8b640bf797986632
|
4
|
+
data.tar.gz: 53d0883e613a9031541734c47006a3ae108598742137d7004ab84a99dd6c7844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/tramway/user/version.rb
CHANGED
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.
|
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
|
+
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
|