roundabout 0.3.0 → 0.3.1
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 +21 -4
- data/Rakefile +2 -0
- data/app/views/roundabout/roundabout/index.html.erb +2 -2
- data/app/views/roundabout/roundabout/readme.html.erb +5 -7
- data/lib/roundabout/railtie.rb +1 -1
- data/lib/roundabout/version.rb +1 -1
- data/roundabout.gemspec +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 249ffe90db2c2528be00eb101f9cbd2e6ad0c7aee644012803ad07e8e59f1fbb
|
4
|
+
data.tar.gz: '086de0a788a44ced7df2c16dada4a2383ba1d3224f7ff15e661f978d16f774c0'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea46b96460cb9fda7b3d73db145c8b3e119da9be25254b09281db05930c950af74318783b66831d87af42ca011f4abd0661567c15d8d4819f2e574feb08031c5
|
7
|
+
data.tar.gz: e1e8bb5988d615eee7d2682a094dbca8d8f48958d4f1a82ca07ed7ffafe9b03f3c974569062a0a304b1c8766a29162ebd8d53ef1b6672d5e2ea02c77d393284a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Roundabout
|
2
2
|
|
3
|
-
A Rails Engine that generates
|
3
|
+
A Rails Engine that generates a page transition diagram for your Rails app from the system tests and shows it on the browser.
|
4
4
|
|
5
5
|

|
6
6
|
|
@@ -21,7 +21,7 @@ A Rails Engine that generates and shows a page transition diagram for your Rails
|
|
21
21
|
Bundle this gem to your Rails app's development and test env:
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
gem 'roundabout', group :development, :test
|
24
|
+
gem 'roundabout', group: [:development, :test]
|
25
25
|
```
|
26
26
|
|
27
27
|
|
@@ -35,13 +35,19 @@ Run the whole tests with `ROUNDABOUT` envvar (I suppose parallel spec is not sup
|
|
35
35
|
|
36
36
|
All page transitions via capybara will be recorded, then woven into a diagram.
|
37
37
|
|
38
|
-
To see the generated diagram, just browse at
|
38
|
+
To see the generated diagram, just browse at `http://localhost:3000/roundabout`.
|
39
39
|
You can also download a png image version and a PDF version from that page.
|
40
40
|
|
41
41
|
|
42
42
|
## Example
|
43
43
|
|
44
|
-
The image shown at the very top of this
|
44
|
+
The image shown at the very top of this document was generated from [Redmine](https://github.com/redmine/redmine) project's codebase.
|
45
|
+
|
46
|
+
Each box shows Rails controller/action name, and the arrows between them means as follows:
|
47
|
+
|
48
|
+
Dark: Redirect
|
49
|
+
Red: Form
|
50
|
+
Yellow: Link
|
45
51
|
|
46
52
|
|
47
53
|
## Contributing
|
@@ -49,6 +55,17 @@ The image shown at the very top of this documentation was generated from [Redmin
|
|
49
55
|
Send me a PR with a patch.
|
50
56
|
|
51
57
|
|
58
|
+
## TODO
|
59
|
+
|
60
|
+
- More tests (with multiple kinds of testing frameworks, capybara drivers, Rails versions, etc.)
|
61
|
+
|
62
|
+
- Configure CI
|
63
|
+
|
64
|
+
- Parallel tests support
|
65
|
+
|
66
|
+
- etcetcetc.
|
67
|
+
|
68
|
+
|
52
69
|
## Team
|
53
70
|
|
54
71
|
* [Akira Matsuda](https://github.com/amatsuda)
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="roundabout-container" style="width: <%= @graph_width %>px; height: <%= @graph_height %>px;">
|
2
2
|
<div id="roundabout">
|
3
3
|
<% @nodes.each.with_index(1) do |node, i| %>
|
4
|
-
<% width, height = BigDecimal
|
4
|
+
<% width, height = BigDecimal(node[:width].source) * 72, BigDecimal(node[:height].source) * 72 %>
|
5
5
|
<div id="roundabout-node-<%= i %>" class="node" style="top: <%= node[:pos].point[1] - height / 2 %>px; left: <%= node[:pos].point[0] - width / 2 %>px; width: <%= width %>px; height: <%= height %>px;">
|
6
6
|
<%- node_controller_name, node_action_name = node.id.split("\n") %>
|
7
7
|
<div class="node-name"><span class="controller_name"><%= node_controller_name %></span><span class="controller_name"><%= node_action_name %></span></div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<span>.pdf</span>
|
24
24
|
<% end %>
|
25
25
|
</li>
|
26
|
-
</ul>
|
26
|
+
</ul>
|
27
27
|
</div>
|
28
28
|
<script>
|
29
29
|
(function () {
|
@@ -1,15 +1,13 @@
|
|
1
1
|
<p>You need to generate the page transition data first.</p>
|
2
2
|
|
3
|
-
|
3
|
+
Please run the system tests with envvar <strong>ROUNDABOUT</strong>.
|
4
4
|
|
5
5
|
<pre>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
And run the specs.
|
6
|
+
test-unit / minitest:
|
7
|
+
% ROUNDABOUT=1 rails test:system
|
10
8
|
|
11
|
-
|
12
|
-
%
|
9
|
+
RSpec
|
10
|
+
% ROUNDABOUT=1 rails test:system
|
13
11
|
</pre>
|
14
12
|
|
15
13
|
Then reload this page.
|
data/lib/roundabout/railtie.rb
CHANGED
@@ -21,7 +21,7 @@ module Roundabout
|
|
21
21
|
require 'roundabout/monkey/action_controller'
|
22
22
|
end
|
23
23
|
|
24
|
-
config.after_initialize do
|
24
|
+
config.after_initialize do
|
25
25
|
require 'roundabout/monkey/capybara'
|
26
26
|
require 'roundabout/rspec' if defined? RSpec
|
27
27
|
require 'roundabout/test-unit' if defined? TestUnitRails
|
data/lib/roundabout/version.rb
CHANGED
data/roundabout.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
|
23
23
|
gem.add_development_dependency 'rails'
|
24
24
|
gem.add_development_dependency 'minitest'
|
25
|
-
gem.add_development_dependency 'sqlite3'
|
25
|
+
gem.add_development_dependency 'sqlite3', '< 1.4'
|
26
26
|
gem.add_development_dependency 'selenium-webdriver'
|
27
27
|
gem.add_development_dependency 'chromedriver-helper'
|
28
28
|
gem.add_development_dependency 'puma'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roundabout
|
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
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: sqlite3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "<"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '1.4'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '1.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: selenium-webdriver
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,8 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
|
249
|
-
rubygems_version: 2.7.6
|
248
|
+
rubygems_version: 3.0.3
|
250
249
|
signing_key:
|
251
250
|
specification_version: 4
|
252
251
|
summary: A Rails Engine that generates a page transition diagram for your Rails app
|