Skip to content

Commit a9cba7c

Browse files
authored
Merge pull request #3 from AlexB52/web-console
Feature - Add web-console
2 parents a84dbf3 + 6e1c98f commit a9cba7c

File tree

7 files changed

+30
-2
lines changed

7 files changed

+30
-2
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gem "sqlite3"
88

99
gem "sprockets-rails"
1010
gem "puma"
11+
gem 'web-console'
1112

1213
# Start debugger with binding.b [https://github.com/ruby/debug]
1314
# gem "debug", ">= 1.0.0"

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ PATH
33
specs:
44
playground (0.1.0)
55
rails (>= 7.0.2.2)
6+
web-console
67

78
GEM
89
remote: https://rubygems.org/
@@ -72,6 +73,7 @@ GEM
7273
i18n (>= 1.6, < 2)
7374
minitest (>= 5.1)
7475
tzinfo (~> 2.0)
76+
bindex (0.8.1)
7577
builder (3.2.4)
7678
concurrent-ruby (1.1.9)
7779
crass (1.0.6)
@@ -155,6 +157,11 @@ GEM
155157
timeout (0.2.0)
156158
tzinfo (2.0.4)
157159
concurrent-ruby (~> 1.0)
160+
web-console (4.2.0)
161+
actionview (>= 6.0.0)
162+
activemodel (>= 6.0.0)
163+
bindex (>= 0.4.0)
164+
railties (>= 6.0.0)
158165
websocket-driver (0.7.5)
159166
websocket-extensions (>= 0.1.0)
160167
websocket-extensions (0.1.5)
@@ -168,6 +175,7 @@ DEPENDENCIES
168175
puma
169176
sprockets-rails
170177
sqlite3
178+
web-console
171179

172180
BUNDLED WITH
173181
2.3.7

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
esbuild: npm run watch
2-
server: bin/rails server -p 3000
2+
web: bin/rails server -p 5000

app/assets/stylesheets/playground/application.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,20 @@
1313
*= require_tree .
1414
*= require_self
1515
*/
16+
17+
body { max-width:900px; margin:auto; padding:0 1rem; }
18+
19+
.code { flex-grow:1; height:500px; }
20+
.sidebar, .code { margin-right:1rem;}
21+
22+
textarea, input, select {
23+
-webkit-box-sizing:border-box;
24+
-moz-box-sizing:border-box;
25+
box-sizing:border-box;
26+
}
27+
28+
textarea, select { padding:1rem; height:100%; max-height:500px; }
29+
textarea { width:100%; max-height:500px; }
30+
input { margin-bottom:0.5rem; padding:0.5rem;}
31+
select, input { width:200px; }
32+
select { font-size:0.7em; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module Playground
22
class ConsolesController < ApplicationController
33
def show
4+
console
45
end
56
end
67
end

playground.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ Gem::Specification.new do |spec|
1818
end
1919

2020
spec.add_dependency "rails", ">= 7.0.2.2"
21+
spec.add_dependency "web-console"
2122
end

test/dummy/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Application < Rails::Application
1313

1414
# For compatibility with applications that use this config
1515
config.action_controller.include_all_helpers = false
16-
16+
config.web_console.development_only = false
1717
# Configuration for the application, engines, and railties goes here.
1818
#
1919
# These settings can be overridden in specific environments using the files

0 commit comments

Comments
 (0)