eac_rails_base0 0.9.0 → 0.11.0

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: 4312911d735a91ed2a06397553405605241edfbbf3cc1168af3a54f41357135c
4
- data.tar.gz: c97d87406e2fb42fb96408ab87ca299bdcd8e4f335fc9d650da717a852fc079b
3
+ metadata.gz: 52b1c17d4069f065dcd2842557d0266e40c9b33f8a08944f39c490d8a2977b71
4
+ data.tar.gz: de9e9530d71d98158b235c97277810997394e6c41201fe8bf31e4b0088b364f9
5
5
  SHA512:
6
- metadata.gz: 891c4cc554ce4b23006cd51daad464db95b13e2a41117fb20cf56d14df4af03f59e6d152acae5d669d5e1543096d8619c57743c7825da925b398d3cc297c9149
7
- data.tar.gz: b4ebb1229261ba00fd85898c16fa3f821c284a67528dc0575993613ea880088914308a289f49c2e15c96a457e0646d5ccb11a13293e2bd350b4af2ad475d0afd
6
+ metadata.gz: 934ccd554b29db7a1dd85639b6a936d8538d0a28327703aaf230b4e84efc01771111e0dfec62d6437c854e86b6c8010b35932449b624e55dd1ec5e685a49e5cc
7
+ data.tar.gz: 495315ce64a8737e7b495e788f974037a8e7c502b4226dcbf85a7b71a3935c4477c5d6569e9d5d3127ba2196df32f3253c6988f96ff7d399196b09fff7889195
@@ -6,3 +6,4 @@
6
6
  //= require eac_rails_utils
7
7
  //= require aranha/application
8
8
  //= require tasks_scheduler
9
+ //= require br_railties
@@ -3,6 +3,7 @@
3
3
  @import "eac_rails_utils";
4
4
  @import "aranha/application";
5
5
  @import "tasks_scheduler";
6
+ @import 'br_railties';
6
7
 
7
8
  .alert-notice {
8
9
  @extend .alert-info;
@@ -23,14 +23,46 @@ module EacRailsBase0
23
23
 
24
24
  def base0_app_main_menu_default_entries
25
25
  {
26
- 'Administração' => {
27
- ::EacUsersSupport::User.model_name.human(count: 2) =>
28
- [eac_users_support.admin_users_path],
29
- t('activerecord.models.scheduled_task.other') => [main_app.status_scheduled_tasks_path],
30
- 'Conteúdo remoto' => {
31
- ::Aranha::Address.model_name.human(count: 2) => [aranha.addresses_path]
32
- }
33
- }
26
+ 'Administração' => base0_app_main_menu_admin_entries
27
+ }
28
+ end
29
+
30
+ def base0_app_main_menu_admin_entries
31
+ h = {}
32
+ base0_app_main_menu_admin_gems.each do |gem_module|
33
+ identifier = gem_module.name.underscore
34
+ h[::I18n.t("eac_rails_base0.main_menu.admin.#{identifier}")] =
35
+ send("#{identifier}_main_menu_admin_entries")
36
+ end
37
+ h
38
+ end
39
+
40
+ def base0_app_main_menu_admin_gems
41
+ [::EacUsersSupport, ::TasksScheduler, ::Aranha, ::BrRailties]
42
+ end
43
+
44
+ def eac_users_support_main_menu_admin_entries
45
+ {
46
+ ::EacUsersSupport::User.model_name.human(count: 2) => [eac_users_support.admin_users_path]
47
+ }
48
+ end
49
+
50
+ def tasks_scheduler_main_menu_admin_entries
51
+ {
52
+ t('activerecord.models.scheduled_task.other') => [main_app.status_scheduled_tasks_path]
53
+ }
54
+ end
55
+
56
+ def aranha_main_menu_admin_entries
57
+ {
58
+ ::Aranha::Address.model_name.human(count: 2) => [aranha.addresses_path]
59
+ }
60
+ end
61
+
62
+ def br_railties_main_menu_admin_entries
63
+ {
64
+ ::BrRailties::FederalUnit.model_name.human(count: 2) => [br_railties.federal_units_path],
65
+ ::BrRailties::Municipality.model_name.human(count: 2) => [br_railties.municipalities_path]
34
66
  }
35
67
  end
36
68
  end
@@ -7,3 +7,10 @@ pt-BR:
7
7
  formats:
8
8
  default: "%d/%m/%Y %H:%M"
9
9
  short: '%d/%m/%y %H:%M'
10
+ eac_rails_base0:
11
+ main_menu:
12
+ admin:
13
+ aranha: Aranha
14
+ br_railties: BrRailties
15
+ eac_users_support: Usuários
16
+ tasks_scheduler: Agendador
@@ -3,4 +3,5 @@
3
3
  Rails.application.routes.draw do
4
4
  mount ::EacUsersSupport::Engine => '/'
5
5
  mount ::Aranha::Engine => '/aranha'
6
+ mount ::BrRailties::Engine => '/br_railties'
6
7
  end
@@ -9,6 +9,7 @@ require 'eac_rails_utils'
9
9
  require 'eac_users_support'
10
10
  require 'eac_rails_base0/engine'
11
11
  require 'tasks_scheduler'
12
+ require 'br_railties'
12
13
 
13
14
  module EacRailsBase0
14
15
  end
@@ -21,6 +21,8 @@ module EacRailsBase0
21
21
 
22
22
  can :manage, ::EacUsersSupport::User
23
23
  can :manage, ::Aranha::Address
24
+ can :manage, ::BrRailties::FederalUnit
25
+ can :manage, ::BrRailties::Municipality
24
26
  can :manage, ::ScheduledTask
25
27
  end
26
28
  end
@@ -10,6 +10,8 @@ module EacRailsBase0
10
10
  map_devise
11
11
  map_controller 'EacUsersSupport::Admin::Users', :manage, ::EacUsersSupport::User
12
12
  map_controller 'Aranha::Addresses', :manage, ::Aranha::Address
13
+ map_controller 'BrRailties::FederalUnits', :manage, ::BrRailties::FederalUnit
14
+ map_controller 'BrRailties::Municipalities', :manage, ::BrRailties::Municipality
13
15
  map_controller 'ScheduledTasks', :manage, ::ScheduledTask
14
16
  map_controller 'TasksSchedulerDaemon', :manage, ::ScheduledTask
15
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsBase0
4
- VERSION = '0.9.0'
4
+ VERSION = '0.11.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_rails_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-21 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.3.7
47
+ - !ruby/object:Gem::Dependency
48
+ name: br_railties
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.2'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.2'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: byebug
49
63
  requirement: !ruby/object:Gem::Requirement