scriptorium 0.0.3 → 0.6.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.lt3 +324 -0
- data/README.md +3155 -1
- data/assets/.DS_Store +0 -0
- data/assets/README.md +44 -0
- data/assets/back-icon.png +0 -0
- data/assets/icons/facebook.svg +1 -0
- data/assets/icons/github.svg +1 -0
- data/assets/icons/instagram.svg +1 -0
- data/assets/icons/reddit.svg +1 -0
- data/assets/icons/ui/.DS_Store +0 -0
- data/assets/icons/ui/back.png +0 -0
- data/assets/icons/ui/copy.png +0 -0
- data/assets/icons/ui/down.png +0 -0
- data/assets/icons/ui/end.png +0 -0
- data/assets/icons/ui/exit.png +0 -0
- data/assets/icons/ui/foo +10 -0
- data/assets/icons/ui/home.png +0 -0
- data/assets/icons/ui/left.png +0 -0
- data/assets/icons/ui/next.png +0 -0
- data/assets/icons/ui/right.png +0 -0
- data/assets/icons/ui/start.png +0 -0
- data/assets/icons/ui/up.png +0 -0
- data/assets/icons/x.svg +1 -0
- data/assets/icons/youtube.svg +1 -0
- data/assets/samples/placeholder.svg +9 -0
- data/assets/themes/standard/favicon.svg +6 -0
- data/bin/scriptorium +1511 -0
- data/doc/README.txt +6 -0
- data/doc/anti-amnesia/20250727-054000-scriptorium-overview.md +95 -0
- data/doc/anti-amnesia/20250727-060000-api-design-tui-planning.md +34 -0
- data/doc/anti-amnesia/20250727-061000-runeblog-tui-analysis.md +50 -0
- data/doc/anti-amnesia/20250727-123000-anti-amnesia-conventions.md +31 -0
- data/doc/anti-amnesia/20250727-154000-livetext-plugin-file-stats.md +73 -0
- data/doc/anti-amnesia/20250727-172600-cursor-rbenv-ruby-version-mystery.md +64 -0
- data/doc/anti-amnesia/20250727-172600-unified-minitest-framework.md +70 -0
- data/doc/anti-amnesia/20250727-172900-ai-cognitive-assessment-capabilities.md +40 -0
- data/doc/anti-amnesia/20250727-173000-widget-testing-achievement.md +110 -0
- data/doc/anti-amnesia/20250727-180000-post-id-num-refactoring.md +73 -0
- data/doc/anti-amnesia/20250728-124243-aaa-syntax-clarification.md +46 -0
- data/doc/anti-amnesia/20250728-124421-conversation-summary-concise.md +124 -0
- data/doc/anti-amnesia/20250729-190000-scriptorium-tui-testing-complete.md +46 -0
- data/doc/anti-amnesia/20250729-200000-scriptorium-tui-testing-edit-file-workflow.md +97 -0
- data/doc/anti-amnesia/20250729-210000-reddit-autopost-integration-complete.md +158 -0
- data/doc/anti-amnesia/20250729-211500-dependency-management-system.md +211 -0
- data/doc/anti-amnesia/20250729-213000-python-virtual-environment-setup.md +141 -0
- data/doc/anti-amnesia/20250729-214500-theme-management-commands.md +211 -0
- data/doc/anti-amnesia/20250729-215000-version-update-to-0.6.0.md +134 -0
- data/doc/anti-amnesia/20250729-220000-user-guide-complete.md +41 -0
- data/doc/anti-amnesia/20250804-190500-cognitive-loop-bug.md +45 -0
- data/doc/anti-amnesia/20250804-190700-anti-amnesia-timestamping-fix.md +30 -0
- data/doc/anti-amnesia/20250804-213700-publishing-test-fix.md +49 -0
- data/doc/anti-amnesia/20250804-214400-additional-test-fixes.md +46 -0
- data/doc/anti-amnesia/20250804-220000-asset-function-logic-clarification.md +41 -0
- data/doc/anti-amnesia/20250806-202032-asset-function-logic-clarification.md +41 -0
- data/doc/anti-amnesia/20250807-213025.md +116 -0
- data/doc/anti-amnesia/20250813-082428-syntax-highlighting-and-navigation-improvements.md +256 -0
- data/doc/banner_svg_config.md +114 -0
- data/doc/contrib.lt3 +8 -0
- data/doc/dependencies.md +281 -0
- data/doc/hacker.lt3 +5 -0
- data/doc/reddit_credentials_template.json +8 -0
- data/doc/reddit_integration.md +207 -0
- data/doc/user.lt3 +38 -0
- data/doc/user_guide_section_1.md +137 -0
- data/doc/user_guide_section_10.md +515 -0
- data/doc/user_guide_section_11.md +708 -0
- data/doc/user_guide_section_2.md +233 -0
- data/doc/user_guide_section_3.md +5 -0
- data/doc/user_guide_section_4.md +221 -0
- data/doc/user_guide_section_5.md +243 -0
- data/doc/user_guide_section_6.md +147 -0
- data/doc/user_guide_section_7.md +311 -0
- data/doc/user_guide_section_8.md +224 -0
- data/doc/user_guide_section_9.md +375 -0
- data/doc/userdoc-toc.txt +88 -0
- data/lib/rouge/lexers/livetext.rb +74 -0
- data/lib/scriptorium/api.rb +640 -0
- data/lib/scriptorium/banner_svg.rb +742 -0
- data/lib/scriptorium/contract.rb +33 -0
- data/lib/scriptorium/exceptions.rb +170 -1
- data/lib/scriptorium/helpers.rb +475 -0
- data/lib/scriptorium/post.rb +195 -0
- data/lib/scriptorium/reddit.rb +83 -0
- data/lib/scriptorium/repo.rb +624 -0
- data/lib/scriptorium/standard_files.rb +515 -0
- data/lib/scriptorium/syntax_highlighter.rb +234 -0
- data/lib/scriptorium/theme.rb +179 -0
- data/lib/scriptorium/version.rb +2 -2
- data/lib/scriptorium/view.rb +976 -0
- data/lib/scriptorium/widgets/featured_posts.rb +149 -0
- data/lib/scriptorium/widgets/links.rb +112 -0
- data/lib/scriptorium/widgets/pages.rb +133 -0
- data/lib/scriptorium/widgets/widget.rb +133 -0
- data/lib/scriptorium.rb +21 -40
- data/lib/skeleton.rb +8 -2
- data/scriptorium.gemspec +15 -4
- data/test/README.md +69 -0
- data/test/all +43 -0
- data/test/api_demo.rb +99 -0
- data/test/assets/imagenotfound.jpg +0 -0
- data/test/assets/images/.DS_Store +0 -0
- data/test/assets/images/README.md +27 -0
- data/test/assets/images/odd_aspect.png +0 -0
- data/test/assets/images/perfect.png +0 -0
- data/test/assets/images/small.png +0 -0
- data/test/assets/images/tall.png +0 -0
- data/test/assets/images/very_tall.png +0 -0
- data/test/assets/images/very_wide.png +0 -0
- data/test/assets/images/wide.png +0 -0
- data/test/assets/testbanner.jpg +0 -0
- data/test/banner_svg/simple_helpers.rb +13 -0
- data/test/banner_svg/unit.rb +768 -0
- data/test/ed_test.rb +204 -0
- data/test/integration/cursor_banner_combinations.rb +193 -0
- data/test/integration/cursor_banner_features.rb +374 -0
- data/test/integration/integration_test.rb +326 -0
- data/test/livetext_plugin_test.rb +229 -0
- data/test/manual/asset_mgmt.rb +67 -0
- data/test/manual/banner-tests/config.txt +3 -0
- data/test/manual/banner-tests/index.html +45 -0
- data/test/manual/banner-tests/test01.html +58 -0
- data/test/manual/banner-tests/test02.html +58 -0
- data/test/manual/banner-tests/test03.html +58 -0
- data/test/manual/banner-tests/test04.html +65 -0
- data/test/manual/banner-tests/test05.html +65 -0
- data/test/manual/banner-tests/test06.html +65 -0
- data/test/manual/banner-tests/test07.html +65 -0
- data/test/manual/banner-tests/test08.html +59 -0
- data/test/manual/banner-tests/test09.html +59 -0
- data/test/manual/banner-tests/test10.html +59 -0
- data/test/manual/banner-tests/test11.html +59 -0
- data/test/manual/banner-tests/test12.html +59 -0
- data/test/manual/banner-tests/test13.html +59 -0
- data/test/manual/banner-tests/test14.html +59 -0
- data/test/manual/banner-tests/test15.html +58 -0
- data/test/manual/banner-tests/test16.html +58 -0
- data/test/manual/banner-tests/test17.html +58 -0
- data/test/manual/banner-tests/test18.html +68 -0
- data/test/manual/banner-tests/test19.html +68 -0
- data/test/manual/banner-tests/test20.html +68 -0
- data/test/manual/banner-tests/test21.html +68 -0
- data/test/manual/banner-tests/test22.html +68 -0
- data/test/manual/banner-tests/test23.html +68 -0
- data/test/manual/banner-tests/test24.html +68 -0
- data/test/manual/banner-tests/test25.html +67 -0
- data/test/manual/banner_environment.rb +192 -0
- data/test/manual/deploy_symlink_demo.rb +142 -0
- data/test/manual/environment.rb +67 -0
- data/test/manual/make_banner.rb +153 -0
- data/test/manual/sample_banner_config.txt +12 -0
- data/test/manual/symlink_demo.rb +117 -0
- data/test/manual/test1.rb +47 -0
- data/test/manual/test2.rb +12 -0
- data/test/manual/test3.rb +38 -0
- data/test/manual/test4.rb +40 -0
- data/test/manual/test5.rb +24 -0
- data/test/manual/test6.rb +73 -0
- data/test/manual/test_banner_combinations.rb +120 -0
- data/test/manual/test_banner_features.rb +306 -0
- data/test/manual/test_banner_from_file.rb +150 -0
- data/test/manual/test_banner_in_header.rb +35 -0
- data/test/manual/test_code_highlighting.rb +68 -0
- data/test/manual/test_complex_header.rb +74 -0
- data/test/manual/test_empty_header.rb +32 -0
- data/test/manual/test_radial_custom.rb +58 -0
- data/test/manual/test_radial_large_radius.rb +52 -0
- data/test/manual/test_svg_debug.rb +47 -0
- data/test/manual/test_syntax_highlighting.rb +147 -0
- data/test/pages-demo/config/currentview.txt +1 -0
- data/test/pages-demo/views/demo/config/bootstrap_css.txt +5 -0
- data/test/pages-demo/views/demo/config/bootstrap_js.txt +4 -0
- data/test/pages-demo/views/demo/config/common.js +57 -0
- data/test/pages-demo/views/demo/config/footer.txt +1 -0
- data/test/pages-demo/views/demo/config/global-head.txt +8 -0
- data/test/pages-demo/views/demo/config/header.txt +1 -0
- data/test/pages-demo/views/demo/config/layout.txt +1 -0
- data/test/pages-demo/views/demo/config/left.txt +1 -0
- data/test/pages-demo/views/demo/config/main.txt +1 -0
- data/test/pages-demo/views/demo/config/right.txt +1 -0
- data/test/pages-demo/views/demo/config.txt +3 -0
- data/test/pages-demo/views/demo/output/panes/footer.html +1 -0
- data/test/pages-demo/views/demo/output/panes/header.html +1 -0
- data/test/pages-demo/views/demo/output/panes/left.html +1 -0
- data/test/pages-demo/views/demo/output/panes/main.html +1 -0
- data/test/pages-demo/views/demo/output/panes/right.html +1 -0
- data/test/rubytext/rubytext_comprehensive_test.rb +307 -0
- data/test/rubytext/rubytext_demo_test.rb +42 -0
- data/test/rubytext/rubytext_testing_guide.md +277 -0
- data/test/run_automated_tests.rb +45 -0
- data/test/scriptorium-TEST-1754622690-146/config/bootstrap_css.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/config/bootstrap_js.txt +4 -0
- data/test/scriptorium-TEST-1754622690-146/config/common.js +57 -0
- data/test/scriptorium-TEST-1754622690-146/config/currentview.txt +1 -0
- data/test/scriptorium-TEST-1754622690-146/config/global-head.txt +9 -0
- data/test/scriptorium-TEST-1754622690-146/config/last_post_num.txt +1 -0
- data/test/scriptorium-TEST-1754622690-146/config/os_helpers.rb +4 -0
- data/test/scriptorium-TEST-1754622690-146/config/widgets.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/posts/0001/meta.txt +8 -0
- data/test/scriptorium-TEST-1754622690-146/posts/0001/source.lt3 +6 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/README.txt +1 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/config.txt +1 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/initial/post.lt3 +12 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/footer.txt +2 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/header.txt +4 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/left.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/main.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/right.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/gen/text.css +1 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/layout.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index.lt3 +1 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index_entry.lt3 +14 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/post.lt3 +13 -0
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/widget.lt3 +1 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_css.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_js.txt +4 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/common.js +57 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/deploy.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/footer.txt +2 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/global-head.txt +9 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/header.txt +4 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/layout.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/left.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/main.txt +5 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/reddit.txt +10 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/right.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/social.txt +7 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/status.txt +7 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/config.txt +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/footer.html +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/header.html +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/left.html +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/main.html +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/right.html +3 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/footer.html +1 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/header.html +1 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/left.html +1 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/main.html +1 -0
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/right.html +1 -0
- data/test/staging/.DS_Store +0 -0
- data/test/syntax_highlighting_test.lt3 +124 -0
- data/test/test_helpers.rb +230 -0
- data/test/tui_editor_integration_test.rb +296 -0
- data/test/tui_integration_test.rb +637 -0
- data/test/unit/api.rb +1056 -0
- data/test/unit/asset_management.rb +245 -0
- data/test/unit/clipboard_test.rb +60 -0
- data/test/unit/contract_test.rb +91 -0
- data/test/unit/core.rb +857 -0
- data/test/unit/deploy_test.rb +187 -0
- data/test/unit/gem_asset_management.rb +189 -0
- data/test/unit/livetext_basic.rb +69 -0
- data/test/unit/livetext_compatibility.rb +89 -0
- data/test/unit/post.rb +244 -0
- data/test/unit/read_commented_file_test.rb +276 -0
- data/test/unit/reddit_test.rb +235 -0
- data/test/unit/repo.rb +548 -0
- data/test/unit/social_test.rb +369 -0
- data/test/unit/symlink_test.rb +213 -0
- data/test/unit/view.rb +431 -0
- data/test/unit/widgets.rb +669 -0
- data/test/wizard_test.rb +123 -0
- data/ui/README.md +67 -0
- data/ui/common/lib/ui_common.rb +8 -0
- data/ui/rubytext/README.md +191 -0
- data/ui/rubytext/bin/scriptorium-rubytext +402 -0
- data/ui/rubytext/lib/rubytext_ui.rb +300 -0
- data/ui/tui/bin/scriptorium +1420 -0
- data/ui/tui/test/tui_test.rb +23 -0
- data/ui/web/app/app.rb +1378 -0
- data/ui/web/app/error_helpers.rb +150 -0
- data/ui/web/app/views/advanced_config.erb +190 -0
- data/ui/web/app/views/asset_management.erb +589 -0
- data/ui/web/app/views/banner_config.erb +200 -0
- data/ui/web/app/views/configure_view.erb +401 -0
- data/ui/web/app/views/dashboard.erb +162 -0
- data/ui/web/app/views/deploy_config.erb +146 -0
- data/ui/web/app/views/edit_pages.erb +195 -0
- data/ui/web/app/views/edit_post.erb +54 -0
- data/ui/web/app/views/error_page.erb +29 -0
- data/ui/web/app/views/header_config.erb +155 -0
- data/ui/web/app/views/layout_config.erb +147 -0
- data/ui/web/app/views/navbar_config.erb +411 -0
- data/ui/web/app/views/view_dashboard.erb +138 -0
- data/ui/web/bin/scriptorium-web +153 -0
- data/ui/web/test/web_basic_test.rb +38 -0
- data/ui/web/test_navbar.txt +7 -0
- data/ui/web/tmp/web_server.log +5 -0
- data/ui/web/tmp/web_server.pid +1 -0
- metadata +359 -7
- data/lib/scriptorium/engine.rb +0 -22
- data/test/engine/unit.rb +0 -44
@@ -0,0 +1,153 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'json'
|
5
|
+
require 'net/http'
|
6
|
+
require 'uri'
|
7
|
+
require 'fileutils'
|
8
|
+
|
9
|
+
class ScriptoriumWebServer
|
10
|
+
def initialize
|
11
|
+
@port = 4567
|
12
|
+
@pid_file = File.join(__dir__, '..', 'tmp', 'web_server.pid')
|
13
|
+
@log_file = File.join(__dir__, '..', 'tmp', 'web_server.log')
|
14
|
+
end
|
15
|
+
|
16
|
+
def start
|
17
|
+
system("kill -9 $(lsof -ti:4567)")
|
18
|
+
if running?
|
19
|
+
puts "Server is already running on port #{@port}"
|
20
|
+
return
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create tmp directory if it doesn't exist
|
24
|
+
FileUtils.mkdir_p(File.dirname(@pid_file))
|
25
|
+
|
26
|
+
# Start the server in background
|
27
|
+
cmd = "cd #{File.dirname(__dir__)} && ruby app/app.rb"
|
28
|
+
pid = Process.spawn(cmd,
|
29
|
+
out: @log_file,
|
30
|
+
err: @log_file,
|
31
|
+
pgroup: true)
|
32
|
+
|
33
|
+
# Save PID
|
34
|
+
File.write(@pid_file, pid.to_s)
|
35
|
+
|
36
|
+
puts "Starting Scriptorium Web UI on port #{@port}..."
|
37
|
+
puts "PID: #{pid}"
|
38
|
+
puts "Log: #{@log_file}"
|
39
|
+
|
40
|
+
# Wait a moment and check if it started successfully
|
41
|
+
sleep 2
|
42
|
+
if running?
|
43
|
+
puts "✅ Server started successfully!"
|
44
|
+
puts "Visit: http://localhost:#{@port}"
|
45
|
+
else
|
46
|
+
puts "❌ Server failed to start. Check logs: #{@log_file}"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def stop
|
51
|
+
system("rm #@log_file")
|
52
|
+
system("touch #@log_file")
|
53
|
+
unless File.exist?(@pid_file)
|
54
|
+
puts "Server is not running"
|
55
|
+
return
|
56
|
+
end
|
57
|
+
|
58
|
+
pid = File.read(@pid_file).strip.to_i
|
59
|
+
puts "Stopping server (PID: #{pid})..."
|
60
|
+
|
61
|
+
begin
|
62
|
+
Process.kill('TERM', pid)
|
63
|
+
Process.wait(pid)
|
64
|
+
puts "✅ Server stopped"
|
65
|
+
rescue Errno::ESRCH
|
66
|
+
puts "Server process not found"
|
67
|
+
rescue Errno::ECHILD
|
68
|
+
puts "Server process already ended"
|
69
|
+
ensure
|
70
|
+
File.delete(@pid_file) if File.exist?(@pid_file)
|
71
|
+
end
|
72
|
+
system("kill -9 $(lsof -ti:4567)")
|
73
|
+
end
|
74
|
+
|
75
|
+
def status
|
76
|
+
if running?
|
77
|
+
pid = File.read(@pid_file).strip
|
78
|
+
puts "✅ Server is running (PID: #{pid})"
|
79
|
+
puts "URL: http://localhost:#{@port}"
|
80
|
+
|
81
|
+
# Try to get JSON status
|
82
|
+
begin
|
83
|
+
response = Net::HTTP.get_response(URI("http://localhost:#{@port}/status"))
|
84
|
+
if response.code == "200"
|
85
|
+
status_data = JSON.parse(response.body)
|
86
|
+
puts "Current view: #{status_data['current_view'] || 'none'}"
|
87
|
+
puts "Repository loaded: #{status_data['repo_loaded']}"
|
88
|
+
end
|
89
|
+
rescue => e
|
90
|
+
puts "Could not fetch status: #{e.message}"
|
91
|
+
end
|
92
|
+
else
|
93
|
+
puts "❌ Server is not running"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def logfile
|
98
|
+
system("cat #@log_file | more")
|
99
|
+
end
|
100
|
+
|
101
|
+
def restart
|
102
|
+
stop
|
103
|
+
sleep 1
|
104
|
+
start
|
105
|
+
end
|
106
|
+
|
107
|
+
private
|
108
|
+
|
109
|
+
def running?
|
110
|
+
return false unless File.exist?(@pid_file)
|
111
|
+
|
112
|
+
pid = File.read(@pid_file).strip.to_i
|
113
|
+
Process.kill(0, pid)
|
114
|
+
true
|
115
|
+
rescue Errno::ESRCH, Errno::ENOENT
|
116
|
+
false
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Parse command line options
|
121
|
+
options = {}
|
122
|
+
OptionParser.new do |opts|
|
123
|
+
opts.banner = "Usage: scriptorium-web [start|stop|restart|status|log]"
|
124
|
+
|
125
|
+
opts.on("-p", "--port PORT", Integer, "Port number (default: 4567)") do |port|
|
126
|
+
options[:port] = port
|
127
|
+
end
|
128
|
+
end.parse!
|
129
|
+
|
130
|
+
# Get command
|
131
|
+
command = ARGV.first || 'status'
|
132
|
+
|
133
|
+
# Create server instance
|
134
|
+
server = ScriptoriumWebServer.new
|
135
|
+
server.instance_variable_set(:@port, options[:port]) if options[:port]
|
136
|
+
|
137
|
+
# Execute command
|
138
|
+
case command
|
139
|
+
when 'start'
|
140
|
+
server.start
|
141
|
+
when 'stop'
|
142
|
+
server.stop
|
143
|
+
when 'log'
|
144
|
+
server.logfile
|
145
|
+
when 'restart'
|
146
|
+
server.restart
|
147
|
+
when 'status'
|
148
|
+
server.status
|
149
|
+
else
|
150
|
+
puts "Unknown command: #{command}"
|
151
|
+
puts "Usage: scriptorium-web [start|stop|restart|status]"
|
152
|
+
exit 1
|
153
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require_relative '../../../lib/scriptorium'
|
3
|
+
|
4
|
+
class WebBasicTest < Minitest::Test
|
5
|
+
def test_web_structure
|
6
|
+
# Test that the web app file exists
|
7
|
+
app_file = File.join(__dir__, '..', 'app', 'app.rb')
|
8
|
+
assert File.exist?(app_file), "Web app should exist at #{app_file}"
|
9
|
+
|
10
|
+
# Test that the dashboard template exists
|
11
|
+
template_file = File.join(__dir__, '..', 'app', 'views', 'dashboard.erb')
|
12
|
+
assert File.exist?(template_file), "Dashboard template should exist at #{template_file}"
|
13
|
+
|
14
|
+
# Test that the server management script exists
|
15
|
+
server_script = File.join(__dir__, '..', 'bin', 'scriptorium-web')
|
16
|
+
assert File.exist?(server_script), "Server script should exist at #{server_script}"
|
17
|
+
assert File.executable?(server_script), "Server script should be executable"
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_api_integration
|
21
|
+
# Test that the web app can create an API instance
|
22
|
+
api = Scriptorium::API.new(testmode: true)
|
23
|
+
assert api, "Should be able to create API instance"
|
24
|
+
|
25
|
+
# Test that we can check for repository
|
26
|
+
assert_respond_to api, :views, "API should respond to views method"
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_server_script_requires
|
30
|
+
# Test that the server script has the necessary requires
|
31
|
+
server_script = File.join(__dir__, '..', 'bin', 'scriptorium-web')
|
32
|
+
content = File.read(server_script)
|
33
|
+
|
34
|
+
assert content.include?('require \'optparse\''), "Should require optparse"
|
35
|
+
assert content.include?('require \'json\''), "Should require json"
|
36
|
+
assert content.include?('require \'net/http\''), "Should require net/http"
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
|
2
|
+
Ignoring unf_ext-0.0.8.2 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.8.2
|
3
|
+
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- sinatra (LoadError)
|
4
|
+
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
|
5
|
+
from app/app.rb:3:in `<main>'
|
@@ -0,0 +1 @@
|
|
1
|
+
35004
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scriptorium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-08-14 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: livetext
|
@@ -70,6 +69,80 @@ dependencies:
|
|
70
69
|
- - ">="
|
71
70
|
- !ruby/object:Gem::Version
|
72
71
|
version: 3.25.0
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: sinatra
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '3.0'
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 3.0.0
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.0'
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 3.0.0
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: redd
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.8.8
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 0.8.8
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: htmlbeautifier
|
108
|
+
requirement: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.4'
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 1.4.0
|
116
|
+
type: :runtime
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.4'
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.4.0
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: clipboard
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '1.3'
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: 1.3.6
|
136
|
+
type: :runtime
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '1.3'
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.3.6
|
73
146
|
- !ruby/object:Gem::Dependency
|
74
147
|
name: minitest
|
75
148
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,19 +167,299 @@ description: A blog system based on Ruby and Livetext
|
|
94
167
|
email: rubyhacker@gmail.com
|
95
168
|
executables:
|
96
169
|
- sblog
|
170
|
+
- scriptorium
|
97
171
|
extensions: []
|
98
172
|
extra_rdoc_files: []
|
99
173
|
files:
|
100
174
|
- "./README.lt3"
|
101
175
|
- "./README.md"
|
102
176
|
- "./scriptorium.gemspec"
|
177
|
+
- assets/.DS_Store
|
178
|
+
- assets/README.md
|
179
|
+
- assets/back-icon.png
|
180
|
+
- assets/icons/facebook.svg
|
181
|
+
- assets/icons/github.svg
|
182
|
+
- assets/icons/instagram.svg
|
183
|
+
- assets/icons/reddit.svg
|
184
|
+
- assets/icons/ui/.DS_Store
|
185
|
+
- assets/icons/ui/back.png
|
186
|
+
- assets/icons/ui/copy.png
|
187
|
+
- assets/icons/ui/down.png
|
188
|
+
- assets/icons/ui/end.png
|
189
|
+
- assets/icons/ui/exit.png
|
190
|
+
- assets/icons/ui/foo
|
191
|
+
- assets/icons/ui/home.png
|
192
|
+
- assets/icons/ui/left.png
|
193
|
+
- assets/icons/ui/next.png
|
194
|
+
- assets/icons/ui/right.png
|
195
|
+
- assets/icons/ui/start.png
|
196
|
+
- assets/icons/ui/up.png
|
197
|
+
- assets/icons/x.svg
|
198
|
+
- assets/icons/youtube.svg
|
199
|
+
- assets/samples/placeholder.svg
|
200
|
+
- assets/themes/standard/favicon.svg
|
103
201
|
- bin/sblog
|
202
|
+
- bin/scriptorium
|
203
|
+
- doc/README.txt
|
204
|
+
- doc/anti-amnesia/20250727-054000-scriptorium-overview.md
|
205
|
+
- doc/anti-amnesia/20250727-060000-api-design-tui-planning.md
|
206
|
+
- doc/anti-amnesia/20250727-061000-runeblog-tui-analysis.md
|
207
|
+
- doc/anti-amnesia/20250727-123000-anti-amnesia-conventions.md
|
208
|
+
- doc/anti-amnesia/20250727-154000-livetext-plugin-file-stats.md
|
209
|
+
- doc/anti-amnesia/20250727-172600-cursor-rbenv-ruby-version-mystery.md
|
210
|
+
- doc/anti-amnesia/20250727-172600-unified-minitest-framework.md
|
211
|
+
- doc/anti-amnesia/20250727-172900-ai-cognitive-assessment-capabilities.md
|
212
|
+
- doc/anti-amnesia/20250727-173000-widget-testing-achievement.md
|
213
|
+
- doc/anti-amnesia/20250727-180000-post-id-num-refactoring.md
|
214
|
+
- doc/anti-amnesia/20250728-124243-aaa-syntax-clarification.md
|
215
|
+
- doc/anti-amnesia/20250728-124421-conversation-summary-concise.md
|
216
|
+
- doc/anti-amnesia/20250729-190000-scriptorium-tui-testing-complete.md
|
217
|
+
- doc/anti-amnesia/20250729-200000-scriptorium-tui-testing-edit-file-workflow.md
|
218
|
+
- doc/anti-amnesia/20250729-210000-reddit-autopost-integration-complete.md
|
219
|
+
- doc/anti-amnesia/20250729-211500-dependency-management-system.md
|
220
|
+
- doc/anti-amnesia/20250729-213000-python-virtual-environment-setup.md
|
221
|
+
- doc/anti-amnesia/20250729-214500-theme-management-commands.md
|
222
|
+
- doc/anti-amnesia/20250729-215000-version-update-to-0.6.0.md
|
223
|
+
- doc/anti-amnesia/20250729-220000-user-guide-complete.md
|
224
|
+
- doc/anti-amnesia/20250804-190500-cognitive-loop-bug.md
|
225
|
+
- doc/anti-amnesia/20250804-190700-anti-amnesia-timestamping-fix.md
|
226
|
+
- doc/anti-amnesia/20250804-213700-publishing-test-fix.md
|
227
|
+
- doc/anti-amnesia/20250804-214400-additional-test-fixes.md
|
228
|
+
- doc/anti-amnesia/20250804-220000-asset-function-logic-clarification.md
|
229
|
+
- doc/anti-amnesia/20250806-202032-asset-function-logic-clarification.md
|
230
|
+
- doc/anti-amnesia/20250807-213025.md
|
231
|
+
- doc/anti-amnesia/20250813-082428-syntax-highlighting-and-navigation-improvements.md
|
232
|
+
- doc/banner_svg_config.md
|
233
|
+
- doc/contrib.lt3
|
234
|
+
- doc/dependencies.md
|
235
|
+
- doc/hacker.lt3
|
236
|
+
- doc/reddit_credentials_template.json
|
237
|
+
- doc/reddit_integration.md
|
238
|
+
- doc/user.lt3
|
239
|
+
- doc/user_guide_section_1.md
|
240
|
+
- doc/user_guide_section_10.md
|
241
|
+
- doc/user_guide_section_11.md
|
242
|
+
- doc/user_guide_section_2.md
|
243
|
+
- doc/user_guide_section_3.md
|
244
|
+
- doc/user_guide_section_4.md
|
245
|
+
- doc/user_guide_section_5.md
|
246
|
+
- doc/user_guide_section_6.md
|
247
|
+
- doc/user_guide_section_7.md
|
248
|
+
- doc/user_guide_section_8.md
|
249
|
+
- doc/user_guide_section_9.md
|
250
|
+
- doc/userdoc-toc.txt
|
251
|
+
- lib/rouge/lexers/livetext.rb
|
104
252
|
- lib/scriptorium.rb
|
105
|
-
- lib/scriptorium/
|
253
|
+
- lib/scriptorium/api.rb
|
254
|
+
- lib/scriptorium/banner_svg.rb
|
255
|
+
- lib/scriptorium/contract.rb
|
106
256
|
- lib/scriptorium/exceptions.rb
|
257
|
+
- lib/scriptorium/helpers.rb
|
258
|
+
- lib/scriptorium/post.rb
|
259
|
+
- lib/scriptorium/reddit.rb
|
260
|
+
- lib/scriptorium/repo.rb
|
261
|
+
- lib/scriptorium/standard_files.rb
|
262
|
+
- lib/scriptorium/syntax_highlighter.rb
|
263
|
+
- lib/scriptorium/theme.rb
|
107
264
|
- lib/scriptorium/version.rb
|
265
|
+
- lib/scriptorium/view.rb
|
266
|
+
- lib/scriptorium/widgets/featured_posts.rb
|
267
|
+
- lib/scriptorium/widgets/links.rb
|
268
|
+
- lib/scriptorium/widgets/pages.rb
|
269
|
+
- lib/scriptorium/widgets/widget.rb
|
108
270
|
- lib/skeleton.rb
|
109
|
-
- test/
|
271
|
+
- test/README.md
|
272
|
+
- test/all
|
273
|
+
- test/api_demo.rb
|
274
|
+
- test/assets/imagenotfound.jpg
|
275
|
+
- test/assets/images/.DS_Store
|
276
|
+
- test/assets/images/README.md
|
277
|
+
- test/assets/images/odd_aspect.png
|
278
|
+
- test/assets/images/perfect.png
|
279
|
+
- test/assets/images/small.png
|
280
|
+
- test/assets/images/tall.png
|
281
|
+
- test/assets/images/very_tall.png
|
282
|
+
- test/assets/images/very_wide.png
|
283
|
+
- test/assets/images/wide.png
|
284
|
+
- test/assets/testbanner.jpg
|
285
|
+
- test/banner_svg/simple_helpers.rb
|
286
|
+
- test/banner_svg/unit.rb
|
287
|
+
- test/ed_test.rb
|
288
|
+
- test/integration/cursor_banner_combinations.rb
|
289
|
+
- test/integration/cursor_banner_features.rb
|
290
|
+
- test/integration/integration_test.rb
|
291
|
+
- test/livetext_plugin_test.rb
|
292
|
+
- test/manual/asset_mgmt.rb
|
293
|
+
- test/manual/banner-tests/config.txt
|
294
|
+
- test/manual/banner-tests/index.html
|
295
|
+
- test/manual/banner-tests/test01.html
|
296
|
+
- test/manual/banner-tests/test02.html
|
297
|
+
- test/manual/banner-tests/test03.html
|
298
|
+
- test/manual/banner-tests/test04.html
|
299
|
+
- test/manual/banner-tests/test05.html
|
300
|
+
- test/manual/banner-tests/test06.html
|
301
|
+
- test/manual/banner-tests/test07.html
|
302
|
+
- test/manual/banner-tests/test08.html
|
303
|
+
- test/manual/banner-tests/test09.html
|
304
|
+
- test/manual/banner-tests/test10.html
|
305
|
+
- test/manual/banner-tests/test11.html
|
306
|
+
- test/manual/banner-tests/test12.html
|
307
|
+
- test/manual/banner-tests/test13.html
|
308
|
+
- test/manual/banner-tests/test14.html
|
309
|
+
- test/manual/banner-tests/test15.html
|
310
|
+
- test/manual/banner-tests/test16.html
|
311
|
+
- test/manual/banner-tests/test17.html
|
312
|
+
- test/manual/banner-tests/test18.html
|
313
|
+
- test/manual/banner-tests/test19.html
|
314
|
+
- test/manual/banner-tests/test20.html
|
315
|
+
- test/manual/banner-tests/test21.html
|
316
|
+
- test/manual/banner-tests/test22.html
|
317
|
+
- test/manual/banner-tests/test23.html
|
318
|
+
- test/manual/banner-tests/test24.html
|
319
|
+
- test/manual/banner-tests/test25.html
|
320
|
+
- test/manual/banner_environment.rb
|
321
|
+
- test/manual/deploy_symlink_demo.rb
|
322
|
+
- test/manual/environment.rb
|
323
|
+
- test/manual/make_banner.rb
|
324
|
+
- test/manual/sample_banner_config.txt
|
325
|
+
- test/manual/symlink_demo.rb
|
326
|
+
- test/manual/test1.rb
|
327
|
+
- test/manual/test2.rb
|
328
|
+
- test/manual/test3.rb
|
329
|
+
- test/manual/test4.rb
|
330
|
+
- test/manual/test5.rb
|
331
|
+
- test/manual/test6.rb
|
332
|
+
- test/manual/test_banner_combinations.rb
|
333
|
+
- test/manual/test_banner_features.rb
|
334
|
+
- test/manual/test_banner_from_file.rb
|
335
|
+
- test/manual/test_banner_in_header.rb
|
336
|
+
- test/manual/test_code_highlighting.rb
|
337
|
+
- test/manual/test_complex_header.rb
|
338
|
+
- test/manual/test_empty_header.rb
|
339
|
+
- test/manual/test_radial_custom.rb
|
340
|
+
- test/manual/test_radial_large_radius.rb
|
341
|
+
- test/manual/test_svg_debug.rb
|
342
|
+
- test/manual/test_syntax_highlighting.rb
|
343
|
+
- test/pages-demo/config/currentview.txt
|
344
|
+
- test/pages-demo/views/demo/config.txt
|
345
|
+
- test/pages-demo/views/demo/config/bootstrap_css.txt
|
346
|
+
- test/pages-demo/views/demo/config/bootstrap_js.txt
|
347
|
+
- test/pages-demo/views/demo/config/common.js
|
348
|
+
- test/pages-demo/views/demo/config/footer.txt
|
349
|
+
- test/pages-demo/views/demo/config/global-head.txt
|
350
|
+
- test/pages-demo/views/demo/config/header.txt
|
351
|
+
- test/pages-demo/views/demo/config/layout.txt
|
352
|
+
- test/pages-demo/views/demo/config/left.txt
|
353
|
+
- test/pages-demo/views/demo/config/main.txt
|
354
|
+
- test/pages-demo/views/demo/config/right.txt
|
355
|
+
- test/pages-demo/views/demo/output/panes/footer.html
|
356
|
+
- test/pages-demo/views/demo/output/panes/header.html
|
357
|
+
- test/pages-demo/views/demo/output/panes/left.html
|
358
|
+
- test/pages-demo/views/demo/output/panes/main.html
|
359
|
+
- test/pages-demo/views/demo/output/panes/right.html
|
360
|
+
- test/rubytext/rubytext_comprehensive_test.rb
|
361
|
+
- test/rubytext/rubytext_demo_test.rb
|
362
|
+
- test/rubytext/rubytext_testing_guide.md
|
363
|
+
- test/run_automated_tests.rb
|
364
|
+
- test/scriptorium-TEST-1754622690-146/config/bootstrap_css.txt
|
365
|
+
- test/scriptorium-TEST-1754622690-146/config/bootstrap_js.txt
|
366
|
+
- test/scriptorium-TEST-1754622690-146/config/common.js
|
367
|
+
- test/scriptorium-TEST-1754622690-146/config/currentview.txt
|
368
|
+
- test/scriptorium-TEST-1754622690-146/config/global-head.txt
|
369
|
+
- test/scriptorium-TEST-1754622690-146/config/last_post_num.txt
|
370
|
+
- test/scriptorium-TEST-1754622690-146/config/os_helpers.rb
|
371
|
+
- test/scriptorium-TEST-1754622690-146/config/widgets.txt
|
372
|
+
- test/scriptorium-TEST-1754622690-146/posts/0001/meta.txt
|
373
|
+
- test/scriptorium-TEST-1754622690-146/posts/0001/source.lt3
|
374
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/README.txt
|
375
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/config.txt
|
376
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/initial/post.lt3
|
377
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/footer.txt
|
378
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/header.txt
|
379
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/left.txt
|
380
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/main.txt
|
381
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/right.txt
|
382
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/gen/text.css
|
383
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/layout/layout.txt
|
384
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/templates/index.lt3
|
385
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/templates/index_entry.lt3
|
386
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/templates/post.lt3
|
387
|
+
- test/scriptorium-TEST-1754622690-146/themes/standard/templates/widget.lt3
|
388
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config.txt
|
389
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_css.txt
|
390
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_js.txt
|
391
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/common.js
|
392
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/deploy.txt
|
393
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/footer.txt
|
394
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/global-head.txt
|
395
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/header.txt
|
396
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/layout.txt
|
397
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/left.txt
|
398
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/main.txt
|
399
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/reddit.txt
|
400
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/right.txt
|
401
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/social.txt
|
402
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/config/status.txt
|
403
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/layout/footer.html
|
404
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/layout/header.html
|
405
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/layout/left.html
|
406
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/layout/main.html
|
407
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/layout/right.html
|
408
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/output/panes/footer.html
|
409
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/output/panes/header.html
|
410
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/output/panes/left.html
|
411
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/output/panes/main.html
|
412
|
+
- test/scriptorium-TEST-1754622690-146/views/sample/output/panes/right.html
|
413
|
+
- test/staging/.DS_Store
|
414
|
+
- test/syntax_highlighting_test.lt3
|
415
|
+
- test/test_helpers.rb
|
416
|
+
- test/tui_editor_integration_test.rb
|
417
|
+
- test/tui_integration_test.rb
|
418
|
+
- test/unit/api.rb
|
419
|
+
- test/unit/asset_management.rb
|
420
|
+
- test/unit/clipboard_test.rb
|
421
|
+
- test/unit/contract_test.rb
|
422
|
+
- test/unit/core.rb
|
423
|
+
- test/unit/deploy_test.rb
|
424
|
+
- test/unit/gem_asset_management.rb
|
425
|
+
- test/unit/livetext_basic.rb
|
426
|
+
- test/unit/livetext_compatibility.rb
|
427
|
+
- test/unit/post.rb
|
428
|
+
- test/unit/read_commented_file_test.rb
|
429
|
+
- test/unit/reddit_test.rb
|
430
|
+
- test/unit/repo.rb
|
431
|
+
- test/unit/social_test.rb
|
432
|
+
- test/unit/symlink_test.rb
|
433
|
+
- test/unit/view.rb
|
434
|
+
- test/unit/widgets.rb
|
435
|
+
- test/wizard_test.rb
|
436
|
+
- ui/README.md
|
437
|
+
- ui/common/lib/ui_common.rb
|
438
|
+
- ui/rubytext/README.md
|
439
|
+
- ui/rubytext/bin/scriptorium-rubytext
|
440
|
+
- ui/rubytext/lib/rubytext_ui.rb
|
441
|
+
- ui/tui/bin/scriptorium
|
442
|
+
- ui/tui/test/tui_test.rb
|
443
|
+
- ui/web/app/app.rb
|
444
|
+
- ui/web/app/error_helpers.rb
|
445
|
+
- ui/web/app/views/advanced_config.erb
|
446
|
+
- ui/web/app/views/asset_management.erb
|
447
|
+
- ui/web/app/views/banner_config.erb
|
448
|
+
- ui/web/app/views/configure_view.erb
|
449
|
+
- ui/web/app/views/dashboard.erb
|
450
|
+
- ui/web/app/views/deploy_config.erb
|
451
|
+
- ui/web/app/views/edit_pages.erb
|
452
|
+
- ui/web/app/views/edit_post.erb
|
453
|
+
- ui/web/app/views/error_page.erb
|
454
|
+
- ui/web/app/views/header_config.erb
|
455
|
+
- ui/web/app/views/layout_config.erb
|
456
|
+
- ui/web/app/views/navbar_config.erb
|
457
|
+
- ui/web/app/views/view_dashboard.erb
|
458
|
+
- ui/web/bin/scriptorium-web
|
459
|
+
- ui/web/test/web_basic_test.rb
|
460
|
+
- ui/web/test_navbar.txt
|
461
|
+
- ui/web/tmp/web_server.log
|
462
|
+
- ui/web/tmp/web_server.pid
|
110
463
|
homepage: https://github.com/Hal9000/scriptorium
|
111
464
|
licenses:
|
112
465
|
- Ruby
|
@@ -126,8 +479,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
479
|
- !ruby/object:Gem::Version
|
127
480
|
version: '0'
|
128
481
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
130
|
-
signing_key:
|
482
|
+
rubygems_version: 3.7.1
|
131
483
|
specification_version: 4
|
132
484
|
summary: A command-line blogging system
|
133
485
|
test_files: []
|
data/lib/scriptorium/engine.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
module Scriptorium::Engine
|
2
|
-
|
3
|
-
include Scriptorium::Exceptions
|
4
|
-
|
5
|
-
def repo_exists?
|
6
|
-
Dir.exist?(@dir)
|
7
|
-
end
|
8
|
-
|
9
|
-
def create_new_repo
|
10
|
-
Dir.mkdir(@dir)
|
11
|
-
Dir.chdir(@dir) do
|
12
|
-
subs = %w[config views]
|
13
|
-
subs.each {|sub| Dir.mkdir(sub) }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def destroy_repo
|
18
|
-
raise TestModeOnly unless Scriptorium.testing
|
19
|
-
system("rm -rf #@dir")
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
data/test/engine/unit.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
|
3
|
-
require_relative '../../lib/scriptorium'
|
4
|
-
|
5
|
-
class TestScriptoriumEngine < MiniTest::Test
|
6
|
-
|
7
|
-
TestModeOnly = Scriptorium::TestModeOnly
|
8
|
-
|
9
|
-
def setup
|
10
|
-
@blog = Scriptorium.blog
|
11
|
-
Scriptorium.testing = true
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
Scriptorium.testing = true
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_singleton
|
19
|
-
refute_nil @blog, "blog accessor was nil"
|
20
|
-
assert_raises(NoMethodError) { y = Scriptorium.new }
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_repo_create_destroy
|
24
|
-
t0 = @blog.repo_exists?
|
25
|
-
refute t0, "Repo should not exist yet"
|
26
|
-
|
27
|
-
@blog.create_new_repo
|
28
|
-
|
29
|
-
t1 = @blog.repo_exists?
|
30
|
-
assert t1, "Repo should exist"
|
31
|
-
|
32
|
-
@blog.destroy_repo
|
33
|
-
|
34
|
-
t2 = @blog.repo_exists?
|
35
|
-
refute t2, "Repo should have been destroyed"
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_illegal_destroy
|
39
|
-
Scriptorium.testing = false
|
40
|
-
assert_raises(TestModeOnly) { @blog.destroy_repo }
|
41
|
-
# @blog.destroy_repo
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|