roundabout 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e04a70b5737616244de5b9c4fa9d71fb3befb049732f9690dbc0e7b8a41e0b9
4
- data.tar.gz: 79bf12bc73b6aff9a9caad512bb9d7a5a668847a56914cbe40b35da6a5e107ac
3
+ metadata.gz: 249ffe90db2c2528be00eb101f9cbd2e6ad0c7aee644012803ad07e8e59f1fbb
4
+ data.tar.gz: '086de0a788a44ced7df2c16dada4a2383ba1d3224f7ff15e661f978d16f774c0'
5
5
  SHA512:
6
- metadata.gz: a9e1cc7575ed994138a771b4807c95586b7d776026a46acefc91e46550dcbe5f76e111e4fc80967769cb0022bcbdf3c107a7ec6db31aeb949451e45ea2806fb6
7
- data.tar.gz: b2a3f5e70f1081e13c45a53aa9301a92ca15901a7d3fd11682fec3908c62315ab1b93dbf558218ed13a696b34e88d9ca069c3c32e695d05c33b8fdd77f66095a
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 and shows a page transition diagram for your Rails app from system tests.
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
  ![Example](example_diagram.png)
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 your `http://localhost:3000/roundabout`.
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 documentation was generated from [Redmine](https://github.com/redmine/redmine) project's codebase.
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
@@ -4,6 +4,8 @@ require 'rake/testtask'
4
4
  Rake::TestTask.new do |t|
5
5
  t.pattern = 'test/**/*_test.rb'
6
6
  t.libs << 'test'
7
+ t.warning = true
8
+ t.verbose = true
7
9
  end
8
10
 
9
11
  task default: :test
@@ -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.new(node[:width].source) * 72, BigDecimal.new(node[:height].source) * 72 %>
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
- Add this line to your <strong>spec/spec_helper.rb</strong>:
3
+ Please run the system tests with envvar <strong>ROUNDABOUT</strong>.
4
4
 
5
5
  <pre>
6
- require 'roundabout/rspec'
7
- </pre>
8
-
9
- And run the specs.
6
+ test-unit / minitest:
7
+ % ROUNDABOUT=1 rails test:system
10
8
 
11
- <pre>
12
- % rake spec
9
+ RSpec
10
+ % ROUNDABOUT=1 rails test:system
13
11
  </pre>
14
12
 
15
13
  Then reload this page.
@@ -21,7 +21,7 @@ module Roundabout
21
21
  require 'roundabout/monkey/action_controller'
22
22
  end
23
23
 
24
- config.after_initialize do |app|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Roundabout
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
@@ -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.0
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: 2018-11-02 00:00:00.000000000 Z
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: '0'
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: '0'
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
- rubyforge_project:
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