egov_utils 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/egov_utils/principal.rb +2 -2
- data/app/models/egov_utils/user.rb +2 -2
- data/app/resources/egov_utils/love.rb +1 -4
- data/app/views/egov_utils/users/_users_tab.html.haml +1 -1
- data/app/views/egov_utils/users/index.html.haml +1 -1
- data/lib/egov_utils/engine.rb +2 -1
- data/lib/egov_utils/settings.rb +2 -2
- data/lib/egov_utils/version.rb +1 -1
- data/vendor/assets/stylesheets/themes/sako/_journal_variables.scss +2 -2
- metadata +41 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f72e2d5d10dee7d6101f3ddf873c9484b85037185dfb062460bcfe7fdb77d90
|
4
|
+
data.tar.gz: 28964c1b315937a7bd0bcb77a2c178ebf7e72f9cbc47ba4cdd660c5fbbe41443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979f062cbcda51f631b213c7fe2b0a5985d28c8fe9a2dec880b24d4d20c0a3976ae7ed3eb3d9ee43687184b2deaa3b2b8452ba3be5a5c105f8c526b76d22a9b8
|
7
|
+
data.tar.gz: a3c04549ae77593022ff411e9604bfc73716e8f00c363d8726a5a7bd3f98fbe46320c68e9bb6b27c8fa8eb2f165510ee4c5dd14d51634ecd12e39faf83878bb5
|
@@ -2,7 +2,7 @@ module EgovUtils
|
|
2
2
|
class Principal < ApplicationRecord
|
3
3
|
self.abstract_class = true
|
4
4
|
|
5
|
-
serialize :roles, Array
|
5
|
+
serialize :roles, type: Array, coder: YAML
|
6
6
|
|
7
7
|
def reload(*attrs)
|
8
8
|
@auth_source = nil
|
@@ -10,7 +10,7 @@ module EgovUtils
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def has_role?(role)
|
13
|
-
roles.include?(role)
|
13
|
+
Array(roles).include?(role)
|
14
14
|
end
|
15
15
|
|
16
16
|
def auth_source
|
@@ -13,7 +13,7 @@ module EgovUtils
|
|
13
13
|
|
14
14
|
has_and_belongs_to_many :groups
|
15
15
|
|
16
|
-
serialize :roles, Array
|
16
|
+
serialize :roles, type: Array, coder: YAML
|
17
17
|
|
18
18
|
has_secure_password validations: false
|
19
19
|
|
@@ -145,7 +145,7 @@ module EgovUtils
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def all_role_names
|
148
|
-
@all_role_names ||= groups.map(&:roles).flatten + roles
|
148
|
+
@all_role_names ||= groups.map(&:roles).flatten + Array(roles)
|
149
149
|
@all_role_names << DEFAULT_ROLE if DEFAULT_ROLE && !@all_role_names.any?
|
150
150
|
@all_role_names
|
151
151
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'activeresource'
|
2
2
|
|
3
|
-
|
4
3
|
module EgovUtils
|
5
4
|
module AzaharaJsonResourceFormat
|
6
5
|
include ActiveResource::Formats::JsonFormat
|
@@ -14,8 +13,6 @@ module EgovUtils
|
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
16
|
module EgovUtils
|
20
17
|
class LoveMock < OpenStruct
|
21
18
|
def self.all
|
@@ -47,7 +44,7 @@ module EgovUtils
|
|
47
44
|
|
48
45
|
def self.config
|
49
46
|
file = Rails.root.join('config', 'config.yml')
|
50
|
-
File.
|
47
|
+
File.exist?(file) ? YAML.load_file(file) : {}
|
51
48
|
end
|
52
49
|
|
53
50
|
self.site = "#{config['love_url'] || Rails.configuration.try(:love_url)}/api/v1/"
|
@@ -26,7 +26,7 @@
|
|
26
26
|
- if can?(:edit, user)
|
27
27
|
= link_to(t('label_edit'), edit_user_path(user), class: 'btn btn-secondary btn-sm')
|
28
28
|
- unless user.active?
|
29
|
-
= button_to(t('label_approve'), approve_user_path(user), class: 'btn btn-primary btn-sm')
|
29
|
+
= button_to(t('label_approve'), approve_user_path(user), class: 'btn btn-primary btn-sm', method: :post)
|
30
30
|
|
31
31
|
:javascript
|
32
32
|
$(function(){
|
@@ -26,7 +26,7 @@
|
|
26
26
|
%td= user.groups.map(&:name).join(', ')
|
27
27
|
%td
|
28
28
|
- unless user.active?
|
29
|
-
= button_to(t('label_approve'), approve_user_path(user), class: 'btn btn-primary btn-sm')
|
29
|
+
= button_to(t('label_approve'), approve_user_path(user), class: 'btn btn-primary btn-sm', method: :post)
|
30
30
|
- if can?(:edit, user)
|
31
31
|
= link_to(t('label_edit'), edit_user_path(user), class: 'btn btn-secondary btn-sm')
|
32
32
|
- if can?(:delete, user)
|
data/lib/egov_utils/engine.rb
CHANGED
@@ -22,6 +22,7 @@ module EgovUtils
|
|
22
22
|
config.assets.paths << config.root.join('vendor', 'assets', 'fonts')
|
23
23
|
config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/
|
24
24
|
config.assets.precompile += %w(egov_utils/justice_logo.png)
|
25
|
+
config.autoload_paths += %w(app/resources)
|
25
26
|
|
26
27
|
config.generators do |g|
|
27
28
|
g.test_framework :rspec
|
@@ -132,7 +133,7 @@ module EgovUtils
|
|
132
133
|
end
|
133
134
|
end
|
134
135
|
|
135
|
-
|
136
|
+
config.after_initialize do
|
136
137
|
if EgovUtils::Settings.mock_resources?
|
137
138
|
EgovUtils::Love.mock!
|
138
139
|
end
|
data/lib/egov_utils/settings.rb
CHANGED
@@ -7,7 +7,7 @@ module EgovUtils
|
|
7
7
|
end
|
8
8
|
|
9
9
|
class Settings < ::Settingslogic
|
10
|
-
source (File.
|
10
|
+
source (File.exist?(EgovUtils.config_file) ? EgovUtils.config_file : {})
|
11
11
|
|
12
12
|
# namespace Rails.env
|
13
13
|
|
@@ -35,6 +35,6 @@ module EgovUtils
|
|
35
35
|
Settings['redmine'] ||= Settingslogic.new({})
|
36
36
|
Settings['redmine']['enabled'] ||= false
|
37
37
|
|
38
|
-
Settings['mock_resources'] ||=
|
38
|
+
Settings['mock_resources'] ||= Rails.env.production? || Rails.env.test?
|
39
39
|
|
40
40
|
end
|
data/lib/egov_utils/version.rb
CHANGED
@@ -629,10 +629,10 @@ $label-link-hover-color: #fff !default;
|
|
629
629
|
//##
|
630
630
|
|
631
631
|
//** Padding applied to the modal body
|
632
|
-
$modal-inner-padding:
|
632
|
+
$modal-inner-padding: 1rem !default;
|
633
633
|
|
634
634
|
//** Padding applied to the modal title
|
635
|
-
$modal-title-padding:
|
635
|
+
$modal-title-padding: 0.75rem !default;
|
636
636
|
//** Modal title line-height
|
637
637
|
$modal-title-line-height: $line-height-base !default;
|
638
638
|
|
metadata
CHANGED
@@ -1,35 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5.1'
|
20
|
-
- - "<"
|
17
|
+
- - ">"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '7'
|
19
|
+
version: '7.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sprockets
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
26
30
|
requirements:
|
27
31
|
- - ">="
|
28
32
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
31
39
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
40
|
+
version: '0'
|
33
41
|
- !ruby/object:Gem::Dependency
|
34
42
|
name: bcrypt
|
35
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,14 +58,14 @@ dependencies:
|
|
50
58
|
requirements:
|
51
59
|
- - "~>"
|
52
60
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
61
|
+
version: '6.0'
|
54
62
|
type: :runtime
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
65
|
requirements:
|
58
66
|
- - "~>"
|
59
67
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
68
|
+
version: '6.0'
|
61
69
|
- !ruby/object:Gem::Dependency
|
62
70
|
name: active_interaction
|
63
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,28 +86,28 @@ dependencies:
|
|
78
86
|
requirements:
|
79
87
|
- - "~>"
|
80
88
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
89
|
+
version: '6.0'
|
82
90
|
type: :runtime
|
83
91
|
prerelease: false
|
84
92
|
version_requirements: !ruby/object:Gem::Requirement
|
85
93
|
requirements:
|
86
94
|
- - "~>"
|
87
95
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
96
|
+
version: '6.0'
|
89
97
|
- !ruby/object:Gem::Dependency
|
90
98
|
name: rails-i18n
|
91
99
|
requirement: !ruby/object:Gem::Requirement
|
92
100
|
requirements:
|
93
101
|
- - "~>"
|
94
102
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
103
|
+
version: '7.0'
|
96
104
|
type: :runtime
|
97
105
|
prerelease: false
|
98
106
|
version_requirements: !ruby/object:Gem::Requirement
|
99
107
|
requirements:
|
100
108
|
- - "~>"
|
101
109
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
110
|
+
version: '7.0'
|
103
111
|
- !ruby/object:Gem::Dependency
|
104
112
|
name: i18n-js
|
105
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,14 +156,14 @@ dependencies:
|
|
148
156
|
requirements:
|
149
157
|
- - "~>"
|
150
158
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
159
|
+
version: '5.4'
|
152
160
|
type: :runtime
|
153
161
|
prerelease: false
|
154
162
|
version_requirements: !ruby/object:Gem::Requirement
|
155
163
|
requirements:
|
156
164
|
- - "~>"
|
157
165
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
166
|
+
version: '5.4'
|
159
167
|
- !ruby/object:Gem::Dependency
|
160
168
|
name: paranoia
|
161
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,7 +207,7 @@ dependencies:
|
|
199
207
|
- !ruby/object:Gem::Version
|
200
208
|
version: '6.11'
|
201
209
|
- !ruby/object:Gem::Dependency
|
202
|
-
name:
|
210
|
+
name: mini_racer
|
203
211
|
requirement: !ruby/object:Gem::Requirement
|
204
212
|
requirements:
|
205
213
|
- - ">="
|
@@ -274,14 +282,14 @@ dependencies:
|
|
274
282
|
requirements:
|
275
283
|
- - "~>"
|
276
284
|
- !ruby/object:Gem::Version
|
277
|
-
version: '1
|
285
|
+
version: '2.1'
|
278
286
|
type: :runtime
|
279
287
|
prerelease: false
|
280
288
|
version_requirements: !ruby/object:Gem::Requirement
|
281
289
|
requirements:
|
282
290
|
- - "~>"
|
283
291
|
- !ruby/object:Gem::Version
|
284
|
-
version: '1
|
292
|
+
version: '2.1'
|
285
293
|
- !ruby/object:Gem::Dependency
|
286
294
|
name: font-awesome-sass
|
287
295
|
requirement: !ruby/object:Gem::Requirement
|
@@ -302,14 +310,14 @@ dependencies:
|
|
302
310
|
requirements:
|
303
311
|
- - "~>"
|
304
312
|
- !ruby/object:Gem::Version
|
305
|
-
version: 4.0.0
|
313
|
+
version: 4.0.0
|
306
314
|
type: :runtime
|
307
315
|
prerelease: false
|
308
316
|
version_requirements: !ruby/object:Gem::Requirement
|
309
317
|
requirements:
|
310
318
|
- - "~>"
|
311
319
|
- !ruby/object:Gem::Version
|
312
|
-
version: 4.0.0
|
320
|
+
version: 4.0.0
|
313
321
|
- !ruby/object:Gem::Dependency
|
314
322
|
name: bootstrap4-datetime-picker-rails
|
315
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -386,14 +394,14 @@ dependencies:
|
|
386
394
|
requirements:
|
387
395
|
- - "~>"
|
388
396
|
- !ruby/object:Gem::Version
|
389
|
-
version: '0.
|
397
|
+
version: '0.5'
|
390
398
|
type: :runtime
|
391
399
|
prerelease: false
|
392
400
|
version_requirements: !ruby/object:Gem::Requirement
|
393
401
|
requirements:
|
394
402
|
- - "~>"
|
395
403
|
- !ruby/object:Gem::Version
|
396
|
-
version: '0.
|
404
|
+
version: '0.5'
|
397
405
|
- !ruby/object:Gem::Dependency
|
398
406
|
name: egon_gate
|
399
407
|
requirement: !ruby/object:Gem::Requirement
|
@@ -482,16 +490,16 @@ dependencies:
|
|
482
490
|
name: sqlite3
|
483
491
|
requirement: !ruby/object:Gem::Requirement
|
484
492
|
requirements:
|
485
|
-
- -
|
493
|
+
- - '='
|
486
494
|
- !ruby/object:Gem::Version
|
487
|
-
version:
|
495
|
+
version: 1.6.9
|
488
496
|
type: :development
|
489
497
|
prerelease: false
|
490
498
|
version_requirements: !ruby/object:Gem::Requirement
|
491
499
|
requirements:
|
492
|
-
- -
|
500
|
+
- - '='
|
493
501
|
- !ruby/object:Gem::Version
|
494
|
-
version:
|
502
|
+
version: 1.6.9
|
495
503
|
description: We hope it will help create better systems for all the eGoverment. In
|
496
504
|
Czech Republic and maybe further.
|
497
505
|
email:
|
@@ -797,7 +805,7 @@ homepage: https://git.servis.justice.cz
|
|
797
805
|
licenses:
|
798
806
|
- MIT
|
799
807
|
metadata: {}
|
800
|
-
post_install_message:
|
808
|
+
post_install_message:
|
801
809
|
rdoc_options: []
|
802
810
|
require_paths:
|
803
811
|
- lib
|
@@ -812,8 +820,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
812
820
|
- !ruby/object:Gem::Version
|
813
821
|
version: '0'
|
814
822
|
requirements: []
|
815
|
-
rubygems_version: 3.
|
816
|
-
signing_key:
|
823
|
+
rubygems_version: 3.5.0.dev
|
824
|
+
signing_key:
|
817
825
|
specification_version: 4
|
818
826
|
summary: The eGoverment utilities is set of functionalities to support basic eGoverment
|
819
827
|
IS needs.
|