glimmer-cs-gladiator 0.7.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/LICENSE.txt +20 -20
- data/README.md +60 -14
- data/VERSION +1 -1
- data/bin/gladiator +34 -13
- data/bin/gladiator-setup +80 -0
- data/bin/glimmer-cs-gladiator +22 -0
- data/glimmer-cs-gladiator.gemspec +20 -9
- data/lib/glimmer-cs-gladiator.rb +30 -29
- data/lib/glimmer-cs-gladiator/launch.rb +6 -0
- data/lib/models/glimmer/gladiator/command.rb +112 -112
- data/lib/models/glimmer/gladiator/dir.rb +8 -4
- data/lib/models/glimmer/gladiator/file.rb +662 -599
- data/lib/views/glimmer/gladiator.rb +510 -801
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +244 -0
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +64 -0
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +189 -0
- data/lib/views/glimmer/gladiator/progress_shell.rb +31 -0
- data/lib/views/glimmer/gladiator/text_editor.rb +40 -19
- metadata +32 -6
- data/bin/gladiator_runner.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11730722d7270481d6ddd3b4ddccf2cea3e4e845896ef78528bb20caf5cdc29a
|
4
|
+
data.tar.gz: 25f8fa48610d54e44dc6d848fe0d583a6857995fe09d021512e6d63202188e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8af3c74194e99143bbefd4bf04b5c1077377264a274cd18075ea0eeebf68d5559a597adc59070e6d978aa4fada54e8e3c915fdd56ccf1a620ce1931d2ed9ad01
|
7
|
+
data.tar.gz: 3c8e99fac4c80e4ede247883fb9b96c1823b24d69f0f3518abcbcf4a78c9889f78d161b7655a39f67615614d68b766e22504ac2dc1c9840b2a145e6fe3dcfc9e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,50 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.8.1
|
4
|
+
|
5
|
+
- 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
|
+
- Fix opening first tab on Windows (shows up as blank, but second tab shows up fine)
|
7
|
+
- Fix issue with losing focus on changing tabs on Windows via Windows default tab switching shortcuts of CTRL+PGUP & CTRL+PGDN
|
8
|
+
- Fix crazy flashing issue upon hitting CTRL+T on Windows to jump to the File Explorer (doesn't always happen, only the first time in a session)
|
9
|
+
- Fix CMD+R shortcut on Windows via CTRL+R
|
10
|
+
- Fix minimization of Navigation area on Windows (closes but keeps size of expand bar)
|
11
|
+
- Fix shortcuts for Windows/Linux by using ALT as alternative to CTRL when employing both COMMAND (CTRL on Windows/Linux) and CONTROL (ALT on Windows/Linux)
|
12
|
+
|
13
|
+
## 0.8.0
|
14
|
+
|
15
|
+
- Upgrade to glimmer-dsl-swt v4.18.3.5
|
16
|
+
- Multiple language syntax highlighting support (over 20 languages) via the new code_text language option in Glimmer DSL for SWT
|
17
|
+
- Refactor code to use display on_quit event (instead of manual SWT code for quitting on the Mac)
|
18
|
+
- Fix issue with Reset All not working
|
19
|
+
- Fix issue with CMD+F not revealing Navigation Area when in Maximized Editor Mode
|
20
|
+
|
21
|
+
## 0.7.3
|
22
|
+
|
23
|
+
- Add gladiator-setup to make gladiator executable available everywhere
|
24
|
+
- Package Gladiator as Mac DMG file
|
25
|
+
- Shrink minimum height for editor area (too large for putting side by side with another window)
|
26
|
+
- Change initial default size of Gladiator window to the entire screen size
|
27
|
+
- Made layout more resilient to shrinkage so that the Navigation area widgets don't get jumbled up
|
28
|
+
- Show open project dialog when run as Gladiator app (e.g. Mac app) instead of opening the local directory of the app
|
29
|
+
- Extract gladiator_menu_bar custom widget and reuse in open_project shell (to use in app version)
|
30
|
+
- Extract progress_shell custom shell
|
31
|
+
- Fix issue with disposed? error in save_config
|
32
|
+
- Fix issue with first open of a file with an empty brand new gladiator session not showing file content until resizing
|
33
|
+
|
34
|
+
## 0.7.2
|
35
|
+
|
36
|
+
- Fallback font ("Courier") for text editor when "Consolas" is not available
|
37
|
+
- Refactor Gladiator Custom Shell to extract more Glimmer Custom Widgets from it like FileLookupList and FileExplorerTree
|
38
|
+
- Upgrade to glimmer-dsl-swt v4.18.0.2
|
39
|
+
|
40
|
+
## 0.7.1
|
41
|
+
|
42
|
+
- Update View -> Reset All to also reset the File Lookup/File Explorer Sash Width and the Navigation Bar (expanding it)
|
43
|
+
- Fix issue with split, reset split, unsplit, and then split again forgetting the reset for the sash width
|
44
|
+
- Ensure closing a single tab moves user back to the previous tab
|
45
|
+
- Add pkg to ignore paths
|
46
|
+
- Update Reset All menu item to reset splits too
|
47
|
+
|
3
48
|
## 0.7.0
|
4
49
|
|
5
50
|
- Upgrade to glimmer-dsl-swt v4.18.0.0
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright (c) 2020 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,4 +1,4 @@
|
|
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.8.1 - [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
|
[![Gem Version](https://badge.fury.io/rb/glimmer-cs-gladiator.svg)](http://badge.fury.io/rb/glimmer-cs-gladiator)
|
4
4
|
|
@@ -9,15 +9,17 @@ It is not intended to be a full-fledged editor by any means, yet mostly a fun ed
|
|
9
9
|
Gladiator is also a personal tool for shaping an editor exactly the way I like, with all the keyboard shortcuts I prefer.
|
10
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.
|
11
11
|
|
12
|
+
You may now [download](#download) a packaged version of Gladiator.
|
13
|
+
|
12
14
|
## Features
|
13
15
|
|
14
|
-
Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL on Windows/Linux)
|
16
|
+
Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL/CTRL=ALT on Windows/Linux)
|
15
17
|
|
16
18
|
![Gladiator Demo](images/glimmer-gladiator.gif)
|
17
19
|
|
18
20
|
### Text Editor
|
19
21
|
|
20
|
-
- Text Editor with Colored
|
22
|
+
- Text Editor with Colored Syntax Highlighting for [Multiple Languages](#multiple-language-syntax-highlighting)
|
21
23
|
- Show Line Numbers
|
22
24
|
- Multi-tab support (CMD+SHIFT+[ & CMD+SHIFT+] for tab navigation. CMD+1-9 to jump to a specific tab)
|
23
25
|
- Drag and drop split pane (drag a file from File Tree or File Lookup List, and it splits the pane)
|
@@ -74,17 +76,52 @@ Gladiator currently supports the following text editing features (including keyb
|
|
74
76
|
- Remember opened tabs, caret position, top pixel, window size, and window location
|
75
77
|
- [Default](#configuration) "ignore paths" to avoid bogging down editor with irrelevant directory files
|
76
78
|
|
79
|
+
### Multiple Language Syntax Highlighting
|
80
|
+
|
81
|
+
- Ruby
|
82
|
+
- Markdown
|
83
|
+
- JavaScript
|
84
|
+
- JSON
|
85
|
+
- Yaml
|
86
|
+
- HTML
|
87
|
+
- C
|
88
|
+
- Haskell
|
89
|
+
- Gradle
|
90
|
+
- C++
|
91
|
+
- CSS
|
92
|
+
- Java
|
93
|
+
- JSP
|
94
|
+
- plist
|
95
|
+
- Haml
|
96
|
+
- XML
|
97
|
+
- INI
|
98
|
+
- Perl
|
99
|
+
- Tcl
|
100
|
+
- SASS
|
101
|
+
- SCSS
|
102
|
+
- SQL
|
103
|
+
- Shell (Bash / Zsh)
|
104
|
+
- Vue
|
105
|
+
|
77
106
|
## Platforms
|
78
107
|
|
79
108
|
- Mac: Gladiator works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
80
|
-
- Windows: Gladiator works
|
109
|
+
- Windows: Gladiator works fine on Windows, but has a few minor issues.
|
81
110
|
- Linux: Gladiator works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
82
111
|
|
83
112
|
## Pre-requisites
|
84
113
|
|
85
114
|
- [JDK](https://www.oracle.com/java/technologies/javase-downloads.html): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
86
115
|
- [JRuby](https://www.jruby.org/download): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
87
|
-
- [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework)
|
116
|
+
- [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework) (dependency included in Ruby gem).
|
117
|
+
|
118
|
+
## Download
|
119
|
+
|
120
|
+
[Download Gladiator Mac DMG Installer](https://www.dropbox.com/s/uklftb8q16czgo6/Gladiator-0.8.1.dmg?dl=1)
|
121
|
+
|
122
|
+
[Download Gladiator Windows MSI Installer](https://www.dropbox.com/s/uuvo5h6golzmr82/Gladiator-0.8.1.msi?dl=1)
|
123
|
+
|
124
|
+
Otherwise, if you prefer a command line version, then follow the Setup Instructions below.
|
88
125
|
|
89
126
|
## Setup Instructions
|
90
127
|
|
@@ -110,6 +147,20 @@ Run (`jruby -S bundle` or `bundle` directly if you have [RVM](https://rvm.io/)):
|
|
110
147
|
jruby -S bundle
|
111
148
|
```
|
112
149
|
|
150
|
+
Afterwards, to ensure system wide availablility of the `gladiator` command, run this command in an environment that has JRuby:
|
151
|
+
|
152
|
+
```
|
153
|
+
gladiator-setup
|
154
|
+
```
|
155
|
+
|
156
|
+
Finally, start a new terminal session or source .gladiator_source:
|
157
|
+
|
158
|
+
```
|
159
|
+
source ~/.gladiator_source
|
160
|
+
```
|
161
|
+
|
162
|
+
You should be able to run `gladiator` from anywhere now, even cross-rubies in [RVM](https://rvm.io).
|
163
|
+
|
113
164
|
## Usage
|
114
165
|
|
115
166
|
You may run the `gladiator` command to bring up the text editor in the project directory you would like to edit:
|
@@ -138,19 +189,13 @@ gladiator relative-or-absolute-path/to/project
|
|
138
189
|
|
139
190
|
Note: If you cloned this project and bundle installed, you may invoke via `bin/gladiator` instead.
|
140
191
|
|
141
|
-
If your project is not a JRuby project, then you cannot install [glimmer-cs-gladiator](https://rubygems.org/gems/glimmer-cs-gladiator), so you must install in a separate JRuby environment and invoke by passing the project path as per command above. Alternatively, you may clone this project, and invoke gladiator via `bin/gladiator` (that's how I use Gladiator for most of my projects):
|
142
|
-
|
143
|
-
```
|
144
|
-
bin/gladiator relative-or-absolute-path/to/project
|
145
|
-
```
|
146
|
-
|
147
192
|
### Glimmer Custom Shell Reuse
|
148
193
|
|
149
194
|
To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application, add the
|
150
195
|
following to the application's `Gemfile`:
|
151
196
|
|
152
197
|
```
|
153
|
-
gem 'glimmer-cs-gladiator', '>= 0.
|
198
|
+
gem 'glimmer-cs-gladiator', '>= 0.8.1'
|
154
199
|
```
|
155
200
|
|
156
201
|
Run:
|
@@ -181,7 +226,7 @@ Gladiator automatically saves configuration data in a `.gladiator` file at the d
|
|
181
226
|
It currently remembers:
|
182
227
|
- Last opened files (in both split panes if split)
|
183
228
|
- Window size and position
|
184
|
-
- Ignore Paths (default: '.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor')
|
229
|
+
- Ignore Paths under `Glimmer::Gladiator::Dir::IGNORE_PATHS` (default: `['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist']`)
|
185
230
|
|
186
231
|
## Gotcha
|
187
232
|
|
@@ -209,12 +254,13 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
|
|
209
254
|
- Commit and push until you are happy with your contribution.
|
210
255
|
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
211
256
|
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
257
|
+
- On windows, add this Git config: `git config core.autocrlf input` (or globally if you're working on multiple Glimmer projects)
|
212
258
|
|
213
259
|
## Copyright
|
214
260
|
|
215
261
|
[MIT](https://opensource.org/licenses/MIT)
|
216
262
|
|
217
|
-
Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
263
|
+
Copyright (c) 2020-2021 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
218
264
|
|
219
265
|
--
|
220
266
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.1
|
data/bin/gladiator
CHANGED
@@ -1,13 +1,34 @@
|
|
1
|
-
#!/usr/bin/env
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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, '-J-Xrs'] + ARGV)
|
28
|
+
launcher.application_paths.to_a.each do |file|
|
29
|
+
if file != gladiator_runner
|
30
|
+
launcher.application_paths.delete(file)
|
31
|
+
ENV['LOCAL_DIR'] ||= file
|
32
|
+
end
|
33
|
+
end
|
34
|
+
launcher.launch
|
data/bin/gladiator-setup
ADDED
@@ -0,0 +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
|
@@ -0,0 +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,21 +1,22 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-cs-gladiator 0.
|
5
|
+
# stub: glimmer-cs-gladiator 0.8.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-cs-gladiator".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.8.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "2021-
|
14
|
+
s.date = "2021-02-07"
|
15
15
|
s.description = "Gladiator (short for Glimmer Editor) is a Glimmer sample project under on-going development. It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using Glimmer to build a text editor. Gladiator is also a personal tool for shaping an editor exactly the way I like. I leave building truly professional text editors to software tooling experts who would hopefully use Glimmer one day.".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
|
-
s.executables = ["gladiator".freeze]
|
17
|
+
s.executables = ["glimmer-cs-gladiator".freeze, "gladiator".freeze, "gladiator-setup".freeze]
|
18
18
|
s.extra_rdoc_files = [
|
19
|
+
"CHANGELOG.md",
|
19
20
|
"LICENSE.txt",
|
20
21
|
"README.md"
|
21
22
|
]
|
@@ -25,18 +26,25 @@ Gem::Specification.new do |s|
|
|
25
26
|
"README.md",
|
26
27
|
"VERSION",
|
27
28
|
"bin/gladiator",
|
28
|
-
"bin/
|
29
|
+
"bin/gladiator-setup",
|
30
|
+
"bin/glimmer-cs-gladiator",
|
29
31
|
"glimmer-cs-gladiator.gemspec",
|
30
32
|
"images/glimmer-cs-gladiator-logo.png",
|
31
33
|
"lib/glimmer-cs-gladiator.rb",
|
34
|
+
"lib/glimmer-cs-gladiator/launch.rb",
|
32
35
|
"lib/models/glimmer/gladiator/command.rb",
|
33
36
|
"lib/models/glimmer/gladiator/dir.rb",
|
34
37
|
"lib/models/glimmer/gladiator/file.rb",
|
35
38
|
"lib/views/glimmer/gladiator.rb",
|
39
|
+
"lib/views/glimmer/gladiator/file_explorer_tree.rb",
|
40
|
+
"lib/views/glimmer/gladiator/file_lookup_list.rb",
|
41
|
+
"lib/views/glimmer/gladiator/gladiator_menu_bar.rb",
|
42
|
+
"lib/views/glimmer/gladiator/progress_shell.rb",
|
36
43
|
"lib/views/glimmer/gladiator/text_editor.rb"
|
37
44
|
]
|
38
45
|
s.homepage = "http://github.com/AndyObtiva/glimmer-cs-gladiator".freeze
|
39
46
|
s.licenses = ["MIT".freeze]
|
47
|
+
s.post_install_message = "\nTo make the gladiator command available system-wide (especially with RVM), make sure you run this command with jruby in path: gladiator-setup\n\n".freeze
|
40
48
|
s.rubygems_version = "3.0.6".freeze
|
41
49
|
s.summary = "Gladiator (Glimmer Editor) - Glimmer Custom Shell - Text Editor Built in Ruby".freeze
|
42
50
|
|
@@ -44,26 +52,29 @@ Gem::Specification.new do |s|
|
|
44
52
|
s.specification_version = 4
|
45
53
|
|
46
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
-
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.
|
55
|
+
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
48
56
|
s.add_runtime_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
49
57
|
s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
50
58
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
51
59
|
s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
60
|
+
s.add_development_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
52
61
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
53
62
|
else
|
54
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.
|
63
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
55
64
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
56
65
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
57
66
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
58
67
|
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
68
|
+
s.add_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
59
69
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
60
70
|
end
|
61
71
|
else
|
62
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.
|
72
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
63
73
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
64
74
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
65
75
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
66
76
|
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
77
|
+
s.add_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
67
78
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
68
79
|
end
|
69
80
|
end
|