lesli_system 1.0.0 → 1.0.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: fadca1b7477c32c3a810a1f461022b5b83a8f5eb088685f3b88ec05c85bdba01
4
- data.tar.gz: 5f356cff4f6246e741203f4f318bd6955abfab01ad9e8773f24a1d2ca0f18569
3
+ metadata.gz: 28356bfdbdc31259937f56ee05cec3e71d4d83e7d19e00cf54d3e18e3d765da1
4
+ data.tar.gz: 922a34b96275b78efa01e7c2a425a456fbe742434dc52c1bdd863f66f8b5e56f
5
5
  SHA512:
6
- metadata.gz: feb5d653e8e229848f8e32f7d11cd89fa17e9adc81bb309a42a720735130bb1c8a7dddcb726161b74f397d4f5966696ed19a4a924689b36363e20aaf7562706b
7
- data.tar.gz: 6dc38a4be96ddb535471dbe6269721f707370d5d1a624a8c50f284aeac772e8b4252031f511ba05ed5cb6d613ddc284f0adbcc946a872b74c592231973c99d18
6
+ metadata.gz: 0b112fe29aa5bfa716cf8ccfacd2cca529afeaac0c152356a0792597b919d62fd9daebded1977ff03e3778c0c81a5fe58ba03d82bd6ebc913377cea096205a1e
7
+ data.tar.gz: d96544ea9192c913c4caabfd9d7c989ef0a9d8413cd1e583e1adf6a38ae0bf290ffacea941414922e8f834077fc0936bc5153ff38e0f7473f20d5b3a65a891bc
@@ -47,6 +47,8 @@ module LesliSystem
47
47
  # do not include engines if not is locally installed
48
48
  next unless File.exist?(engine_local_path)
49
49
  end
50
+
51
+ gem_specification = Gem::Specification.find_by_name(engine.underscore)
50
52
 
51
53
  # engine completelly information
52
54
  ENGINES[engine] = {
@@ -54,9 +56,10 @@ module LesliSystem
54
56
  :name => engine,
55
57
  :path => engine_instance::Engine.routes.find_script_name({}),
56
58
  :version => engine_instance::VERSION,
57
- :description => Gem::Specification.find_by_name(engine.underscore).description,
59
+ :description => gem_specification.description,
60
+ :metadata => gem_specification.metadata,
58
61
  :build => engine_instance::BUILD,
59
- :dir => Gem::Specification.find_by_name(engine.underscore).gem_dir
62
+ :dir => gem_specification.gem_dir
60
63
  }
61
64
  end
62
65
 
@@ -1,4 +1,4 @@
1
- =begin
1
+ =begin
2
2
 
3
3
  Lesli
4
4
 
@@ -31,11 +31,17 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
  module LesliSystem
34
- # class Engine < ::Rails::Engine
35
- # isolate_namespace LesliSystem
36
-
37
- # initializer "lesli_system" do |app|
38
-
39
- # end
40
- # end
34
+ class Klass
35
+ ModelStruct = Struct.new(:account, :dashboard)
36
+
37
+ attr_reader :engine_name, :model
38
+
39
+ def initialize(klass = nil)
40
+ @engine_name = klass.class.name.split("::").first
41
+ @model = ModelStruct.new(
42
+ "#{@engine_name}::Account".constantize,
43
+ "#{@engine_name}::Dashboard".constantize
44
+ )
45
+ end
46
+ end
41
47
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LesliSystem
4
- VERSION = "1.0.0"
5
- BUILD = "1751334981"
4
+ VERSION = "1.0.2"
5
+ BUILD = "1752589521"
6
6
  end
data/lib/lesli_system.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # loading gem coomponents
4
- require "lesli_system/engines"
5
4
  require "lesli_system/version"
6
- #require "lesli_system/engine"
5
+ require "lesli_system/engines"
6
+ require "lesli_system/klass"
7
7
 
8
8
  module LesliSystem
9
9
  class Error < StandardError; end
data/readme.md CHANGED
@@ -73,6 +73,18 @@ LesliSystem.engine("Lesli", "path")
73
73
  "/lesli"
74
74
  ```
75
75
 
76
+ ```ruby
77
+ module LesliBell
78
+ class DashboardsController < ApplicationController
79
+ def index
80
+ # Build a standard object based on a controller reference
81
+ builder = LesliSystem::Klass.new(self)
82
+ @dashboards = builder.model.dashboard.all
83
+ end
84
+ end
85
+ end
86
+ ```
87
+
76
88
  ### Documentation
77
89
  * [website](https://www.lesli.dev/)
78
90
  * [database](./docs/database.md)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-01 00:00:00.000000000 Z
11
+ date: 2025-07-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  LesliSystem provides shared, reusable system-level components for The Lesli Framework.
@@ -22,8 +22,8 @@ extra_rdoc_files: []
22
22
  files:
23
23
  - Rakefile
24
24
  - lib/lesli_system.rb
25
- - lib/lesli_system/engine.rb
26
25
  - lib/lesli_system/engines.rb
26
+ - lib/lesli_system/klass.rb
27
27
  - lib/lesli_system/version.rb
28
28
  - license
29
29
  - readme.md