rubrowser 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/readme.md ADDED
@@ -0,0 +1,29 @@
1
+ # Rubrowser
2
+
3
+ a visualizer for ruby code (rails or otherwise), it analyze your code and extract the modules definitions and used classes/modules and render all these information as a directed force graph using D3.
4
+
5
+ this project is so small that the visualization looks like so
6
+
7
+ ![rubrowser visualization](http://i.imgur.com/EqyxF8F.png)
8
+
9
+
10
+ ## Usage
11
+
12
+ for now you can clone it, get inside the directory and
13
+
14
+ ```
15
+ bundle install
16
+ ruby rubrowser.rb /path/of/project/or/file
17
+ ```
18
+
19
+ it'll analyze the project and open port 9000, so you can access the graph from `localhost:9000`
20
+
21
+ ## Tests?
22
+
23
+ what test? :D
24
+
25
+ ## Why?
26
+
27
+ Because i didn't find a good visualization tool to make me understand ruby projects when I join a new one.
28
+
29
+ it's great when you want to get into an open source project and visualize the structure to know where to work and the relations between modules/classes.
data/views/index.haml ADDED
@@ -0,0 +1,12 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
5
+ %title Rubrowser
6
+ %link{ rel: "stylesheet", media: "all", href: "/css/application.css"}
7
+ %script{:src => "/javascript/d3.js", :type => "text/javascript"}
8
+ %script{:src => "/javascript/jquery.js", :type => "text/javascript"}
9
+ %script{:src => "/javascript/application.js", :type => "text/javascript"}
10
+ %body
11
+ .dependency_graph
12
+ %svg{ data: { constants: constants.to_json, occurences: occurences.to_json } }
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubrowser
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Emad Elsaid
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sinatra
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.4.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.4.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: parser
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.3'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.3.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.3'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.3.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: parallel
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.9'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.9.0
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.9'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.9.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: haml
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '4.0'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 4.0.0
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 4.0.0
93
+ description: a ruby code dependency graph interactive visualizer
94
+ email:
95
+ - blazeeboy@gmail.com
96
+ executables:
97
+ - rubrowser
98
+ extensions: []
99
+ extra_rdoc_files: []
100
+ files:
101
+ - ".gitignore"
102
+ - Gemfile
103
+ - Gemfile.lock
104
+ - bin/rubrowser
105
+ - lib/d3.rb
106
+ - lib/data.rb
107
+ - lib/parser/directory.rb
108
+ - lib/parser/factory.rb
109
+ - lib/parser/file.rb
110
+ - lib/rubrowser.rb
111
+ - lib/server.rb
112
+ - lib/tree.rb
113
+ - public/css/application.css
114
+ - public/javascript/application.js
115
+ - public/javascript/d3.js
116
+ - public/javascript/jquery.js
117
+ - readme.md
118
+ - views/index.haml
119
+ homepage: https://github.com/blazeeboy/rubrowser
120
+ licenses:
121
+ - MIT
122
+ metadata: {}
123
+ post_install_message:
124
+ rdoc_options: []
125
+ require_paths:
126
+ - "../lib"
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ requirements: []
138
+ rubyforge_project:
139
+ rubygems_version: 2.6.3
140
+ signing_key:
141
+ specification_version: 4
142
+ summary: a ruby code dependency graph interactive visualizer
143
+ test_files: []
144
+ has_rdoc: