vls 0.3.4 → 0.3.5
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/README.md +20 -13
- data/bin/vls +4 -5
- data/lib/vls/monkey_patch.rb +5 -0
- data/lib/vls/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17db29744dbbccea1c7827ffdb8ae7949c7e9995
|
4
|
+
data.tar.gz: a958d743642683678a760339c8c8240721ae5e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b9b80c584773aa52d4dac99761c254f66a66bed1b5516922d9f1cabf7d4d7bb3d7e1a2154d1bf7f09a7fe6d299c2133dccd6003196293b5eae6a96d8a846228
|
7
|
+
data.tar.gz: 02f4781c24339dd1323489353d383be4b2f81ebd7a5ec868c90660bd8dae843e4328c2d9f4959fecb43bdb505558487ffaca2d42bcc6b98a68295a26ec6e084c
|
data/README.md
CHANGED
@@ -65,23 +65,31 @@ accessed with:
|
|
65
65
|
module_version_list = VersionLS.vls
|
66
66
|
```
|
67
67
|
This returns an array of entries, sorted by module name, consisting of an
|
68
|
-
array with the module and a string with its version.
|
68
|
+
array with the module and a string with its version. Also, the Object class
|
69
|
+
is monkey patched with the vls method that outputs the information to the
|
70
|
+
console.
|
69
71
|
|
70
|
-
|
72
|
+
```ruby
|
73
|
+
vls
|
74
|
+
```
|
75
|
+
|
76
|
+
Note that these methods do not accept a list of modules to be required. It
|
71
77
|
is assumed that when embedded within an application, the needed facilities
|
72
|
-
would have already been loaded.
|
78
|
+
would have already been loaded. In addition, the vls listing to the console
|
79
|
+
has no header information. If this is desired, the application should do a
|
80
|
+
puts of the appropriate descriptive text.
|
73
81
|
|
74
82
|
## The Rails Console
|
75
83
|
|
76
|
-
If the vls gem has been added to a rails project
|
77
|
-
easily accessed via the rails console:
|
84
|
+
If the vls gem has been added to a rails project (in its Gemfile), its
|
85
|
+
functionality is also easily accessed via the rails console:
|
78
86
|
|
79
87
|
$ rails console
|
80
88
|
|
81
89
|
followed by
|
82
90
|
|
83
91
|
```ruby
|
84
|
-
|
92
|
+
vls
|
85
93
|
```
|
86
94
|
|
87
95
|
will create a formatted listing of the modules with version info of the module
|
@@ -89,7 +97,7 @@ load out of the web site. For example:
|
|
89
97
|
|
90
98
|
$ rails console
|
91
99
|
Loading development environment (Rails 4.2.6)
|
92
|
-
irb(main):001:0>
|
100
|
+
irb(main):001:0> vls
|
93
101
|
ActionDispatch::Journey::Router, 2.0.0
|
94
102
|
ActionMailer, 4.2.6
|
95
103
|
ActionPack, 4.2.6
|
@@ -162,13 +170,12 @@ load out of the web site. For example:
|
|
162
170
|
|
163
171
|
## Usage in Rails Views
|
164
172
|
|
165
|
-
It is also possible to incorporate vls data into a view using the vls
|
166
|
-
in a controller and passing the resultant array of data to a view for
|
173
|
+
It is also possible to incorporate vls data into a view using the VersionLS.vls
|
174
|
+
method in a controller and passing the resultant array of data to a view for
|
167
175
|
rendering in a web page. This may be useful for a diagnostic or informational
|
168
|
-
page in
|
169
|
-
|
170
|
-
|
171
|
-
readers are advised to consult Ruby on Rails tutorials for more information.
|
176
|
+
page in a web site. However, a detailed examination of this task is beyond the
|
177
|
+
scope of this document and readers are advised to consult Ruby on Rails
|
178
|
+
tutorials for more information.
|
172
179
|
|
173
180
|
## Contributing
|
174
181
|
|
data/bin/vls
CHANGED
@@ -4,16 +4,13 @@
|
|
4
4
|
require_relative '../lib/vls'
|
5
5
|
|
6
6
|
def vls_show_header
|
7
|
-
|
8
|
-
puts
|
7
|
+
print "vls (VersionLS): #{VersionLS::VERSION}\n\n"
|
9
8
|
end
|
10
9
|
|
11
10
|
def vls_show_help
|
12
11
|
vls_show_header
|
13
12
|
puts VersionLS::DESCRIPTION
|
14
|
-
puts
|
15
|
-
puts "Usage template:"
|
16
|
-
puts "$ vls <options> <names>"
|
13
|
+
puts "\nUsage: $ vls <options> <names>"
|
17
14
|
puts "\n<options>"
|
18
15
|
puts " --help, -h, -? = Display this text and exit."
|
19
16
|
puts " --raw, -r = Display results with no header text."
|
@@ -25,6 +22,7 @@ end
|
|
25
22
|
|
26
23
|
load_list, no_header = [], false
|
27
24
|
|
25
|
+
#Process the script argument list.
|
28
26
|
ARGV.each do |arg|
|
29
27
|
case arg
|
30
28
|
when "--help", "-h", "-?"
|
@@ -40,6 +38,7 @@ vls_show_help if load_list.empty?
|
|
40
38
|
vls_show_header unless no_header
|
41
39
|
errors_found = false
|
42
40
|
|
41
|
+
#Require the specified gems and ruby files.
|
43
42
|
load_list.each do |pkg|
|
44
43
|
begin
|
45
44
|
if pkg.downcase.end_with?('.rb')
|
data/lib/vls/monkey_patch.rb
CHANGED
data/lib/vls/version.rb
CHANGED
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.5
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|