Compare commits
103 Commits
diy-render
...
new-volt
Author | SHA1 | Date | |
---|---|---|---|
83b9511df3 | |||
719f026d0f | |||
d7e0cd665f | |||
ef321dab26 | |||
f942ed719a | |||
a779daf205 | |||
9837461a86 | |||
08fba7129b | |||
5583a7a56c | |||
3d2dadbd62 | |||
c6d5824dff | |||
a1f1d9d6a4 | |||
2b9f16dad4 | |||
33ee57e605 | |||
7b82ff31dd | |||
8ed2a03ea9 | |||
0926f1f85f | |||
72a2d22215 | |||
abb22f524b | |||
b91fabdd90 | |||
878ec9aecc | |||
50367abcbb | |||
64078cc331 | |||
65d95de885 | |||
bdfafd17c8 | |||
ab08fcc7c1 | |||
cfc6f09ec1 | |||
1728cc1b25 | |||
5bd6b3517d | |||
69e51a1037 | |||
ba8768e374 | |||
33b0260bfb | |||
b81c8e69b7 | |||
eba80177ae | |||
9afaeba302 | |||
4c4d90385f | |||
e8a5a20db1 | |||
08beaa2d93 | |||
bb24a6cae5 | |||
d8a3657365 | |||
a2f3daa828 | |||
9383f0d75e | |||
264a52c184 | |||
3bad4cc570 | |||
56521fd5ed | |||
a0b37977a9 | |||
9c7a333127 | |||
485f3134dd | |||
79383d89b1 | |||
933b64c499 | |||
62e5761a40 | |||
07f7945917 | |||
756ab31a61 | |||
557c455167 | |||
7e34ae003e | |||
e460e0041b | |||
87cec0f4bc | |||
1ae4baf3f7 | |||
228b1b5832 | |||
add84432b4 | |||
6ce51c38db | |||
6ba3c54690 | |||
3464e50b2f | |||
515e1b106b | |||
b693f55a29 | |||
2f66bd9f08 | |||
93ac945dd2 | |||
1526656dfe | |||
959cb628fa | |||
5d42da9d03 | |||
f5ece67233 | |||
246bb5ee4f | |||
0cdd5fdf13 | |||
8183dfd6b1 | |||
950c77b127 | |||
a896702880 | |||
53d576ef90 | |||
1f19a28906 | |||
03c0041255 | |||
736bff02a5 | |||
2645f54d5b | |||
aa2303ddaa | |||
f4dfbb5845 | |||
398d364c02 | |||
3d96d59371 | |||
a0721a0cde | |||
d021816726 | |||
e8d9000a74 | |||
db7fa423bb | |||
bd882b7d2e | |||
5c2f423f58 | |||
19a0b7f9fe | |||
4305ddaf1d | |||
b5b0630060 | |||
c22a4a95d3 | |||
69414a11f9 | |||
40d97dcf87 | |||
acd66f66f3 | |||
f2af076c8e | |||
1efce561d7 | |||
1d005862ac | |||
e51d6cb3fa | |||
d47d8a9e2a |
47
.gitignore
vendored
47
.gitignore
vendored
@ -1,42 +1,9 @@
|
||||
# database
|
||||
db
|
||||
|
||||
# rdoc generated
|
||||
rdoc
|
||||
|
||||
# yard generated
|
||||
doc
|
||||
.yardoc
|
||||
|
||||
# bundler
|
||||
.bundle
|
||||
*.gem
|
||||
|
||||
# jeweler generated
|
||||
pkg
|
||||
|
||||
#
|
||||
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
||||
#
|
||||
# For MacOS:
|
||||
#
|
||||
.config
|
||||
.yardoc
|
||||
tmp
|
||||
.idea
|
||||
.yardoc
|
||||
.sass-cache
|
||||
.DS_Store
|
||||
|
||||
# For TextMate
|
||||
#*.tmproj
|
||||
#tmtags
|
||||
|
||||
# For emacs:
|
||||
#*~
|
||||
#\#*
|
||||
#.\#*
|
||||
|
||||
# For vim:
|
||||
#*.swp
|
||||
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
log
|
||||
|
||||
tmp/
|
||||
compiled
|
23
Gemfile
23
Gemfile
@ -1,30 +1,27 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'volt', :path => "../volt"
|
||||
gem 'volt', '0.9.5.pre4'
|
||||
|
||||
# volt uses mongo as the default data store.
|
||||
gem 'volt-mongo', '~> 0.1.0'
|
||||
|
||||
# The following gem's are optional for themeing
|
||||
# Twitter bootstrap
|
||||
gem 'volt-bootstrap', '~> 0.0.10'
|
||||
gem "parslet" , git: "https://github.com/salama/parslet.git"
|
||||
#gem "salama" , git: "https://github.com/salama/salama.git"
|
||||
gem "salama" , path: "../salama"
|
||||
gem "salama-reader" , git: "https://github.com/salama/salama-reader.git"
|
||||
gem "salama-arm" , git: "https://github.com/salama/salama-arm.git"
|
||||
gem "salama-object-file" , git: "https://github.com/salama/salama-object-file.git"
|
||||
gem "susy" , "2.2.5"
|
||||
|
||||
# Asset compilation gems, they will be required when needed.
|
||||
gem 'csso-rails', '~> 0.3.4', require: false
|
||||
gem 'uglifier', '>= 2.4.0', require: false
|
||||
|
||||
gem 'opal-pixi' , :path => "../opal-pixi"
|
||||
|
||||
#gem "salama" , "0.2" , :path => "../salama"
|
||||
|
||||
gem "parslet" , path: "../parslet"
|
||||
gem "salama" , path: "../salama"
|
||||
gem "salama-reader" , path: "../salama-reader"
|
||||
gem "salama-object-file" , path: "../salama-object-file"
|
||||
|
||||
#gem "foundation" , :github => "zurb/foundation"
|
||||
|
||||
group :test do
|
||||
# Testing dependencies
|
||||
gem "minitest"
|
||||
gem 'rspec', '~> 3.2.0'
|
||||
gem 'opal-rspec', '~> 0.4.2'
|
||||
gem 'capybara', '~> 2.4.2'
|
||||
|
110
Gemfile.lock
110
Gemfile.lock
@ -1,14 +1,28 @@
|
||||
PATH
|
||||
remote: ../opal-pixi
|
||||
specs:
|
||||
opal-pixi (0.1.0)
|
||||
opal (~> 0.7.0)
|
||||
|
||||
PATH
|
||||
remote: ../parslet
|
||||
GIT
|
||||
remote: https://github.com/salama/parslet.git
|
||||
revision: beeb9b441a9ade1504f7f0e848d805e36a02c544
|
||||
specs:
|
||||
parslet (1.7.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/salama/salama-arm.git
|
||||
revision: 0bd5091e3f284ecf040e0086a41d2449cd5afb7a
|
||||
specs:
|
||||
salama-arm (0.0.1)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/salama/salama-object-file.git
|
||||
revision: fbae6a02764dbe97e01e4833f9ffffe09879b100
|
||||
specs:
|
||||
salama-object-file (0.2.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/salama/salama-reader.git
|
||||
revision: 841592c667acea1e796f950851262e6938b231bc
|
||||
specs:
|
||||
salama-reader (0.2.0)
|
||||
parslet (~> 1.7.0)
|
||||
|
||||
PATH
|
||||
remote: ../salama
|
||||
specs:
|
||||
@ -16,34 +30,6 @@ PATH
|
||||
salama-object-file (~> 0.2)
|
||||
salama-reader (~> 0.2)
|
||||
|
||||
PATH
|
||||
remote: ../salama-object-file
|
||||
specs:
|
||||
salama-object-file (0.2.0)
|
||||
|
||||
PATH
|
||||
remote: ../salama-reader
|
||||
specs:
|
||||
salama-reader (0.2.0)
|
||||
parslet (~> 1.7.0)
|
||||
|
||||
PATH
|
||||
remote: ../volt
|
||||
specs:
|
||||
volt (0.9.4)
|
||||
bcrypt (~> 3.1.9)
|
||||
bundler (>= 1.5)
|
||||
concurrent-ruby (= 0.8.0)
|
||||
configurations (~> 2.0.0.pre)
|
||||
faye-websocket (~> 0.9.2)
|
||||
listen (~> 3.0.1)
|
||||
opal (~> 0.7.2)
|
||||
pry (~> 0.10.1)
|
||||
rack (~> 1.5.0)
|
||||
sass (~> 3.2.5)
|
||||
sprockets-sass (~> 1.0.0)
|
||||
thor (~> 0.19.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -72,30 +58,31 @@ GEM
|
||||
execjs (>= 1)
|
||||
daemons (1.2.3)
|
||||
diff-lcs (1.2.5)
|
||||
eventmachine (1.0.7)
|
||||
eventmachine (1.0.8)
|
||||
execjs (2.5.2)
|
||||
faye-websocket (0.9.2)
|
||||
faye-websocket (0.10.0)
|
||||
eventmachine (>= 0.12.0)
|
||||
websocket-driver (>= 0.5.1)
|
||||
ffi (1.9.10)
|
||||
hike (1.2.3)
|
||||
json (1.8.3)
|
||||
listen (3.0.2)
|
||||
listen (3.0.3)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.6.1)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.8.0)
|
||||
mongo (1.9.2)
|
||||
bson (~> 1.9.2)
|
||||
multi_json (1.11.2)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
opal (0.7.2)
|
||||
opal (0.8.0)
|
||||
hike (~> 1.2)
|
||||
sourcemap (~> 0.1.0)
|
||||
sprockets (>= 2.2.3, < 3.0.0)
|
||||
tilt (~> 1.4)
|
||||
sprockets (~> 3.1)
|
||||
tilt (>= 1.4)
|
||||
opal-rspec (0.4.3)
|
||||
opal (>= 0.7.0, < 0.9)
|
||||
poltergeist (1.5.1)
|
||||
@ -128,7 +115,7 @@ GEM
|
||||
rspec-support (~> 3.2.0)
|
||||
rspec-support (3.2.2)
|
||||
rubyzip (1.1.7)
|
||||
sass (3.2.19)
|
||||
sass (3.4.16)
|
||||
selenium-webdriver (2.43.0)
|
||||
childprocess (~> 0.5)
|
||||
multi_json (~> 1.0)
|
||||
@ -136,28 +123,35 @@ GEM
|
||||
websocket (~> 1.0)
|
||||
slop (3.6.0)
|
||||
sourcemap (0.1.1)
|
||||
sprockets (2.12.4)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
sprockets (3.2.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-sass (1.0.3)
|
||||
sprockets (~> 2.0)
|
||||
tilt (~> 1.1)
|
||||
susy (2.2.5)
|
||||
sass (>= 3.3.0, < 3.5)
|
||||
thin (1.6.3)
|
||||
daemons (~> 1.0, >= 1.0.9)
|
||||
eventmachine (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
thor (0.19.1)
|
||||
tilt (1.4.1)
|
||||
tilt (2.0.1)
|
||||
uglifier (2.7.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
volt-bootstrap (0.0.10)
|
||||
volt (0.9.5.pre4)
|
||||
bcrypt (~> 3.1.9)
|
||||
bundler (>= 1.5)
|
||||
concurrent-ruby (= 0.8.0)
|
||||
configurations (~> 2.0.0.pre)
|
||||
faye-websocket (~> 0.10.0)
|
||||
listen (~> 3.0.1)
|
||||
opal (~> 0.8.0)
|
||||
pry (~> 0.10.1)
|
||||
rack (~> 1.5.0)
|
||||
sass (~> 3.4.15)
|
||||
thor (~> 0.19.0)
|
||||
volt-mongo (0.1.1)
|
||||
mongo (~> 1.9.0)
|
||||
websocket (1.2.2)
|
||||
websocket-driver (0.5.4)
|
||||
websocket-driver (0.6.2)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
xpath (2.0.0)
|
||||
@ -172,17 +166,21 @@ DEPENDENCIES
|
||||
chromedriver2-helper (~> 0.0.8)
|
||||
concurrent-ruby-ext (~> 0.8.0)
|
||||
csso-rails (~> 0.3.4)
|
||||
opal-pixi!
|
||||
minitest
|
||||
opal-rspec (~> 0.4.2)
|
||||
parslet!
|
||||
poltergeist (~> 1.5.0)
|
||||
rspec (~> 3.2.0)
|
||||
salama!
|
||||
salama-arm!
|
||||
salama-object-file!
|
||||
salama-reader!
|
||||
selenium-webdriver (~> 2.43.0)
|
||||
susy (= 2.2.5)
|
||||
thin (~> 1.6.0)
|
||||
uglifier (>= 2.4.0)
|
||||
volt!
|
||||
volt-bootstrap (~> 0.0.10)
|
||||
volt (= 0.9.5.pre4)
|
||||
volt-mongo (~> 0.1.0)
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.5
|
||||
|
21
README.md
21
README.md
@ -1,9 +1,22 @@
|
||||
### statement of intent
|
||||
|
||||
just starting and not quite sure, but here is the direction
|
||||
|
||||
# Debugger
|
||||
|
||||
After some tryouts it ended up being an Opal application. That is ruby as javascript in the browser.
|
||||
|
||||

|
||||
|
||||
- On the left are the classes of the system. Next idea is to have hover info about them.
|
||||
- Next a source code view (not implemented)
|
||||
- next a view of the Virtual Instructions
|
||||
- last section, current block with current Register Instruction highlighted
|
||||
- step (next) button for single stepping
|
||||
- status: starting , running , exited
|
||||
- bottom row are the registers. If the register hold an object the variables are shown.
|
||||
(also should have hover info) , the first letter indicates the class, the number is the address
|
||||
|
||||
So lots to do, but a good start.
|
||||
|
||||
|
||||
|
||||
I don't want to use gdb anymore, and it would be easier without using the qemu setup, so:
|
||||
|
||||
- single step debugging of the register machine level (as close to arm as need be)
|
||||
|
@ -1 +1,59 @@
|
||||
// Place your apps css here
|
||||
// Place your apps css here
|
||||
@import "susy";
|
||||
|
||||
|
||||
$susy: (
|
||||
columns: 24 ,
|
||||
gutter-position: split ,
|
||||
);
|
||||
|
||||
.debugger-view { @include container(90%); }
|
||||
|
||||
.classes {
|
||||
@include span(3);
|
||||
}
|
||||
|
||||
.one-class {
|
||||
margin: 10px;
|
||||
}
|
||||
.file-view {
|
||||
@include span(4);
|
||||
margin: span(1);
|
||||
}
|
||||
|
||||
.source-view { @include span(6); }
|
||||
|
||||
.block-view {
|
||||
@include span(4);
|
||||
margin-right: span(2);
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.status-view {
|
||||
@include span(2 at 22);
|
||||
}
|
||||
|
||||
.registers-view {
|
||||
@include span(20 at 3);
|
||||
}
|
||||
|
||||
.register-view {
|
||||
@include gallery(4);
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.field {
|
||||
@include span(5)
|
||||
}
|
||||
|
||||
.value {
|
||||
@include span(18)
|
||||
}
|
||||
|
||||
.value-head {
|
||||
background-color: #C5FFD9;
|
||||
}
|
||||
|
||||
.bright {
|
||||
background-color: orange ;
|
||||
}
|
||||
|
59
app/main/assets/css/menu.css
Normal file
59
app/main/assets/css/menu.css
Normal file
@ -0,0 +1,59 @@
|
||||
body {
|
||||
font-family: arial, helvetica, serif;
|
||||
}
|
||||
|
||||
#nav, #nav ul { /* all lists */
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
float : left;
|
||||
width : 10em;
|
||||
/*border around submenu goes here*/
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
background:#fff;
|
||||
border:1px solid #C3D46A
|
||||
}
|
||||
|
||||
#nav li { /* all list items */
|
||||
position : relative;
|
||||
float : left;
|
||||
line-height : 1.25em;
|
||||
width: 9em;
|
||||
}
|
||||
|
||||
#nav li ul { /* second-level lists */
|
||||
position : absolute;
|
||||
left: -999em;
|
||||
margin-left : 10.05em;
|
||||
margin-top : -1.35em;
|
||||
}
|
||||
|
||||
#nav li ul ul { /* third-and-above-level lists */
|
||||
left: -999em;
|
||||
}
|
||||
|
||||
#nav li a , li span {
|
||||
padding-left: 0.5em;
|
||||
width : 9.5em;
|
||||
display : block;
|
||||
color : black;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
background-color : white;
|
||||
-moz-border-radius: 7px;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
#nav li a:hover {
|
||||
color : white;
|
||||
background-color : #F6C739;
|
||||
}
|
||||
|
||||
#nav li:hover ul ul, #nav li:hover ul ul ul {
|
||||
left: -999em;
|
||||
}
|
||||
|
||||
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul { /* lists nested under hovered list items */
|
||||
left: auto;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 237 B |
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,2 @@
|
||||
# Specify which components you wish to include when
|
||||
# the "home" component loads.
|
||||
|
||||
# bootstrap css framework
|
||||
component 'bootstrap'
|
||||
|
||||
|
||||
Opal.use_gem("salama")
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
client '/about', action: 'about'
|
||||
|
||||
|
||||
# The main route, this should be last. It will match any params not
|
||||
# previously matched.
|
||||
client '/', {}
|
||||
|
12
app/main/controllers/blocks_controller.rb
Normal file
12
app/main/controllers/blocks_controller.rb
Normal file
@ -0,0 +1,12 @@
|
||||
module Main
|
||||
class BlocksController < Volt::ModelController
|
||||
|
||||
def initialize *args
|
||||
super(*args)
|
||||
blocks = BlocksModel.new
|
||||
page._blocks = blocks
|
||||
@volt_app.interpreter.register_event(:instruction_changed, blocks)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
28
app/main/controllers/classes_controller.rb
Normal file
28
app/main/controllers/classes_controller.rb
Normal file
@ -0,0 +1,28 @@
|
||||
module Main
|
||||
class ClassesController < Volt::ModelController
|
||||
|
||||
def initialize *args
|
||||
super(*args)
|
||||
|
||||
page._classes!.clear
|
||||
all = []
|
||||
Virtual.machine.space.classes.each do |name , claz|
|
||||
next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name
|
||||
all << name
|
||||
end
|
||||
all.sort.each do |name|
|
||||
c = Volt::Model.new :name => name
|
||||
page._classes << c
|
||||
end
|
||||
end
|
||||
|
||||
def variables(clas_model)
|
||||
layout = Virtual.machine.space.get_class_by_name(clas_model._name).object_layout
|
||||
vars = []
|
||||
layout.object_instance_names.each do |name|
|
||||
vars.push name
|
||||
end
|
||||
vars
|
||||
end
|
||||
end
|
||||
end
|
@ -1,25 +1,32 @@
|
||||
# By default Volt generates this controller for your Main component
|
||||
require "salama"
|
||||
require "interpreter/interpreter"
|
||||
|
||||
if RUBY_PLATFORM == 'opal'
|
||||
require "main/lib/main_view"
|
||||
end
|
||||
|
||||
Virtual::Machine.boot
|
||||
|
||||
module Main
|
||||
class MainController < Volt::ModelController
|
||||
|
||||
def index
|
||||
MainView.new()
|
||||
def initialize *args
|
||||
super(*args)
|
||||
@volt_app.class.attr_accessor :interpreter
|
||||
@volt_app.interpreter = Interpreter::Interpreter.new
|
||||
end
|
||||
|
||||
def about
|
||||
|
||||
def index
|
||||
init_machine
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def init_machine
|
||||
machine = Virtual.machine.boot
|
||||
code = Ast::OperatorExpression.new("+", Ast::IntegerExpression.new(2),Ast::IntegerExpression.new(5))
|
||||
Virtual::Compiler.compile( code , machine.space.get_main )
|
||||
machine.run_before "Register::CallImplementation"
|
||||
page._interpreter = { }
|
||||
@volt_app.interpreter.start machine.init
|
||||
end
|
||||
|
||||
# The main template contains a #template binding that shows another
|
||||
# template. This is the path to that template. It may change based
|
||||
# on the params._component, params._controller, and params._action values.
|
||||
|
55
app/main/controllers/objects_controller.rb
Normal file
55
app/main/controllers/objects_controller.rb
Normal file
@ -0,0 +1,55 @@
|
||||
if RUBY_PLATFORM == 'opal'
|
||||
require "native"
|
||||
end
|
||||
|
||||
module Main
|
||||
class ObjectsController < Volt::ModelController
|
||||
|
||||
def index_ready
|
||||
container = Native(self.container).querySelector("ul")
|
||||
all = container.querySelectorAll("a")
|
||||
len = all.length - 1
|
||||
while len >= 0
|
||||
puts "li #{len}" + all.item(len).innerHTML + " lo"
|
||||
len = len - 1
|
||||
end
|
||||
# red = -> (event) { container.style.backgroundColor = "red" }
|
||||
red = -> (event) { puts container.innerHTML }
|
||||
container.addEventListener("mouseenter" , red)
|
||||
end
|
||||
|
||||
def marker id
|
||||
var = Virtual.machine.objects[id]
|
||||
if var.is_a? String
|
||||
str "Wo"
|
||||
else
|
||||
str = var.class.name.split("::").last[0,2]
|
||||
end
|
||||
str + " : #{id.to_s}"
|
||||
end
|
||||
|
||||
def class_header(id)
|
||||
object = Virtual.machine.objects[id]
|
||||
return "" unless object
|
||||
clazz = object.class.name.split("::").last
|
||||
"#{clazz}:#{id}"
|
||||
end
|
||||
|
||||
def content(id)
|
||||
object = Virtual.machine.objects[id]
|
||||
fields = []
|
||||
if object and ! object.is_a?(String)
|
||||
object.get_instance_variables.each do |variable|
|
||||
f = object.get_instance_variable(variable)
|
||||
fields << ["#{variable} : #{marker(f.object_id)}" , f.object_id]
|
||||
end
|
||||
end
|
||||
fields
|
||||
end
|
||||
|
||||
def is_object?( id )
|
||||
Virtual.machine.objects[id] != nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
26
app/main/controllers/registers_controller.rb
Normal file
26
app/main/controllers/registers_controller.rb
Normal file
@ -0,0 +1,26 @@
|
||||
module Main
|
||||
class RegistersController < Volt::ModelController
|
||||
|
||||
def initialize *args
|
||||
super(*args)
|
||||
self.model = []
|
||||
init_registers
|
||||
end
|
||||
|
||||
|
||||
def init_registers
|
||||
@volt_app.interpreter.registers.each do |reg , val|
|
||||
r = RegisterModel.new( :name => reg , :value => val)
|
||||
self.model << r
|
||||
@volt_app.interpreter.register_event(:register_changed, r)
|
||||
@volt_app.interpreter.register_event(:object_changed, r)
|
||||
r.register_changed( reg , nil , @volt_app.interpreter.registers[reg])
|
||||
end
|
||||
end
|
||||
|
||||
def is_object?( id )
|
||||
Virtual.machine.objects[id] != nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
12
app/main/controllers/sources_controller.rb
Normal file
12
app/main/controllers/sources_controller.rb
Normal file
@ -0,0 +1,12 @@
|
||||
module Main
|
||||
class SourcesController < Volt::ModelController
|
||||
def initialize *args
|
||||
super(*args)
|
||||
|
||||
sources = SourceModel.new
|
||||
page._sources = sources
|
||||
@volt_app.interpreter.register_event(:instruction_changed, sources)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
31
app/main/controllers/status_controller.rb
Normal file
31
app/main/controllers/status_controller.rb
Normal file
@ -0,0 +1,31 @@
|
||||
module Main
|
||||
class StatusController < Volt::ModelController
|
||||
|
||||
def initialize *args
|
||||
super(*args)
|
||||
self.model = Volt::Model.new
|
||||
update_interpreter
|
||||
end
|
||||
|
||||
def tick
|
||||
@volt_app.interpreter.tick
|
||||
update_interpreter
|
||||
end
|
||||
def update_interpreter
|
||||
self._clock = @volt_app.interpreter.clock
|
||||
self._state = @volt_app.interpreter.state
|
||||
self._stdout = @volt_app.interpreter.stdout
|
||||
self._link = @volt_app.interpreter.link.to_s
|
||||
page._method_name = method_name
|
||||
page._block_name = @volt_app.interpreter.block ? @volt_app.interpreter.block.name : " "
|
||||
end
|
||||
|
||||
def method_name
|
||||
bl = @volt_app.interpreter.block
|
||||
return " " unless bl
|
||||
return bl.method if bl.method.is_a? String
|
||||
"#{bl.method.for_class.name}.#{bl.method.name}"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,46 +0,0 @@
|
||||
require 'opal/pixi'
|
||||
require 'native'
|
||||
require "salama"
|
||||
|
||||
require_relative "registers_view"
|
||||
require_relative "object_view"
|
||||
require_relative "space_view"
|
||||
|
||||
class MainView
|
||||
|
||||
def initialize
|
||||
@container = PIXI::Container.new
|
||||
|
||||
height = `window.innerHeight`
|
||||
width = `window.innerWidth`
|
||||
renderer = PIXI::WebGLRenderer.new( width - 100 , height - 100, {"backgroundColor" => 0xFFFFFF})
|
||||
body = Native(`window.document.body`)
|
||||
# bit of a hack as it assumes index's structure
|
||||
html_con = body.firstElementChild
|
||||
html_con.insertBefore renderer.view , html_con.lastElementChild
|
||||
|
||||
registers = RegisterView.new(height - 150)
|
||||
@container.add_child registers
|
||||
|
||||
ParseTask.parse(1).then do |result|
|
||||
is = Ast::Expression.from_basic(result)
|
||||
Virtual::Compiler.compile( is , Virtual.machine.space.get_main )
|
||||
Virtual.machine.run_before Virtual::Machine::FIRST_PASS
|
||||
end.fail do |error|
|
||||
raise "Error: #{error}"
|
||||
end
|
||||
space = SpaceView.new
|
||||
@container.add_child space
|
||||
|
||||
animate = Proc.new do
|
||||
`requestAnimationFrame(animate)`
|
||||
registers.draw_me
|
||||
space.draw_me
|
||||
renderer.render @container
|
||||
end
|
||||
animate.call
|
||||
|
||||
end
|
||||
|
||||
attr_reader :container
|
||||
end
|
@ -1,38 +0,0 @@
|
||||
|
||||
class ObjectView
|
||||
|
||||
attr_accessor :text , :object , :attributes
|
||||
|
||||
def initialize o
|
||||
super()
|
||||
self.text = PIXI::Text.new("no")
|
||||
self.text.position = PIXI::Point.new( rand(1000) , rand(550))
|
||||
puts "NO O " unless o
|
||||
self.object = o
|
||||
self.text.text = short
|
||||
@attributes = {}
|
||||
end
|
||||
|
||||
def short
|
||||
object.class.name.split("::").last[0 .. 3]
|
||||
end
|
||||
|
||||
def is_parfait
|
||||
object.class.name.split("::").first == "Parfait"
|
||||
end
|
||||
def set name , val
|
||||
@attributes[name] = val
|
||||
self.text.text = short + @attributes.length.to_s
|
||||
end
|
||||
def get(name)
|
||||
@attributes[name]
|
||||
end
|
||||
def position
|
||||
#raise "NONAME" unless self.text
|
||||
self.text.position
|
||||
end
|
||||
|
||||
def distance to
|
||||
self.position - to.position
|
||||
end
|
||||
end
|
@ -1,21 +0,0 @@
|
||||
|
||||
class RegisterView < PIXI::Container
|
||||
|
||||
@@register_names = (0..8).collect {|i| "r#{i}"}
|
||||
|
||||
def initialize at_y
|
||||
super()
|
||||
@registers = {}
|
||||
x = 0
|
||||
@@register_names.each do |name|
|
||||
reg = PIXI::Text.new( name )
|
||||
reg.position = PIXI::Point.new x , at_y
|
||||
x += reg.width + 20
|
||||
@registers[name] = reg
|
||||
self.add_child reg
|
||||
end
|
||||
def draw_me
|
||||
|
||||
end
|
||||
end
|
||||
end
|
@ -1,159 +0,0 @@
|
||||
|
||||
require "math"
|
||||
|
||||
PIXI::Point.class_eval do
|
||||
alias_native :y=
|
||||
|
||||
def add point
|
||||
self.x += point.x
|
||||
self.x = 0 if self.x < 0
|
||||
self.x = 1100 if self.x > 1100
|
||||
self.y += point.y
|
||||
self.y = 0 if self.y < 0
|
||||
self.y = 550 if self.y > 550
|
||||
end
|
||||
|
||||
def scale_by num
|
||||
min = 0.001
|
||||
num = min if num <= min
|
||||
self.x = self.x / num
|
||||
self.y = self.y / num
|
||||
end
|
||||
end
|
||||
|
||||
class SpaceView < PIXI::Graphics
|
||||
include Sof::Util
|
||||
|
||||
def initialize
|
||||
super()
|
||||
space = Virtual.machine.space
|
||||
# just a way to get the space into a list. objects is an id => occurence mapping.
|
||||
# occurence.object is the object
|
||||
objects = Sof::Members.new(space).objects
|
||||
@objects = objects
|
||||
puts "Objects #{objects.length}"
|
||||
# create a mapping from id to volt models
|
||||
@view_objects = {}
|
||||
|
||||
@objects.each do |i , o|
|
||||
next unless o.object
|
||||
view = ObjectView.new o.object
|
||||
@view_objects[i] = view
|
||||
add_child view.text
|
||||
end
|
||||
fill_attributes
|
||||
end
|
||||
|
||||
# should almost be called draw by now
|
||||
def draw_me
|
||||
update_positions
|
||||
self.clear
|
||||
@view_objects.each do |i , view|
|
||||
self.lineStyle(4, 0xffd900, 2)
|
||||
puts "v" if view.nil?
|
||||
view.attributes.each do |n , v |
|
||||
next if n == :id
|
||||
next unless v.is_a? ObjectView
|
||||
next unless v.is_parfait
|
||||
puts "v2" if view.nil?
|
||||
puts "0" if v.nil?
|
||||
self.moveTo( view.position.x , view.position.y )
|
||||
self.lineTo( v.position.x , v.position.y )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def force from , to
|
||||
dir_x = from.x - to.x - 100
|
||||
dir_x2 = dir_x * dir_x
|
||||
dir_y = from.y - to.y - 100
|
||||
dir_y2 = dir_y * dir_y
|
||||
if( dir_x2 < 0.1 and dir_y2 < 0.1 )
|
||||
puts "Were close"
|
||||
dir_x = rand(10) - 5
|
||||
dir_y = rand(10) - 5
|
||||
end
|
||||
f = dir_x * dir_x + dir_y * dir_y
|
||||
f = 0.01 if f < 0.01
|
||||
f = f / 100
|
||||
#puts "force #{f}"
|
||||
PIXI::Point.new( dir_x / f , dir_y / f)
|
||||
end
|
||||
|
||||
def update_positions
|
||||
@view_objects.each do |i , view|
|
||||
view.attributes.each do |n , v |
|
||||
next if n == :id
|
||||
next unless v.is_a? ObjectView
|
||||
next unless v.is_parfait
|
||||
puts "v2" if view.nil?
|
||||
puts "0" if v.nil?
|
||||
view.position.add force( view.position , v.position )
|
||||
end
|
||||
offset = 0.0
|
||||
view.position.add force( view.position , PIXI::Point.new(view.position.x , -offset) )
|
||||
view.position.add force( view.position , PIXI::Point.new(-offset , view.position.y) )
|
||||
view.position.add force( view.position , PIXI::Point.new(view.position.x , 550 + offset) )
|
||||
view.position.add force( view.position , PIXI::Point.new(1000 + offset , view.position.y) )
|
||||
end
|
||||
end
|
||||
|
||||
def fill_attributes
|
||||
@view_objects.each do |i , view|
|
||||
ob = view.object
|
||||
next if is_value?(ob)
|
||||
case ob.class.name
|
||||
when "Array" , "Parfait::List"
|
||||
fill_array view
|
||||
when "Hash" , "Parfait::Dictionary"
|
||||
fill_hash view
|
||||
else
|
||||
next if ob.class.name.include?("::") and !ob.class.name.include?("Parfait")
|
||||
next if ob.class.name == "Proc"
|
||||
next if ob.class.name == "String"
|
||||
next if ob.class.name == "Numeric"
|
||||
next if ob.class.name == "Class"
|
||||
#puts "object #{ob.class.name}"
|
||||
|
||||
attributes = attributes_for(ob)
|
||||
attributes.each do |a|
|
||||
next if a == "html_safe"
|
||||
next if a == "constructor"
|
||||
next if a == "toString"
|
||||
next if a == "position"
|
||||
val = get_value( ob , a)
|
||||
if( @view_objects[val.object_id])
|
||||
val = @view_objects[val.object_id]
|
||||
end
|
||||
#puts "set #{a}"
|
||||
view.set(a , val )
|
||||
end
|
||||
superclasses = [ob.class.superclass.name]
|
||||
if superclasses.include?( "Array") or superclasses.include?( "Parfait::List")
|
||||
fill_array view
|
||||
end
|
||||
if superclasses.include?( "Hash") or superclasses.include?( "Parfait::Dictionary")
|
||||
fill_hash view
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# and hash keys/values
|
||||
def fill_hash hash
|
||||
return
|
||||
hash.each do |a,b|
|
||||
next_level << a
|
||||
next_level << b
|
||||
end
|
||||
end
|
||||
# and array values
|
||||
def fill_array array
|
||||
return
|
||||
array.each do |a|
|
||||
next_level << a
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
10
app/main/models/blocks_model.rb
Normal file
10
app/main/models/blocks_model.rb
Normal file
@ -0,0 +1,10 @@
|
||||
class BlocksModel < Volt::ArrayModel
|
||||
|
||||
def instruction_changed old , ins
|
||||
self.last._class_name = "inactive" if( self.length > 0)
|
||||
self << { :name => ins.to_s , :class_name => "bright" }
|
||||
#puts "block #{self.length}"
|
||||
self.delete_at(0) if( self.length > 5)
|
||||
end
|
||||
|
||||
end
|
36
app/main/models/register_model.rb
Normal file
36
app/main/models/register_model.rb
Normal file
@ -0,0 +1,36 @@
|
||||
class RegisterModel < Volt::Model
|
||||
field :name
|
||||
field :value
|
||||
field :fields
|
||||
|
||||
def register_changed reg , old , value
|
||||
reg = reg.symbol unless reg.is_a? Symbol
|
||||
return unless reg == name
|
||||
self.value = value
|
||||
calc_fields
|
||||
end
|
||||
|
||||
def object_changed reg
|
||||
reg = reg.symbol unless reg.is_a? Symbol
|
||||
return unless reg == name
|
||||
#puts "Object changed in #{reg}"
|
||||
calc_fields
|
||||
end
|
||||
|
||||
def calc_fields
|
||||
#puts "My id #{objects_id} , #{objects_id.class}"
|
||||
object = Virtual.machine.objects[value]
|
||||
self.fields.clear
|
||||
if object and ! object.is_a?(String)
|
||||
clazz = object.class.name.split("::").last
|
||||
#puts "found #{clazz}"
|
||||
self.fields << "#{clazz}:#{object.internal_object_length}"
|
||||
self.fields << object.get_layout
|
||||
object.get_instance_variables.each do |variable|
|
||||
f = object.get_instance_variable(variable)
|
||||
self.fields << f
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
23
app/main/models/source_model.rb
Normal file
23
app/main/models/source_model.rb
Normal file
@ -0,0 +1,23 @@
|
||||
class SourceModel < Volt::ArrayModel
|
||||
|
||||
def instruction_changed old , ins
|
||||
return unless ins
|
||||
source = source_text ins.source
|
||||
if( self.length > 0)
|
||||
return if self.last._name == source
|
||||
self.last._class_name = "inactive"
|
||||
end
|
||||
self << { :name => source.to_s , :class_name => "bright" }
|
||||
#puts "sources #{self.length}"
|
||||
self.delete_at(0) if( self.length > 5)
|
||||
end
|
||||
|
||||
def source_text source
|
||||
if source.is_a? Virtual::Instruction
|
||||
return source.class.name
|
||||
else
|
||||
return "Method: #{source.name}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@ -1,12 +0,0 @@
|
||||
# By default Volt generates this User model which inherits from Volt::User,
|
||||
# you can rename this if you want.
|
||||
class User < Volt::User
|
||||
# login_field is set to :email by default and can be changed to :username
|
||||
# in config/app.rb
|
||||
field login_field
|
||||
field :name
|
||||
|
||||
validate login_field, unique: true, length: 8
|
||||
validate :email, email: true
|
||||
|
||||
end
|
17
app/main/views/blocks/index.html
Normal file
17
app/main/views/blocks/index.html
Normal file
@ -0,0 +1,17 @@
|
||||
<:Title>
|
||||
blocks index
|
||||
|
||||
<:Body>
|
||||
<div class="block-view">
|
||||
<div>
|
||||
<h4> {{page._method_name}} </h4>
|
||||
<h4> Block: {{page._block_name}} </h4>
|
||||
</div>
|
||||
{{ page._blocks.each do |b| }}
|
||||
<div>
|
||||
<span class="{{b._class_name}}">
|
||||
{{b._name}}
|
||||
</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
23
app/main/views/classes/index.html
Normal file
23
app/main/views/classes/index.html
Normal file
@ -0,0 +1,23 @@
|
||||
<:Title>
|
||||
classes index
|
||||
|
||||
<:Body>
|
||||
<div class="classes">
|
||||
<h4> Classes </h4>
|
||||
<ul id="nav">
|
||||
{{page._classes.each do |clas| }}
|
||||
<li>
|
||||
<a href="#">{{ clas._name }}</a>
|
||||
{{ unless variables(clas).empty? }}
|
||||
<ul>
|
||||
{{variables(clas).each do |var| }}
|
||||
<li>
|
||||
<a href="#">{{var}}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
@ -1,7 +0,0 @@
|
||||
<:Title>
|
||||
About
|
||||
|
||||
<:Body>
|
||||
<h1>About</h1>
|
||||
|
||||
<p>About page...</p>
|
@ -2,3 +2,15 @@
|
||||
Home
|
||||
|
||||
<:Body>
|
||||
<:classes />
|
||||
|
||||
<div class="file-view">
|
||||
</div>
|
||||
|
||||
<:sources />
|
||||
|
||||
<:blocks />
|
||||
|
||||
<:status/>
|
||||
|
||||
<:registers/>
|
||||
|
@ -2,26 +2,11 @@
|
||||
{{ view main_path, "title", {controller_group: 'main'} }}
|
||||
|
||||
<:Body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<ul class="nav nav-pills pull-right">
|
||||
<:nav href="/">Home</:nav>
|
||||
<:nav href="/about">About</:nav>
|
||||
</ul>
|
||||
<h3 class="text-muted">Salama Debugger</h3>
|
||||
</div>
|
||||
<div class="debugger_view">
|
||||
|
||||
<:volt:notices />
|
||||
|
||||
{{ view main_path, 'body', {controller_group: 'main'} }}
|
||||
|
||||
<div class="footer">
|
||||
<p> <a href="http://salama-vm.org/" >Salama</a> {{ Time.now.year }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<:Nav>
|
||||
<li class="{{ if active_tab? }}active{{ end }}">
|
||||
<a href="{{ attrs.href }}">{{ yield }}</a>
|
||||
</li>
|
||||
|
15
app/main/views/objects/index.html
Normal file
15
app/main/views/objects/index.html
Normal file
@ -0,0 +1,15 @@
|
||||
<:Title>
|
||||
objects index
|
||||
|
||||
<:Body>
|
||||
<ul sid={{attrs.id}}>
|
||||
<li>
|
||||
<span>{{class_header(attrs.id)}}</span>
|
||||
</li>
|
||||
<li> -------------------------</li>
|
||||
{{content(attrs.id).each do |con3| }}
|
||||
<li>
|
||||
<a href="#">{{con3[0]}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
19
app/main/views/registers/index.html
Normal file
19
app/main/views/registers/index.html
Normal file
@ -0,0 +1,19 @@
|
||||
<:Title>
|
||||
registers index
|
||||
|
||||
<:Body>
|
||||
<div class="registers-view">
|
||||
{{ model.each do |reg| }}
|
||||
<div class="register-view" id="nav">
|
||||
{{ if(is_object?(reg.value) ) }}
|
||||
<:objects id={{reg.value}} />
|
||||
{{else}}
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">{{reg.value}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
14
app/main/views/sources/index.html
Normal file
14
app/main/views/sources/index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<:Title>
|
||||
sources index
|
||||
|
||||
<:Body>
|
||||
<div class="source-view">
|
||||
<h4> Virtual Machine Instruction </h4>
|
||||
{{page._sources.each do |source| }}
|
||||
<div>
|
||||
<span class="{{source._class_name}}">
|
||||
{{source._name}}
|
||||
</span>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
17
app/main/views/status/index.html
Normal file
17
app/main/views/status/index.html
Normal file
@ -0,0 +1,17 @@
|
||||
<:Title>
|
||||
status index
|
||||
|
||||
<:Body>
|
||||
<div class="status-view">
|
||||
<h4> Interpreter </h4>
|
||||
Instruction {{ _clock}}
|
||||
<button e-click="tick"> Next </button>
|
||||
<br/>
|
||||
<span> State </span>
|
||||
<span> {{_state}} </span>
|
||||
<br/>
|
||||
<span> Link: {{_link}} </span>
|
||||
<br/>
|
||||
Stdout <br/>
|
||||
<span> {{_stdout}} </span>
|
||||
</div>
|
@ -1,13 +1,17 @@
|
||||
# app.rb is used to configure your app. This code is only run on the server,
|
||||
# then any config options in config.public are passed to the client as well.
|
||||
|
||||
|
||||
#hint_path = Bundler.definition.specs["simptip"].first.full_gem_path
|
||||
#ENV["SASS_PATH"] = ENV["SASS_PATH"] + File::PATH_SEPARATOR + hint_path
|
||||
|
||||
Volt.configure do |config|
|
||||
# Setup your global app config here.
|
||||
|
||||
#######################################
|
||||
# Basic App Info (stuff you should set)
|
||||
#######################################
|
||||
config.domain = 'salama-vm.org'
|
||||
config.domain = 'salama-debugger.com'
|
||||
config.app_name = 'Salama-debugger'
|
||||
config.mailer.from = 'Salama-debugger <no-reply@salama-debugger.com>'
|
||||
|
||||
@ -23,7 +27,7 @@ Volt.configure do |config|
|
||||
#
|
||||
# config.app_secret = ENV['APP_SECRET']
|
||||
#
|
||||
config.app_secret = 'pKDKhKInTaI5EVH9WmyN-cJSYnJt8PmDogwW63Zqr_ieUNqYvh1KybeWJoslylzFgsU'
|
||||
config.app_secret = 'qwSEmWdixdHgwOgXiLdGJt87b9TxMq009gbJWn0fOTygfIk6fAIlgHO9tAPbA4vaKgY'
|
||||
|
||||
###############
|
||||
# Log Filtering
|
||||
@ -100,8 +104,8 @@ Volt.configure do |config|
|
||||
# config.message_bus.bus_name = 'peer_to_peer'
|
||||
#
|
||||
# Encrypt message bus - messages on the message bus are encrypted by default
|
||||
# but this is meant to be used locally by a developer
|
||||
config.message_bus.disable_encryption = true
|
||||
# using rbnacl.
|
||||
# config.message_bus.disable_encryption = true
|
||||
#
|
||||
# ## MessageBus Server -- the message bus binds to a port and ip which the
|
||||
# other volt instances need to be able to connect to. You can customize
|
||||
|
@ -6,13 +6,8 @@
|
||||
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<% javascript_files.each do |javascript_file| %>
|
||||
<script src="<%= javascript_file %>"></script>
|
||||
<% end %>
|
||||
|
||||
<% css_files.each do |css_file| %>
|
||||
<link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
|
||||
<% end %>
|
||||
<%= javascript_tags %>
|
||||
<%= css_tags %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
6
config/dependencies.rb
Normal file
6
config/dependencies.rb
Normal file
@ -0,0 +1,6 @@
|
||||
# Specify which components you wish to include when
|
||||
# the "home" component loads.
|
||||
|
||||
|
||||
Opal.use_gem("salama-reader")
|
||||
Opal.use_gem("salama-object-file")
|
10
config/initializers/boot.rb
Normal file
10
config/initializers/boot.rb
Normal file
@ -0,0 +1,10 @@
|
||||
# Place any code you want to run when the component is included on the client
|
||||
# or server.
|
||||
|
||||
# To include code only on the client use:
|
||||
# if RUBY_PLATFORM == 'opal'
|
||||
#
|
||||
# To include code only on the server, use:
|
||||
# unless RUBY_PLATFORM == 'opal'
|
||||
# ^^ this will not send compile in code in the conditional to the client.
|
||||
# ^^ this include code required in the conditional.
|
@ -1,3 +0,0 @@
|
||||
#require "salama"
|
||||
|
||||
Virtual::Machine.boot
|
2
config/initializers/server/salama.rb
Normal file
2
config/initializers/server/salama.rb
Normal file
@ -0,0 +1,2 @@
|
||||
Opal.use_gem "salama"
|
||||
Opal.use_gem "salama-arm"
|
7
config/routes.rb
Normal file
7
config/routes.rb
Normal file
@ -0,0 +1,7 @@
|
||||
# See https://github.com/voltrb/volt#routes for more info on routes
|
||||
|
||||
client '/about', action: 'about'
|
||||
|
||||
# The main route, this should be last. It will match any params not
|
||||
# previously matched.
|
||||
client '/', {}
|
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample http controller test', type: :http_controller do
|
||||
# Specs here
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample model' do
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample task', type: :task do
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
5
spec/app/main/integration/objects_spec.rb
Normal file
5
spec/app/main/integration/objects_spec.rb
Normal file
@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
5
spec/app/main/integration/registers_spec.rb
Normal file
5
spec/app/main/integration/registers_spec.rb
Normal file
@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample integration test', type: :feature do
|
||||
# An example integration spec, this will only be run if ENV['BROWSER'] is
|
||||
# specified. Current values for ENV['BROWSER'] are 'firefox' and 'phantom'
|
||||
it 'should load the page' do
|
||||
visit '/'
|
||||
|
||||
expect(page).to have_content('Home')
|
||||
end
|
||||
end
|
5
spec/app/main/integration/sources_spec.rb
Normal file
5
spec/app/main/integration/sources_spec.rb
Normal file
@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
5
spec/app/main/integration/statuses_spec.rb
Normal file
5
spec/app/main/integration/statuses_spec.rb
Normal file
@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe '', type: :feature do
|
||||
# Specs here
|
||||
end
|
@ -1,14 +0,0 @@
|
||||
# Volt sets up rspec and capybara for testing.
|
||||
require 'volt/spec/setup'
|
||||
Volt.spec_setup
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.run_all_when_everything_filtered = true
|
||||
config.filter_run :focus
|
||||
|
||||
# Run specs in random order to surface order dependencies. If you find an
|
||||
# order dependency and want to debug it, you can fix the order by providing
|
||||
# the seed, which is printed after each run.
|
||||
# --seed 1234
|
||||
config.order = 'random'
|
||||
end
|
BIN
static/debugger.png
Normal file
BIN
static/debugger.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 KiB |
Reference in New Issue
Block a user