eksa-framework 1.2.1 โ 2.2.1
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 +4 -4
- data/README.md +2 -1
- data/exe/eksa +17 -0
- data/lib/eksa/version.rb +1 -1
- data/lib/eksa.rb +40 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba5e76573384bd8808a04847817e7237efc4dc6230d05b7c6ca732d7de32608b
|
|
4
|
+
data.tar.gz: 786e3dd03a18afd6f4ed632c12b52d01339136dade7575789c9c355bb086829e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbbabdc3eb08873aca77b657ae5c1d56590738b7b89618276e841189c810a46c0fcfc459e7aef8ed78495a0739363bbb474de7c17cb620cbe675cfd2a78a8863
|
|
7
|
+
data.tar.gz: 7fba997f5684df20931e3fb297d6d8cdb73c9f0b174d765b6abcfb95c60b491fbf8608ebfb60b39998e6fc8e8420000bf8518829966c132f22aae716ecbf3b6d
|
data/README.md
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
* ๐ **Modern Glassmorphism UI**: Tampilan transparan yang indah dengan Tailwind CSS & Lucide Icons.
|
|
15
15
|
* โก **Rack 3 & Middleware Support**: Mendukung standar terbaru dan pembuatan pipeline middleware kustom.
|
|
16
|
-
* ๐ ๏ธ **Powerful CLI**: Inisialisasi project (`eksa init`), jalankan server (`eksa run`),
|
|
16
|
+
* ๐ ๏ธ **Powerful CLI**: Inisialisasi project (`eksa init`), jalankan server (`eksa run`), generate komponen, dan **auto-routing** otomatis.
|
|
17
17
|
* ๐พ **Dynamic Database Engine**: Database SQLite otomatis dengan schema yang ditentukan oleh model Anda sendiri.
|
|
18
18
|
* ๐งช **Built-in Testing**: Lingkungan pengujian otomatis siap pakai menggunakan RSpec dan `rack-test`.
|
|
19
19
|
* ๐จ **Asset Helpers**: Library bawaan untuk pengelolaan CSS dan JS yang lebih rapi.
|
|
20
20
|
* ๐ **Dynamic SEO Engine**: Penanganan otomatis file `robots.txt` dan `sitemap.xml`.
|
|
21
|
+
* ๐ป **Aesthetic Error Pages**: Halaman 404 dengan desain Glassmorphism yang elegan secara native.
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
data/exe/eksa
CHANGED
|
@@ -66,6 +66,23 @@ def generate_controller(name)
|
|
|
66
66
|
index_view = File.join(view_dir, "index.html.erb")
|
|
67
67
|
File.write(index_view, "<h1>#{class_name}#index</h1>\n<p>Temukan saya di #{index_view}</p>")
|
|
68
68
|
puts " [OK] Created #{index_view}"
|
|
69
|
+
|
|
70
|
+
# Update config.ru with a new route
|
|
71
|
+
if File.exist?('config.ru')
|
|
72
|
+
config_content = File.read('config.ru')
|
|
73
|
+
route_line = %(app.add_route "/#{name}", #{class_name}Controller, :index)
|
|
74
|
+
|
|
75
|
+
unless config_content.include?(route_line)
|
|
76
|
+
if config_content.match?(/run app/)
|
|
77
|
+
new_content = config_content.gsub(/run app/, "#{route_line}\n\nrun app")
|
|
78
|
+
File.write('config.ru', new_content)
|
|
79
|
+
puts " [OK] Added route to config.ru"
|
|
80
|
+
else
|
|
81
|
+
File.open('config.ru', 'a') { |f| f.puts "\n#{route_line}" }
|
|
82
|
+
puts " [OK] Appended route to config.ru"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
69
86
|
end
|
|
70
87
|
|
|
71
88
|
def generate_model(name)
|
data/lib/eksa/version.rb
CHANGED
data/lib/eksa.rb
CHANGED
|
@@ -68,7 +68,46 @@ module Eksa
|
|
|
68
68
|
response.delete_cookie('eksa_flash') if flash_message
|
|
69
69
|
response.finish
|
|
70
70
|
else
|
|
71
|
-
|
|
71
|
+
html = <<~HTML
|
|
72
|
+
<!DOCTYPE html>
|
|
73
|
+
<html lang="id">
|
|
74
|
+
<head>
|
|
75
|
+
<meta charset="UTF-8">
|
|
76
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
77
|
+
<title>404 - Halaman Tidak Ditemukan</title>
|
|
78
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
79
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
|
|
80
|
+
<script src="https://unpkg.com/lucide@latest"></script>
|
|
81
|
+
<style>
|
|
82
|
+
body { background: radial-gradient(circle at top left, #1e1b4b 0%, #000000 100%); min-height: 100vh; color: white; font-family: sans-serif; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 0; }
|
|
83
|
+
.glass { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
|
|
84
|
+
.glow { position: absolute; width: 400px; height: 400px; background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%); z-index: -1; filter: blur(40px); }
|
|
85
|
+
</style>
|
|
86
|
+
</head>
|
|
87
|
+
<body>
|
|
88
|
+
<div class="glow" style="top: 0; left: 0; transform: translate(-50%, -50%);"></div>
|
|
89
|
+
<div class="glow" style="bottom: 0; right: 0; transform: translate(50%, 50%);"></div>
|
|
90
|
+
<div class="glass" style="max-width: 512px; width: 100%; padding: 48px; border-radius: 40px; text-align: center; animation: zoomIn 0.8s;">
|
|
91
|
+
<div style="margin-bottom: 32px; position: relative; display: inline-block;">
|
|
92
|
+
<div style="position: absolute; inset: 0; background: rgba(79, 70, 229, 0.2); filter: blur(3xl); border-radius: 9999px;"></div>
|
|
93
|
+
<div style="position: relative; background: rgba(79, 70, 229, 0.2); padding: 24px; border-radius: 24px; border: 1px solid rgba(99, 102, 241, 0.3);">
|
|
94
|
+
<i data-lucide="ghost" style="width: 64px; height: 64px; color: #a5b4fc;"></i>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<h1 style="font-size: 80px; font-weight: 900; margin: 0; letter-spacing: -0.05em; color: white; opacity: 0.9;">404</h1>
|
|
98
|
+
<h2 style="font-size: 24px; font-weight: 700; margin: 16px 0; color: rgba(255, 255, 255, 0.9);">Oops! Halaman Hilang.</h2>
|
|
99
|
+
<p style="color: rgba(255, 255, 255, 0.5); margin-bottom: 40px; line-height: 1.6;">Sepertinya halaman yang Anda cari tidak ada atau sudah berpindah alamat. Jangan khawatir, kita bisa kembali.</p>
|
|
100
|
+
<div style="display: flex; flex-direction: column; gap: 16px; justify-content: center;">
|
|
101
|
+
<a href="/" style="padding: 16px 32px; background: white; color: black; font-weight: 700; border-radius: 16px; text-decoration: none; display: flex; items-center: center; justify-content: center; gap: 8px;">
|
|
102
|
+
<i data-lucide="home" style="width: 20px; height: 20px;"></i> Kembali ke Beranda
|
|
103
|
+
</a>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<script>lucide.createIcons();</script>
|
|
107
|
+
</body>
|
|
108
|
+
</html>
|
|
109
|
+
HTML
|
|
110
|
+
[404, { 'content-type' => 'text/html' }, [html]]
|
|
72
111
|
end
|
|
73
112
|
end
|
|
74
113
|
end
|