tramway-user 2.1.3 → 2.1.3.4

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: 9c93a4759c90b60858ccb08d74a67a255627d082b918c5bd2a0c820330559109
4
- data.tar.gz: 1a955a0de07469bb8fe519e5f0c89bc2340f3998f789f0e63fc66f236d3da3c4
3
+ metadata.gz: 139cc090b24cda759d1b6cee9ab6be2b8df9e02f6ab998b1106e26d90e5fec4e
4
+ data.tar.gz: a093cbd6a01e0003796ff8164acfb71461fe26347faa4e627425febe8824ae4f
5
5
  SHA512:
6
- metadata.gz: 1f34a1205dc744cc9a52b9ff0f70c2cffb1ba0d61d7b83c59258e408729f35b00b907bebd566b1d8680cc9dea05d81bad6ea29c21a00896bb3462c74fc7bde94
7
- data.tar.gz: 1f577c0f97c2930fd46df20065dcc88f01e6d2add0523313905312019adfaaff37eada73e6cbd56327e262216f6f7bcff8398a91caa26642a959a21704b3d15e
6
+ metadata.gz: b1876918bf785a6f8b58bfc73aa7a94420a2de13b78d0a38a6cafaa0919a257ca36612fb7f96c21576b732a59f4860f62d3cd8bcdffef24a8ae24eea79886510
7
+ data.tar.gz: 27a3c4e4ac46c5aa2ca338434904e11c3381e6698fb78f7d894fa99c7917e0925394e1ff984d9760259928d4331eb570063d99ba8cf2338b2eae569ee29b3858
data/README.md CHANGED
@@ -26,6 +26,10 @@ $ gem install tramway-user
26
26
 
27
27
  `Tramway::User::User` has scope `admins` which returns all admins from the app.
28
28
 
29
+ ## Instructions
30
+
31
+ Edit roles for `Tramway::User::User` model - [doc](https://github.com/ulmic/tramway-dev/tree/develop/tramway#if-you-want-to-edit-roles-to-the-tramwayuseruser-class)
32
+
29
33
  ## Contributing
30
34
  Contribution directions go here.
31
35
 
@@ -16,16 +16,16 @@ class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
16
16
 
17
17
  if defined? Tramway::Conference
18
18
  def show_associations
19
- [ :social_networks ]
19
+ [:social_networks]
20
20
  end
21
21
  end
22
22
  end
23
23
 
24
24
  decorate_association :social_networks, as: :record if defined? Tramway::Conference
25
25
 
26
- delegate_attributes :first_name, :last_name, :email, :phone, :role, :created_at, :updated_at
26
+ delegate_attributes :first_name, :last_name, :email, :phone, :role, :created_at, :updated_at, :admin?
27
27
 
28
28
  def name
29
- "#{object.first_name} #{object.last_name}"
29
+ "#{object&.first_name} #{object&.last_name}"
30
30
  end
31
31
  end
@@ -5,7 +5,8 @@ class Admin::Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
5
5
 
6
6
  properties :email, :password, :first_name, :last_name, :role, :phone
7
7
 
8
- validates :email, email: true
8
+ # fix me
9
+ validates :email, email: true, uniqueness: true, on: :destroy unless model_class.columns_hash['project_id'].present?
9
10
 
10
11
  def initialize(object)
11
12
  super(object).tap do
@@ -2,7 +2,7 @@
2
2
 
3
3
  class Tramway::User::User < ::Tramway::Core::ApplicationRecord
4
4
  has_secure_password
5
-
5
+
6
6
  has_many :social_networks, as: :record, class_name: 'Tramway::Profiles::SocialNetwork' if defined? Tramway::Conference
7
7
 
8
8
  # FIXME: replace to tramway-admin
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module User
5
- VERSION = '2.1.3'
5
+ VERSION = '2.1.3.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,33 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-user
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.3.4
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-03-19 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.1.11
20
- - - ">="
20
+ - - "~>"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.1.11
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 3.1.11
30
- - - ">="
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.1.11
33
33
  - !ruby/object:Gem::Dependency
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.1.2
101
+ rubygems_version: 3.0.3.1
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Engine for users in your Rails app