eac_rails_base0 0.29.1 → 0.29.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b23aa8510c39f9658dada19f006579f3314d8a5a698d6f5ea4105ea52897e66
4
- data.tar.gz: 852ffd0231ba4701d7e653ea0012531183db8d2e49c3bce98c1c9a2aa4a2213f
3
+ metadata.gz: a216bf6ad6dd62013908222b6d40cc0c7f1984411b631e6b7992cf7e3729ee7d
4
+ data.tar.gz: c3b3a88bfe212b9b409ae5b573c5018198cc09f50d63755a86a26a34925bf8ae
5
5
  SHA512:
6
- metadata.gz: 1313a597deb3167327ecda6f2563987871efd421a55a0d977537b3795b7d074e0caf310b8a48959ef16786faf32d78cb44318eff5a9872a1268429108ecb12b3
7
- data.tar.gz: df357f183960bd20621e641d53b72f935bb05108abd83a26a0f565642459e33cdbd13a292864bd1256a1d7b1cfbd8dfb41bbffb91ed364636fcd827ac0aba78b
6
+ metadata.gz: 517e5aa1b7fbefe652f677c8d392cac5b069cb5f04cbb9ce5d8ea2c512c3d9e9492edf08ac8b77a9db2b2c3fe1cf86f1f71e72d728e32733b078e9ab24ddd2ea
7
+ data.tar.gz: 0e54a6541281181a4a0702072d4aa6acafb2dc0e5ddcde37173404163847c74a249dffb72b66681e748fb7d18704834996a6ad30fc1f98a473551f3045371b12
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'carrierwave'
3
4
 
4
5
  module EacRailsBase0
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  Rails.application.configure do
3
4
  config.action_mailer.smtp_settings = {
4
5
  address: ENV['action_mailer_smtp_address'],
@@ -10,7 +11,7 @@ Rails.application.configure do
10
11
  enable_starttls_auto:
11
12
  ::EacRailsBase0::BooleanValue.to_b(ENV['action_mailer_smtp_enable_starttls_auto'])
12
13
  }
13
- %i(host port).each do |option|
14
+ %i[host port].each do |option|
14
15
  value = ENV["action_mailer_default_url_#{option}"]
15
16
  if value.present?
16
17
  config.action_mailer.default_url_options ||= {}
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'carrierwave'
3
4
  require 'fog/aws'
4
5
 
@@ -1,2 +1,3 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'eac_rails_base0/patches/eac_rails_utils_links_helper_patch'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # File: lib/pg/deprecated_constants.rb
3
4
  #
4
5
  # This file overrides the pg gem's pg/deprecated_constants.rb file and so
@@ -16,16 +17,16 @@
16
17
  #
17
18
  # config.autoload_paths << Rails.root.join('lib')
18
19
  #
19
- if ('0.21.0' != PG::VERSION) || (ActiveRecord.version.to_s != '4.2.11.1')
20
- puts <<MSG
21
- -----------------------------------------------------------------------------------
22
- The pg and/or activerecord gem version has changed, meaning deprecated pg constants
23
- may no longer be in use, so try deleting this file to see if the
24
- 'The PGconn, PGresult, and PGError constants are deprecated...' message has gone:
25
- #{__FILE__}
26
- -----------------------------------------------------------------------------------
20
+ if (PG::VERSION != '0.21.0') || (ActiveRecord.version.to_s != '4.2.11.1')
21
+ ::Rails.logger.warn(<<~MSG)
22
+ -----------------------------------------------------------------------------------
23
+ The pg and/or activerecord gem version has changed, meaning deprecated pg constants
24
+ may no longer be in use, so try deleting this file to see if the
25
+ 'The PGconn, PGresult, and PGError constants are deprecated...' message has gone:
26
+ #{__FILE__}
27
+ -----------------------------------------------------------------------------------
27
28
 
28
- MSG
29
+ MSG
29
30
  end
30
31
 
31
32
  # Declare the deprecated constants as is done in the original
@@ -9,6 +9,7 @@ Bundler.require(*Rails.groups)
9
9
  def rails_root(dir)
10
10
  return dir if ::File.exist?(::File.join(dir, 'config.ru'))
11
11
  raise 'config.ru not found in ascendent path' if dir == '/'
12
+
12
13
  rails_root(::File.dirname(dir))
13
14
  end
14
15
 
@@ -1,13 +1,15 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module EacRailsBase0
3
4
  class BooleanValue
4
- def self.to_b(v)
5
- return false if v.blank?
6
- if v.is_a?(String)
7
- v = v.strip
8
- !v.blank? && v != '0' && v != 'false'
5
+ def self.to_b(object)
6
+ return false if object.blank?
7
+
8
+ if object.is_a?(String)
9
+ object = object.strip
10
+ object.present? && object != '0' && object != 'false'
9
11
  else
10
- v ? true : false
12
+ object ? true : false
11
13
  end
12
14
  end
13
15
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'eac_ruby_gems_utils/gem'
3
4
 
4
5
  module EacRailsBase0
@@ -15,9 +15,7 @@ module EacRailsBase0
15
15
  def short_object_link_with_base0(object, action = nil, options = {})
16
16
  value_or_sign(object, '') do |value|
17
17
  path = object_path(value, action)
18
- if can_by_path?(path, options[:method])
19
- link_to '', url_for(path), options
20
- end
18
+ link_to '', url_for(path), options if can_by_path?(path, options[:method])
21
19
  end
22
20
  end
23
21
 
@@ -19,7 +19,7 @@ begin
19
19
  ActiveRecord::Migration.maintain_test_schema!
20
20
  rescue ActiveRecord::PendingMigrationError => e
21
21
  ::Rails.logger.fatal(e)
22
- ::Kernel.exit 1
22
+ ::Kernel.exit 1 # rubocop:disable Rails/Exit
23
23
  end
24
24
 
25
25
  RSpec.configure do |config|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsBase0
4
- VERSION = '0.29.1'
4
+ VERSION = '0.29.2'
5
5
  end
data/lib/fog.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Fog
3
4
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if %w(test rspec).any? { |arg| ARGV.first.to_s.include?(arg) }
3
+ if %w[test rspec].any? { |arg| ARGV.first.to_s.include?(arg) }
4
4
  ENV['RACK_ENV'] = ENV['RAILS_ENV'] = 'test'
5
5
  end
6
6
 
7
- require File.expand_path('../config/application', __FILE__)
7
+ require File.expand_path('config/application', __dir__)
8
8
 
9
9
  Rails.application.load_tasks
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class EacRailsBase0Generator < Rails::Generators::Base
4
- SUB_GENERATORS = %w(abilities testers rubocop).freeze
4
+ SUB_GENERATORS = %w[abilities testers rubocop].freeze
5
5
 
6
6
  def run_other_generators
7
7
  SUB_GENERATORS.each do |generator|
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rspec/core/rake_task'
3
4
 
4
5
  namespace :eac_rails_base0 do
@@ -17,7 +18,7 @@ namespace :eac_rails_base0 do
17
18
  end
18
19
 
19
20
  desc 'Minitest for application'
20
- task minitest: %w(test:run eac_rails_base0:minitest:engines)
21
+ task minitest: %w[test:run eac_rails_base0:minitest:engines]
21
22
 
22
23
  desc 'Minitest and RSpec for application'
23
24
  task test: ['test', 'eac_rails_base0:rspec']
@@ -27,10 +28,13 @@ namespace :eac_rails_base0 do
27
28
  task test_all: :environment do
28
29
  require 'eac_ruby_gems_utils/tests/multiple'
29
30
  tests = ::EacRubyGemsUtils::Tests::Multiple.new(::EacRailsBase0::Gems.all)
30
- fail 'Some test did not pass' unless tests.ok?
31
+ raise 'Some test did not pass' unless tests.ok?
31
32
  end
32
33
  end
33
34
  end
34
35
 
35
36
  Rake::Task['default'].clear
36
- task default: %w(eac_rails_base0:gems:test_all)
37
+ task default: %w[eac_rails_base0:gems:test_all]
38
+
39
+ Rake::Task['test'].clear
40
+ task test: %w[eac_rails_base0:minitest]
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.29.1
4
+ version: 0.29.2
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-02-28 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha
@@ -322,16 +322,56 @@ dependencies:
322
322
  name: rubocop
323
323
  requirement: !ruby/object:Gem::Requirement
324
324
  requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: '0.80'
328
+ type: :runtime
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: '0.80'
335
+ - !ruby/object:Gem::Dependency
336
+ name: rubocop-rails
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - "~>"
340
+ - !ruby/object:Gem::Version
341
+ version: '2.4'
325
342
  - - ">="
326
343
  - !ruby/object:Gem::Version
327
- version: '0'
344
+ version: 2.4.2
345
+ type: :runtime
346
+ prerelease: false
347
+ version_requirements: !ruby/object:Gem::Requirement
348
+ requirements:
349
+ - - "~>"
350
+ - !ruby/object:Gem::Version
351
+ version: '2.4'
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ version: 2.4.2
355
+ - !ruby/object:Gem::Dependency
356
+ name: rubocop-rspec
357
+ requirement: !ruby/object:Gem::Requirement
358
+ requirements:
359
+ - - "~>"
360
+ - !ruby/object:Gem::Version
361
+ version: '1.38'
362
+ - - ">="
363
+ - !ruby/object:Gem::Version
364
+ version: 1.38.1
328
365
  type: :runtime
329
366
  prerelease: false
330
367
  version_requirements: !ruby/object:Gem::Requirement
331
368
  requirements:
369
+ - - "~>"
370
+ - !ruby/object:Gem::Version
371
+ version: '1.38'
332
372
  - - ">="
333
373
  - !ruby/object:Gem::Version
334
- version: '0'
374
+ version: 1.38.1
335
375
  - !ruby/object:Gem::Dependency
336
376
  name: sass-rails
337
377
  requirement: !ruby/object:Gem::Requirement