Skip to content

Commit 587bfea

Browse files
authored
Merge pull request rails#39038 from kamipo/remove_unused_journey_code
Remove unused journey code
2 parents 4175896 + 639f5fd commit 587bfea

File tree

8 files changed

+6
-437
lines changed

8 files changed

+6
-437
lines changed

actionpack/lib/action_dispatch/journey.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
require "action_dispatch/journey/router"
44
require "action_dispatch/journey/gtg/builder"
55
require "action_dispatch/journey/gtg/simulator"
6-
require "action_dispatch/journey/nfa/builder"
7-
require "action_dispatch/journey/nfa/simulator"

actionpack/lib/action_dispatch/journey/nfa/builder.rb

Lines changed: 0 additions & 78 deletions
This file was deleted.

actionpack/lib/action_dispatch/journey/nfa/dot.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ def to_dot
99
" #{from} -> #{to} [label=\"#{sym || 'ε'}\"];"
1010
}
1111

12-
# memo_nodes = memos.values.flatten.map { |n|
13-
# label = n
14-
# if Journey::Route === n
15-
# label = "#{n.verb.source} #{n.path.spec}"
16-
# end
17-
# " #{n.object_id} [label=\"#{label}\", shape=box];"
18-
# }
19-
# memo_edges = memos.flat_map { |k, memos|
20-
# (memos || []).map { |v| " #{k} -> #{v.object_id};" }
21-
# }.uniq
22-
2312
<<-eodot
2413
digraph nfa {
2514
rankdir=LR;

actionpack/lib/action_dispatch/journey/nfa/simulator.rb

Lines changed: 0 additions & 47 deletions
This file was deleted.

actionpack/lib/action_dispatch/journey/nfa/transition_table.rb

Lines changed: 0 additions & 119 deletions
This file was deleted.

actionpack/test/journey/gtg/builder_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def test_match_data_ambiguous
4040
/articles/:id(.:format)
4141
}
4242

43-
sim = NFA::Simulator.new table
43+
sim = Simulator.new table
4444

45-
match = sim.match "/articles/new"
46-
assert_equal 2, match.memos.length
45+
memos = sim.memos "/articles/new"
46+
assert_equal 2, memos.length
4747
end
4848

4949
##
@@ -54,10 +54,10 @@ def test_match_same_paths
5454
/articles/new(.:format)
5555
}
5656

57-
sim = NFA::Simulator.new table
57+
sim = Simulator.new table
5858

59-
match = sim.match "/articles/new"
60-
assert_equal 2, match.memos.length
59+
memos = sim.memos "/articles/new"
60+
assert_equal 2, memos.length
6161
end
6262

6363
private

actionpack/test/journey/nfa/simulator_test.rb

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)