egov_utils 0.4.17 → 0.4.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/resources/egov_utils/organization.rb +9 -1
- data/lib/egov_utils/version.rb +1 -1
- data/lib/tasks/egov_utils_tasks.rake +2 -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: 4d05b59d1557eeeba773ca94b798335640a14fd913677bd1faf8675067b5f5ae
|
4
|
+
data.tar.gz: 9a6b4617ee0b416cb74dde62adf398962268a5674e95222176e47cfe9f9029ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb82cc5e6c591af911c1b5792b6a35c44541ba4d1631f0e98331e9a5967e1df2dd6100f1bf964199b04bc833c6ed25766e59448a4dd9c4bd6d2281995f8e9b2
|
7
|
+
data.tar.gz: a06bb56fa7e3206977b0bed3075a2577a2d02cd51a064f8b9bed84444a5cc2c5530b7ac9b51599859771050814503722d75bec58d635564f59e880272fd6deae
|
@@ -5,7 +5,8 @@ module EgovUtils
|
|
5
5
|
new(id: 1, name: 'Městský soud 1', key: '104000', category_abbrev: 'MS' ),
|
6
6
|
new(id: 2, name: 'Krajský soud 1', key: '204000', category_abbrev: 'KS' ),
|
7
7
|
new(id: 3, name: 'Krajský soud 2', key: '205000', category_abbrev: 'KS' ),
|
8
|
-
new(id: 13, name: 'Okresní soud 1', key: '204001', category_abbrev: 'OS' )
|
8
|
+
new(id: 13, name: 'Okresní soud 1', key: '204001', category_abbrev: 'OS' ),
|
9
|
+
new(id: 14, name: 'Okresní soud v Chomutově', key: '205030', category_abbrev: 'OS' )
|
9
10
|
]
|
10
11
|
end
|
11
12
|
|
@@ -13,6 +14,13 @@ module EgovUtils
|
|
13
14
|
all.detect{ |o| o.key == key }
|
14
15
|
end
|
15
16
|
|
17
|
+
def self.courts(organization_keys=nil)
|
18
|
+
all.select do |o|
|
19
|
+
%w{OS KS MS}.include?(o.category_abbrev) &&
|
20
|
+
(organization_keys.nil? || organization_keys.include?(o.key))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
16
24
|
def self.region_courts(branches=false)
|
17
25
|
all.select{ |o| %w{KS MS}.include?(o.category_abbrev) }
|
18
26
|
end
|
data/lib/egov_utils/version.rb
CHANGED
@@ -25,8 +25,10 @@ namespace :egov_utils do
|
|
25
25
|
.merge('password' => 'abcdefgh', 'password_confirmation' => 'abcdefgh')
|
26
26
|
end
|
27
27
|
users = EgovUtils::User.where.not(provider: nil).collect{|u| u.attributes.except('id', 'created_at', 'updated_at') }
|
28
|
+
groups = EgovUtils::Group.where.not(provider: nil).collect{|u| u.attributes.except('id', 'created_at', 'updated_at') }
|
28
29
|
DatabaseCleaner.clean_with :truncation
|
29
30
|
EgovUtils::User.create(users)
|
31
|
+
EgovUtils::Group.create(groups)
|
30
32
|
EgovUtils::User.create(admins).each do |admin|
|
31
33
|
attrs = admins.detect{ |a| a['login'] == admin.login }
|
32
34
|
admin.update_columns(password_digest: attrs['password_digest'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|