symphonia 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/symphonia/user.rb +5 -0
- data/app/views/symphonia/accounts/_form.html.erb +4 -2
- data/lib/symphonia/version.rb +1 -1
- data/spec/models/user_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcbc8cd072e8954ef37d0d33d6e496f2c6bf0a3d7c248ac6d91597962efd5f7f
|
4
|
+
data.tar.gz: 7e6723dc2fada4ac259d8d9c940b6316c0f484b303e9cbcb310ec882744a1112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e3c9d3d7d059afa8bcb300b7416b10c7b1d084b3a367f1c8d272a4967831bb16812a2aca71edd78e0d88617f87993cf8d1a96bec5db72687c16d19d204e939d
|
7
|
+
data.tar.gz: 7e653165f5f73e584899aba6b4a92b3cb7ee03f5bb42d43e2c186e39cd38308f9abe86639efca96cd7998669bd1f77f9346f3d6fb87ae4c24d0c79dcd33d970c
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<div class="row">
|
2
|
-
<!-- <div class="col-xs-12 col-sm-6 col-md-3"><%#= f.text_field :login, required: true %></div>-->
|
2
|
+
<!-- <div class="col-xs-12 col-sm-6 col-md-3"><%#= f.text_field :login, required: true %></div>-->
|
3
3
|
<div class="col-xs-12 col-sm-6 col-md-3"><%= f.email_field :mail, required: true %></div>
|
4
4
|
<div class="col-xs-12 col-sm-6 col-md-3"><%= f.text_field :first_name, required: true %></div>
|
5
5
|
<div class="col-xs-12 col-sm-6 col-md-3"><%= f.text_field :last_name, required: true %></div>
|
6
|
-
|
6
|
+
<% if f.object.external_id.blank? %>
|
7
|
+
<div class="col-xs-12 col-sm-6 col-md-3"><%= f.password_field :password, required: f.object.new_record?, prepend: icon('key') %></div>
|
8
|
+
<% end %>
|
7
9
|
</div>
|
data/lib/symphonia/version.rb
CHANGED
data/spec/models/user_spec.rb
CHANGED
@@ -13,4 +13,15 @@ RSpec.describe Symphonia::User do
|
|
13
13
|
expect(subject.first_name).to eq "Tata"
|
14
14
|
expect(subject.last_name).to eq "smoula"
|
15
15
|
end
|
16
|
+
|
17
|
+
|
18
|
+
describe "#required_password" do
|
19
|
+
it "require password for internal" do
|
20
|
+
expect { FactoryBot.create(:user, password: nil) }.to raise_error ActiveRecord::RecordInvalid
|
21
|
+
end
|
22
|
+
it "do not require password for external_ids" do
|
23
|
+
expect { FactoryBot.create(:user, password: nil, external_id: "ex1") }.not_to raise_error ActiveRecord::RecordInvalid
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
16
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symphonia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Pokorny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|