enhance_swarm 1.0.0 → 2.0.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 +4 -4
- data/.enhance_swarm/archives/session_1751182876_06ee7e0e_20250629_094116.json +16 -0
- data/.enhance_swarm/archives/session_1751187567_9d1227c8_20250629_105927.json +16 -0
- data/.enhance_swarm/archives/session_1751190454_6faf48a2_20250629_114734.json +16 -0
- data/.enhance_swarm/archives/session_1751190516_3e4f9437_20250629_114836.json +16 -0
- data/.enhance_swarm/archives/session_1751192354_79568f0f_20250629_121914.json +16 -0
- data/.enhance_swarm/archives/session_1751195070_99653548_20250629_130433.json +16 -0
- data/.enhance_swarm/archives/session_1751196542_a292e40c_20250629_132902.json +7 -0
- data/.enhance_swarm/archives/session_1751196824_9b65d28e_20250629_133344.json +24 -0
- data/.enhance_swarm/archives/session_1751197867_d16edbc5_20250629_135109.json +24 -0
- data/.enhance_swarm/archives/session_1751208541_f9531ce5_20250629_164901.json +16 -0
- data/.enhance_swarm/logs/backend_error.log +0 -0
- data/.enhance_swarm/logs/backend_output.log +0 -0
- data/.enhance_swarm/logs/debug_manual_error.log +0 -0
- data/.enhance_swarm/logs/debug_manual_output.log +18 -0
- data/.enhance_swarm/logs/frontend_error.log +0 -0
- data/.enhance_swarm/logs/frontend_output.log +45 -0
- data/.enhance_swarm/logs/general_error.log +0 -0
- data/.enhance_swarm/logs/general_output.log +404 -0
- data/.enhance_swarm/user_patterns.json +5 -5
- data/DEPLOYMENT.md +344 -0
- data/README.md +183 -820
- data/debug_agent_spawner.rb +99 -0
- data/debug_cli_spawn.rb +95 -0
- data/debug_fixes.rb +209 -0
- data/debug_script_execution.rb +124 -0
- data/debug_session_issue.rb +87 -0
- data/debug_spawn.rb +113 -0
- data/debug_spawn_step_by_step.rb +190 -0
- data/debug_worktree.rb +77 -0
- data/enhance_swarm-0.1.1.gem +0 -0
- data/enhance_swarm-1.0.0.gem +0 -0
- data/final_validation_test.rb +199 -0
- data/lib/enhance_swarm/agent_spawner.rb +5 -1
- data/lib/enhance_swarm/cli.rb +42 -9
- data/lib/enhance_swarm/control_agent.rb +28 -27
- data/lib/enhance_swarm/smart_orchestration.rb +60 -0
- data/lib/enhance_swarm/task_coordinator.rb +1050 -0
- data/lib/enhance_swarm/version.rb +1 -1
- data/lib/enhance_swarm/visual_dashboard.rb +2 -1
- data/test_blog_app/.enhance_swarm/archives/session_1751187575_e119ea73_20250629_105935.json +16 -0
- data/test_blog_app/.enhance_swarm/archives/session_1751187637_7fda97dd_20250629_110037.json +32 -0
- data/test_blog_app/.enhance_swarm/archives/session_1751190527_4c99147e_20250629_114847.json +32 -0
- data/test_blog_app/.enhance_swarm/archives/session_1751190541_8dc83406_20250629_114901.json +16 -0
- data/test_blog_app/.ruby-version +1 -0
- data/test_blog_app/Gemfile +18 -0
- data/test_blog_app/Gemfile.lock +206 -0
- data/test_blog_app/README.md +24 -0
- data/test_blog_app/Rakefile +6 -0
- data/test_blog_app/app/assets/images/.keep +0 -0
- data/test_blog_app/app/assets/stylesheets/application.css +10 -0
- data/test_blog_app/app/controllers/application_controller.rb +4 -0
- data/test_blog_app/app/controllers/concerns/.keep +0 -0
- data/test_blog_app/app/helpers/application_helper.rb +2 -0
- data/test_blog_app/app/models/application_record.rb +3 -0
- data/test_blog_app/app/models/concerns/.keep +0 -0
- data/test_blog_app/app/views/layouts/application.html.erb +27 -0
- data/test_blog_app/app/views/pwa/manifest.json.erb +22 -0
- data/test_blog_app/app/views/pwa/service-worker.js +26 -0
- data/test_blog_app/bin/dev +2 -0
- data/test_blog_app/bin/rails +4 -0
- data/test_blog_app/bin/rake +4 -0
- data/test_blog_app/bin/setup +34 -0
- data/test_blog_app/config/application.rb +42 -0
- data/test_blog_app/config/boot.rb +3 -0
- data/test_blog_app/config/credentials.yml.enc +1 -0
- data/test_blog_app/config/database.yml +32 -0
- data/test_blog_app/config/environment.rb +5 -0
- data/test_blog_app/config/environments/development.rb +51 -0
- data/test_blog_app/config/environments/production.rb +67 -0
- data/test_blog_app/config/environments/test.rb +42 -0
- data/test_blog_app/config/initializers/assets.rb +7 -0
- data/test_blog_app/config/initializers/content_security_policy.rb +25 -0
- data/test_blog_app/config/initializers/filter_parameter_logging.rb +8 -0
- data/test_blog_app/config/initializers/inflections.rb +16 -0
- data/test_blog_app/config/locales/en.yml +31 -0
- data/test_blog_app/config/master.key +1 -0
- data/test_blog_app/config/puma.rb +38 -0
- data/test_blog_app/config/routes.rb +14 -0
- data/test_blog_app/config.ru +6 -0
- data/test_blog_app/db/seeds.rb +9 -0
- data/test_blog_app/lib/tasks/.keep +0 -0
- data/test_blog_app/log/.keep +0 -0
- data/test_blog_app/public/400.html +114 -0
- data/test_blog_app/public/404.html +114 -0
- data/test_blog_app/public/406-unsupported-browser.html +114 -0
- data/test_blog_app/public/422.html +114 -0
- data/test_blog_app/public/500.html +114 -0
- data/test_blog_app/public/icon.png +0 -0
- data/test_blog_app/public/icon.svg +3 -0
- data/test_blog_app/public/robots.txt +1 -0
- data/test_blog_app/script/.keep +0 -0
- data/test_blog_app/storage/.keep +0 -0
- data/test_blog_app/test/controllers/.keep +0 -0
- data/test_blog_app/test/fixtures/files/.keep +0 -0
- data/test_blog_app/test/helpers/.keep +0 -0
- data/test_blog_app/test/integration/.keep +0 -0
- data/test_blog_app/test/models/.keep +0 -0
- data/test_blog_app/test/test_helper.rb +15 -0
- data/test_blog_app/test_enhance_swarm_e2e.rb +244 -0
- data/test_blog_app/test_realistic_workflow.rb +292 -0
- data/test_blog_app/tmp/.keep +0 -0
- data/test_blog_app/tmp/pids/.keep +0 -0
- data/test_blog_app/tmp/storage/.keep +0 -0
- data/test_blog_app/vendor/.keep +0 -0
- data/test_complete_system.rb +267 -0
- metadata +99 -1
@@ -277,7 +277,8 @@ module EnhanceSwarm
|
|
277
277
|
|
278
278
|
def format_duration(agent)
|
279
279
|
if agent[:start_time]
|
280
|
-
|
280
|
+
start_time = agent[:start_time].is_a?(String) ? Time.parse(agent[:start_time]) : agent[:start_time]
|
281
|
+
duration = Time.now - start_time
|
281
282
|
format_time_duration(duration)
|
282
283
|
else
|
283
284
|
""
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"session_id": "1751187575_e119ea73",
|
3
|
+
"start_time": "2025-06-29T10:59:35+02:00",
|
4
|
+
"task_description": "Rails E2E test session",
|
5
|
+
"agents": [
|
6
|
+
{
|
7
|
+
"role": "test_agent",
|
8
|
+
"pid": 99999,
|
9
|
+
"worktree_path": "/test/path",
|
10
|
+
"task": "Test Rails development",
|
11
|
+
"start_time": "2025-06-29T10:59:35+02:00",
|
12
|
+
"status": "running"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"status": "active"
|
16
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"session_id": "1751187637_7fda97dd",
|
3
|
+
"start_time": "2025-06-29T11:00:37+02:00",
|
4
|
+
"task_description": "Blog development workflow",
|
5
|
+
"agents": [
|
6
|
+
{
|
7
|
+
"role": "backend",
|
8
|
+
"pid": 10001,
|
9
|
+
"worktree_path": "/tmp/worktree_backend",
|
10
|
+
"task": "Create Post model and controller",
|
11
|
+
"start_time": "2025-06-29T11:00:37+02:00",
|
12
|
+
"status": "running"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"role": "frontend",
|
16
|
+
"pid": 10002,
|
17
|
+
"worktree_path": "/tmp/worktree_frontend",
|
18
|
+
"task": "Create Post views and styling",
|
19
|
+
"start_time": "2025-06-29T11:00:37+02:00",
|
20
|
+
"status": "running"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"role": "qa",
|
24
|
+
"pid": 10003,
|
25
|
+
"worktree_path": "/tmp/worktree_qa",
|
26
|
+
"task": "Write comprehensive tests",
|
27
|
+
"start_time": "2025-06-29T11:00:37+02:00",
|
28
|
+
"status": "running"
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"status": "active"
|
32
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"session_id": "1751190527_4c99147e",
|
3
|
+
"start_time": "2025-06-29T11:48:47+02:00",
|
4
|
+
"task_description": "Blog development workflow",
|
5
|
+
"agents": [
|
6
|
+
{
|
7
|
+
"role": "backend",
|
8
|
+
"pid": 10001,
|
9
|
+
"worktree_path": "/tmp/worktree_backend",
|
10
|
+
"task": "Create Post model and controller",
|
11
|
+
"start_time": "2025-06-29T11:48:47+02:00",
|
12
|
+
"status": "running"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"role": "frontend",
|
16
|
+
"pid": 10002,
|
17
|
+
"worktree_path": "/tmp/worktree_frontend",
|
18
|
+
"task": "Create Post views and styling",
|
19
|
+
"start_time": "2025-06-29T11:48:47+02:00",
|
20
|
+
"status": "running"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"role": "qa",
|
24
|
+
"pid": 10003,
|
25
|
+
"worktree_path": "/tmp/worktree_qa",
|
26
|
+
"task": "Write comprehensive tests",
|
27
|
+
"start_time": "2025-06-29T11:48:47+02:00",
|
28
|
+
"status": "running"
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"status": "active"
|
32
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"session_id": "1751190541_8dc83406",
|
3
|
+
"start_time": "2025-06-29T11:49:01+02:00",
|
4
|
+
"task_description": "Rails E2E test session",
|
5
|
+
"agents": [
|
6
|
+
{
|
7
|
+
"role": "test_agent",
|
8
|
+
"pid": 99999,
|
9
|
+
"worktree_path": "/test/path",
|
10
|
+
"task": "Test Rails development",
|
11
|
+
"start_time": "2025-06-29T11:49:01+02:00",
|
12
|
+
"status": "running"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"status": "active"
|
16
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
@@ -0,0 +1,18 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
4
|
+
gem "rails", "~> 8.0.2"
|
5
|
+
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
|
6
|
+
gem "propshaft"
|
7
|
+
# Use sqlite3 as the database for Active Record
|
8
|
+
gem "sqlite3", ">= 2.1"
|
9
|
+
# Use the Puma web server [https://github.com/puma/puma]
|
10
|
+
gem "puma", ">= 5.0"
|
11
|
+
|
12
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
13
|
+
gem "tzinfo-data", platforms: %i[ windows jruby ]
|
14
|
+
|
15
|
+
group :development, :test do
|
16
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
17
|
+
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"
|
18
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actioncable (8.0.2)
|
5
|
+
actionpack (= 8.0.2)
|
6
|
+
activesupport (= 8.0.2)
|
7
|
+
nio4r (~> 2.0)
|
8
|
+
websocket-driver (>= 0.6.1)
|
9
|
+
zeitwerk (~> 2.6)
|
10
|
+
actionmailbox (8.0.2)
|
11
|
+
actionpack (= 8.0.2)
|
12
|
+
activejob (= 8.0.2)
|
13
|
+
activerecord (= 8.0.2)
|
14
|
+
activestorage (= 8.0.2)
|
15
|
+
activesupport (= 8.0.2)
|
16
|
+
mail (>= 2.8.0)
|
17
|
+
actionmailer (8.0.2)
|
18
|
+
actionpack (= 8.0.2)
|
19
|
+
actionview (= 8.0.2)
|
20
|
+
activejob (= 8.0.2)
|
21
|
+
activesupport (= 8.0.2)
|
22
|
+
mail (>= 2.8.0)
|
23
|
+
rails-dom-testing (~> 2.2)
|
24
|
+
actionpack (8.0.2)
|
25
|
+
actionview (= 8.0.2)
|
26
|
+
activesupport (= 8.0.2)
|
27
|
+
nokogiri (>= 1.8.5)
|
28
|
+
rack (>= 2.2.4)
|
29
|
+
rack-session (>= 1.0.1)
|
30
|
+
rack-test (>= 0.6.3)
|
31
|
+
rails-dom-testing (~> 2.2)
|
32
|
+
rails-html-sanitizer (~> 1.6)
|
33
|
+
useragent (~> 0.16)
|
34
|
+
actiontext (8.0.2)
|
35
|
+
actionpack (= 8.0.2)
|
36
|
+
activerecord (= 8.0.2)
|
37
|
+
activestorage (= 8.0.2)
|
38
|
+
activesupport (= 8.0.2)
|
39
|
+
globalid (>= 0.6.0)
|
40
|
+
nokogiri (>= 1.8.5)
|
41
|
+
actionview (8.0.2)
|
42
|
+
activesupport (= 8.0.2)
|
43
|
+
builder (~> 3.1)
|
44
|
+
erubi (~> 1.11)
|
45
|
+
rails-dom-testing (~> 2.2)
|
46
|
+
rails-html-sanitizer (~> 1.6)
|
47
|
+
activejob (8.0.2)
|
48
|
+
activesupport (= 8.0.2)
|
49
|
+
globalid (>= 0.3.6)
|
50
|
+
activemodel (8.0.2)
|
51
|
+
activesupport (= 8.0.2)
|
52
|
+
activerecord (8.0.2)
|
53
|
+
activemodel (= 8.0.2)
|
54
|
+
activesupport (= 8.0.2)
|
55
|
+
timeout (>= 0.4.0)
|
56
|
+
activestorage (8.0.2)
|
57
|
+
actionpack (= 8.0.2)
|
58
|
+
activejob (= 8.0.2)
|
59
|
+
activerecord (= 8.0.2)
|
60
|
+
activesupport (= 8.0.2)
|
61
|
+
marcel (~> 1.0)
|
62
|
+
activesupport (8.0.2)
|
63
|
+
base64
|
64
|
+
benchmark (>= 0.3)
|
65
|
+
bigdecimal
|
66
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
67
|
+
connection_pool (>= 2.2.5)
|
68
|
+
drb
|
69
|
+
i18n (>= 1.6, < 2)
|
70
|
+
logger (>= 1.4.2)
|
71
|
+
minitest (>= 5.1)
|
72
|
+
securerandom (>= 0.3)
|
73
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
74
|
+
uri (>= 0.13.1)
|
75
|
+
base64 (0.3.0)
|
76
|
+
benchmark (0.4.1)
|
77
|
+
bigdecimal (3.2.2)
|
78
|
+
builder (3.3.0)
|
79
|
+
concurrent-ruby (1.3.5)
|
80
|
+
connection_pool (2.5.3)
|
81
|
+
crass (1.0.6)
|
82
|
+
date (3.4.1)
|
83
|
+
debug (1.11.0)
|
84
|
+
irb (~> 1.10)
|
85
|
+
reline (>= 0.3.8)
|
86
|
+
drb (2.2.3)
|
87
|
+
erb (5.0.1)
|
88
|
+
erubi (1.13.1)
|
89
|
+
globalid (1.2.1)
|
90
|
+
activesupport (>= 6.1)
|
91
|
+
i18n (1.14.7)
|
92
|
+
concurrent-ruby (~> 1.0)
|
93
|
+
io-console (0.8.0)
|
94
|
+
irb (1.15.2)
|
95
|
+
pp (>= 0.6.0)
|
96
|
+
rdoc (>= 4.0.0)
|
97
|
+
reline (>= 0.4.2)
|
98
|
+
logger (1.7.0)
|
99
|
+
loofah (2.24.1)
|
100
|
+
crass (~> 1.0.2)
|
101
|
+
nokogiri (>= 1.12.0)
|
102
|
+
mail (2.8.1)
|
103
|
+
mini_mime (>= 0.1.1)
|
104
|
+
net-imap
|
105
|
+
net-pop
|
106
|
+
net-smtp
|
107
|
+
marcel (1.0.4)
|
108
|
+
mini_mime (1.1.5)
|
109
|
+
minitest (5.25.5)
|
110
|
+
net-imap (0.5.9)
|
111
|
+
date
|
112
|
+
net-protocol
|
113
|
+
net-pop (0.1.2)
|
114
|
+
net-protocol
|
115
|
+
net-protocol (0.2.2)
|
116
|
+
timeout
|
117
|
+
net-smtp (0.5.1)
|
118
|
+
net-protocol
|
119
|
+
nio4r (2.7.4)
|
120
|
+
nokogiri (1.18.8-arm64-darwin)
|
121
|
+
racc (~> 1.4)
|
122
|
+
pp (0.6.2)
|
123
|
+
prettyprint
|
124
|
+
prettyprint (0.2.0)
|
125
|
+
propshaft (1.1.0)
|
126
|
+
actionpack (>= 7.0.0)
|
127
|
+
activesupport (>= 7.0.0)
|
128
|
+
rack
|
129
|
+
railties (>= 7.0.0)
|
130
|
+
psych (5.2.6)
|
131
|
+
date
|
132
|
+
stringio
|
133
|
+
puma (6.6.0)
|
134
|
+
nio4r (~> 2.0)
|
135
|
+
racc (1.8.1)
|
136
|
+
rack (3.1.16)
|
137
|
+
rack-session (2.1.1)
|
138
|
+
base64 (>= 0.1.0)
|
139
|
+
rack (>= 3.0.0)
|
140
|
+
rack-test (2.2.0)
|
141
|
+
rack (>= 1.3)
|
142
|
+
rackup (2.2.1)
|
143
|
+
rack (>= 3)
|
144
|
+
rails (8.0.2)
|
145
|
+
actioncable (= 8.0.2)
|
146
|
+
actionmailbox (= 8.0.2)
|
147
|
+
actionmailer (= 8.0.2)
|
148
|
+
actionpack (= 8.0.2)
|
149
|
+
actiontext (= 8.0.2)
|
150
|
+
actionview (= 8.0.2)
|
151
|
+
activejob (= 8.0.2)
|
152
|
+
activemodel (= 8.0.2)
|
153
|
+
activerecord (= 8.0.2)
|
154
|
+
activestorage (= 8.0.2)
|
155
|
+
activesupport (= 8.0.2)
|
156
|
+
bundler (>= 1.15.0)
|
157
|
+
railties (= 8.0.2)
|
158
|
+
rails-dom-testing (2.3.0)
|
159
|
+
activesupport (>= 5.0.0)
|
160
|
+
minitest
|
161
|
+
nokogiri (>= 1.6)
|
162
|
+
rails-html-sanitizer (1.6.2)
|
163
|
+
loofah (~> 2.21)
|
164
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
165
|
+
railties (8.0.2)
|
166
|
+
actionpack (= 8.0.2)
|
167
|
+
activesupport (= 8.0.2)
|
168
|
+
irb (~> 1.13)
|
169
|
+
rackup (>= 1.0.0)
|
170
|
+
rake (>= 12.2)
|
171
|
+
thor (~> 1.0, >= 1.2.2)
|
172
|
+
zeitwerk (~> 2.6)
|
173
|
+
rake (13.3.0)
|
174
|
+
rdoc (6.14.1)
|
175
|
+
erb
|
176
|
+
psych (>= 4.0.0)
|
177
|
+
reline (0.6.1)
|
178
|
+
io-console (~> 0.5)
|
179
|
+
securerandom (0.4.1)
|
180
|
+
sqlite3 (2.7.0-arm64-darwin)
|
181
|
+
stringio (3.1.7)
|
182
|
+
thor (1.3.2)
|
183
|
+
timeout (0.4.3)
|
184
|
+
tzinfo (2.0.6)
|
185
|
+
concurrent-ruby (~> 1.0)
|
186
|
+
uri (1.0.3)
|
187
|
+
useragent (0.16.11)
|
188
|
+
websocket-driver (0.8.0)
|
189
|
+
base64
|
190
|
+
websocket-extensions (>= 0.1.0)
|
191
|
+
websocket-extensions (0.1.5)
|
192
|
+
zeitwerk (2.7.3)
|
193
|
+
|
194
|
+
PLATFORMS
|
195
|
+
arm64-darwin
|
196
|
+
|
197
|
+
DEPENDENCIES
|
198
|
+
debug
|
199
|
+
propshaft
|
200
|
+
puma (>= 5.0)
|
201
|
+
rails (~> 8.0.2)
|
202
|
+
sqlite3 (>= 2.1)
|
203
|
+
tzinfo-data
|
204
|
+
|
205
|
+
BUNDLED WITH
|
206
|
+
2.5.15
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css.
|
3
|
+
*
|
4
|
+
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
|
5
|
+
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
|
6
|
+
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
|
7
|
+
* depending on specificity.
|
8
|
+
*
|
9
|
+
* Consider organizing styles into separate files for maintainability.
|
10
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= content_for(:title) || "Test Blog App" %></title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
7
|
+
<meta name="mobile-web-app-capable" content="yes">
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
<%= csp_meta_tag %>
|
10
|
+
|
11
|
+
<%= yield :head %>
|
12
|
+
|
13
|
+
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
|
14
|
+
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
|
15
|
+
|
16
|
+
<link rel="icon" href="/icon.png" type="image/png">
|
17
|
+
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
18
|
+
<link rel="apple-touch-icon" href="/icon.png">
|
19
|
+
|
20
|
+
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
21
|
+
<%= stylesheet_link_tag :app %>
|
22
|
+
</head>
|
23
|
+
|
24
|
+
<body>
|
25
|
+
<%= yield %>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name": "TestBlogApp",
|
3
|
+
"icons": [
|
4
|
+
{
|
5
|
+
"src": "/icon.png",
|
6
|
+
"type": "image/png",
|
7
|
+
"sizes": "512x512"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"src": "/icon.png",
|
11
|
+
"type": "image/png",
|
12
|
+
"sizes": "512x512",
|
13
|
+
"purpose": "maskable"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"start_url": "/",
|
17
|
+
"display": "standalone",
|
18
|
+
"scope": "/",
|
19
|
+
"description": "TestBlogApp.",
|
20
|
+
"theme_color": "red",
|
21
|
+
"background_color": "red"
|
22
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Add a service worker for processing Web Push notifications:
|
2
|
+
//
|
3
|
+
// self.addEventListener("push", async (event) => {
|
4
|
+
// const { title, options } = await event.data.json()
|
5
|
+
// event.waitUntil(self.registration.showNotification(title, options))
|
6
|
+
// })
|
7
|
+
//
|
8
|
+
// self.addEventListener("notificationclick", function(event) {
|
9
|
+
// event.notification.close()
|
10
|
+
// event.waitUntil(
|
11
|
+
// clients.matchAll({ type: "window" }).then((clientList) => {
|
12
|
+
// for (let i = 0; i < clientList.length; i++) {
|
13
|
+
// let client = clientList[i]
|
14
|
+
// let clientPath = (new URL(client.url)).pathname
|
15
|
+
//
|
16
|
+
// if (clientPath == event.notification.data.path && "focus" in client) {
|
17
|
+
// return client.focus()
|
18
|
+
// }
|
19
|
+
// }
|
20
|
+
//
|
21
|
+
// if (clients.openWindow) {
|
22
|
+
// return clients.openWindow(event.notification.data.path)
|
23
|
+
// }
|
24
|
+
// })
|
25
|
+
// )
|
26
|
+
// })
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
5
|
+
|
6
|
+
def system!(*args)
|
7
|
+
system(*args, exception: true)
|
8
|
+
end
|
9
|
+
|
10
|
+
FileUtils.chdir APP_ROOT do
|
11
|
+
# This script is a way to set up or update your development environment automatically.
|
12
|
+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
13
|
+
# Add necessary setup steps to this file.
|
14
|
+
|
15
|
+
puts "== Installing dependencies =="
|
16
|
+
system("bundle check") || system!("bundle install")
|
17
|
+
|
18
|
+
# puts "\n== Copying sample files =="
|
19
|
+
# unless File.exist?("config/database.yml")
|
20
|
+
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
21
|
+
# end
|
22
|
+
|
23
|
+
puts "\n== Preparing database =="
|
24
|
+
system! "bin/rails db:prepare"
|
25
|
+
|
26
|
+
puts "\n== Removing old logs and tempfiles =="
|
27
|
+
system! "bin/rails log:clear tmp:clear"
|
28
|
+
|
29
|
+
unless ARGV.include?("--skip-server")
|
30
|
+
puts "\n== Starting development server =="
|
31
|
+
STDOUT.flush # flush the output before exec(2) so that it displays
|
32
|
+
exec "bin/dev"
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require_relative "boot"
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
# Pick the frameworks you want:
|
5
|
+
require "active_model/railtie"
|
6
|
+
# require "active_job/railtie"
|
7
|
+
require "active_record/railtie"
|
8
|
+
# require "active_storage/engine"
|
9
|
+
require "action_controller/railtie"
|
10
|
+
# require "action_mailer/railtie"
|
11
|
+
# require "action_mailbox/engine"
|
12
|
+
# require "action_text/engine"
|
13
|
+
require "action_view/railtie"
|
14
|
+
# require "action_cable/engine"
|
15
|
+
require "rails/test_unit/railtie"
|
16
|
+
|
17
|
+
# Require the gems listed in Gemfile, including any gems
|
18
|
+
# you've limited to :test, :development, or :production.
|
19
|
+
Bundler.require(*Rails.groups)
|
20
|
+
|
21
|
+
module TestBlogApp
|
22
|
+
class Application < Rails::Application
|
23
|
+
# Initialize configuration defaults for originally generated Rails version.
|
24
|
+
config.load_defaults 8.0
|
25
|
+
|
26
|
+
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
27
|
+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
28
|
+
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
29
|
+
config.autoload_lib(ignore: %w[assets tasks])
|
30
|
+
|
31
|
+
# Configuration for the application, engines, and railties goes here.
|
32
|
+
#
|
33
|
+
# These settings can be overridden in specific environments using the files
|
34
|
+
# in config/environments, which are processed later.
|
35
|
+
#
|
36
|
+
# config.time_zone = "Central Time (US & Canada)"
|
37
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
38
|
+
|
39
|
+
# Don't generate system test files.
|
40
|
+
config.generators.system_tests = nil
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
M+YViaTqXEBpRTxEfKuwxpWy0MTcJXcDpH2HjSRln1MKlieOwzNwKB5H3kC7HYL2owC3wyFrBQauaiSEiG9yVs/vIhWrU0SPquRw72sslOylmUuQFa1H99iXo7HPX7LqRg9sNSTpVrr8wBScRTTRxRahzmF/f0qL5s/DoDrnejUZE3Ew3Ohca6d292FTio38yib/pMCxNhM8CT5I95O3Ph2SWm1e1MP9ZIMCAnYumE+oI7mVLWALEEzohhb2kktthLfMgo7z5X8JnvcAZ2C9pMJFlse8gl5HzJ7A30irnLV6s84FXgMlcIOqA5uZ5LR7AA22aZxedLRyp3dS2DihIRTxMaJ410zEEoaBpdHhViXkTlmFugloh99Jy2mpntgbE25MOFwfLbieVoty9BNXQuBSpEarn0JYgQd5kVkOHZXBavNpapiktxEaD+dWeXUj1CrYPKZTd1E3npE/SyT6tUyi3r5A+z/nxLZ/kzjDlkfAGd5gA/ONTSBz--vDblNxdEoaeOvdg3--DpOafpk9S+K+zLjqgKyVXw==
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem "sqlite3"
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: storage/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: storage/test.sqlite3
|
22
|
+
|
23
|
+
|
24
|
+
# SQLite3 write its data on the local filesystem, as such it requires
|
25
|
+
# persistent disks. If you are deploying to a managed service, you should
|
26
|
+
# make sure it provides disk persistence, as many don't.
|
27
|
+
#
|
28
|
+
# Similarly, if you deploy your application as a Docker container, you must
|
29
|
+
# ensure the database is located in a persisted volume.
|
30
|
+
production:
|
31
|
+
<<: *default
|
32
|
+
# database: path/to/persistent/storage/production.sqlite3
|