opal-irb 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +113 -0
- data/Guardfile +5 -0
- data/LICENSE +21 -0
- data/README.md +175 -0
- data/Rakefile +65 -0
- data/Roadmap.org +17 -0
- data/app/assets/stylesheets/opal-irb/jqconsole.css +263 -0
- data/compiled/app-embeddable.js +39765 -0
- data/compiled/app-jqconsole.js +39767 -0
- data/compiled/application.js +27399 -0
- data/css/ansi.css +172 -0
- data/css/opal_irb_jqconsole.css +79 -0
- data/css/show-hint.css +38 -0
- data/doc/presentations/opal_irb_overview.html +678 -0
- data/doc/presentations/opal_irb_overview.org +448 -0
- data/examples/app-embeddable.rb +8 -0
- data/examples/app-jqconsole.rb +10 -0
- data/examples/application.rb +8 -0
- data/index-embeddable.html +29 -0
- data/index-homebrew.html +115 -0
- data/index-jq.html +80 -0
- data/js/anyword-hint.js +44 -0
- data/js/jqconsole.js +1583 -0
- data/js/nodeutil.js +546 -0
- data/js/ruby.js +285 -0
- data/js/show-hint.js +383 -0
- data/lib/opal-irb/rails_engine.rb +3 -0
- data/lib/opal-irb/version.rb +3 -0
- data/lib/opal-irb-rails.rb +2 -0
- data/lib/opal-irb.rb +44 -0
- data/opal/object_extensions.rb +20 -0
- data/opal/opal_irb/completion_engine.rb +202 -0
- data/opal/opal_irb/completion_formatter.rb +49 -0
- data/opal/opal_irb/completion_results.rb +88 -0
- data/opal/opal_irb.rb +88 -0
- data/opal/opal_irb_homebrew_console.rb +398 -0
- data/opal/opal_irb_jqconsole.rb +517 -0
- data/opal/opal_irb_jqconsole_css.rb +259 -0
- data/opal/opal_irb_log_redirector.rb +32 -0
- data/opal/opal_phantomjs.rb +49 -0
- data/opal-irb.gemspec +20 -0
- data/spec/code_link_handler_spec.rb +30 -0
- data/spec/jquery.js +5 -0
- data/spec/object_extensions_spec.rb +32 -0
- data/spec/opal_irb/completion_engine_spec.rb +204 -0
- data/spec/opal_irb/completion_results_spec.rb +32 -0
- data/spec/opal_irb_log_director_spec.rb +19 -0
- data/spec/opal_irb_spec.rb +19 -0
- data/spec/spec_helper.rb +1 -0
- metadata +151 -0
data/css/ansi.css
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
.jqconsole-ansi-bold {
|
2
|
+
font-weight: bold!important;
|
3
|
+
}
|
4
|
+
|
5
|
+
.jqconsole-ansi-lighter {
|
6
|
+
font-weight: lighter!important;
|
7
|
+
}
|
8
|
+
|
9
|
+
.jqconsole-ansi-italic {
|
10
|
+
font-style: italic!important;
|
11
|
+
}
|
12
|
+
|
13
|
+
.jqconsole-ansi-underline {
|
14
|
+
text-decoration: underline!important;
|
15
|
+
}
|
16
|
+
|
17
|
+
@-webkit-keyframes blinker {
|
18
|
+
from { opacity: 1.0; }
|
19
|
+
to { opacity: 0.0; }
|
20
|
+
}
|
21
|
+
|
22
|
+
@-moz-keyframes blinker {
|
23
|
+
from { opacity: 1.0; }
|
24
|
+
to { opacity: 0.0; }
|
25
|
+
}
|
26
|
+
|
27
|
+
@-ms-keyframes blinker {
|
28
|
+
from { opacity: 1.0; }
|
29
|
+
to { opacity: 0.0; }
|
30
|
+
}
|
31
|
+
|
32
|
+
@-o-keyframes blinker {
|
33
|
+
from { opacity: 1.0; }
|
34
|
+
to { opacity: 0.0; }
|
35
|
+
}
|
36
|
+
|
37
|
+
.jqconsole-ansi-blink {
|
38
|
+
-webkit-animation-name: blinker;
|
39
|
+
-moz-animation-name: blinker;
|
40
|
+
-ms-animation-name: blinker;
|
41
|
+
-o-animation-name: blinker;
|
42
|
+
-webkit-animation-iteration-count: infinite;
|
43
|
+
-moz-animation-iteration-count: infinite;
|
44
|
+
-ms-animation-iteration-count: infinite;
|
45
|
+
-o-animation-iteration-count: infinite;
|
46
|
+
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
47
|
+
-ms-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
48
|
+
-o-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
49
|
+
-moz-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
50
|
+
-webkit-animation-duration: 1s;
|
51
|
+
-moz-animation-duration: 1s;
|
52
|
+
-o-animation-duration: 1s;
|
53
|
+
-ms-animation-duration: 1s;
|
54
|
+
}
|
55
|
+
|
56
|
+
.jqconsole-ansi-blink-rapid {
|
57
|
+
-webkit-animation-name: blinker;
|
58
|
+
-moz-animation-name: blinker;
|
59
|
+
-ms-animation-name: blinker;
|
60
|
+
-o-animation-name: blinker;
|
61
|
+
-webkit-animation-iteration-count: infinite;
|
62
|
+
-moz-animation-iteration-count: infinite;
|
63
|
+
-ms-animation-iteration-count: infinite;
|
64
|
+
-o-animation-iteration-count: infinite;
|
65
|
+
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
66
|
+
-ms-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
67
|
+
-o-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
68
|
+
-moz-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
|
69
|
+
-webkit-animation-duration: 0.5s;
|
70
|
+
-moz-animation-duration: 0.5s;
|
71
|
+
-o-animation-duration: 0.5s;
|
72
|
+
-ms-animation-duration: 0.5s;
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
.jqconsole-ansi-hidden {
|
77
|
+
visibility:hidden!important;
|
78
|
+
}
|
79
|
+
|
80
|
+
.jqconsole-ansi-line-through {
|
81
|
+
text-decoration: line-through;
|
82
|
+
}
|
83
|
+
|
84
|
+
.jqconsole-ansi-fonts-1 {
|
85
|
+
|
86
|
+
}
|
87
|
+
.jqconsole-ansi-fonts-2 {
|
88
|
+
|
89
|
+
}
|
90
|
+
.jqconsole-ansi-fonts-3 {
|
91
|
+
|
92
|
+
}
|
93
|
+
.jqconsole-ansi-fonts-4 {
|
94
|
+
|
95
|
+
}
|
96
|
+
.jqconsole-ansi-fonts-5 {
|
97
|
+
|
98
|
+
}
|
99
|
+
.jqconsole-ansi-fonts-6 {
|
100
|
+
|
101
|
+
}
|
102
|
+
.jqconsole-ansi-fonts-7 {
|
103
|
+
|
104
|
+
}
|
105
|
+
.jqconsole-ansi-fonts-8 {
|
106
|
+
|
107
|
+
}
|
108
|
+
.jqconsole-ansi-fonts-9 {
|
109
|
+
|
110
|
+
}
|
111
|
+
|
112
|
+
.jqconsole-ansi-fraktur {
|
113
|
+
|
114
|
+
}
|
115
|
+
|
116
|
+
.jqconsole-ansi-color-black {
|
117
|
+
color: black!important;
|
118
|
+
}
|
119
|
+
.jqconsole-ansi-color-red {
|
120
|
+
color: red!important;
|
121
|
+
}
|
122
|
+
.jqconsole-ansi-color-green {
|
123
|
+
color: green!important;
|
124
|
+
}
|
125
|
+
.jqconsole-ansi-color-yellow {
|
126
|
+
color: yellow!important;
|
127
|
+
}
|
128
|
+
.jqconsole-ansi-color-blue {
|
129
|
+
color: blue!important;
|
130
|
+
}
|
131
|
+
.jqconsole-ansi-color-magenta {
|
132
|
+
color: magenta!important;
|
133
|
+
}
|
134
|
+
.jqconsole-ansi-color-cyan {
|
135
|
+
color: cyan!important;
|
136
|
+
}
|
137
|
+
.jqconsole-ansi-color-white {
|
138
|
+
color: white!important;
|
139
|
+
}
|
140
|
+
|
141
|
+
.jqconsole-ansi-background-color-black {
|
142
|
+
background-color: black!important;
|
143
|
+
}
|
144
|
+
.jqconsole-ansi-background-color-red {
|
145
|
+
background-color: red!important;
|
146
|
+
}
|
147
|
+
.jqconsole-ansi-background-color-green {
|
148
|
+
background-color: green!important;
|
149
|
+
}
|
150
|
+
.jqconsole-ansi-background-color-yellow {
|
151
|
+
background-color: yellow!important;
|
152
|
+
}
|
153
|
+
.jqconsole-ansi-background-color-blue {
|
154
|
+
background-color: blue!important;
|
155
|
+
}
|
156
|
+
.jqconsole-ansi-background-color-magenta {
|
157
|
+
background-color: magenta!important;
|
158
|
+
}
|
159
|
+
.jqconsole-ansi-background-color-cyan {
|
160
|
+
background-color: cyan!important;
|
161
|
+
}
|
162
|
+
.jqconsole-ansi-background-color-white {
|
163
|
+
background-color: white!important;
|
164
|
+
}
|
165
|
+
|
166
|
+
.jqconsole-ansi-framed {
|
167
|
+
border: 1px solid!important;
|
168
|
+
}
|
169
|
+
.jqconsole-ansi-overline {
|
170
|
+
text-decoration: overline!important;
|
171
|
+
}
|
172
|
+
|
@@ -0,0 +1,79 @@
|
|
1
|
+
html, body {
|
2
|
+
background-color: #333;
|
3
|
+
color: white;
|
4
|
+
font-family: monospace;
|
5
|
+
margin: 0;
|
6
|
+
padding: 0;
|
7
|
+
}
|
8
|
+
#opal-irb-console-bottom-panel {
|
9
|
+
width: 100%;
|
10
|
+
position: fixed;
|
11
|
+
bottom: 0px;
|
12
|
+
}
|
13
|
+
#opal-irb-console-topbar {
|
14
|
+
height:24px;
|
15
|
+
}
|
16
|
+
#opal-irb-console {
|
17
|
+
height: 400px;
|
18
|
+
position:relative;
|
19
|
+
background-color: #9b111e;
|
20
|
+
border: 2px solid #CCC;
|
21
|
+
margin: 0 auto;
|
22
|
+
}
|
23
|
+
.jqconsole {
|
24
|
+
padding: 10px;
|
25
|
+
padding-bottom: 10px;
|
26
|
+
}
|
27
|
+
.jqconsole-cursor {
|
28
|
+
background-color: #999;
|
29
|
+
}
|
30
|
+
.jqconsole-blurred .jqconsole-cursor {
|
31
|
+
background-color: #666;
|
32
|
+
}
|
33
|
+
.jqconsole-prompt {
|
34
|
+
color: #0d0;
|
35
|
+
}
|
36
|
+
.jqconsole-old-prompt {
|
37
|
+
color: #0b0;
|
38
|
+
font-weight: normal;
|
39
|
+
}
|
40
|
+
.jqconsole-input {
|
41
|
+
color: #dd0;
|
42
|
+
}
|
43
|
+
.jqconsole-old-input {
|
44
|
+
color: #bb0;
|
45
|
+
font-weight: normal;
|
46
|
+
}
|
47
|
+
.brace {
|
48
|
+
color: #00FFFF;
|
49
|
+
}
|
50
|
+
.paran {
|
51
|
+
color: #FF00FF;
|
52
|
+
}
|
53
|
+
.bracket {
|
54
|
+
color: #FFFF00;
|
55
|
+
}
|
56
|
+
.jqconsole-composition {
|
57
|
+
background-color: red;
|
58
|
+
}
|
59
|
+
|
60
|
+
span.boxclose, a.boxclose{
|
61
|
+
float:right;
|
62
|
+
cursor:pointer;
|
63
|
+
color: #fff;
|
64
|
+
border: 1px solid #AEAEAE;
|
65
|
+
border-radius: 30px;
|
66
|
+
background: red;
|
67
|
+
font-family: helvetica;
|
68
|
+
font-size: 20px;
|
69
|
+
font-weight: bold;
|
70
|
+
display: inline-block;
|
71
|
+
line-height: 0px;
|
72
|
+
padding: 11px 3px;
|
73
|
+
}
|
74
|
+
#opal-irb-console-topbar {
|
75
|
+
background-color: #AAA;
|
76
|
+
}
|
77
|
+
.boxclose:before {
|
78
|
+
content: "x";
|
79
|
+
}
|
data/css/show-hint.css
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
.CodeMirror-hints {
|
2
|
+
position: absolute;
|
3
|
+
z-index: 1000; /*needs to be greater than dialog*/
|
4
|
+
overflow: hidden;
|
5
|
+
list-style: none;
|
6
|
+
|
7
|
+
margin: 0;
|
8
|
+
padding: 2px;
|
9
|
+
|
10
|
+
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
11
|
+
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
12
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
13
|
+
border-radius: 3px;
|
14
|
+
border: 1px solid silver;
|
15
|
+
|
16
|
+
background: white;
|
17
|
+
font-size: 90%;
|
18
|
+
font-family: monospace;
|
19
|
+
|
20
|
+
max-height: 20em;
|
21
|
+
overflow-y: auto;
|
22
|
+
}
|
23
|
+
|
24
|
+
.CodeMirror-hint {
|
25
|
+
margin: 0;
|
26
|
+
padding: 0 4px;
|
27
|
+
border-radius: 2px;
|
28
|
+
max-width: 19em;
|
29
|
+
overflow: hidden;
|
30
|
+
white-space: pre;
|
31
|
+
color: black;
|
32
|
+
cursor: pointer;
|
33
|
+
}
|
34
|
+
|
35
|
+
li.CodeMirror-hint-active {
|
36
|
+
background: #08f;
|
37
|
+
color: white;
|
38
|
+
}
|