egov_utils 0.4.16 → 0.4.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/egov_utils/version.rb +1 -1
- data/lib/tasks/egov_utils_tasks.rake +1 -0
- data/spec/factories/egov_utils_addresses.rb +11 -0
- data/spec/factories/egov_utils_groups.rb +8 -0
- data/spec/factories/egov_utils_people.rb +29 -0
- data/spec/factories/egov_utils_users.rb +12 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47cda9774483d83d1e270afa4840a6c2221cab71b4c2f7238ae02e1706c9df89
|
4
|
+
data.tar.gz: e24e20b2e28b788f6aab8174d74b5c0198d9208482029c971a28fe3856d86b71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d53e1d8b7b291b4d052a4ce872043310a5510b8d8a2c0484111c9d6b45ae705e44ddf9dbfda12f85856e47cfeb5c7d8be8ff06faca35ca8f69020c71f55fe88e
|
7
|
+
data.tar.gz: 2062e2433f6cd864769dcabdeb2d7ee20614f8e2181c0bcf769a96130d34c920d4acefeb9909575d28125b4a8c5fccb30248bab13f091164f758d413838e66fe
|
data/lib/egov_utils/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :egov_utils_person, class: 'EgovUtils::Person' do
|
3
|
+
transient do
|
4
|
+
natural_attributes { Hash.new }
|
5
|
+
end
|
6
|
+
association :residence, factory: :egov_utils_address
|
7
|
+
joid { SecureRandom.uuid }
|
8
|
+
person_type { nil }
|
9
|
+
natural_person { nil }
|
10
|
+
legal_person { nil }
|
11
|
+
|
12
|
+
trait :natural do
|
13
|
+
person_type { 'natural' }
|
14
|
+
after(:build) do |person, evaluator|
|
15
|
+
evaluator.natural_person = FactoryBot.build(:egov_utils_natural_person, evaluator.natural_attributes.merge(person: person))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
factory :natural_person, traits: [:natural]
|
20
|
+
end
|
21
|
+
|
22
|
+
factory :egov_utils_natural_person, class: 'EgovUtils::NaturalPerson' do
|
23
|
+
firstname { 'John' }
|
24
|
+
sequence(:lastname){|n| "Doe-#{n}"}
|
25
|
+
birth_date { Date.today - (Random.new.rand(50)+18).years }
|
26
|
+
association :person, factory: :egov_utils_person
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :egov_utils_user, class: 'EgovUtils::User' do
|
3
|
+
firstname { 'John' }
|
4
|
+
lastname { 'Doe' }
|
5
|
+
login { mail }
|
6
|
+
sequence(:mail) {|n| "user#{n}@example.com"}
|
7
|
+
password { 'abcdef123456' }
|
8
|
+
password_confirmation { 'abcdef123456' }
|
9
|
+
active { true }
|
10
|
+
roles { [] }
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
@@ -567,6 +567,10 @@ files:
|
|
567
567
|
- lib/egov_utils/version.rb
|
568
568
|
- lib/grid/shield_grid.rb
|
569
569
|
- lib/tasks/egov_utils_tasks.rake
|
570
|
+
- spec/factories/egov_utils_addresses.rb
|
571
|
+
- spec/factories/egov_utils_groups.rb
|
572
|
+
- spec/factories/egov_utils_people.rb
|
573
|
+
- spec/factories/egov_utils_users.rb
|
570
574
|
- vendor/assets/fonts/Linotype.eot
|
571
575
|
- vendor/assets/fonts/Linotype.ttf
|
572
576
|
- vendor/assets/images/shieldui/editor.png
|