eac_rails_base0 0.39.1 → 0.43.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: '09afacb952ef742890bedbd4cb74ba068068845e11f1b55027e1daf19f47b678'
4
- data.tar.gz: 92719c116ec417d888d9b8f63bcc12e07d5bd5b7f641fda3bbd68eef13cf50a7
3
+ metadata.gz: 498eff900a0951c0c73c628587259bf44efce02c0ceb06674cfac71d0ee85edd
4
+ data.tar.gz: bdc5d5287a5ac57b5d3333132d86d27c0544a60cd53ec3817c554a6c0d242ed1
5
5
  SHA512:
6
- metadata.gz: debf1bd86d1d670470f81676ec145015799ff5e56c24c537c7876c4771ff4072070d5199a80ebf198f8345b89b201eef2d715e9666ab898cb1c2549354adace2
7
- data.tar.gz: 1df7ce2f1b9bee101ef6d4aaff3619a64b0a683ce2105a8af77f28f919d8e5a7e3053b48f39071f18151d9ac42c17e78e87cd9c0ed9af7a90eb33b34f30fbcd4
6
+ metadata.gz: a86077e990517c0bf8d270e64698208684cbd1b7c6236e671e8ad5e91925b9492124e307c0b0c0a1a66a0be41d5f8c9af88b2de47e3b7f62e0bb767390e0abc6
7
+ data.tar.gz: 2bf780632d6c81d556c3ab76f4b1c1aa82d9545015e393c6e5dc21b20dfbcbc660be3225f12be641704484c4aa6b11fa9db5e251273cf58c04c986ee7e01a7f5
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRailsBase0
4
+ class ApplicationRecord < ActiveRecord::Base
5
+ self.abstract_class = true
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ <% if current_user&.administrator %>
2
+ <div class="text-center"><b>Versão:</b> <%= base0_app_version %></div>
3
+ <div class="text-center"><b>RailsEnv:</b> <%= ::Rails.env %></div>
4
+ <% end %>
@@ -33,5 +33,6 @@
33
33
  <%= render partial: '/layouts/eac_rails_base0/flash' %>
34
34
  <%= yield %>
35
35
  </div>
36
+ <%= render partial: '/layouts/eac_rails_base0/version' %>
36
37
  </body>
37
38
  </html>
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'carrierwave'
4
+ require 'carrierwave/orm/activerecord'
4
5
  require 'fog/aws'
5
6
 
6
7
  if ENV['carrierwave_provider'] == 'AWS'
@@ -2,4 +2,4 @@
2
2
 
3
3
  # Be sure to restart your server when you modify this file.
4
4
 
5
- Rails.application.config.action_dispatch.cookies_serializer = :json
5
+ Rails.application.config.action_dispatch.cookies_serializer = :marshal
@@ -32,7 +32,7 @@ module EacRailsBase0App
32
32
  config.i18n.default_locale = :'pt-BR'
33
33
 
34
34
  # Do not swallow errors in after_commit/after_rollback callbacks.
35
- config.active_record.raise_in_transactional_callbacks = true
35
+ config.active_record.raise_in_transactional_callbacks = true if ::Rails.version < '5'
36
36
 
37
37
  # Autoload do código em /lib.
38
38
  config.autoload_paths << Rails.root.join('lib')
@@ -53,5 +53,13 @@ module EacRailsBase0App
53
53
 
54
54
  migrate_deprecated_dir = ::Rails.root.join('db', 'migrate_deprecated')
55
55
  config.paths['db/migrate'] << migrate_deprecated_dir if migrate_deprecated_dir.directory?
56
+
57
+ if ::Rails.env.development?
58
+ require 'letter_opener'
59
+ config.action_mailer.delivery_method = :letter_opener
60
+ config.action_mailer.perform_deliveries = true
61
+ end
56
62
  end
57
63
  end
64
+
65
+ require 'carrierwave'
@@ -5,23 +5,21 @@ module EacRailsBase0
5
5
  module EacRailsUtilsLinksHelper
6
6
  class << self
7
7
  def included(base)
8
- base.include(InstanceMethods)
9
- base.include(::CanCanDryHelper)
10
- base.alias_method_chain :short_object_link, :base0
11
- base.alias_method_chain :object_path_by_class, :base0
8
+ base.prepend(InstanceMethods)
9
+ base.prepend(::CanCanDryHelper)
12
10
  end
13
11
  end
14
12
 
15
13
  module InstanceMethods
16
- def short_object_link_with_base0(object, action = nil, options = {})
14
+ def short_object_link(object, action = nil, options = {})
17
15
  value_or_sign(object, '') do |value|
18
16
  path = object_path(value, action)
19
17
  link_to '', url_for(path), options if can_by_path?(path, options[:method])
20
18
  end
21
19
  end
22
20
 
23
- def object_path_by_class_with_base0(*args)
24
- object_path_by_class_without_base0(*args).gsub(/_url\z/, '_path')
21
+ def object_path_by_class(*args)
22
+ super(*args).gsub(/_url\z/, '_path')
25
23
  end
26
24
  end
27
25
  end
@@ -31,4 +29,4 @@ end
31
29
  require 'eac_rails_utils/links_helper'
32
30
  patch = ::EacRailsBase0::Patches::EacRailsUtilsLinksHelper
33
31
  target = ::EacRailsUtils::LinksHelper
34
- target.send(:include, patch) unless target.included_modules.include?(patch)
32
+ target.prepend(patch) unless target.included_modules.include?(patch)
@@ -5,14 +5,13 @@ module EacRailsBase0
5
5
  module UrlForPatch
6
6
  class << self
7
7
  def included(base)
8
- base.include(InstanceMethods)
9
- base.alias_method_chain :url_for, :engines
8
+ base.prepend(InstanceMethods)
10
9
  end
11
10
  end
12
11
 
13
12
  module InstanceMethods
14
- def url_for_with_engines(options = nil)
15
- url_for_without_engines(options)
13
+ def url_for(options = nil)
14
+ super(options)
16
15
  rescue ActionController::UrlGenerationError
17
16
  engines_url_for(options)
18
17
  end
@@ -39,4 +38,4 @@ end
39
38
 
40
39
  patch = ::EacRailsBase0::Patches::UrlForPatch
41
40
  target = ::ActionDispatch::Routing::UrlFor
42
- target.send(:include, patch) unless target.included_modules.include?(patch)
41
+ target.prepend(patch) unless target.included_modules.include?(patch)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsBase0
4
- VERSION = '0.39.1'
4
+ VERSION = '0.43.0'
5
5
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rake/testtask'
3
4
  require 'rspec/core/rake_task'
4
5
 
5
6
  namespace :eac_rails_base0 do
@@ -12,16 +13,22 @@ namespace :eac_rails_base0 do
12
13
  end
13
14
  Rake::Task['eac_rails_base0:rspec'].enhance ['db:test:prepare']
14
15
 
15
- desc 'Minitest for engines'
16
- Rails::TestTask.new('minitest:engines' => 'test:prepare') do |t|
17
- t.pattern = 'engines/*/test/**/*_test.rb'
16
+ namespace :minitest do
17
+ { core: '', engines: 'engines/*/' }.each do |name, pattern_prefix|
18
+ ::Rake::TestTask.new(name => 'test:prepare') do |t|
19
+ t.libs << 'test'
20
+ t.pattern = "#{pattern_prefix}test/**/*_test.rb"
21
+ t.ruby_opts = %w[-W0]
22
+ t.verbose = false
23
+ end
24
+ end
18
25
  end
19
26
 
20
- desc 'Minitest for application'
21
- task minitest: %w[test:run eac_rails_base0:minitest:engines]
27
+ desc 'Minitest for application and engines'
28
+ task minitest: %w[core engines].map { |task| "eac_rails_base0:minitest:#{task}" }
22
29
 
23
30
  desc 'Minitest and RSpec for application'
24
- task test: ['test', 'eac_rails_base0:rspec']
31
+ task test: ['eac_rails_base0:minitest', 'eac_rails_base0:rspec']
25
32
  end
26
33
 
27
34
  Rake::Task['default'].clear
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_rails_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.1
4
+ version: 0.43.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: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2020-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: active_scaffold
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.5.5
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.5'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.5.5
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: aranha
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -130,16 +150,16 @@ dependencies:
130
150
  name: coffee-rails
131
151
  requirement: !ruby/object:Gem::Requirement
132
152
  requirements:
133
- - - "~>"
153
+ - - ">="
134
154
  - !ruby/object:Gem::Version
135
- version: 4.1.0
155
+ version: 4.2.2
136
156
  type: :runtime
137
157
  prerelease: false
138
158
  version_requirements: !ruby/object:Gem::Requirement
139
159
  requirements:
140
- - - "~>"
160
+ - - ">="
141
161
  - !ruby/object:Gem::Version
142
- version: 4.1.0
162
+ version: 4.2.2
143
163
  - !ruby/object:Gem::Dependency
144
164
  name: eac_rails_utils
145
165
  requirement: !ruby/object:Gem::Requirement
@@ -180,14 +200,20 @@ dependencies:
180
200
  requirements:
181
201
  - - "~>"
182
202
  - !ruby/object:Gem::Version
183
- version: '0.4'
203
+ version: '0.6'
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 0.6.3
184
207
  type: :runtime
185
208
  prerelease: false
186
209
  version_requirements: !ruby/object:Gem::Requirement
187
210
  requirements:
188
211
  - - "~>"
189
212
  - !ruby/object:Gem::Version
190
- version: '0.4'
213
+ version: '0.6'
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: 0.6.3
191
217
  - !ruby/object:Gem::Dependency
192
218
  name: eac_ruby_utils
193
219
  requirement: !ruby/object:Gem::Requirement
@@ -208,20 +234,20 @@ dependencies:
208
234
  requirements:
209
235
  - - "~>"
210
236
  - !ruby/object:Gem::Version
211
- version: '0.6'
237
+ version: '0.8'
212
238
  - - ">="
213
239
  - !ruby/object:Gem::Version
214
- version: 0.6.1
240
+ version: 0.8.2
215
241
  type: :runtime
216
242
  prerelease: false
217
243
  version_requirements: !ruby/object:Gem::Requirement
218
244
  requirements:
219
245
  - - "~>"
220
246
  - !ruby/object:Gem::Version
221
- version: '0.6'
247
+ version: '0.8'
222
248
  - - ">="
223
249
  - !ruby/object:Gem::Version
224
- version: 0.6.1
250
+ version: 0.8.2
225
251
  - !ruby/object:Gem::Dependency
226
252
  name: factory_bot_rails
227
253
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +338,20 @@ dependencies:
312
338
  - - ">="
313
339
  - !ruby/object:Gem::Version
314
340
  version: '0'
341
+ - !ruby/object:Gem::Dependency
342
+ name: letter_opener
343
+ requirement: !ruby/object:Gem::Requirement
344
+ requirements:
345
+ - - ">="
346
+ - !ruby/object:Gem::Version
347
+ version: '0'
348
+ type: :runtime
349
+ prerelease: false
350
+ version_requirements: !ruby/object:Gem::Requirement
351
+ requirements:
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ version: '0'
315
355
  - !ruby/object:Gem::Dependency
316
356
  name: puma
317
357
  requirement: !ruby/object:Gem::Requirement
@@ -330,22 +370,16 @@ dependencies:
330
370
  name: rails
331
371
  requirement: !ruby/object:Gem::Requirement
332
372
  requirements:
333
- - - "~>"
334
- - !ruby/object:Gem::Version
335
- version: 4.2.11
336
373
  - - ">="
337
374
  - !ruby/object:Gem::Version
338
- version: 4.2.11.1
375
+ version: 4.2.11.3
339
376
  type: :runtime
340
377
  prerelease: false
341
378
  version_requirements: !ruby/object:Gem::Requirement
342
379
  requirements:
343
- - - "~>"
344
- - !ruby/object:Gem::Version
345
- version: 4.2.11
346
380
  - - ">="
347
381
  - !ruby/object:Gem::Version
348
- version: 4.2.11.1
382
+ version: 4.2.11.3
349
383
  - !ruby/object:Gem::Dependency
350
384
  name: rails-i18n
351
385
  requirement: !ruby/object:Gem::Requirement
@@ -360,6 +394,20 @@ dependencies:
360
394
  - - "~>"
361
395
  - !ruby/object:Gem::Version
362
396
  version: '4.0'
397
+ - !ruby/object:Gem::Dependency
398
+ name: recordselect
399
+ requirement: !ruby/object:Gem::Requirement
400
+ requirements:
401
+ - - ">="
402
+ - !ruby/object:Gem::Version
403
+ version: 3.10.1
404
+ type: :runtime
405
+ prerelease: false
406
+ version_requirements: !ruby/object:Gem::Requirement
407
+ requirements:
408
+ - - ">="
409
+ - !ruby/object:Gem::Version
410
+ version: 3.10.1
363
411
  - !ruby/object:Gem::Dependency
364
412
  name: rspec-rails
365
413
  requirement: !ruby/object:Gem::Requirement
@@ -518,6 +566,7 @@ files:
518
566
  - app/helpers/eac_rails_base0/app_version_helper.rb
519
567
  - app/helpers/eac_rails_base0/layout_helper.rb
520
568
  - app/helpers/eac_rails_base0/panel_default_helper.rb
569
+ - app/models/eac_rails_base0/application_record.rb
521
570
  - app/uploaders/eac_rails_base0/default_file_uploader.rb
522
571
  - app/views/devise/confirmations/new.html.erb
523
572
  - app/views/devise/mailer/confirmation_instructions.html.erb
@@ -533,6 +582,7 @@ files:
533
582
  - app/views/layouts/eac_rails_base0/_navbar_user.html.erb
534
583
  - app/views/layouts/eac_rails_base0/_open_graph_protocol.html.erb
535
584
  - app/views/layouts/eac_rails_base0/_tasks_scheduler_alert.html.erb
585
+ - app/views/layouts/eac_rails_base0/_version.erb
536
586
  - app/views/layouts/eac_rails_base0/application.html.erb
537
587
  - config/initializers/action_mailer.rb
538
588
  - config/initializers/active_scaffold.rb