eac_rails_base0 0.30.0 → 0.33.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: 9d0d81e530147f8a6feb877eeed1dbf0b765fccc5357d14bfc901dcdf5d912c3
4
- data.tar.gz: dea4940b8f76a4931d64708ed99144e3cfd4d06953dea7af14025c7c8d11e192
3
+ metadata.gz: bc8407af240d11d2f91c8ccbd191a7eceeeeeb7a2bb40e1c15f1305b68706345
4
+ data.tar.gz: 14934f7095527c7ec6867cfc4205b620070cddc3d31f6659aba10ecaa27e7cdd
5
5
  SHA512:
6
- metadata.gz: ecbd569fe49919a574d3518b0a71b56c5bc3686886138094d9304bf330edfba096324c304db2ab99054dfeec83621b11ce07d8c3f27dcf4f33b24a70af53a07e
7
- data.tar.gz: 570df99ca55dc4bc10415770cc72785db949f0dbd4a73c1d28edd49d316d50ce4662295680894f8b6d26716c88d54ffc95fd627b94078033f98280c46db02646
6
+ metadata.gz: 57fedca57c919a198749270c28a11407599d7803e498a35d158852fbfdb58763e393f912d054e81e54ffb9fc732ef4d43e900f41791f197a523605fc85f4560e
7
+ data.tar.gz: 2f6e1db72c27d3eb3682d624b4f1b846d554c003137a0948350804e535e62f78708b444214136236edeaf2786eff6736f4c9c37592f576a10834f6e41a9044d5
@@ -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
@@ -6,6 +6,7 @@ module EacRailsBase0
6
6
  class << self
7
7
  def included(base)
8
8
  base.include(InstanceMethods)
9
+ base.include(::CanCanDryHelper)
9
10
  base.alias_method_chain :short_object_link, :base0
10
11
  base.alias_method_chain :object_path_by_class, :base0
11
12
  end
@@ -14,6 +14,7 @@ FactoryBot.define do
14
14
  factory :user, class: ::EacUsersSupport::User do
15
15
  email { 'admin@example.com' }
16
16
  password { 'mysecret' }
17
+ confirmed_at { ::Time.zone.now }
17
18
  end
18
19
  end
19
20
 
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsBase0
4
- VERSION = '0.30.0'
4
+ VERSION = '0.33.0'
5
5
  end
@@ -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.30.0
4
+ version: 0.33.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-05-12 00:00:00.000000000 Z
11
+ date: 2020-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha
@@ -203,6 +203,9 @@ dependencies:
203
203
  - - "~>"
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0.6'
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: 0.6.1
206
209
  type: :runtime
207
210
  prerelease: false
208
211
  version_requirements: !ruby/object:Gem::Requirement
@@ -210,6 +213,9 @@ dependencies:
210
213
  - - "~>"
211
214
  - !ruby/object:Gem::Version
212
215
  version: '0.6'
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: 0.6.1
213
219
  - !ruby/object:Gem::Dependency
214
220
  name: factory_bot_rails
215
221
  requirement: !ruby/object:Gem::Requirement
@@ -286,6 +292,20 @@ dependencies:
286
292
  - - ">="
287
293
  - !ruby/object:Gem::Version
288
294
  version: '0'
295
+ - !ruby/object:Gem::Dependency
296
+ name: puma
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'
289
309
  - !ruby/object:Gem::Dependency
290
310
  name: rails
291
311
  requirement: !ruby/object:Gem::Requirement
@@ -535,6 +555,7 @@ files:
535
555
  - lib/eac_rails_base0/spec_helper/eac_users_support.rb
536
556
  - lib/eac_rails_base0/spec_helper/factory_bot.rb
537
557
  - lib/eac_rails_base0/version.rb
558
+ - lib/eac_rails_base0/x_engine.rb
538
559
  - lib/fog.rb
539
560
  - lib/generators/eac_rails_base0/abilities/abilities_generator.rb
540
561
  - lib/generators/eac_rails_base0/abilities/templates/ability.rb