glimmer-cs-gladiator 0.8.1 → 0.9.2
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/CHANGELOG.md +43 -0
- data/LICENSE.txt +20 -20
- data/README.md +65 -31
- data/VERSION +1 -1
- data/bin/gladiator +31 -34
- data/bin/gladiator-setup +80 -80
- data/bin/glimmer-cs-gladiator +22 -22
- data/glimmer-cs-gladiator.gemspec +17 -22
- data/images/glimmer-cs-gladiator-logo.png +0 -0
- data/lib/glimmer-cs-gladiator/launch.rb +6 -6
- data/lib/glimmer-cs-gladiator.rb +30 -30
- data/lib/models/glimmer/gladiator/command.rb +112 -112
- data/lib/models/glimmer/gladiator/dir.rb +17 -4
- data/lib/models/glimmer/gladiator/file.rb +729 -662
- data/lib/views/glimmer/gladiator/file_edit_menu.rb +67 -0
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +244 -244
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +63 -64
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +35 -8
- data/lib/views/glimmer/gladiator/progress_shell.rb +29 -31
- data/lib/views/glimmer/gladiator/text_editor.rb +11 -0
- data/lib/views/glimmer/gladiator.rb +159 -138
- metadata +29 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2bd61ab016bc1d3992e56c082f137a5ed81941806fd20249c3a94020cb9970c
|
4
|
+
data.tar.gz: 293d2e2c7928fd5098e9f831b92cda26fc293bba8fdc5d8f11f06ef965877660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 468c13aaba846681e204d56e730b3a4c673fbee65f85423817f3580560bfb6c0361655504dfcffbcfe1c44aab184b1db637aa2e07713bf6f77a1f288579e8672
|
7
|
+
data.tar.gz: 99929299b521b244b8d4912a4fec64f7b6e0bd630b3e4e49a257ad7247391187dcb5a0dcb85ff06726170fb706d1998b8f496fe38f40996c93316cf444798186
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,50 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.9.2
|
4
|
+
|
5
|
+
- Ensure cleaning filewatcher/thread resources when closing a project dir/file
|
6
|
+
- Fix issue with `gladiator` function command produced by `gladiator-setup` not forwarding arguments in
|
7
|
+
- Fix issue with making changes to file through Find/Replace not persisting if I close Gladiator right afterwards unless I focus/unfocus open text editor
|
8
|
+
- Fix issue with not being able to open a project by passing project directory as first argument to `gladiator` command
|
9
|
+
- Fix issue with sometimes not remembering last open tabs when opening Gladiator
|
10
|
+
- Fix issues with renaming files in file explorer not reflecting change in open tab file name
|
11
|
+
- Fix minor issue with leaving `'-J-Xrs'` option in `bin/gladiator`
|
12
|
+
- Fix issue with Scratchpad not running content anymore
|
13
|
+
- Fix issue of stopping file watcher for open files that still need watching
|
14
|
+
|
15
|
+
## 0.9.1
|
16
|
+
|
17
|
+
- Upgrade to glimmer-dsl-swt 4.20.15.4
|
18
|
+
- Fix issue with keyboard shortcuts not working in first tab (also fix scroll-jittering when performing CMD+] and CMD+[ in first tab)
|
19
|
+
- Change Quit Project keyboard shortcut to ALT+F4
|
20
|
+
- In app mode (packaged version), show "Open Project..." shell again after closing last open project
|
21
|
+
|
22
|
+
## 0.9.0
|
23
|
+
|
24
|
+
- Upgrade to glimmer-dsl-swt 4.19.0.0
|
25
|
+
- Updated quit project accelerator (keyboard shortcut) to ALT+F4
|
26
|
+
|
27
|
+
## 0.8.3
|
28
|
+
|
29
|
+
- Switch Scratchpad evaling to loading a temporary local file under `project_dir/.gladiator-scratchpad` for a more realistic Ruby running experience
|
30
|
+
- Fix issue with detecting current gladiator window when handling keyboard shortcuts
|
31
|
+
- Fix issue with Scratchpad opening twice when called twice instead of reusing the existing Scratchpad
|
32
|
+
- Fix issue with closed tabs not closing their file streams/watchers, including the Scratchpad temporary file
|
33
|
+
|
34
|
+
## 0.8.2
|
35
|
+
|
36
|
+
- Add a right click menu on text editor area with undo redo | cut, copy, paste, delete | select all
|
37
|
+
- Replaced error message_box with a more readable error dialog for running Ruby code
|
38
|
+
- Update Ruby Run menu item command to run against the top level binding receiver (ensuring no weird errors when including Glimmer)
|
39
|
+
- In app mode, display an "Open Project..." button
|
40
|
+
- In app mode, set gladiator icon on initial shell
|
41
|
+
- Fix full line selection on Windows (SHIFT+HOME or SHIFT+END)
|
42
|
+
- Fix issue with display saving original file before changes when running in app mode, making changes to an open project, and then closing
|
43
|
+
- Fix caret position after formatting dirty content (when pasting a string that has extra empty spaces for example)
|
44
|
+
|
3
45
|
## 0.8.1
|
4
46
|
|
47
|
+
- Package Gladiator as a Windows MSI file
|
5
48
|
- Fix issue with HOME and END taking to beginning of file and end of file on Windows instead of beginning of line and end of line
|
6
49
|
- Fix opening first tab on Windows (shows up as blank, but second tab shows up fine)
|
7
50
|
- Fix issue with losing focus on changing tabs on Windows via Windows default tab switching shortcuts of CTRL+PGUP & CTRL+PGDN
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright (c) 2020-2021 Andy Maleh
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2020-2021 Andy Maleh
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.
|
1
|
+
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.9.2 - [Ugliest Text Editor Ever!](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
|
2
2
|
## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shell-gem)
|
3
3
|
[](http://badge.fury.io/rb/glimmer-cs-gladiator)
|
4
4
|
|
5
5
|

|
6
6
|
|
7
|
-
Gladiator (short for Glimmer Editor) is a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) sample beta project under on-going development that demonstrates how to build a text editor in Ruby using [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Library).
|
7
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) (short for Glimmer Editor) is a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) sample beta project under on-going development that demonstrates how to build a text editor in Ruby using [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Library).
|
8
8
|
It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using [Glimmer](https://github.com/AndyObtiva/glimmer).
|
9
|
-
Gladiator is also a personal tool for shaping an editor exactly the way I like, with all the keyboard shortcuts I prefer.
|
10
|
-
I leave building truly professional text editors to software tooling experts who would hopefully use [Glimmer](https://github.com/AndyObtiva/glimmer) one day. Otherwise, I have been happily using Gladiator to develop all my [open-source projects](https://github.com/AndyObtiva) since May of 2020.
|
9
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) is also a personal tool for shaping an editor exactly the way I like, with all the keyboard shortcuts I prefer.
|
10
|
+
I leave building truly professional text editors to software tooling experts who would hopefully use [Glimmer](https://github.com/AndyObtiva/glimmer) one day. Otherwise, I have been happily using [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) to develop all my [open-source projects](https://github.com/AndyObtiva) since May of 2020.
|
11
11
|
|
12
|
-
You may now [download](#download) a packaged version of Gladiator.
|
12
|
+
You may now [download](#download) a packaged version of [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator).
|
13
13
|
|
14
14
|
## Features
|
15
15
|
|
16
|
-
Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL/CTRL=ALT on Windows/Linux)
|
16
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL/CTRL=ALT on Windows/Linux)
|
17
17
|
|
18
18
|

|
19
19
|
|
@@ -45,16 +45,16 @@ Gladiator currently supports the following text editing features (including keyb
|
|
45
45
|
### Navigation Area
|
46
46
|
|
47
47
|
- Show current text editor file name
|
48
|
-
- Show file navigation stats (Caret Position / Line Position / Selection Count / Top Pixel)
|
48
|
+
0- Show file navigation stats (Caret Position / Line Position / Selection Count / Top Pixel)
|
49
49
|
- Jump to Line (CMD+L)
|
50
50
|
- Find & Replace (CMD+F)
|
51
51
|
|
52
52
|
### Menus
|
53
53
|
|
54
54
|
- File Menu:
|
55
|
+
- Open Scratchpad for running arbitrary Ruby/Glimmer code (saves a temporary file to `project_dir/.gladiator-scratchpad`) (CMD+SHIFT+S)
|
55
56
|
- Open Project (CMD+O)
|
56
|
-
- Quit Project (
|
57
|
-
- New Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
|
57
|
+
- Quit Project (ALT+F4)
|
58
58
|
- View Menu
|
59
59
|
- Split Pane
|
60
60
|
- Orientation change to Horizontal/Vertical (CMD+SHIFT+O)
|
@@ -105,9 +105,9 @@ Gladiator currently supports the following text editing features (including keyb
|
|
105
105
|
|
106
106
|
## Platforms
|
107
107
|
|
108
|
-
- Mac: Gladiator works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
109
|
-
- Windows: Gladiator works
|
110
|
-
- Linux: Gladiator works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
108
|
+
- Mac: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
109
|
+
- Windows: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works OK on Windows, but has a few annoying issues.
|
110
|
+
- Linux: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
111
111
|
|
112
112
|
## Pre-requisites
|
113
113
|
|
@@ -117,17 +117,21 @@ Gladiator currently supports the following text editing features (including keyb
|
|
117
117
|
|
118
118
|
## Download
|
119
119
|
|
120
|
-
[Download Gladiator Mac DMG Installer](https://www.dropbox.com/s/
|
120
|
+
[Download Gladiator 0.9.2 Mac DMG Installer (x64 Catalina & Older)](https://www.dropbox.com/s/8gvthczqhb9szwp/Gladiator-0.9.2.dmg?dl=1)
|
121
121
|
|
122
|
-
[Download Gladiator Windows MSI Installer](https://www.dropbox.com/s/
|
122
|
+
[Download Gladiator 0.9.2 Windows MSI Installer (x64 Windows 10)](https://www.dropbox.com/s/xxik700jh0utn8q/Gladiator-0.9.2.msi?dl=1)
|
123
|
+
|
124
|
+
[Download Gladiator 0.9.1 Mac DMG Installer (x64 Big Sur & Older)](https://www.dropbox.com/s/s9yp6qtelh85qko/Gladiator-0.9.1.dmg?dl=1)
|
125
|
+
|
126
|
+
The packaged version starts with a dialog asking you what project to open. [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) does not fully show up until you have selected a project directory.
|
123
127
|
|
124
128
|
Otherwise, if you prefer a command line version, then follow the Setup Instructions below.
|
125
129
|
|
126
130
|
## Setup Instructions
|
127
131
|
|
128
|
-
Note: if you encounter any issues, check if they are documented in [TODO.md](TODO.md), [issues](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues), or [pull requests](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls) as they might be on my radar to fix. Otherwise, please report as an [issue](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues) or better yet fix and submit a [pull request](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls).
|
132
|
+
Note: if you encounter any issues, check if they are documented in [TODO.md](TODO.md), [issues](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues), or [pull requests](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls) as they might be on my radar to fix. Otherwise, please report as an [issue](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues) or better yet fix and submit a [pull request](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls). Also, try going back to a [previous version of the gem](https://rubygems.org/gems/glimmer-cs-gladiator/versions) until you find one that works. Keep in mind this is open-source software provided as is, so there are no guarantees of functionality. If you would like such guarantees, you are welcome to [hire me full-time](https://www.linkedin.com/in/andymaleh/).
|
129
133
|
|
130
|
-
Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
134
|
+
Install [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
131
135
|
|
132
136
|
```
|
133
137
|
jgem install glimmer-cs-gladiator
|
@@ -137,7 +141,7 @@ Or add to a JRuby project Bundler `Gemfile` under the `:developement` group:
|
|
137
141
|
|
138
142
|
```
|
139
143
|
group :development do
|
140
|
-
gem 'glimmer-cs-gladiator'
|
144
|
+
gem 'glimmer-cs-gladiator', '> 0'
|
141
145
|
end
|
142
146
|
```
|
143
147
|
|
@@ -147,19 +151,18 @@ Run (`jruby -S bundle` or `bundle` directly if you have [RVM](https://rvm.io/)):
|
|
147
151
|
jruby -S bundle
|
148
152
|
```
|
149
153
|
|
150
|
-
Afterwards, to ensure system wide availablility of the `gladiator` command, run this command in an environment that has JRuby:
|
154
|
+
Afterwards, if you are using [RVM](https://rvm.io/) and want to ensure system wide availablility of the `gladiator` command across Ruby versions, run this command in an environment that has JRuby (not needed without [RVM](https://rvm.io/)):
|
151
155
|
|
152
156
|
```
|
153
157
|
gladiator-setup
|
158
|
+
source ~/.gladiator_source
|
154
159
|
```
|
155
160
|
|
156
|
-
|
161
|
+
You should be able to run `gladiator` from anywhere now.
|
157
162
|
|
158
|
-
|
159
|
-
source ~/.gladiator_source
|
160
|
-
```
|
163
|
+
You can pass a project path as a first argument to open a particular project.
|
161
164
|
|
162
|
-
|
165
|
+
Alternatively, open in app mode (gives you a dialog to open any project) by passing `APP_MODE=true` argument/env-var.
|
163
166
|
|
164
167
|
## Usage
|
165
168
|
|
@@ -191,11 +194,11 @@ Note: If you cloned this project and bundle installed, you may invoke via `bin/g
|
|
191
194
|
|
192
195
|
### Glimmer Custom Shell Reuse
|
193
196
|
|
194
|
-
To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application, add the
|
197
|
+
To reuse [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) as a Glimmer Custom Shell inside another Glimmer application, add the
|
195
198
|
following to the application's `Gemfile`:
|
196
199
|
|
197
200
|
```
|
198
|
-
gem 'glimmer-cs-gladiator', '>= 0.
|
201
|
+
gem 'glimmer-cs-gladiator', '>= 0.9.2'
|
199
202
|
```
|
200
203
|
|
201
204
|
Run:
|
@@ -204,11 +207,17 @@ Run:
|
|
204
207
|
jruby -S bundle
|
205
208
|
```
|
206
209
|
|
207
|
-
And, then instantiate the Gladiator [custom shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shells) in your [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) application via the `gladiator` keyword assuming you already have `include Glimmer` in your class, module, or main object.
|
210
|
+
And, then instantiate the [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) [custom shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shells) in your [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) application via the `gladiator` keyword assuming you already have `include Glimmer` in your class, module, or main object.
|
208
211
|
|
209
212
|
## Env Var Options
|
210
213
|
|
211
|
-
Gladiator
|
214
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) supports these environment variable options.
|
215
|
+
|
216
|
+
### LOCAL_DIR
|
217
|
+
|
218
|
+
(String / default: `'.'`)
|
219
|
+
|
220
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) opens with the current directory as the root by default.
|
212
221
|
If you would like to open another directory, set `LOCAL_DIR` environment variable.
|
213
222
|
|
214
223
|
Example:
|
@@ -217,26 +226,51 @@ Example:
|
|
217
226
|
LOCAL_DIR="/Users/User/code" gladiator
|
218
227
|
```
|
219
228
|
|
220
|
-
Opens Gladiator with "/Users/User/code" as the root directory.
|
229
|
+
Opens [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) with "/Users/User/code" as the root directory.
|
230
|
+
|
231
|
+
### APP_MODE
|
232
|
+
|
233
|
+
(`true` or `false` / default: `false` from terminal/command-line and `true` from [packaged Gladiator](#download))
|
234
|
+
|
235
|
+
Specifies whether to run in app mode, thus providing a dialog to open any project path instead of starting with a specific project from the get-go.
|
236
|
+
|
237
|
+
Example:
|
238
|
+
|
239
|
+
```
|
240
|
+
APP_MODE=true gladiator
|
241
|
+
```
|
221
242
|
|
222
243
|
## Configuration
|
223
244
|
|
224
|
-
Gladiator automatically saves configuration data in a `.gladiator` file at the directory it is run from. It may be edited to add extra ignore paths.
|
245
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) automatically saves configuration data in a `.gladiator` file at the directory it is run from. It may be edited to add extra ignore paths.
|
225
246
|
|
226
247
|
It currently remembers:
|
227
248
|
- Last opened files (in both split panes if split)
|
228
249
|
- Window size and position
|
229
250
|
- Ignore Paths under `Glimmer::Gladiator::Dir::IGNORE_PATHS` (default: `['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist']`)
|
230
251
|
|
231
|
-
##
|
252
|
+
## Gotchas
|
232
253
|
|
233
|
-
|
254
|
+
### Signaling Error
|
255
|
+
|
256
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) repetitively displays a signaling error that is harmless in practice:
|
234
257
|
```
|
235
258
|
The signal HUP is in use by the JVM and will not work correctly on this platform
|
236
259
|
The signal INT is in use by the JVM and will not work correctly on this platform
|
237
260
|
The signal TERM is in use by the JVM and will not work correctly on this platform
|
238
261
|
```
|
239
262
|
|
263
|
+
### App Is Not Responding
|
264
|
+
|
265
|
+
If you run the `gladiator` command from the root directory or some parent directory to many projects, it assumes that is
|
266
|
+
the project directory and attempts to pre-load all files (just part of [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator)'s architectural design and assumptions for optimizing use per project), taking a very long time and not responding for quite a while.
|
267
|
+
|
268
|
+
To avoid this problem, always make sure you are running the `gladiator` command from a single project's directory.
|
269
|
+
|
270
|
+
Also, if you encounter this issue with projects that contain a lot of extra files that you do not need to edit, you
|
271
|
+
could later open the generated `.gladiator` file at the root of the project directory and add unnecessary subdirectories
|
272
|
+
to the `ignore_paths` array.
|
273
|
+
|
240
274
|
## TODO
|
241
275
|
|
242
276
|
[TODO.md](TODO.md)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.2
|
data/bin/gladiator
CHANGED
@@ -1,34 +1,31 @@
|
|
1
|
-
#!/usr/bin/env jruby
|
2
|
-
|
3
|
-
# Copyright (c) 2020-2021 Andy Maleh
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
# a copy of this software and associated documentation files (the
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
# the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be
|
14
|
-
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
-
|
24
|
-
require 'glimmer/launcher'
|
25
|
-
|
26
|
-
gladiator_runner = File.expand_path('../glimmer-cs-gladiator', __FILE__)
|
27
|
-
launcher = Glimmer::Launcher.new([gladiator_runner
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
34
|
-
launcher.launch
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
require 'glimmer/launcher'
|
25
|
+
|
26
|
+
gladiator_runner = File.expand_path('../glimmer-cs-gladiator', __FILE__)
|
27
|
+
launcher = Glimmer::Launcher.new([gladiator_runner] + ARGV)
|
28
|
+
local_dir = ARGV.find {|arg| !arg.include?('=') }
|
29
|
+
local_dir = File.expand_path(local_dir) if local_dir
|
30
|
+
ENV['LOCAL_DIR'] ||= local_dir if local_dir != gladiator_runner
|
31
|
+
launcher.launch
|
data/bin/gladiator-setup
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Copyright (c) 2020-2021 Andy Maleh
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
# a copy of this software and associated documentation files (the
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
# the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be
|
14
|
-
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
-
|
24
|
-
version = File.read(File.expand_path('../VERSION', __dir__))
|
25
|
-
puts "== Gladiator (Glimmer Editor) Version #{version.strip} =="
|
26
|
-
|
27
|
-
ruby = `which jruby`.to_s.strip
|
28
|
-
if ruby.empty?
|
29
|
-
return puts('jruby is not available. Make sure you have jruby installed and available in path environment (or selected if using RVM)')
|
30
|
-
end
|
31
|
-
|
32
|
-
rvm_command = `which rvm`
|
33
|
-
if rvm_command.to_s.strip.empty?
|
34
|
-
command = "#{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
35
|
-
else
|
36
|
-
rvm = `rvm current`.strip
|
37
|
-
command = "rvm #{rvm} do #{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
38
|
-
end
|
39
|
-
|
40
|
-
gladiator_script = <<~SHELL_SCRIPT
|
41
|
-
function gladiator()
|
42
|
-
{
|
43
|
-
#{command}
|
44
|
-
}
|
45
|
-
SHELL_SCRIPT
|
46
|
-
|
47
|
-
|
48
|
-
require 'fileutils'
|
49
|
-
home_dir = `echo ~`.strip
|
50
|
-
FileUtils.mkdir_p("#{home_dir}/bin")
|
51
|
-
gladiator_script_file = "#{home_dir}/.gladiator_source"
|
52
|
-
gladiator_script_file_bash = "$HOME/.gladiator_source"
|
53
|
-
File.write(gladiator_script_file, gladiator_script)
|
54
|
-
|
55
|
-
[
|
56
|
-
['.bash_profile', '.bashrc'],
|
57
|
-
['.zprofile', '.zshrc']
|
58
|
-
].each do |profile_and_fallback|
|
59
|
-
shell_profile_file_name = profile_and_fallback.first
|
60
|
-
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
61
|
-
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
62
|
-
FileUtils.touch(shell_profile_file)
|
63
|
-
shell_profile = File.read(shell_profile_file)
|
64
|
-
gladiator_source_statement = "source \"#{gladiator_script_file_bash}\""
|
65
|
-
unless shell_profile.split("\n").detect {|line| line.include?(gladiator_source_statement) }
|
66
|
-
File.write(shell_profile_file, "#{shell_profile}\n#{gladiator_source_statement}")
|
67
|
-
end
|
68
|
-
puts "~/#{shell_profile_file_name} has been modified to source the `gladiator` function from ~/.gladiator_source"
|
69
|
-
end
|
70
|
-
|
71
|
-
puts <<~OUTPUT
|
72
|
-
|
73
|
-
Before using `gladiator`, start a new shell session (open a new terminal tab) or run:
|
74
|
-
|
75
|
-
source ~/.gladiator_source
|
76
|
-
|
77
|
-
Afterwards, you may run the following command from anywhere to start Gladiator (Glimmer Editor):
|
78
|
-
|
79
|
-
gladiator
|
80
|
-
OUTPUT
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
version = File.read(File.expand_path('../VERSION', __dir__))
|
25
|
+
puts "== Gladiator (Glimmer Editor) Version #{version.strip} =="
|
26
|
+
|
27
|
+
ruby = `which jruby`.to_s.strip
|
28
|
+
if ruby.empty?
|
29
|
+
return puts('jruby is not available. Make sure you have jruby installed and available in path environment (or selected if using RVM)')
|
30
|
+
end
|
31
|
+
|
32
|
+
rvm_command = `which rvm`
|
33
|
+
if rvm_command.to_s.strip.empty?
|
34
|
+
command = "#{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
35
|
+
else
|
36
|
+
rvm = `rvm current`.strip
|
37
|
+
command = "rvm #{rvm} do #{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
38
|
+
end
|
39
|
+
|
40
|
+
gladiator_script = <<~SHELL_SCRIPT
|
41
|
+
function gladiator()
|
42
|
+
{
|
43
|
+
#{command} $@
|
44
|
+
}
|
45
|
+
SHELL_SCRIPT
|
46
|
+
|
47
|
+
|
48
|
+
require 'fileutils'
|
49
|
+
home_dir = `echo ~`.strip
|
50
|
+
FileUtils.mkdir_p("#{home_dir}/bin")
|
51
|
+
gladiator_script_file = "#{home_dir}/.gladiator_source"
|
52
|
+
gladiator_script_file_bash = "$HOME/.gladiator_source"
|
53
|
+
File.write(gladiator_script_file, gladiator_script)
|
54
|
+
|
55
|
+
[
|
56
|
+
['.bash_profile', '.bashrc'],
|
57
|
+
['.zprofile', '.zshrc']
|
58
|
+
].each do |profile_and_fallback|
|
59
|
+
shell_profile_file_name = profile_and_fallback.first
|
60
|
+
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
61
|
+
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
62
|
+
FileUtils.touch(shell_profile_file)
|
63
|
+
shell_profile = File.read(shell_profile_file)
|
64
|
+
gladiator_source_statement = "source \"#{gladiator_script_file_bash}\""
|
65
|
+
unless shell_profile.split("\n").detect {|line| line.include?(gladiator_source_statement) }
|
66
|
+
File.write(shell_profile_file, "#{shell_profile}\n#{gladiator_source_statement}")
|
67
|
+
end
|
68
|
+
puts "~/#{shell_profile_file_name} has been modified to source the `gladiator` function from ~/.gladiator_source"
|
69
|
+
end
|
70
|
+
|
71
|
+
puts <<~OUTPUT
|
72
|
+
|
73
|
+
Before using `gladiator`, start a new shell session in the same directory (open a new terminal tab and go to the same directory) or run:
|
74
|
+
|
75
|
+
source ~/.gladiator_source
|
76
|
+
|
77
|
+
Afterwards, you may run the following command from anywhere to start Gladiator (Glimmer Editor):
|
78
|
+
|
79
|
+
gladiator
|
80
|
+
OUTPUT
|
data/bin/glimmer-cs-gladiator
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
# Copyright (c) 2020-2021 Andy Maleh
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
# a copy of this software and associated documentation files (the
|
5
|
-
# "Software"), to deal in the Software without restriction, including
|
6
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
# the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be
|
12
|
-
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
|
22
|
-
require_relative '../lib/glimmer-cs-gladiator/launch'
|
1
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
require_relative '../lib/glimmer-cs-gladiator/launch'
|