mysh 0.6.6 → 0.6.7

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
  SHA1:
3
- metadata.gz: 36d1e9cb65e8e404c9e85ab77e29e1201a2df5f6
4
- data.tar.gz: 3e5f058a9f2a8ebbe313fff8983aa328b016652f
3
+ metadata.gz: 8ccc77021991eea710a4f18df07bcbc4299ac54f
4
+ data.tar.gz: b2b8547854f287ce68ae9c3f4040e9a350540a80
5
5
  SHA512:
6
- metadata.gz: 5d9ba17eb0a81ebc7b291767f03f9d56b077b8b82e89593b090fd689eae5acfdce02554b7b8ab0eff9a0359506328bb7a28f49101ac0b9847980d5dec10b075c
7
- data.tar.gz: fbb691b11d8daf992f152412bd4dae5b3ebe958c73abfc1f2c759ba0c757443c8bacf19174914057cb95639dcac5c8a417973ff0e02e5bd87ee2ff495b8e872a
6
+ metadata.gz: 46d4a07ecced86317296a1d1d2b61180eb10c33baec5c45395757f466834d207af16de8f209015321f2713797ed0678ef601cc0117505ccbe4d58e6fd3bfbcb0
7
+ data.tar.gz: 96c351932b68923ee8af8b75834dd8ce958b83c9e2c1c1c210abdbb16db8e720164d74568682291b031bb58915c8d0e33934fb66ff5e74d3df8379c36df531d1
data/README.md CHANGED
@@ -667,6 +667,29 @@ host os | The current operating system.
667
667
  host vendor | The current environment vendor/genre.
668
668
  $: | An easy-to-read, formatted version of $: or the ruby search path.
669
669
 
670
+ ##### Gem (@gem)
671
+
672
+ This command displays useful information about the current rubygems
673
+ gem management system.
674
+
675
+ Topic | Description
676
+ --------------|----------------------------------------------------
677
+ rubygems vers | The installed version of rubygems.
678
+ latest vers | The latest version of rubygems available.
679
+ marshal vers | The version of the Marshal format for your Ruby.
680
+ host | Get the default RubyGems API host. This is normally https://rubygems.org.
681
+ sources | Returns an Array of sources to fetch remote gems from.
682
+ gem folder | The path where gems are to be installed.
683
+ bin folder | The path where gem executables are to be installed.
684
+ config path | The path to standard location of the user's .gemrc file.
685
+ cert path | The default signing certificate chain path
686
+ key path | The default signing key path
687
+ spec cache | The path to where specs are cached.
688
+ file suffixes | Suffixes for require-able paths.
689
+ gem dep files | The files where dependencies may be specified. Use Gemfile
690
+ gem platforms | Array of platforms this RubyGems supports.
691
+ gem path | The folders searched when looking for a gem locally.
692
+
670
693
 
671
694
  ### Internal Shell Commands:
672
695
 
@@ -0,0 +1,22 @@
1
+ Help: mysh show gem command summary:
2
+
3
+ The show gem (or @gem) command is used to display useful information about
4
+ the current gem system. This includes:
5
+
6
+ rubygems vers - The installed version of rubygems.
7
+ latest vers - The latest version of rubygems available.
8
+ marshal vers - The version of the Marshal format for your Ruby.
9
+ host - Get the default RubyGems API host.
10
+ This is normally https://rubygems.org.
11
+ sources - Returns an Array of sources to fetch remote gems from.
12
+ gem folder - The path where gems are to be installed.
13
+ bin folder - The path where gem executables are to be installed.
14
+ config path - The path to standard location of the user's .gemrc file.
15
+ cert path - The default signing certificate chain path
16
+ key path - The default signing key path
17
+ spec cache - The path to where specs are cached.
18
+ file suffixes - Suffixes for require-able paths.
19
+ gem dep files - The files where dependencies may be specified. Use Gemfile
20
+ gem platforms - Array of platforms this RubyGems supports.
21
+ gem path - The folders searched when looking for a gem locally.
22
+
@@ -28,6 +28,7 @@ module Mysh
28
28
  ['%', 'Help on timed command execution.', 'timed.txt' ],
29
29
  ['env', 'Help on the show env command.', 'env.txt' ],
30
30
  ['ruby', 'Help on the show ruby command.', 'ruby.txt' ],
31
+ ['gem', 'Help on the show gem command.', 'gem.txt' ],
31
32
  ['math', 'Help on math functions.', 'math.txt' ],
32
33
  ['usage', 'Help on mysh usage.', 'usage.txt' ],
33
34
  ['=', 'Help on ruby expressions.', 'expr.txt' ],
@@ -0,0 +1,55 @@
1
+ # coding: utf-8
2
+
3
+ # Get help on the gem environment.
4
+ module Mysh
5
+
6
+ #* mysh/internal/actions/show/env.rb -- Get help on the mysh environment.
7
+ class GemInfoCommand < Action
8
+
9
+ #Execute the ? shell command.
10
+ def process_command(_args)
11
+ print "Working...\r" unless @ran_once
12
+
13
+ puts "Key gem system information.", "",
14
+ info.format_mysh_bullets, "",
15
+ path.format_mysh_bullets, ""
16
+
17
+ @ran_once = true
18
+ end
19
+
20
+ private
21
+
22
+ # Get the info
23
+ #<br>Endemic Code Smells
24
+ #* :reek:UtilityFunction
25
+ def info
26
+ [["rubygems vers", Gem.rubygems_version.to_s],
27
+ ["latest vers", Gem.latest_rubygems_version.to_s],
28
+ ["marshal vers", Gem.marshal_version],
29
+ ["host", Gem.host],
30
+ ["sources", Gem.sources.map(&:to_s)],
31
+ ["gem folder", Gem.dir.to_host_spec],
32
+ ["bin folder", Gem.bindir.to_host_spec],
33
+ ["config path", Gem.config_file.to_host_spec],
34
+ ["cert path", Gem.default_cert_path.to_host_spec],
35
+ ["key path", Gem.default_key_path.to_host_spec],
36
+ ["spec cache", Gem.spec_cache_dir.to_host_spec],
37
+ ["file suffixes", Gem.suffixes.map{|sfx| '"'+sfx+'"'}.join(", ")],
38
+ ["gem dep files", Gem::GEM_DEP_FILES.map{|sfx| '"'+sfx+'"'}.join(", ")],
39
+ ["gem platforms", Gem.platforms.map{|sfx| '"'+sfx.to_s+'"'}.join(", ")]
40
+ ]
41
+ end
42
+
43
+ # Get the Gem path.
44
+ #<br>Endemic Code Smells
45
+ #* :reek:UtilityFunction
46
+ def path
47
+ [["gem path"].concat(Gem.path)]
48
+ end
49
+
50
+ end
51
+
52
+ desc = 'Get information about the current gem support. ' +
53
+ 'See ?gem for more.'
54
+ SHOW.add_action(GemInfoCommand.new('gem', desc))
55
+ end
data/lib/mysh/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mysh
4
4
  #The version string of MY SHell.
5
- VERSION = "0.6.6"
5
+ VERSION = "0.6.7"
6
6
 
7
7
  #A brief summary of this gem.
8
8
  SUMMARY = "mysh -- a Ruby inspired command line shell."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-03 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -184,6 +184,7 @@ files:
184
184
  - lib/mysh/internal/actions/help.rb
185
185
  - lib/mysh/internal/actions/help/env.txt
186
186
  - lib/mysh/internal/actions/help/expr.txt
187
+ - lib/mysh/internal/actions/help/gem.txt
187
188
  - lib/mysh/internal/actions/help/gls.txt
188
189
  - lib/mysh/internal/actions/help/h_o_h.txt
189
190
  - lib/mysh/internal/actions/help/hbar.txt
@@ -208,6 +209,7 @@ files:
208
209
  - lib/mysh/internal/actions/say.rb
209
210
  - lib/mysh/internal/actions/show.rb
210
211
  - lib/mysh/internal/actions/show/env.rb
212
+ - lib/mysh/internal/actions/show/gem.rb
211
213
  - lib/mysh/internal/actions/show/ruby.rb
212
214
  - lib/mysh/internal/actions/type.rb
213
215
  - lib/mysh/internal/actions/vars.rb