rubrowser 2.1.0 → 2.2.0
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 +5 -5
- data/Gemfile.lock +1 -1
- data/bin/rubrowser +7 -2
- data/lib/rubrowser/renderer.rb +7 -2
- data/lib/rubrowser/version.rb +1 -1
- data/readme.md +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 6b289faa595ba604fd4a512f0b92ed805b514499
|
|
4
|
+
data.tar.gz: c98570f4f2365a8d670967941f4e5638789211bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b49456ac5b7772bfd815658587e740422f02e10193bece15133984d374e65a58f95a5edfc16a1a8154601f056c2c75fb4f2976ebc3617cd46cfa334a727d28f4
|
|
7
|
+
data.tar.gz: a1804ef9b1bf354a290159f8d99332baac4723e4eff65af626dd69d7e1e2c67c3907db6bfcd0c8603eeef9f28333ca6d779bbccdc775ab1d197fc8b911dcc9af
|
data/Gemfile.lock
CHANGED
data/bin/rubrowser
CHANGED
|
@@ -6,12 +6,17 @@ require 'rubrowser'
|
|
|
6
6
|
require 'rubrowser/renderer'
|
|
7
7
|
|
|
8
8
|
options = {
|
|
9
|
-
toolbox: true
|
|
9
|
+
toolbox: true,
|
|
10
|
+
output: STDOUT
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
OptionParser.new do |opts|
|
|
13
14
|
opts.banner = "Usage: #{__FILE__} [options] [file] ..."
|
|
14
15
|
|
|
16
|
+
opts.on('-oFILE', '--output=FILE', 'output file page, if not specified output will be written to stdout') do |output|
|
|
17
|
+
options[:output] = output
|
|
18
|
+
end
|
|
19
|
+
|
|
15
20
|
opts.on('-T', '--no-toolbox', 'Don\'t display toolbox on the page') do
|
|
16
21
|
options[:toolbox] = false
|
|
17
22
|
end
|
|
@@ -29,4 +34,4 @@ end.parse!
|
|
|
29
34
|
|
|
30
35
|
options[:files] = ARGV.empty? ? ['.'] : ARGV
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
Rubrowser::Renderer.call(options)
|
data/lib/rubrowser/renderer.rb
CHANGED
|
@@ -12,20 +12,25 @@ module Rubrowser
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def call
|
|
15
|
-
erb
|
|
15
|
+
output.write(erb(:index))
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
private
|
|
19
19
|
|
|
20
20
|
include ERB::Util
|
|
21
21
|
|
|
22
|
-
attr_reader :files
|
|
22
|
+
attr_reader :files, :output
|
|
23
23
|
|
|
24
24
|
def initialize(options)
|
|
25
|
+
@output = output_file(options[:output])
|
|
25
26
|
@files = options[:files]
|
|
26
27
|
@toolbox = options[:toolbox]
|
|
27
28
|
end
|
|
28
29
|
|
|
30
|
+
def output_file(path)
|
|
31
|
+
path.is_a?(String) ? File.open(path, 'w') : path
|
|
32
|
+
end
|
|
33
|
+
|
|
29
34
|
def toolbox?
|
|
30
35
|
@toolbox
|
|
31
36
|
end
|
data/lib/rubrowser/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -52,6 +52,7 @@ gem install rubrowser
|
|
|
52
52
|
|
|
53
53
|
```
|
|
54
54
|
Usage: rubrowser [options] [file] ...
|
|
55
|
+
-o, --output=FILE output file page, if not specified output will be written to stdout
|
|
55
56
|
-T, --no-toolbox Don't display toolbox on the page
|
|
56
57
|
-v, --version Print Rubrowser version
|
|
57
58
|
-h, --help Prints this help
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubrowser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emad Elsaid
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01
|
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: parser
|
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
159
|
version: '0'
|
|
160
160
|
requirements: []
|
|
161
161
|
rubyforge_project:
|
|
162
|
-
rubygems_version: 2.
|
|
162
|
+
rubygems_version: 2.6.10
|
|
163
163
|
signing_key:
|
|
164
164
|
specification_version: 4
|
|
165
165
|
summary: A ruby interactive dependency graph visualizer
|