dorsale 3.8.0 → 3.8.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/app/models/dorsale/customer_vault/event.rb +3 -2
- data/app/views/dorsale/customer_vault/events/_form.html.slim +1 -1
- data/db/migrate/20171024075514_customer_vault_contact_type_default_value.rb +5 -0
- data/lib/dorsale/version.rb +1 -1
- data/spec/models/dorsale/customer_vault/event_spec.rb +6 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a17406e315fbb33c48f5604ce568769965b4d3b4
|
|
4
|
+
data.tar.gz: e41ccc6d00e2e3d627dcc386047d5069fcc83210
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 793932d453f32824948498bec31c14274aea9297c906d28d95ab818a81f3141294285098fac81cdd652563ffd0eb8502c247721fb8c44fc47af26d4b74c5318c
|
|
7
|
+
data.tar.gz: eef15ca0089f73911c95775d081feb8f4b6b7e176f0a5991f99334b0ae9da9c38ca1c48705a6ad8b95b919c3196c8722effa3ec6e13da0d973ecb8525585a261
|
data/CHANGELOG.md
CHANGED
|
@@ -10,8 +10,8 @@ class Dorsale::CustomerVault::Event < ::Dorsale::ApplicationRecord
|
|
|
10
10
|
validates :person, presence: true
|
|
11
11
|
validates :date, presence: true
|
|
12
12
|
validates :text, presence: true
|
|
13
|
-
validates :action, presence: true,
|
|
14
|
-
validates :contact_type,
|
|
13
|
+
validates :action, presence: true, inclusion: {in: proc {ACTIONS} }
|
|
14
|
+
validates :contact_type, presence: true, inclusion: {in: proc {CONTACT_TYPES} }
|
|
15
15
|
|
|
16
16
|
default_scope -> {
|
|
17
17
|
all
|
|
@@ -23,5 +23,6 @@ class Dorsale::CustomerVault::Event < ::Dorsale::ApplicationRecord
|
|
|
23
23
|
|
|
24
24
|
def assign_default_values
|
|
25
25
|
assign_default :date, Date.current
|
|
26
|
+
assign_default :contact_type, CONTACT_TYPES.first
|
|
26
27
|
end
|
|
27
28
|
end
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
= f.text_field :title, class: "form-control input-sm", placeholder: f.object.t(:title)
|
|
18
18
|
|
|
19
19
|
.comment-contact_type-field
|
|
20
|
-
= f.select :contact_type, customer_vault_event_contact_types_for_filter_select, {include_blank:
|
|
20
|
+
= f.select :contact_type, customer_vault_event_contact_types_for_filter_select, {include_blank: false}, class: "form-control input-sm"
|
|
21
21
|
|
|
22
22
|
.comment-date-field
|
|
23
23
|
= f.text_field :date, class: "form-control input-sm", placeholder: f.object.t(:date)
|
data/lib/dorsale/version.rb
CHANGED
|
@@ -6,12 +6,17 @@ RSpec.describe ::Dorsale::CustomerVault::Event, type: :model do
|
|
|
6
6
|
|
|
7
7
|
it { is_expected.to validate_presence_of :person }
|
|
8
8
|
it { is_expected.to validate_presence_of :action }
|
|
9
|
+
it { is_expected.to validate_presence_of :contact_type }
|
|
9
10
|
|
|
10
11
|
it { is_expected.to_not validate_presence_of :author }
|
|
11
|
-
it { is_expected.to_not validate_presence_of :contact_type }
|
|
12
12
|
|
|
13
13
|
it "should have a valid factory" do
|
|
14
14
|
event = create(:customer_vault_event)
|
|
15
15
|
expect(event).to be_valid
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
it "should assign default values" do
|
|
19
|
+
expect(described_class.new.date).to be_present
|
|
20
|
+
expect(described_class.new.contact_type).to eq "contact"
|
|
21
|
+
end
|
|
17
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dorsale
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.8.
|
|
4
|
+
version: 3.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- agilidée
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -861,6 +861,7 @@ files:
|
|
|
861
861
|
- db/migrate/20170915070538_dorsale_customer_vault_events_add_text.rb
|
|
862
862
|
- db/migrate/20171023080507_migrate_people_comments_to_events.rb
|
|
863
863
|
- db/migrate/20171023133219_customer_vault_events_add_contact_type.rb
|
|
864
|
+
- db/migrate/20171024075514_customer_vault_contact_type_default_value.rb
|
|
864
865
|
- features/access.feature
|
|
865
866
|
- features/billing_machine_id_cards.feature
|
|
866
867
|
- features/billing_machine_invoices.feature
|