glimmer-cs-gladiator 0.6.3 → 0.7.3
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 +48 -0
- data/LICENSE.txt +1 -1
- data/README.md +40 -14
- data/VERSION +1 -1
- data/bin/gladiator +22 -1
- data/bin/gladiator-setup +80 -0
- data/bin/glimmer-cs-gladiator +22 -0
- data/glimmer-cs-gladiator.gemspec +19 -9
- data/lib/glimmer-cs-gladiator.rb +1 -0
- data/lib/glimmer-cs-gladiator/launch.rb +6 -0
- data/lib/models/glimmer/gladiator/dir.rb +2 -2
- data/lib/models/glimmer/gladiator/file.rb +5 -10
- data/lib/views/glimmer/gladiator.rb +536 -733
- 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 +181 -0
- data/lib/views/glimmer/gladiator/progress_shell.rb +31 -0
- data/lib/views/glimmer/gladiator/text_editor.rb +27 -4
- metadata +33 -7
- 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: 4027589accf83fa2244350dc416c3ab56bf28c9f65cbf3288d96c0b5f13c27aa
|
|
4
|
+
data.tar.gz: 11e18e7f18605188cd151e4e8307b10dc808b9059a7f275d3a37c1a1ba3cc65a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c774eaa5fb91c4a5ceb08aa98715ab32bddcea61c4793b3d0dfd74119142c2245c7574835dda59d698239b8be3448d1d7fc76fe801643b53d4aa236b3a6bd54e
|
|
7
|
+
data.tar.gz: cab4d312f803a8e93fb5d7954ffd7319092ae4a1c9d827dca95b5670c22ef484475c34989b109b91f922f126a73eea94d7c73b56d53fa6781075011419b8d1fb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.7.3
|
|
4
|
+
|
|
5
|
+
- Add gladiator-setup to make gladiator executable available everywhere
|
|
6
|
+
- Package Gladiator as Mac DMG file
|
|
7
|
+
- Shrink minimum height for editor area (too large for putting side by side with another window)
|
|
8
|
+
- Change initial default size of Gladiator window to the entire screen size
|
|
9
|
+
- Made layout more resilient to shrinkage so that the Navigation area widgets don't get jumbled up
|
|
10
|
+
- Show open project dialog when run as Gladiator app (e.g. Mac app) instead of opening the local directory of the app
|
|
11
|
+
- Extract gladiator_menu_bar custom widget and reuse in open_project shell (to use in app version)
|
|
12
|
+
- Extract progress_shell custom shell
|
|
13
|
+
- Fix issue with disposed? error in save_config
|
|
14
|
+
- Fix issue with first open of a file with an empty brand new gladiator session not showing file content until resizing
|
|
15
|
+
|
|
16
|
+
## 0.7.2
|
|
17
|
+
|
|
18
|
+
- Fallback font ("Courier") for text editor when "Consolas" is not available
|
|
19
|
+
- Refactor Gladiator Custom Shell to extract more Glimmer Custom Widgets from it like FileLookupList and FileExplorerTree
|
|
20
|
+
- Upgrade to glimmer-dsl-swt v4.18.0.2
|
|
21
|
+
|
|
22
|
+
## 0.7.1
|
|
23
|
+
|
|
24
|
+
- Update View -> Reset All to also reset the File Lookup/File Explorer Sash Width and the Navigation Bar (expanding it)
|
|
25
|
+
- Fix issue with split, reset split, unsplit, and then split again forgetting the reset for the sash width
|
|
26
|
+
- Ensure closing a single tab moves user back to the previous tab
|
|
27
|
+
- Add pkg to ignore paths
|
|
28
|
+
- Update Reset All menu item to reset splits too
|
|
29
|
+
|
|
30
|
+
## 0.7.0
|
|
31
|
+
|
|
32
|
+
- Upgrade to glimmer-dsl-swt v4.18.0.0
|
|
33
|
+
- Implement sash form for separator between file area and editing area to make resizable
|
|
34
|
+
- Change shortcut for open project from CMD+SHIFT+P to CMD+O
|
|
35
|
+
- Unsplit pane Menu Item / Keyboard Shortcut (CMD+SHIFT+U)
|
|
36
|
+
- Maximize Split Pane Size Menu Item / Keyboard Shortcut (CMD+SHIFT+M)
|
|
37
|
+
- Reset Split Pane Menu Item / Keyboard Shortcut (CMD+SHIFT+M again while maximized or CMD+SHIFT+P to reset split widths)
|
|
38
|
+
- Maximize Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M)
|
|
39
|
+
- Reset Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M again while maximized or CMD+CTRL+R to reset all sizes)
|
|
40
|
+
- Make CMD R and CMD T shortcuts show the file lookup/file explorer if collapsed (just like CMD + F shows navigation area)
|
|
41
|
+
- Display Accelerators (keyboard shortcuts) on Mac Menu Items
|
|
42
|
+
- Show exception dialog on error when invoking Run -> Ruby
|
|
43
|
+
- Fix issue with creating a new directory in a different project from the main one open
|
|
44
|
+
- Fix issue with quitting gladiator when multiple projects are open requiring multiple presses of CMD+Q
|
|
45
|
+
|
|
46
|
+
## 0.6.4
|
|
47
|
+
|
|
48
|
+
- Ensured Gladiator logo in the about menu has a white background
|
|
49
|
+
- Fixed issue on failing to configure Mac Quit menu item on Windows (restricted code to Mac only)
|
|
50
|
+
|
|
3
51
|
## 0.6.3
|
|
4
52
|
|
|
5
53
|
- Display Gladiator version in window title
|
data/LICENSE.txt
CHANGED
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.7.3 - [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
|
|
|
@@ -13,6 +13,8 @@ I leave building truly professional text editors to software tooling experts who
|
|
|
13
13
|
|
|
14
14
|
Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL on Windows/Linux)
|
|
15
15
|
|
|
16
|
+

|
|
17
|
+
|
|
16
18
|
### Text Editor
|
|
17
19
|
|
|
18
20
|
- Text Editor with Colored Ruby Syntax Highlighting
|
|
@@ -47,8 +49,18 @@ Gladiator currently supports the following text editing features (including keyb
|
|
|
47
49
|
|
|
48
50
|
### Menus
|
|
49
51
|
|
|
50
|
-
- File Menu
|
|
51
|
-
-
|
|
52
|
+
- File Menu:
|
|
53
|
+
- Open Project (CMD+O)
|
|
54
|
+
- Quit Project (CMD+ALT+Q)
|
|
55
|
+
- New Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
|
|
56
|
+
- View Menu
|
|
57
|
+
- Split Pane
|
|
58
|
+
- Orientation change to Horizontal/Vertical (CMD+SHIFT+O)
|
|
59
|
+
- Maximize Pane: maximizes current pane in split pane to take entire area (CMD+SHIFT+M)
|
|
60
|
+
- Reset Panes: resets pane sizes if split width/height was adjusted (CMD+SHIFT+P)
|
|
61
|
+
- Unsplit: closes the second pane (CMD+SHIFT+U)
|
|
62
|
+
- Maximize Editor: maximizes editor area to hide file lookup list and file explorer tree (CMD+CTRL+M)
|
|
63
|
+
- Reset All: resizes sizes of all areas in the editor (CMD+CTRL+R)
|
|
52
64
|
- Run Menu to run Ruby code (CMD+SHIFT+R)
|
|
53
65
|
|
|
54
66
|
### Watch External Changes
|
|
@@ -70,13 +82,19 @@ Gladiator currently supports the following text editing features (including keyb
|
|
|
70
82
|
|
|
71
83
|
## Pre-requisites
|
|
72
84
|
|
|
73
|
-
- [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework): '>= 4.17.2.0', '< 5.0.0.0' (dependency included in Ruby gem).
|
|
74
|
-
- [JRuby](https://www.jruby.org/download): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
|
75
85
|
- [JDK](https://www.oracle.com/java/technologies/javase-downloads.html): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
|
86
|
+
- [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): '>= 4.17.2.0', '< 5.0.0.0' (dependency included in Ruby gem).
|
|
88
|
+
|
|
89
|
+
## Download
|
|
90
|
+
|
|
91
|
+
You may download a [packaged version of the Gladiator app](https://www.dropbox.com/s/kcr20unx7obs6z2/Gladiator-0.7.3.dmg?dl=1) on the Mac.
|
|
92
|
+
|
|
93
|
+
Otherwise, if you prefer a command line version, then follow the Setup Instructions below.
|
|
76
94
|
|
|
77
95
|
## Setup Instructions
|
|
78
96
|
|
|
79
|
-
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).
|
|
97
|
+
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).
|
|
80
98
|
|
|
81
99
|
Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
|
82
100
|
|
|
@@ -98,6 +116,20 @@ Run (`jruby -S bundle` or `bundle` directly if you have [RVM](https://rvm.io/)):
|
|
|
98
116
|
jruby -S bundle
|
|
99
117
|
```
|
|
100
118
|
|
|
119
|
+
Afterwards, to ensure system wide availablility of the `gladiator` command, run this command in an environment that has JRuby:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
gladiator-setup
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Finally, start a new terminal session or source .gladiator_source:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
source ~/.gladiator_source
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
You should be able to run `gladiator` from anywhere now, even cross-rubies in [RVM](https://rvm.io).
|
|
132
|
+
|
|
101
133
|
## Usage
|
|
102
134
|
|
|
103
135
|
You may run the `gladiator` command to bring up the text editor in the project directory you would like to edit:
|
|
@@ -126,19 +158,13 @@ gladiator relative-or-absolute-path/to/project
|
|
|
126
158
|
|
|
127
159
|
Note: If you cloned this project and bundle installed, you may invoke via `bin/gladiator` instead.
|
|
128
160
|
|
|
129
|
-
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):
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
bin/gladiator relative-or-absolute-path/to/project
|
|
133
|
-
```
|
|
134
|
-
|
|
135
161
|
### Glimmer Custom Shell Reuse
|
|
136
162
|
|
|
137
163
|
To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application, add the
|
|
138
164
|
following to the application's `Gemfile`:
|
|
139
165
|
|
|
140
166
|
```
|
|
141
|
-
gem 'glimmer-cs-gladiator', '>= 0.
|
|
167
|
+
gem 'glimmer-cs-gladiator', '>= 0.7.3'
|
|
142
168
|
```
|
|
143
169
|
|
|
144
170
|
Run:
|
|
@@ -202,7 +228,7 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
|
|
|
202
228
|
|
|
203
229
|
[MIT](https://opensource.org/licenses/MIT)
|
|
204
230
|
|
|
205
|
-
Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
|
231
|
+
Copyright (c) 2020-2021 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
|
206
232
|
|
|
207
233
|
--
|
|
208
234
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.7.3
|
data/bin/gladiator
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
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
|
+
|
|
3
24
|
require 'glimmer/launcher'
|
|
4
25
|
|
|
5
|
-
gladiator_runner = File.expand_path('../
|
|
26
|
+
gladiator_runner = File.expand_path('../glimmer-cs-gladiator', __FILE__)
|
|
6
27
|
launcher = Glimmer::Launcher.new([gladiator_runner, '-J-Xrs'] + ARGV)
|
|
7
28
|
launcher.application_paths.to_a.each do |file|
|
|
8
29
|
if file != gladiator_runner
|
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'
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
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.7.3 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.7.3"
|
|
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 = "
|
|
14
|
+
s.date = "2021-01-20"
|
|
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
19
|
"LICENSE.txt",
|
|
20
20
|
"README.md"
|
|
@@ -25,45 +25,55 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
"README.md",
|
|
26
26
|
"VERSION",
|
|
27
27
|
"bin/gladiator",
|
|
28
|
-
"bin/
|
|
28
|
+
"bin/gladiator-setup",
|
|
29
|
+
"bin/glimmer-cs-gladiator",
|
|
29
30
|
"glimmer-cs-gladiator.gemspec",
|
|
30
31
|
"images/glimmer-cs-gladiator-logo.png",
|
|
31
32
|
"lib/glimmer-cs-gladiator.rb",
|
|
33
|
+
"lib/glimmer-cs-gladiator/launch.rb",
|
|
32
34
|
"lib/models/glimmer/gladiator/command.rb",
|
|
33
35
|
"lib/models/glimmer/gladiator/dir.rb",
|
|
34
36
|
"lib/models/glimmer/gladiator/file.rb",
|
|
35
37
|
"lib/views/glimmer/gladiator.rb",
|
|
38
|
+
"lib/views/glimmer/gladiator/file_explorer_tree.rb",
|
|
39
|
+
"lib/views/glimmer/gladiator/file_lookup_list.rb",
|
|
40
|
+
"lib/views/glimmer/gladiator/gladiator_menu_bar.rb",
|
|
41
|
+
"lib/views/glimmer/gladiator/progress_shell.rb",
|
|
36
42
|
"lib/views/glimmer/gladiator/text_editor.rb"
|
|
37
43
|
]
|
|
38
44
|
s.homepage = "http://github.com/AndyObtiva/glimmer-cs-gladiator".freeze
|
|
39
45
|
s.licenses = ["MIT".freeze]
|
|
46
|
+
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
47
|
s.rubygems_version = "3.0.6".freeze
|
|
41
|
-
s.summary = "Gladiator (Glimmer Editor) - Glimmer Custom Shell".freeze
|
|
48
|
+
s.summary = "Gladiator (Glimmer Editor) - Glimmer Custom Shell - Text Editor Built in Ruby".freeze
|
|
42
49
|
|
|
43
50
|
if s.respond_to? :specification_version then
|
|
44
51
|
s.specification_version = 4
|
|
45
52
|
|
|
46
53
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
47
|
-
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.
|
|
54
|
+
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.0.2", "< 5.0.0.0"])
|
|
48
55
|
s.add_runtime_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
|
49
56
|
s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
|
50
57
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
|
51
58
|
s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
|
59
|
+
s.add_development_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
|
52
60
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
|
53
61
|
else
|
|
54
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.
|
|
62
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.0.2", "< 5.0.0.0"])
|
|
55
63
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
|
56
64
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
|
57
65
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
|
58
66
|
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
|
67
|
+
s.add_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
|
59
68
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
|
60
69
|
end
|
|
61
70
|
else
|
|
62
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.
|
|
71
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.0.2", "< 5.0.0.0"])
|
|
63
72
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
|
64
73
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
|
65
74
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
|
66
75
|
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
|
76
|
+
s.add_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
|
67
77
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
|
68
78
|
end
|
|
69
79
|
end
|
data/lib/glimmer-cs-gladiator.rb
CHANGED
|
@@ -36,7 +36,7 @@ module Glimmer
|
|
|
36
36
|
end
|
|
37
37
|
self.path = ::File.expand_path(path)
|
|
38
38
|
@name = ::File.basename(::File.expand_path(path))
|
|
39
|
-
@ignore_paths = ['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor']
|
|
39
|
+
@ignore_paths = ['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg']
|
|
40
40
|
self.filtered_path_options = []
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -60,7 +60,7 @@ module Glimmer
|
|
|
60
60
|
def name=(the_name)
|
|
61
61
|
self.display_path = display_path.sub(/#{Regexp.escape(@name)}$/, the_name)
|
|
62
62
|
@name = the_name
|
|
63
|
-
new_path = ::File.expand_path(display_path)
|
|
63
|
+
new_path = @project_dir.nil? ? ::File.expand_path(display_path) : ::File.join(project_dir.path, display_path)
|
|
64
64
|
FileUtils.mv(path, new_path)
|
|
65
65
|
self.path = display_path
|
|
66
66
|
end
|
|
@@ -512,16 +512,11 @@ module Glimmer
|
|
|
512
512
|
end
|
|
513
513
|
|
|
514
514
|
def run
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
load path
|
|
521
|
-
end
|
|
522
|
-
rescue LoadError, SyntaxError, StandardError => e
|
|
523
|
-
# TODO consider showing a message dialog or error message console in the future
|
|
524
|
-
puts e.full_message
|
|
515
|
+
if scratchpad?
|
|
516
|
+
eval content
|
|
517
|
+
else
|
|
518
|
+
write_dirty_content
|
|
519
|
+
load path
|
|
525
520
|
end
|
|
526
521
|
end
|
|
527
522
|
|