glimmer-cs-gladiator 0.8.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 +10 -0
- data/LICENSE.txt +20 -20
- data/README.md +9 -7
- 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 +8 -7
- data/lib/glimmer-cs-gladiator.rb +30 -30
- data/lib/glimmer-cs-gladiator/launch.rb +6 -6
- data/lib/models/glimmer/gladiator/command.rb +112 -112
- data/lib/models/glimmer/gladiator/file.rb +662 -662
- data/lib/views/glimmer/gladiator.rb +93 -72
- 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 +2 -2
- data/lib/views/glimmer/gladiator/progress_shell.rb +31 -31
- data/lib/views/glimmer/gladiator/text_editor.rb +11 -10
- metadata +5 -4
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,15 @@
|
|
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
|
+
|
3
13
|
## 0.8.0
|
4
14
|
|
5
15
|
- Upgrade to glimmer-dsl-swt v4.18.3.5
|
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.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,11 +9,11 @@ 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
|
12
|
+
You may now [download](#download) a packaged version of Gladiator.
|
13
13
|
|
14
14
|
## Features
|
15
15
|
|
16
|
-
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)
|
17
17
|
|
18
18
|
![Gladiator Demo](images/glimmer-gladiator.gif)
|
19
19
|
|
@@ -102,12 +102,11 @@ Gladiator currently supports the following text editing features (including keyb
|
|
102
102
|
- SQL
|
103
103
|
- Shell (Bash / Zsh)
|
104
104
|
- Vue
|
105
|
-
- Plain Text
|
106
105
|
|
107
106
|
## Platforms
|
108
107
|
|
109
108
|
- Mac: Gladiator works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
110
|
-
- Windows: Gladiator works
|
109
|
+
- Windows: Gladiator works fine on Windows, but has a few minor issues.
|
111
110
|
- Linux: Gladiator works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
112
111
|
|
113
112
|
## Pre-requisites
|
@@ -118,7 +117,9 @@ Gladiator currently supports the following text editing features (including keyb
|
|
118
117
|
|
119
118
|
## Download
|
120
119
|
|
121
|
-
|
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)
|
122
123
|
|
123
124
|
Otherwise, if you prefer a command line version, then follow the Setup Instructions below.
|
124
125
|
|
@@ -194,7 +195,7 @@ To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application,
|
|
194
195
|
following to the application's `Gemfile`:
|
195
196
|
|
196
197
|
```
|
197
|
-
gem 'glimmer-cs-gladiator', '>= 0.8.
|
198
|
+
gem 'glimmer-cs-gladiator', '>= 0.8.1'
|
198
199
|
```
|
199
200
|
|
200
201
|
Run:
|
@@ -253,6 +254,7 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
|
|
253
254
|
- Commit and push until you are happy with your contribution.
|
254
255
|
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
255
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)
|
256
258
|
|
257
259
|
## Copyright
|
258
260
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
data/bin/gladiator
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
#!/usr/bin/env
|
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,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.8.
|
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.8.
|
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-02-
|
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
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
|
]
|
@@ -51,7 +52,7 @@ Gem::Specification.new do |s|
|
|
51
52
|
s.specification_version = 4
|
52
53
|
|
53
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
|
-
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.3
|
55
|
+
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
55
56
|
s.add_runtime_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
56
57
|
s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
57
58
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
@@ -59,7 +60,7 @@ Gem::Specification.new do |s|
|
|
59
60
|
s.add_development_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
60
61
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
61
62
|
else
|
62
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.3
|
63
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
63
64
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
64
65
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
65
66
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
@@ -68,7 +69,7 @@ Gem::Specification.new do |s|
|
|
68
69
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
69
70
|
end
|
70
71
|
else
|
71
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.3
|
72
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.18.4.3", "< 5.0.0.0"])
|
72
73
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
73
74
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
74
75
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|