rvm-tui 0.0.2 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb887902a94db7f5b472c4a2344c4d619dfbfa820a27e64c43e54ac1d22876a8
4
- data.tar.gz: b6d25cc471a84289c45684b35387933c200cb33ad45e2e614a0f321ebd59e07e
3
+ metadata.gz: bcc765b935c104ba6422b3187fb68faaa06f295bd3c8986524b15a63b2ed29aa
4
+ data.tar.gz: c1a7f8ad62d2292e37b47f26c2aa33c7d8950f39393db61841ecdfca6d6cea34
5
5
  SHA512:
6
- metadata.gz: 528ea9fa16c7dc9eedf1988cae2c2caaf9b3a83ee93f981d630aa24f4b277a276e922a94ea8b57e8ca284239c03b116471db794f2d6f89987f69fd3f47bfd500
7
- data.tar.gz: df555dd0a0c2c12c6e4697d2709db78326d29d271170eb1bcb0612a0c8c1f12a8e59f88cce455356c0b818207d6fd9c46ec81001752733dceaad75dcaf83125e
6
+ metadata.gz: 3c51e7f811cc54688244df6a0c7e4e0d78d083e529be5188479c3a4cc4b972f22fdf4a12205d326b153fa4198b8e30fc4bd4992d4b3fb401827cdf39916446a5
7
+ data.tar.gz: e2c75a87536e76210a9a8e7675a7a8360ab185b1616ba9d470f1303dcbe19e398fddff618623b1cd12fd772b661dabb16e4049be70882ac5a1af3048342be45d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.6
4
+
5
+ - Fix missing `;` before `then` in rvm-tui-setup
6
+
7
+ ## 0.0.5
8
+
9
+ - Support Zsh (Z Shell)
10
+ - Add alises rvmui, rvmtui, and rvm-ui
11
+ - Fix error: "bad option -a"
12
+
13
+ ## 0.0.4
14
+
15
+ - Fixed an issue when running without RVM default ruby setup
16
+
17
+ ## 0.0.3
18
+
19
+ - Corrected declaration of license as Apache-2.0
20
+
3
21
  ## 0.0.2
4
22
 
5
23
  - Safe abort support (use CTRL+C without seeing error messages)
data/LICENSE.txt CHANGED
@@ -1,13 +1,202 @@
1
- Copyright (c) 2020 Andy Maleh
2
1
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
6
5
 
7
- http://www.apache.org/licenses/LICENSE-2.0
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README.md CHANGED
@@ -9,27 +9,33 @@
9
9
  - Prevent odd bugs that happen when sharing gems with other projects due to making changes in them
10
10
  - Simplify gem-related troubleshooting without a domino effect on other projects
11
11
 
12
- Given how practical and often-used [RVM](https://rvm.io) is, I am providing a text-based user interface for it.
12
+ Given how practical and often-used [RVM](https://rvm.io) is, I am providing a text-based user interface for it that facilitates these tasks:
13
+ - Testing the same project with multiple Rubies (e.g. ensuring it runs on both Ruby and JRuby)
14
+ - Testing the same project with different gem version combinations in different gemsets (e.g. checking if it works with both facets 3 + dependencies and facets 2 + dependencies)
13
15
 
14
16
  ![RVM TUI DEMO](rvm-tui-demo.gif)
15
17
 
18
+ Other TUI gems you may be interested in:
19
+ - [rake-tui](https://github.com/AndyObtiva/rake-tui)
20
+
16
21
  ## Pre-requisites
17
22
 
18
23
  - [RVM](https://rvm.io)
19
- - Any version of Ruby installed via [RVM](https://rvm.io)
24
+ - Any version of [Ruby](https://www.ruby-lang.org/en/) installed via [RVM](https://rvm.io) (preferably [MRI Ruby](https://www.ruby-lang.org/en/) for a fast startup time)
25
+ - [Bash](https://www.gnu.org/software/bash/) or [Zsh](http://zsh.sourceforge.net/) (Z Shell) (including Sed)
20
26
 
21
27
  ## Setup Instructions
22
28
 
23
- The gem can be installed unto any [Ruby](https://rvm.io/rubies/installing)/[Gemset](https://rvm.io/gemsets/basics) in [RVM](https://rvm.io) and it will be used from there everywhere.
29
+ The gem can be installed unto any [Ruby](https://rvm.io/rubies/installing)/[Gemset](https://rvm.io/gemsets/basics) in [RVM](https://rvm.io) and it will be used from there everywhere.
24
30
 
25
- Since it is independent of any particular [Ruby](https://www.ruby-lang.org/en/) project, it is recommended you install unto the default [gemset](https://rvm.io/gemsets/basics).
31
+ Since it is independent of any particular [Ruby](https://www.ruby-lang.org/en/) project, it is recommended you install unto the default [gemset](https://rvm.io/gemsets/basics) (or optionally into its own gemset if you prefer). Global gemset wouldn't be enough to share it since it does not cross Rubies yet is limited to a specific Ruby version.
26
32
 
27
33
  Afterwards, run the `rvm-tui-setup` command from the same [RVM](https://rvm.io) [Ruby](https://rvm.io/rubies/installing)/[Gemset](https://rvm.io/gemsets/basics) you installed the gem at to setup the `rvm-tui` function source in `~/.bash_profile` or `~/.bashrc` (whichever is available)
28
34
 
29
- These are the commands you need to run:
35
+ These are the commands you need to run in order to select a Ruby and gemset, install gem, and finally setup gem commands globablly in the shell environment:
30
36
 
31
37
  ```
32
- rvm use @default
38
+ rvm use @default # or a different ruby version/gemset like `rvm use ruby-2.7.2@rvm-tui --create`
33
39
  gem install rvm-tui
34
40
  rvm-tui-setup
35
41
  ```
@@ -39,9 +45,18 @@ rvm-tui-setup
39
45
  Simply run this command:
40
46
 
41
47
  ```
48
+ rvmui
49
+ ```
50
+
51
+ Or one of the aliases:
52
+
53
+ ```
54
+ rvmtui
55
+ rvm-ui
42
56
  rvm-tui
43
57
  ```
44
58
 
59
+
45
60
  ## Contributing to rvm-tui
46
61
 
47
62
  - Make sure you have [RVM](https://rvm.io) installed
@@ -69,6 +84,18 @@ rvm-tui
69
84
 
70
85
  ## License
71
86
 
72
- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
87
+ [Apache License, Version 2.0](LICENSE.txt)
88
+
89
+ Copyright (c) 2020-2022 Andy Maleh
90
+
91
+ Licensed under the Apache License, Version 2.0 (the "License");
92
+ you may not use this file except in compliance with the License.
93
+ You may obtain a copy of the License at
94
+
95
+ http://www.apache.org/licenses/LICENSE-2.0
73
96
 
74
- Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
97
+ Unless required by applicable law or agreed to in writing, software
98
+ distributed under the License is distributed on an "AS IS" BASIS,
99
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100
+ See the License for the specific language governing permissions and
101
+ limitations under the License.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.6
data/bin/rvm-tui-setup CHANGED
@@ -1,5 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # Copyright (c) 2020-2022 Andy Maleh
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
3
17
  version = File.read(File.expand_path('../../VERSION', __FILE__))
4
18
  puts "== rvm-tui-setup version #{version.strip} =="
5
19
 
@@ -23,16 +37,21 @@ rvm_tui_script = <<~SHELL_SCRIPT
23
37
  printf "ERROR: An RVM installation was not found.\\n"
24
38
  fi
25
39
 
26
- IFS='@'
27
- read -a rvm_current <<< "$(rvm current)"
28
- current_ruby="${rvm_current[0]}"
29
- current_gemset="${rvm_current[1]}"
40
+ current_rvm="$(rvm current)"
41
+ current_ruby="$(echo $current_rvm | sed -E 's/@.*$//')"
42
+ current_gemset="default"
43
+ if [[ $current_rvm == *"@"* ]] ; then
44
+ current_gemset="$(echo $current_rvm | sed -E 's/^[^@]+@//')"
45
+ fi
30
46
  #{command} $current_ruby $current_gemset
31
- if [ -f "$HOME/.rvm_command" ]; then
47
+ if [ -f "$HOME/.rvm_command" ] ; then
32
48
  source $HOME/.rvm_command
33
49
  rm $HOME/.rvm_command
34
- fi
50
+ fi
35
51
  }
52
+ alias rvm-ui=rvm-tui
53
+ alias rvmtui=rvm-tui
54
+ alias rvmui=rvm-tui
36
55
  SHELL_SCRIPT
37
56
 
38
57
  require 'fileutils'
@@ -41,20 +60,33 @@ FileUtils.mkdir_p("#{home_dir}/bin")
41
60
  rvm_tui_script_file = "#{home_dir}/.rvm_tui_source"
42
61
  rvm_tui_script_file_bash = "$HOME/.rvm_tui_source"
43
62
  File.write(rvm_tui_script_file, rvm_tui_script)
44
- bash_profile_file_name = '.bash_profile'
45
- bash_profile_file = "#{home_dir}/#{bash_profile_file_name}"
46
- if !File.exist?(bash_profile_file)
47
- bash_profile_file_name = '.bashrc'
48
- bash_profile_file = "#{home_dir}/#{bash_profile_file_name}"
49
- end
50
- FileUtils.touch(bash_profile_file)
51
- bash_profile = File.read(bash_profile_file)
52
- rvm_tui_source_statement = "source \"#{rvm_tui_script_file_bash}\""
53
- unless bash_profile.split("\n").detect {|line| line.include?(rvm_tui_source_statement) }
54
- File.write(bash_profile_file, "#{bash_profile}\n#{rvm_tui_source_statement}")
63
+
64
+ [
65
+ ['.bash_profile', '.bashrc'],
66
+ ['.zprofile', '.zshrc']
67
+ ].each do |profile_and_fallback|
68
+ shell_profile_file_name = profile_and_fallback.first
69
+ shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
70
+ shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
71
+ FileUtils.touch(shell_profile_file)
72
+ bash_profile = File.read(shell_profile_file)
73
+ rvm_tui_source_statement = "source \"#{rvm_tui_script_file_bash}\""
74
+ unless bash_profile.split("\n").detect {|line| line.include?(rvm_tui_source_statement) }
75
+ File.write(shell_profile_file, "#{bash_profile}\n#{rvm_tui_source_statement}")
76
+ end
77
+ puts "~/#{shell_profile_file_name} has been modified to source the `rvm-tui` function from ~/.rvm_tui_source"
55
78
  end
79
+
56
80
  puts <<~OUTPUT
57
- ~/#{bash_profile_file_name} has been modified to source the `rvm-tui` function from ~/.rvm_tui_source
58
- To use `rvm-tui`, make sure to first run:
59
- source ~/.rvm_tui_source
81
+
82
+ Before using `rvm-tui`, start a new shell session (open a new terminal tab) or run:
83
+
84
+ source ~/.rvm_tui_source
85
+
86
+ Afterwards, you may run `rvm-tui` via one of these commands (aliases):
87
+
88
+ rvm-tui
89
+ rvm-ui
90
+ rvmtui
91
+ rvmui
60
92
  OUTPUT
data/lib/rvm-tui.rb CHANGED
@@ -1,3 +1,17 @@
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  $LOAD_PATH.unshift(File.expand_path('..', __FILE__))
2
16
 
3
17
  puts "== rvm-tui version #{File.read(File.expand_path('../../VERSION', __FILE__)).strip} =="
@@ -6,7 +20,7 @@ require 'tty-prompt'
6
20
 
7
21
  CURRENT_RVM_RUBY = ARGV[0]
8
22
  CURRENT_RVM_GEMSET = ARGV[1] || 'default'
9
- current_rvm = CURRENT_RVM_RUBY
23
+ current_rvm = CURRENT_RVM_RUBY.to_s
10
24
  current_rvm += "@#{CURRENT_RVM_GEMSET}" unless CURRENT_RVM_GEMSET.nil?
11
25
  CURRENT_RVM = current_rvm
12
26
  puts "Current: #{CURRENT_RVM}"
@@ -21,7 +35,7 @@ RVM_COMMAND_PREFIX = <<~SHELL_SCRIPT
21
35
  source "/usr/local/rvm/scripts/rvm"
22
36
  else
23
37
  printf "ERROR: An RVM installation was not found.\\n"
24
- fi
38
+ fi
25
39
  rvm use #{CURRENT_RVM_RUBY}@#{CURRENT_RVM_GEMSET}
26
40
  SHELL_SCRIPT
27
41
 
@@ -30,12 +44,12 @@ def rvm_command(command)
30
44
  end
31
45
 
32
46
  begin
33
- prompt = TTY::Prompt.new
47
+ prompt = TTY::Prompt.new
34
48
  rvm_list_lines = rvm_command('rvm list').split("\n")
35
49
  rvm_list_lines.shift if rvm_list_lines.first.start_with?('Using ')
36
50
  rubies = rvm_list_lines[0...-4] # TODO print excluded lines as an appendix
37
51
  rubies_help = rvm_list_lines[-4..-1].join("\n") + "\n"
38
- ruby = prompt.select("Choose a Ruby: ", rubies, cycle: true, per_page: 40, filter: true, help: "\n#{rubies_help}", show_help: :always)
52
+ ruby = prompt.select("Choose Ruby: ", rubies, cycle: true, per_page: 40, filter: true, help: "\n#{rubies_help}", show_help: :always)
39
53
 
40
54
  ruby = ruby.split.detect {|text| text.include?('ruby')}
41
55
  rvm_gemset_list = nil
@@ -48,7 +62,7 @@ begin
48
62
  rvm_gemset_list_lines.shift if rvm_gemset_list_lines.first.start_with?('Using ')
49
63
  gemsets = rvm_gemset_list_lines[2..-1]
50
64
  gemsets_help = rvm_gemset_list_lines[0..1].join("\n") + "\n"
51
- gemset = prompt.select("Choose a Gemset: ", gemsets, cycle: true, per_page: 40, filter: true, help: gemsets_help, show_help: :always)
65
+ gemset = prompt.select("Choose Gemset: ", gemsets, cycle: true, per_page: 40, filter: true, help: gemsets_help, show_help: :always)
52
66
 
53
67
  gemset = gemset.sub('=>', '').sub('(default)', 'default').strip
54
68
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm-tui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - andy_maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-05 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-prompt
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.23.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '0'
29
+ version: 0.23.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rspec
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +114,20 @@ dependencies:
108
114
  - - ">="
109
115
  - !ruby/object:Gem::Version
110
116
  version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: rake-tui
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
111
131
  description: Ruby enVironment Manager - Text-based User Interface
112
132
  email: andy.am@gmail.com
113
133
  executables:
@@ -126,9 +146,12 @@ files:
126
146
  - lib/rvm-tui.rb
127
147
  homepage: http://github.com/AndyObtiva/rvm-tui
128
148
  licenses:
129
- - MIT
149
+ - Apache-2.0
130
150
  metadata: {}
131
- post_install_message:
151
+ post_install_message: |2+
152
+
153
+ To finish setting up the rvm-tui Ruby gem in your shell environment, run: rvm-tui-setup
154
+
132
155
  rdoc_options: []
133
156
  require_paths:
134
157
  - lib
@@ -148,3 +171,4 @@ signing_key:
148
171
  specification_version: 4
149
172
  summary: Ruby enVironment Manager - Text-based User Interface
150
173
  test_files: []
174
+ ...