rubelith 0.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 +7 -0
- data/README.md +103 -0
- data/bin/rubelith +122 -0
- data/core/crystallis/base.rb +111 -0
- data/core/crystallis/migration.rb +33 -0
- data/core/crystallis/relation.rb +25 -0
- data/core/crystallis/schema.rb +23 -0
- data/core/crystallis/validators.rb +18 -0
- data/core/router.rb +148 -0
- data/lib/lithblade/engine.rb +56 -0
- data/lib/lithblade.rb +8 -0
- data/lib/rubelith/application.rb +591 -0
- data/lib/rubelith/crystallis.rb +12 -0
- data/lib/rubelith/version.rb +52 -0
- data/lib/rubelith.rb +173 -0
- metadata +174 -0
data/lib/rubelith.rb
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
# lib/rubelith.rb
|
2
|
+
|
3
|
+
require "zeitwerk"
|
4
|
+
require_relative "rubelith/version"
|
5
|
+
require_relative "rubelith/application"
|
6
|
+
# LithBlade integration
|
7
|
+
require_relative "../lithblade"
|
8
|
+
# Core modules (add more as needed)
|
9
|
+
require_relative "rubelith/crystallis"
|
10
|
+
# ...existing code for Zeitwerk loader...
|
11
|
+
loader = Zeitwerk::Loader.for_gem
|
12
|
+
loader.setup
|
13
|
+
|
14
|
+
module Rubelith
|
15
|
+
# Advanced features
|
16
|
+
def self.hot_reload!
|
17
|
+
application.hot_reload!
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.service_container
|
21
|
+
application.service_container
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.register_service(name, instance)
|
25
|
+
application.register_service(name, instance)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.background_job(job_class, *args)
|
29
|
+
application.background_job(job_class, *args)
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.rate_limit!(key, limit: 100, period: 60)
|
33
|
+
application.rate_limit!(key, limit: limit, period: period)
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.audit_log(event, data = {})
|
37
|
+
application.audit_log(event, data)
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.render_error_page(status)
|
41
|
+
application.render_error_page(status)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.upload_file(file, dest)
|
45
|
+
application.upload_file(file, dest)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.oauth_login(provider)
|
49
|
+
application.oauth_login(provider)
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.graphql_query(*args)
|
53
|
+
application.graphql_query(*args)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.generate_admin_panel!
|
57
|
+
application.generate_admin_panel!
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.health_check!
|
61
|
+
application.health_check!
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.enable_multi_tenancy!
|
65
|
+
application.enable_multi_tenancy!
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.search(query)
|
69
|
+
application.search(query)
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.send_notification(type, message)
|
73
|
+
application.send_notification(type, message)
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.set_template_engine(engine)
|
77
|
+
application.set_template_engine(engine)
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.generate_static_site!
|
81
|
+
application.generate_static_site!
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.api_throttle!(key, limit: 100, period: 60)
|
85
|
+
application.api_throttle!(key, limit: limit, period: period)
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.add_cli_generator(name, &block)
|
89
|
+
application.add_cli_generator(name, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.feature_flag(name, enabled)
|
93
|
+
application.feature_flag(name, enabled)
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.containerize!
|
97
|
+
application.containerize!
|
98
|
+
end
|
99
|
+
# Expose versioning system
|
100
|
+
def self.version
|
101
|
+
Version.to_s
|
102
|
+
end
|
103
|
+
|
104
|
+
# Expose application class
|
105
|
+
def self.application
|
106
|
+
@application ||= Application.new
|
107
|
+
end
|
108
|
+
|
109
|
+
# Expose core features
|
110
|
+
def self.cache(*args, **kwargs)
|
111
|
+
application.cache(*args, **kwargs)
|
112
|
+
end
|
113
|
+
|
114
|
+
def self.log(*args, **kwargs)
|
115
|
+
application.log(*args, **kwargs)
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.monitor(*args, **kwargs)
|
119
|
+
application.monitor(*args, **kwargs)
|
120
|
+
end
|
121
|
+
|
122
|
+
def self.track_analytics(*args, **kwargs)
|
123
|
+
application.track_analytics(*args, **kwargs)
|
124
|
+
end
|
125
|
+
|
126
|
+
def self.authenticate(req)
|
127
|
+
application.authenticate(req)
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.authorize(user, action, resource)
|
131
|
+
application.authorize(user, action, resource)
|
132
|
+
end
|
133
|
+
|
134
|
+
def self.protect_from_csrf(req, res)
|
135
|
+
application.protect_from_csrf(req, res)
|
136
|
+
end
|
137
|
+
|
138
|
+
def self.protect_from_xss(content)
|
139
|
+
application.protect_from_xss(content)
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.enqueue(job_class, *args)
|
143
|
+
application.enqueue(job_class, *args)
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.deliver_mail(mailer_class, method, *args)
|
147
|
+
application.deliver_mail(mailer_class, method, *args)
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.migrate!
|
151
|
+
application.migrate!
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.define_relation(*args, **kwargs)
|
155
|
+
application.define_relation(*args, **kwargs)
|
156
|
+
end
|
157
|
+
|
158
|
+
def self.validate(*args, **kwargs)
|
159
|
+
application.validate(*args, **kwargs)
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.t(*args, **kwargs)
|
163
|
+
application.t(*args, **kwargs)
|
164
|
+
end
|
165
|
+
|
166
|
+
def self.register_plugin(plugin)
|
167
|
+
application.register_plugin(plugin)
|
168
|
+
end
|
169
|
+
|
170
|
+
def self.run_tests
|
171
|
+
application.run_tests
|
172
|
+
end
|
173
|
+
end
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubelith
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jade Taluwa Lewis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-07-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rack
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: zeitwerk
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.14'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: minitest
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '5.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '5.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest-reporters
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.0'
|
125
|
+
description: Rubelith is a gemlike Rails-adjacent framework focused on clarity, beauty,
|
126
|
+
and expressive design. Featuring Crystallis ORM and a modular architecture.
|
127
|
+
email:
|
128
|
+
- you@example.com
|
129
|
+
executables:
|
130
|
+
- rubelith
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- README.md
|
135
|
+
- bin/rubelith
|
136
|
+
- core/crystallis/base.rb
|
137
|
+
- core/crystallis/migration.rb
|
138
|
+
- core/crystallis/relation.rb
|
139
|
+
- core/crystallis/schema.rb
|
140
|
+
- core/crystallis/validators.rb
|
141
|
+
- core/router.rb
|
142
|
+
- lib/lithblade.rb
|
143
|
+
- lib/lithblade/engine.rb
|
144
|
+
- lib/rubelith.rb
|
145
|
+
- lib/rubelith/application.rb
|
146
|
+
- lib/rubelith/crystallis.rb
|
147
|
+
- lib/rubelith/version.rb
|
148
|
+
homepage: https://rubelith.dev
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
metadata:
|
152
|
+
source_code_uri: https://github.com/jadebyurei/rubelith
|
153
|
+
changelog_uri: https://rubelith.dev/changelog
|
154
|
+
documentation_uri: https://rubelith.dev/docs
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 3.0.0
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubygems_version: 3.5.3
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: An elegant, modern Ruby framework for web artisans
|
174
|
+
test_files: []
|