lesli_system 1.0.5 → 1.1.0

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: 85e62f3d407792c3b06e76d12b38e287487344b4d109277eb6cae3bfcb55b284
4
- data.tar.gz: 95572c747deabfce33f1e9c2940a6bdbef46df117f72c98c2b0fdfd059e2e03d
3
+ metadata.gz: 13589abb0e500e3486fa5d9539c2e356bc185a947ddb60f4bff1eff0020481c4
4
+ data.tar.gz: 21cab5afb5c7a86e2ae3d3a1f8a0937518cc5dcbc8e69db7240bfe29bcb1ea60
5
5
  SHA512:
6
- metadata.gz: 6e8899e47ef9547ee9ded144bb5b7495bbc01e27811449094db0b243d0e1dbe68a39fac88d7f88d9cee071537326d35fb33f7a71e39021409282dc2a1a2a5b7b
7
- data.tar.gz: 56a7047d1fb1394a053142a6b15057dd82661e9794b7156d618c4e6815cb94a57be1442fa8b3cca4eea88be4dbf6f4d66e3eae817048391a035b412d36ba89f1
6
+ metadata.gz: 870d0d651a99c132344189b46060f236d81eeb4d572473983c7d5d9a8b08c81617b8911bfd568ce87ca6be9f40c3d743a79137ca985746c3680a2e7822eb922b
7
+ data.tar.gz: 4c139b3624088d6f14d036fe34f7f9626d8e32cf7207c20f16a978614f415f71a4f84f02b9537e7bce97066a09dc7c5db3fc13b08dbf39538af1955564492bf8
@@ -22,10 +22,10 @@ module LesliSystem
22
22
  return ENGINES[engine]
23
23
  end
24
24
 
25
- def self.engines local:true
25
+ def self.engines
26
26
  return ENGINES unless ENGINES.empty?
27
27
 
28
- engines_and_gems(:engine, LESLI_ENGINES, local:local)
28
+ engines_and_gems(:engine, LESLI_ENGINES)
29
29
 
30
30
  ENGINES["Root"] = {
31
31
  :code => "root",
@@ -52,7 +52,7 @@ module LesliSystem
52
52
 
53
53
  # Lesli::System.engines()
54
54
  # Lesli::System.engines(:local => true)
55
- def self.engines_and_gems engine_or_gem, lesli_gems, local: false
55
+ def self.engines_and_gems engine_or_gem, lesli_gems
56
56
 
57
57
  # due we do not know the engine mounted path we have to look up for it every
58
58
  # time we load the html view so we can use the dynamic route from the main rails app
@@ -65,16 +65,6 @@ module LesliSystem
65
65
  # convert engine name to Ruby object
66
66
  gem_instance = "#{lesli_gem}".constantize
67
67
 
68
- # check if engines installed locally are required
69
- if local
70
-
71
- # build the path were engines should be installed
72
- gem_local_path = Rails.root.join("engines", lesli_gem)
73
-
74
- # do not include engines if not is locally installed
75
- next unless File.exist?(gem_local_path)
76
- end
77
-
78
68
  gem_specification = Gem::Specification.find_by_name(lesli_gem.underscore)
79
69
 
80
70
  path = (engine_or_gem == :engine) ? gem_instance::Engine.routes.find_script_name({}) : nil
@@ -118,6 +108,7 @@ module LesliSystem
118
108
  LesliSupport
119
109
  LesliSecurity
120
110
  LesliCalendar
111
+ LesliContacts
121
112
  LesliDashboard
122
113
  ]
123
114
  end
@@ -36,11 +36,12 @@ module LesliSystem
36
36
 
37
37
  attr_reader :engine_name, :model
38
38
 
39
- def initialize(klass = nil)
40
- @engine_name = klass.class.name.split("::").first
39
+ def initialize(klass = nil, engine:nil)
40
+ @engine_name = klass.class.name.split("::").first unless klass.nil?
41
+ @engine_name = engine unless engine.nil?
41
42
  @model = ModelStruct.new(
42
- "#{@engine_name}::Account".constantize,
43
- "#{@engine_name}::Dashboard".constantize
43
+ "#{@engine_name}::Account".safe_constantize,
44
+ "#{@engine_name}::Dashboard".safe_constantize
44
45
  )
45
46
  end
46
47
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LesliSystem
4
- VERSION = "1.0.5"
5
- BUILD = "1767506624"
4
+ VERSION = "1.1.0"
5
+ BUILD = "1774678451"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -40,7 +40,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '2.7'
43
+ version: '0'
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="