vls 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -22
- data/bin/vls +1 -1
- data/lib/vls.rb +48 -8
- data/lib/vls/version.rb +1 -1
- data/rakefile.rb +1 -1
- data/reek.txt +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56829e5ca3f1738854377aa261fa31007f842727
|
4
|
+
data.tar.gz: 7a1deb11651e1af6796f395415e3a12f1eb7ea67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e99b53ea8c68227b63d95d13ac0033fd0550a23c021db21ae3e45bfad9ea220727726ffba23e84d283ab49eeb0b26065e24d9d2dc7a81f306e2be1a2dc24f61
|
7
|
+
data.tar.gz: 4fe67b80c4143e4446b03d0075cd364d3a2fe5140cc6db5fb4c350d8d3086328efec570508d9636bf40751aa4a56beaace39099ee6789c685df4b8ae06b07f0e
|
data/README.md
CHANGED
@@ -33,30 +33,31 @@ is:
|
|
33
33
|
where names is a list of gems and/or files to be required before the
|
34
34
|
module/classes are displayed with their VERSION information. For example:
|
35
35
|
|
36
|
-
|
37
|
-
vls (VersionLS): 0.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
$ vls rails
|
37
|
+
vls (VersionLS): 0.3.0
|
38
|
+
|
39
|
+
ActionPack, 4.2.6
|
40
|
+
ActiveSupport, 4.2.6
|
41
|
+
ActiveSupport::Logger, 1.2.7
|
42
|
+
Gem, 2.2.2
|
43
|
+
I18n, 0.7.0
|
44
|
+
JSON, 1.8.3
|
45
|
+
Logger, 1.2.7
|
46
|
+
OpenSSL, 1.1.0
|
47
|
+
Psych, 2.0.5
|
48
|
+
Rack, [1, 3]
|
49
|
+
Rails, 4.2.6
|
50
|
+
ThreadSafe, 0.3.5
|
51
|
+
|
52
|
+
In order to use relative paths instead of the gem search path, the .rb extension
|
53
|
+
needs to be specified on the target file.
|
54
|
+
|
55
|
+
$ vls ruby_sscanf.rb
|
56
|
+
vls (VersionLS): 0.3.0
|
57
|
+
|
45
58
|
FormatEngine, 0.7.2
|
46
|
-
FullClone, 0.0.5
|
47
59
|
Gem, 2.2.2
|
48
|
-
|
49
|
-
Integer, 0.0.5
|
50
|
-
MiniReadline, 0.4.8
|
51
|
-
NilClass, 0.0.5
|
52
|
-
Numeric, 0.0.5
|
53
|
-
Rational, 0.0.5
|
54
|
-
Regexp, 0.0.5
|
55
|
-
RubySscanf, 0.2.1
|
56
|
-
SafeClone, 0.0.3
|
57
|
-
Symbol, 0.0.5
|
58
|
-
TrueClass, 0.0.5
|
59
|
-
XfOOrth, 0.6.1
|
60
|
+
RubySscanf, 0.2.3
|
60
61
|
|
61
62
|
The vls utility is also available for use within an application. It may be
|
62
63
|
accessed with:
|
data/bin/vls
CHANGED
data/lib/vls.rb
CHANGED
@@ -2,26 +2,66 @@
|
|
2
2
|
|
3
3
|
require_relative "vls/version"
|
4
4
|
|
5
|
-
|
5
|
+
#An addition to the Object class for vls support.
|
6
|
+
class Object
|
7
|
+
#Get the vls version string from this module.
|
8
|
+
def to_vls_version_string
|
9
|
+
"version #{self.class} ???"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
#An addition to the String class for vls support.
|
14
|
+
class String
|
15
|
+
#Get this string as a vls version string.
|
16
|
+
def to_vls_version_string
|
17
|
+
self
|
18
|
+
end
|
19
|
+
end
|
6
20
|
|
21
|
+
#An addition to the Module class for vls support.
|
22
|
+
class Module
|
23
|
+
#Get the vls version string from this module.
|
24
|
+
def to_vls_version_string
|
25
|
+
self::STRING
|
26
|
+
rescue
|
27
|
+
"version module ???"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
#An addition to the Array class for vls support.
|
32
|
+
class Array
|
33
|
+
#Get the vls version string from this array.
|
34
|
+
def to_vls_version_string
|
35
|
+
self.join('.')
|
36
|
+
rescue
|
37
|
+
"version array ???"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# The Version LiSt utility module.
|
42
|
+
module VersionLS
|
7
43
|
#Execute the core of the vls command and return an array of
|
8
44
|
#[module, version] arrays.
|
9
45
|
def self.vls
|
10
46
|
modules.map do |mod|
|
11
|
-
|
12
|
-
|
47
|
+
begin
|
48
|
+
version = mod::VERSION
|
49
|
+
rescue
|
50
|
+
version = 'version ???'
|
51
|
+
end
|
13
52
|
|
14
|
-
[mod, version]
|
53
|
+
[mod, version.to_vls_version_string]
|
15
54
|
end
|
16
55
|
end
|
17
56
|
|
18
57
|
#Get a list of modules that have VERSION info.
|
19
58
|
def self.modules
|
20
|
-
mods = ObjectSpace.each_object(Module).select do
|
21
|
-
|
22
|
-
end.sort
|
59
|
+
mods = ObjectSpace.each_object(Module).select do |mod|
|
60
|
+
mod.const_defined?("VERSION")
|
61
|
+
end.sort do
|
62
|
+
|first, second| first.name <=> second.name
|
63
|
+
end
|
23
64
|
|
24
65
|
mods - [VersionLS]
|
25
66
|
end
|
26
|
-
|
27
67
|
end
|
data/lib/vls/version.rb
CHANGED
data/rakefile.rb
CHANGED
data/reek.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0 total warnings
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/vls.rb
|
55
55
|
- lib/vls/version.rb
|
56
56
|
- rakefile.rb
|
57
|
+
- reek.txt
|
57
58
|
- vls.gemspec
|
58
59
|
homepage: http://teuthida-technologies.com/
|
59
60
|
licenses:
|