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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47cda9774483d83d1e270afa4840a6c2221cab71b4c2f7238ae02e1706c9df89
4
- data.tar.gz: e24e20b2e28b788f6aab8174d74b5c0198d9208482029c971a28fe3856d86b71
3
+ metadata.gz: 4d05b59d1557eeeba773ca94b798335640a14fd913677bd1faf8675067b5f5ae
4
+ data.tar.gz: 9a6b4617ee0b416cb74dde62adf398962268a5674e95222176e47cfe9f9029ce
5
5
  SHA512:
6
- metadata.gz: d53e1d8b7b291b4d052a4ce872043310a5510b8d8a2c0484111c9d6b45ae705e44ddf9dbfda12f85856e47cfeb5c7d8be8ff06faca35ca8f69020c71f55fe88e
7
- data.tar.gz: 2062e2433f6cd864769dcabdeb2d7ee20614f8e2181c0bcf769a96130d34c920d4acefeb9909575d28125b4a8c5fccb30248bab13f091164f758d413838e66fe
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
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.4.17'
2
+ VERSION = '0.4.18'
3
3
  end
@@ -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.17
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-08 00:00:00.000000000 Z
11
+ date: 2019-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails