visualize_ruby 0.11.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -1
- data/README.md +12 -13
- data/docs/asset-manifest.json +6 -0
- data/docs/index.html +1 -0
- data/docs/manifest.json +15 -0
- data/docs/service-worker.js +1 -0
- data/docs/static/css/main.8d2a69c3.css +2 -0
- data/docs/static/css/main.8d2a69c3.css.map +1 -0
- data/docs/static/js/main.fcab249e.js +2 -0
- data/docs/static/js/main.fcab249e.js.map +1 -0
- data/lib/visualize_ruby.rb +2 -0
- data/lib/visualize_ruby/builder.rb +37 -19
- data/lib/visualize_ruby/edge.rb +7 -3
- data/lib/visualize_ruby/execution_tracer.rb +14 -33
- data/lib/visualize_ruby/graphviz.rb +23 -16
- data/lib/visualize_ruby/highlight_tracer.rb +89 -24
- data/lib/visualize_ruby/input_coercer.rb +61 -0
- data/lib/visualize_ruby/namable.rb +37 -0
- data/lib/visualize_ruby/node.rb +5 -4
- data/lib/visualize_ruby/parser.rb +1 -0
- data/lib/visualize_ruby/parser/begin.rb +1 -1
- data/lib/visualize_ruby/parser/block.rb +1 -10
- data/lib/visualize_ruby/parser/case.rb +13 -8
- data/lib/visualize_ruby/parser/conditions.rb +5 -6
- data/lib/visualize_ruby/parser/return.rb +12 -0
- data/lib/visualize_ruby/runner.rb +78 -16
- data/lib/visualize_ruby/touchable.rb +13 -6
- data/lib/visualize_ruby/version.rb +1 -1
- data/logo.jpg +0 -0
- data/visualize_ruby.gemspec +4 -3
- metadata +33 -14
- data/CODE_OF_CONDUCT.md +0 -74
@@ -1,20 +1,27 @@
|
|
1
1
|
module VisualizeRuby
|
2
2
|
module Touchable
|
3
3
|
def post_initialize(**args)
|
4
|
+
self.class.add_names(:touched_display, :step_display)
|
5
|
+
@steps = []
|
4
6
|
@touched = 0
|
5
7
|
super if defined? super
|
6
8
|
end
|
7
9
|
|
8
|
-
def touch(color)
|
10
|
+
def touch(color, step: nil)
|
11
|
+
@steps << step
|
9
12
|
options.merge!(color: color)
|
10
13
|
@touched += 1
|
11
14
|
end
|
12
15
|
|
13
|
-
def
|
14
|
-
|
15
|
-
@
|
16
|
-
|
17
|
-
|
16
|
+
def touched_display
|
17
|
+
unless [0, 1].include?(@touched)
|
18
|
+
"(called: #{@touched})"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def step_display
|
23
|
+
unless @steps.empty?
|
24
|
+
"step: #{@steps.join(", ")}"
|
18
25
|
end
|
19
26
|
end
|
20
27
|
|
data/logo.jpg
ADDED
Binary file
|
data/visualize_ruby.gemspec
CHANGED
@@ -20,13 +20,14 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.required_ruby_version = ">= 2.
|
23
|
+
spec.required_ruby_version = ">= 2.3"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.16"
|
26
26
|
spec.add_development_dependency "rake", "~> 12.3", ">= 12.3.1"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.7"
|
28
|
+
spec.add_development_dependency "activesupport", "~> 5.2"
|
28
29
|
|
29
30
|
spec.add_runtime_dependency "graphviz", "~> 1.0"
|
30
|
-
spec.add_runtime_dependency "dissociated_introspection", "~> 0.
|
31
|
-
spec.add_runtime_dependency "parser", "
|
31
|
+
spec.add_runtime_dependency "dissociated_introspection", "~> 0.12.0"
|
32
|
+
spec.add_runtime_dependency "parser", ">= 2.3"
|
32
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visualize_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.7'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: activesupport
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '5.2'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '5.2'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: graphviz
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,34 +92,28 @@ dependencies:
|
|
78
92
|
requirements:
|
79
93
|
- - "~>"
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
95
|
+
version: 0.12.0
|
82
96
|
type: :runtime
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
100
|
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0.
|
102
|
+
version: 0.12.0
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: parser
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
92
106
|
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '2.1'
|
96
107
|
- - ">="
|
97
108
|
- !ruby/object:Gem::Version
|
98
|
-
version: 2.
|
109
|
+
version: '2.3'
|
99
110
|
type: :runtime
|
100
111
|
prerelease: false
|
101
112
|
version_requirements: !ruby/object:Gem::Requirement
|
102
113
|
requirements:
|
103
|
-
- - "~>"
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '2.1'
|
106
114
|
- - ">="
|
107
115
|
- !ruby/object:Gem::Version
|
108
|
-
version: 2.
|
116
|
+
version: '2.3'
|
109
117
|
description: Turn Ruby code into flow charts
|
110
118
|
email:
|
111
119
|
- dustin@zeisler.net
|
@@ -118,13 +126,20 @@ files:
|
|
118
126
|
- ".rspec"
|
119
127
|
- ".travis.yml"
|
120
128
|
- CHANGELOG.md
|
121
|
-
- CODE_OF_CONDUCT.md
|
122
129
|
- Gemfile
|
123
130
|
- LICENSE.txt
|
124
131
|
- README.md
|
125
132
|
- Rakefile
|
126
133
|
- bin/console
|
127
134
|
- bin/setup
|
135
|
+
- docs/asset-manifest.json
|
136
|
+
- docs/index.html
|
137
|
+
- docs/manifest.json
|
138
|
+
- docs/service-worker.js
|
139
|
+
- docs/static/css/main.8d2a69c3.css
|
140
|
+
- docs/static/css/main.8d2a69c3.css.map
|
141
|
+
- docs/static/js/main.fcab249e.js
|
142
|
+
- docs/static/js/main.fcab249e.js.map
|
128
143
|
- exe/visualize_ruby
|
129
144
|
- lib/visualize_ruby.rb
|
130
145
|
- lib/visualize_ruby/ast_helper.rb
|
@@ -134,6 +149,8 @@ files:
|
|
134
149
|
- lib/visualize_ruby/graph.rb
|
135
150
|
- lib/visualize_ruby/graphviz.rb
|
136
151
|
- lib/visualize_ruby/highlight_tracer.rb
|
152
|
+
- lib/visualize_ruby/input_coercer.rb
|
153
|
+
- lib/visualize_ruby/namable.rb
|
137
154
|
- lib/visualize_ruby/node.rb
|
138
155
|
- lib/visualize_ruby/optionalable.rb
|
139
156
|
- lib/visualize_ruby/parser.rb
|
@@ -146,6 +163,7 @@ files:
|
|
146
163
|
- lib/visualize_ruby/parser/false.rb
|
147
164
|
- lib/visualize_ruby/parser/if.rb
|
148
165
|
- lib/visualize_ruby/parser/or.rb
|
166
|
+
- lib/visualize_ruby/parser/return.rb
|
149
167
|
- lib/visualize_ruby/parser/send.rb
|
150
168
|
- lib/visualize_ruby/parser/str.rb
|
151
169
|
- lib/visualize_ruby/parser/true.rb
|
@@ -153,6 +171,7 @@ files:
|
|
153
171
|
- lib/visualize_ruby/runner.rb
|
154
172
|
- lib/visualize_ruby/touchable.rb
|
155
173
|
- lib/visualize_ruby/version.rb
|
174
|
+
- logo.jpg
|
156
175
|
- visualize_ruby.gemspec
|
157
176
|
homepage: https://github.com/zeisler/visualize_ruby
|
158
177
|
licenses:
|
@@ -166,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
185
|
requirements:
|
167
186
|
- - ">="
|
168
187
|
- !ruby/object:Gem::Version
|
169
|
-
version: '2.
|
188
|
+
version: '2.3'
|
170
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
190
|
requirements:
|
172
191
|
- - ">="
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at TODO: Write your email address. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|