eac_rails_base0 0.68.0 → 0.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/app/helpers/eac_rails_base0/app_version_helper.rb +1 -1
- data/config/initializers/action_mailer.rb +2 -2
- data/config/initializers/active_scaffold.rb +1 -1
- data/config/initializers/backport_pg_10_support_to_rails_4.rb +2 -2
- data/config/initializers/menus.rb +2 -2
- data/config/initializers/premailer.rb +2 -2
- data/config/initializers/speaker.rb +2 -2
- data/config/routes.rb +6 -6
- data/exe/eac_rails_base0_app +1 -1
- data/lib/eac_rails_base0/app_base/application/production.rb +2 -2
- data/lib/eac_rails_base0/app_generator/templates/Gemfile +1 -1
- data/lib/eac_rails_base0/app_generator/templates/app/controllers/application_controller.rb +1 -1
- data/lib/eac_rails_base0/app_generator/templates/config/application.rb +1 -1
- data/lib/eac_rails_base0/app_generator/templates/config.ru +1 -1
- data/lib/eac_rails_base0/patches/eac_rails_utils_links_helper_patch.rb +2 -2
- data/lib/eac_rails_base0/patches/url_for_patch.rb +2 -2
- data/lib/eac_rails_base0/rspec/shared_contexts/when_user_is_admin.rb +5 -5
- data/lib/eac_rails_base0/rspec/shared_contexts/when_user_is_anonymous.rb +4 -4
- data/lib/eac_rails_base0/rspec/shared_contexts/when_user_is_non_admin.rb +5 -5
- data/lib/eac_rails_base0/version.rb +1 -1
- data/lib/generators/eac_rails_base0/abilities/templates/ability.rb +1 -1
- data/lib/generators/eac_rails_base0/abilities/templates/ability_mapping.rb +1 -1
- data/lib/tasks/eac_rails_base0.rake +4 -4
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b38e3dc40010de2211ba60fcf15e3197c8b2325f45be5a2b16bb658784c9cd27
|
4
|
+
data.tar.gz: fa589cceb61aa1a641f17ccfc0a612ec65b0c8dd3ea4e07c5368155fa5e005a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64df09374ec826afc1f9ed70279c114ecf0bf2320e75d9b4e76f69814f510c4d48d224edae7dd49ce509c2715826434ad1fbdd6e21b027a2cd17fef0484f673f
|
7
|
+
data.tar.gz: dc449cfef4c9bc811ccddf8420780215232c2a7c748fb89df7479e21517ec9043c63aec833aa03a90e8e57e2d1c9ef4008ebb5e949b5f3f813787b93405d13ac
|
data/Gemfile
CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
local_gemfile =
|
8
|
-
eval_gemfile local_gemfile if
|
7
|
+
local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
|
8
|
+
eval_gemfile local_gemfile if File.exist?(local_gemfile)
|
@@ -14,7 +14,7 @@ module EacRailsBase0
|
|
14
14
|
|
15
15
|
def base0_app_version_by_version_file
|
16
16
|
::Rails.root.children.find { |file| file.basename.to_path.downcase == 'version' }
|
17
|
-
|
17
|
+
.if_present { |file| file.read.presence }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
unless
|
3
|
+
unless Rails.env.test?
|
4
4
|
Rails.application.configure do
|
5
5
|
config.action_mailer.smtp_settings = {
|
6
6
|
address: ENV['action_mailer_smtp_address'],
|
@@ -10,7 +10,7 @@ unless ::Rails.env.test?
|
|
10
10
|
password: ENV['action_mailer_smtp_password'],
|
11
11
|
authentication: ENV['action_mailer_smtp_authentication'],
|
12
12
|
enable_starttls_auto:
|
13
|
-
|
13
|
+
EacRubyUtils::Boolean.parse(ENV['action_mailer_smtp_enable_starttls_auto'])
|
14
14
|
}
|
15
15
|
%i[host port].each do |option|
|
16
16
|
value = ENV["action_mailer_default_url_#{option}"]
|
@@ -13,7 +13,7 @@ module ActiveRecord
|
|
13
13
|
module PostgreSQL
|
14
14
|
module SchemaStatements
|
15
15
|
# Resets the sequence of a table's primary key to the maximum value.
|
16
|
-
def reset_pk_sequence!(table, pkey = nil, sequence = nil)
|
16
|
+
def reset_pk_sequence!(table, pkey = nil, sequence = nil) # :nodoc:
|
17
17
|
unless pkey && sequence
|
18
18
|
default_pk, default_sequence = pk_and_sequence_for(table)
|
19
19
|
pkey ||= default_pk
|
@@ -36,7 +36,7 @@ module ActiveRecord
|
|
36
36
|
|
37
37
|
if postgresql_version >= 100_000
|
38
38
|
select_value('SELECT seqmin FROM pg_sequence WHERE seqrelid = ' \
|
39
|
-
|
39
|
+
"#{quote(quoted_sequence)}::regclass")
|
40
40
|
else
|
41
41
|
select_value("SELECT min_value FROM #{quoted_sequence}")
|
42
42
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
Rails.application.root_menu.group(:admin).group(:email).within do |g|
|
4
4
|
%w[info send_test].each do |action|
|
5
5
|
g.action("#{action}_eac_rails_base0_mailer_index")
|
6
|
-
|
6
|
+
.label(-> { I18n.t("eac_rails_base0.mailer.#{action}") })
|
7
7
|
end
|
8
8
|
end
|
@@ -13,5 +13,5 @@ class Premailer
|
|
13
13
|
end
|
14
14
|
|
15
15
|
require 'premailer/rails'
|
16
|
-
|
17
|
-
|
16
|
+
Premailer::Rails.config.merge!(remove_classes: true, remove_ids: true,
|
17
|
+
drop_unmergeable_css_rules: true)
|
@@ -3,6 +3,6 @@
|
|
3
3
|
require 'eac_cli/speaker'
|
4
4
|
require 'eac_ruby_utils/speaker'
|
5
5
|
|
6
|
-
unless
|
7
|
-
|
6
|
+
unless EacRubyUtils::Speaker.context.optional_current
|
7
|
+
EacRubyUtils::Speaker.context.push(EacCli::Speaker.new)
|
8
8
|
end
|
data/config/routes.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Rails.application.routes.draw do
|
4
|
-
mount
|
5
|
-
mount
|
6
|
-
mount
|
7
|
-
mount
|
8
|
-
mount
|
9
|
-
mount
|
4
|
+
mount EacRailsUtils::Engine => '/'
|
5
|
+
mount EacUsersSupport::Engine => '/'
|
6
|
+
mount Aranha::Rails::Engine => '/aranha'
|
7
|
+
mount BrRailties::Engine => '/br_railties'
|
8
|
+
mount EacRailsDelayedJob::Engine => '/delayed_job'
|
9
|
+
mount EacRailsRemotes::Engine => '/remotes'
|
10
10
|
|
11
11
|
namespace(:eac_rails_base0) do
|
12
12
|
resources(:mailer, only: []) do
|
data/exe/eac_rails_base0_app
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'aranha/selenium/
|
4
|
+
require 'aranha/selenium/driver_options'
|
5
5
|
|
6
6
|
module EacRailsBase0App
|
7
7
|
class Application < Rails::Application
|
@@ -14,7 +14,7 @@ module EacRailsBase0App
|
|
14
14
|
|
15
15
|
module ClassMethods
|
16
16
|
def setup_aranha
|
17
|
-
::Aranha::Selenium::
|
17
|
+
::Aranha::Selenium::DriverOptions.default.headless = true
|
18
18
|
end
|
19
19
|
|
20
20
|
def setup_assets
|
@@ -27,6 +27,6 @@ module EacRailsBase0
|
|
27
27
|
end
|
28
28
|
|
29
29
|
require 'eac_rails_utils/links_helper'
|
30
|
-
patch =
|
31
|
-
target =
|
30
|
+
patch = EacRailsBase0::Patches::EacRailsUtilsLinksHelper
|
31
|
+
target = EacRailsUtils::LinksHelper
|
32
32
|
target.prepend(patch) unless target.included_modules.include?(patch)
|
@@ -36,6 +36,6 @@ module EacRailsBase0
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
patch =
|
40
|
-
target =
|
39
|
+
patch = EacRailsBase0::Patches::UrlForPatch
|
40
|
+
target = ActionDispatch::Routing::UrlFor
|
41
41
|
target.prepend(patch) unless target.included_modules.include?(patch)
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
let(:user) {
|
3
|
+
RSpec.shared_context 'when user is admin', shared_context: :metadata do
|
4
|
+
let(:user) { FactoryBot.create(:admin_user) }
|
5
5
|
|
6
6
|
before do
|
7
7
|
visit '/users/sign_in'
|
8
|
-
fill_in
|
8
|
+
fill_in I18n.translate!('activerecord.attributes.eac_users_support/user.email'),
|
9
9
|
with: user.email
|
10
|
-
fill_in
|
10
|
+
fill_in I18n.translate!('activerecord.attributes.eac_users_support/user.password'),
|
11
11
|
with: user.password
|
12
|
-
click_button
|
12
|
+
click_button I18n.translate!('devise.log_in')
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'user should be logged' do
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
RSpec.shared_context 'when user is anonymous', shared_context: :metadata do
|
4
4
|
before do
|
5
5
|
visit '/'
|
6
|
-
if link_exist?(
|
7
|
-
click_link(
|
8
|
-
elsif !link_exist?(
|
6
|
+
if link_exist?(I18n.translate!('devise.log_out'))
|
7
|
+
click_link(I18n.translate!('devise.log_out'))
|
8
|
+
elsif !link_exist?(I18n.translate!('devise.log_in'))
|
9
9
|
raise 'login nor logout link found'
|
10
10
|
end
|
11
11
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
let(:user) {
|
3
|
+
RSpec.shared_context 'when user is non admin', shared_context: :metadata do
|
4
|
+
let(:user) { FactoryBot.create(:non_admin_user) }
|
5
5
|
|
6
6
|
before do
|
7
7
|
visit '/users/sign_in'
|
8
|
-
fill_in
|
8
|
+
fill_in I18n.translate!('activerecord.attributes.eac_users_support/user.email'),
|
9
9
|
with: user.email
|
10
|
-
fill_in
|
10
|
+
fill_in I18n.translate!('activerecord.attributes.eac_users_support/user.password'),
|
11
11
|
with: user.password
|
12
|
-
click_button
|
12
|
+
click_button I18n.translate!('devise.log_in')
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'user should be logged' do
|
@@ -15,17 +15,17 @@ namespace :eac_rails_base0 do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
if rspec_loaded
|
18
|
-
|
18
|
+
RSpec::Core::RakeTask.new(:rspec) do |t|
|
19
19
|
t.rspec_opts =
|
20
|
-
"--pattern '{spec,#{
|
20
|
+
"--pattern '{spec,#{EacRailsBase0::Paths.engines_subpath}/*/spec}/**/*_spec.rb'"
|
21
21
|
end
|
22
22
|
Rake::Task['eac_rails_base0:rspec'].enhance ['db:test:prepare']
|
23
23
|
end
|
24
24
|
|
25
25
|
namespace :minitest do
|
26
|
-
{ core: '', engines: "#{
|
26
|
+
{ core: '', engines: "#{EacRailsBase0::Paths.engines_subpath}/*/" }
|
27
27
|
.each do |name, pattern_prefix|
|
28
|
-
|
28
|
+
Rake::TestTask.new(name => 'test:prepare') do |t|
|
29
29
|
t.libs << 'test'
|
30
30
|
t.pattern = "#{pattern_prefix}test/**/*_test.rb"
|
31
31
|
t.ruby_opts = %w[-W0]
|
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.68.
|
4
|
+
version: 0.68.1
|
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:
|
11
|
+
date: 2024-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.22'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.22'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aranha-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.8'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bootstrap-sass
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,7 +149,7 @@ dependencies:
|
|
149
149
|
version: '0.5'
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.5.
|
152
|
+
version: 0.5.2
|
153
153
|
type: :runtime
|
154
154
|
prerelease: false
|
155
155
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -159,35 +159,35 @@ dependencies:
|
|
159
159
|
version: '0.5'
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version: 0.5.
|
162
|
+
version: 0.5.2
|
163
163
|
- !ruby/object:Gem::Dependency
|
164
164
|
name: eac_cli
|
165
165
|
requirement: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
167
|
- - "~>"
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: '0.
|
169
|
+
version: '0.40'
|
170
170
|
type: :runtime
|
171
171
|
prerelease: false
|
172
172
|
version_requirements: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
174
|
- - "~>"
|
175
175
|
- !ruby/object:Gem::Version
|
176
|
-
version: '0.
|
176
|
+
version: '0.40'
|
177
177
|
- !ruby/object:Gem::Dependency
|
178
178
|
name: eac_fs
|
179
179
|
requirement: !ruby/object:Gem::Requirement
|
180
180
|
requirements:
|
181
181
|
- - "~>"
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
version: '0.
|
183
|
+
version: '0.17'
|
184
184
|
type: :runtime
|
185
185
|
prerelease: false
|
186
186
|
version_requirements: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
188
|
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version: '0.
|
190
|
+
version: '0.17'
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: eac_rails_delayed_job
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,6 +209,9 @@ dependencies:
|
|
209
209
|
- - "~>"
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: '0.9'
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: 0.9.1
|
212
215
|
type: :runtime
|
213
216
|
prerelease: false
|
214
217
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -216,6 +219,9 @@ dependencies:
|
|
216
219
|
- - "~>"
|
217
220
|
- !ruby/object:Gem::Version
|
218
221
|
version: '0.9'
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: 0.9.1
|
219
225
|
- !ruby/object:Gem::Dependency
|
220
226
|
name: eac_rails_remotes
|
221
227
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,20 +262,14 @@ dependencies:
|
|
256
262
|
requirements:
|
257
263
|
- - "~>"
|
258
264
|
- !ruby/object:Gem::Version
|
259
|
-
version: '0.
|
260
|
-
- - ">="
|
261
|
-
- !ruby/object:Gem::Version
|
262
|
-
version: 0.119.2
|
265
|
+
version: '0.120'
|
263
266
|
type: :runtime
|
264
267
|
prerelease: false
|
265
268
|
version_requirements: !ruby/object:Gem::Requirement
|
266
269
|
requirements:
|
267
270
|
- - "~>"
|
268
271
|
- !ruby/object:Gem::Version
|
269
|
-
version: '0.
|
270
|
-
- - ">="
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
version: 0.119.2
|
272
|
+
version: '0.120'
|
273
273
|
- !ruby/object:Gem::Dependency
|
274
274
|
name: eac_users_support
|
275
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -517,7 +517,7 @@ dependencies:
|
|
517
517
|
version: '4.1'
|
518
518
|
- - ">="
|
519
519
|
- !ruby/object:Gem::Version
|
520
|
-
version: 4.1.
|
520
|
+
version: 4.1.3
|
521
521
|
type: :runtime
|
522
522
|
prerelease: false
|
523
523
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -527,7 +527,7 @@ dependencies:
|
|
527
527
|
version: '4.1'
|
528
528
|
- - ">="
|
529
529
|
- !ruby/object:Gem::Version
|
530
|
-
version: 4.1.
|
530
|
+
version: 4.1.3
|
531
531
|
- !ruby/object:Gem::Dependency
|
532
532
|
name: tasks_scheduler
|
533
533
|
requirement: !ruby/object:Gem::Requirement
|
@@ -727,7 +727,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
727
727
|
requirements:
|
728
728
|
- - ">="
|
729
729
|
- !ruby/object:Gem::Version
|
730
|
-
version: '
|
730
|
+
version: '2.7'
|
731
731
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
732
732
|
requirements:
|
733
733
|
- - ">="
|