glimmer-cs-gladiator 0.8.2 → 0.8.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 +7 -0
- data/LICENSE.txt +20 -20
- data/README.md +21 -8
- data/VERSION +1 -1
- data/bin/gladiator +34 -34
- data/bin/gladiator-setup +80 -80
- data/bin/glimmer-cs-gladiator +22 -22
- data/glimmer-cs-gladiator.gemspec +4 -5
- data/images/glimmer-cs-gladiator-logo.png +0 -0
- data/lib/glimmer-cs-gladiator.rb +30 -30
- data/lib/glimmer-cs-gladiator/launch.rb +6 -6
- data/lib/models/glimmer/gladiator/dir.rb +3 -2
- data/lib/models/glimmer/gladiator/file.rb +14 -3
- data/lib/views/glimmer/gladiator.rb +5 -3
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +244 -244
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +64 -64
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +3 -3
- data/lib/views/glimmer/gladiator/text_editor.rb +2 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b50517d61cc617ff8301fd56053e04c385e75591a9d4adc7ddf02b9ca6bfb785
|
4
|
+
data.tar.gz: deac989a0cd8086b8c6b3be605606ff96fda4d6ad9a8c8d7fcb4cee6afcde1b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79bd7f9c58f721c17168d51b13a58f2f7ac6817110c76e14170cdebae3c22d4adf2b30763ce2cbb04c220300934c30b3dfc8c2e9533520689444c94c537c3e54
|
7
|
+
data.tar.gz: b04a9bd90fe07bd5c64e947089a017b51925707805d6127866cc10cd789c6ac76f4f40f37669033c8deaf375d98072fbb92e419c37429bcdb368e634ce1e2aa5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.8.3
|
4
|
+
|
5
|
+
- Switch Scratchpad evaling to loading a temporary local file under `project_dir/.gladiator-scratchpad` for a more realistic Ruby running experience
|
6
|
+
- Fix issue with detecting current gladiator window when handling keyboard shortcuts
|
7
|
+
- Fix issue with Scratchpad opening twice when called twice instead of reusing the existing Scratchpad
|
8
|
+
- Fix issue with closed tabs not closing their file streams/watchers, including the Scratchpad temporary file
|
9
|
+
|
3
10
|
## 0.8.2
|
4
11
|
|
5
12
|
- Add a right click menu on text editor area with undo redo | cut, copy, paste, delete | select all
|
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,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.8.
|
1
|
+
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.8.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
|
|
@@ -52,9 +52,9 @@ Gladiator currently supports the following text editing features (including keyb
|
|
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
57
|
- Quit Project (CMD+ALT+Q)
|
57
|
-
- New Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
|
58
58
|
- View Menu
|
59
59
|
- Split Pane
|
60
60
|
- Orientation change to Horizontal/Vertical (CMD+SHIFT+O)
|
@@ -106,7 +106,7 @@ Gladiator currently supports the following text editing features (including keyb
|
|
106
106
|
## Platforms
|
107
107
|
|
108
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
|
109
|
+
- Windows: Gladiator works OK on Windows, but has a few annoying issues.
|
110
110
|
- Linux: Gladiator works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
111
111
|
|
112
112
|
## Pre-requisites
|
@@ -117,9 +117,9 @@ 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.8.3 Mac DMG Installer](https://www.dropbox.com/s/suqvzceqj1fxj8o/Gladiator-0.8.3.dmg?dl=1)
|
121
121
|
|
122
|
-
[Download Gladiator Windows MSI Installer](https://www.dropbox.com/s/
|
122
|
+
[Download Gladiator 0.8.3 Windows MSI Installer](https://www.dropbox.com/s/7kcrf7r5p6vxfm7/Gladiator-0.8.3.msi?dl=1)
|
123
123
|
|
124
124
|
The packaged version starts with a dialog asking you what project to open. Gladiator does not fully show up until you have selected a project directory.
|
125
125
|
|
@@ -127,7 +127,7 @@ Otherwise, if you prefer a command line version, then follow the Setup Instructi
|
|
127
127
|
|
128
128
|
## Setup Instructions
|
129
129
|
|
130
|
-
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).
|
130
|
+
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/).
|
131
131
|
|
132
132
|
Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
133
133
|
|
@@ -192,7 +192,7 @@ To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application,
|
|
192
192
|
following to the application's `Gemfile`:
|
193
193
|
|
194
194
|
```
|
195
|
-
gem 'glimmer-cs-gladiator', '>= 0.8.
|
195
|
+
gem 'glimmer-cs-gladiator', '>= 0.8.3'
|
196
196
|
```
|
197
197
|
|
198
198
|
Run:
|
@@ -225,7 +225,9 @@ It currently remembers:
|
|
225
225
|
- Window size and position
|
226
226
|
- Ignore Paths under `Glimmer::Gladiator::Dir::IGNORE_PATHS` (default: `['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist']`)
|
227
227
|
|
228
|
-
##
|
228
|
+
## Gotchas
|
229
|
+
|
230
|
+
### Signaling Error
|
229
231
|
|
230
232
|
Gladiator repetitively displays a signaling error that is harmless in practice:
|
231
233
|
```
|
@@ -234,6 +236,17 @@ The signal INT is in use by the JVM and will not work correctly on this platform
|
|
234
236
|
The signal TERM is in use by the JVM and will not work correctly on this platform
|
235
237
|
```
|
236
238
|
|
239
|
+
### App Is Not Responding
|
240
|
+
|
241
|
+
If you run the `gladiator` command from the root directory or some parent directory to many projects, it assumes that is
|
242
|
+
the project directory and attempt to pre-load all files, taking a very long time and not responding for quite a while.
|
243
|
+
|
244
|
+
To avoid this problem, always make sure you are running the `gladiator` command from a single project's directory.
|
245
|
+
|
246
|
+
Also, if you encounter this issue with projects that contain a lot of extra files that you do not need to edit, you
|
247
|
+
could later open the generate `.gladiator` file at the root of the project directory and add unnecessary subdirectories
|
248
|
+
to the `ignore_paths` array.
|
249
|
+
|
237
250
|
## TODO
|
238
251
|
|
239
252
|
[TODO.md](TODO.md)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.3
|
data/bin/gladiator
CHANGED
@@ -1,34 +1,34 @@
|
|
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
|
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
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 (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
|
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'
|
@@ -1,22 +1,21 @@
|
|
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.8.
|
5
|
+
# stub: glimmer-cs-gladiator 0.8.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-cs-gladiator".freeze
|
9
|
-
s.version = "0.8.
|
9
|
+
s.version = "0.8.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 = "2021-
|
14
|
+
s.date = "2021-03-04"
|
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
17
|
s.executables = ["glimmer-cs-gladiator".freeze, "gladiator".freeze, "gladiator-setup".freeze]
|
18
18
|
s.extra_rdoc_files = [
|
19
|
-
"CHANGELOG.md",
|
20
19
|
"LICENSE.txt",
|
21
20
|
"README.md"
|
22
21
|
]
|