eac_rails_base0 0.30.2 → 0.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/pg_deprecated_constants.rb +1 -1
- data/lib/eac_rails_base0.rb +1 -0
- data/lib/eac_rails_base0/app_base/application.rb +10 -0
- data/lib/eac_rails_base0/patches/eac_rails_utils_links_helper_patch.rb +1 -0
- data/lib/eac_rails_base0/spec_helper/factory_bot.rb +10 -0
- data/lib/eac_rails_base0/version.rb +1 -1
- data/lib/eac_rails_base0/x_engine.rb +38 -0
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3e5eb35f94687aa107c7b794a1fcb1c7a2be5c83bc5470c8a2ccd63354d911
|
4
|
+
data.tar.gz: 435b04aba0c29a6095cc7d60fe38392f6f99b9add924ae23666593874d324d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef9181e5bdc9f747068f9c3fe795f05068f7d4a1ad8eb391de91c32b1afd112f9d1fbbf64c24a86c7da288473dd996166a40260fc2ee40d02bdc50a896ca4884
|
7
|
+
data.tar.gz: 48f590ceabb20253c7fb79145c5891ef61acef7c93d1409e04310bed3094c222c81eb84df509e67c341e71b0b716a7e868348b8abdbcf174f49e8700a66c497a
|
@@ -17,7 +17,7 @@
|
|
17
17
|
#
|
18
18
|
# config.autoload_paths << Rails.root.join('lib')
|
19
19
|
#
|
20
|
-
if (PG::VERSION != '0.21.0') || (ActiveRecord.version.to_s != '4.2.11.
|
20
|
+
if (PG::VERSION != '0.21.0') || (ActiveRecord.version.to_s != '4.2.11.3')
|
21
21
|
::Rails.logger.warn(<<~MSG)
|
22
22
|
-----------------------------------------------------------------------------------
|
23
23
|
The pg and/or activerecord gem version has changed, meaning deprecated pg constants
|
data/lib/eac_rails_base0.rb
CHANGED
@@ -22,3 +22,4 @@ require_dependency 'eac_rails_base0/app_base/ability_mapping'
|
|
22
22
|
require_dependency 'eac_rails_base0/app_base/ability'
|
23
23
|
require_dependency 'eac_rails_base0/boolean_value'
|
24
24
|
require_dependency 'eac_rails_base0/patches/url_for_patch'
|
25
|
+
require_dependency 'eac_rails_base0/x_engine'
|
@@ -40,5 +40,15 @@ module EacRailsBase0App
|
|
40
40
|
config.after_initialize do
|
41
41
|
ActiveRecord::Base.logger = nil
|
42
42
|
end
|
43
|
+
|
44
|
+
app_tmpdir = ::File.join(::Dir.tmpdir, ::Rails.root.to_path.parameterize, 'tmp')
|
45
|
+
|
46
|
+
config.assets.configure do |env|
|
47
|
+
env.cache = Sprockets::Cache::FileStore.new(
|
48
|
+
::File.join(app_tmpdir, 'cache', 'assets'),
|
49
|
+
config.assets.cache_limit,
|
50
|
+
env.logger
|
51
|
+
)
|
52
|
+
end
|
43
53
|
end
|
44
54
|
end
|
@@ -5,3 +5,13 @@ require 'factory_bot_rails'
|
|
5
5
|
RSpec.configure do |config|
|
6
6
|
config.include FactoryBot::Syntax::Methods
|
7
7
|
end
|
8
|
+
|
9
|
+
::FactoryBot.definition_file_paths += ::EacRailsBase0::XEngine.local.flat_map do |engine|
|
10
|
+
%w[factories test/factories spec/factories].map do |subpath|
|
11
|
+
engine.config.root.join(subpath).to_path
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
::FactoryBot.find_definitions
|
16
|
+
|
17
|
+
Spring.after_fork { FactoryBot.reload } if defined?(Spring)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'find'
|
5
|
+
require 'delegate'
|
6
|
+
|
7
|
+
module EacRailsBase0
|
8
|
+
# A extended version of [Rails::Engine].
|
9
|
+
class XEngine < SimpleDelegator
|
10
|
+
class << self
|
11
|
+
enable_simple_cache
|
12
|
+
|
13
|
+
def local_root
|
14
|
+
::Rails.root.join('engines')
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def all_uncached
|
20
|
+
::Rails::Engine.subclasses.map { |engine_class| new(engine_class.instance) }
|
21
|
+
end
|
22
|
+
|
23
|
+
def local_uncached
|
24
|
+
all.select(&:local?)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def initialize(engine_instance)
|
29
|
+
super(engine_instance)
|
30
|
+
end
|
31
|
+
|
32
|
+
def local?
|
33
|
+
return false unless self.class.local_root.directory?
|
34
|
+
|
35
|
+
::Find.find(self.class.local_root.to_path).include?(config.root.to_path)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
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.
|
4
|
+
version: 0.34.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: 2020-
|
11
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha
|
@@ -292,6 +292,34 @@ dependencies:
|
|
292
292
|
- - ">="
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
|
+
- !ruby/object:Gem::Dependency
|
296
|
+
name: launchy
|
297
|
+
requirement: !ruby/object:Gem::Requirement
|
298
|
+
requirements:
|
299
|
+
- - ">="
|
300
|
+
- !ruby/object:Gem::Version
|
301
|
+
version: '0'
|
302
|
+
type: :runtime
|
303
|
+
prerelease: false
|
304
|
+
version_requirements: !ruby/object:Gem::Requirement
|
305
|
+
requirements:
|
306
|
+
- - ">="
|
307
|
+
- !ruby/object:Gem::Version
|
308
|
+
version: '0'
|
309
|
+
- !ruby/object:Gem::Dependency
|
310
|
+
name: puma
|
311
|
+
requirement: !ruby/object:Gem::Requirement
|
312
|
+
requirements:
|
313
|
+
- - ">="
|
314
|
+
- !ruby/object:Gem::Version
|
315
|
+
version: '0'
|
316
|
+
type: :runtime
|
317
|
+
prerelease: false
|
318
|
+
version_requirements: !ruby/object:Gem::Requirement
|
319
|
+
requirements:
|
320
|
+
- - ">="
|
321
|
+
- !ruby/object:Gem::Version
|
322
|
+
version: '0'
|
295
323
|
- !ruby/object:Gem::Dependency
|
296
324
|
name: rails
|
297
325
|
requirement: !ruby/object:Gem::Requirement
|
@@ -541,6 +569,7 @@ files:
|
|
541
569
|
- lib/eac_rails_base0/spec_helper/eac_users_support.rb
|
542
570
|
- lib/eac_rails_base0/spec_helper/factory_bot.rb
|
543
571
|
- lib/eac_rails_base0/version.rb
|
572
|
+
- lib/eac_rails_base0/x_engine.rb
|
544
573
|
- lib/fog.rb
|
545
574
|
- lib/generators/eac_rails_base0/abilities/abilities_generator.rb
|
546
575
|
- lib/generators/eac_rails_base0/abilities/templates/ability.rb
|