Skip to content

Commit

Permalink
Remove unused journey code
Browse files Browse the repository at this point in the history
Journey was integrated into Action Dispatch at 56fee39, but from that
time, almost all NFA namespace code were not used.
  • Loading branch information
kamipo committed Apr 24, 2020
1 parent 4175896 commit 639f5fd
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 437 deletions.
2 changes: 0 additions & 2 deletions actionpack/lib/action_dispatch/journey.rb
Expand Up @@ -3,5 +3,3 @@
require "action_dispatch/journey/router"
require "action_dispatch/journey/gtg/builder"
require "action_dispatch/journey/gtg/simulator"
require "action_dispatch/journey/nfa/builder"
require "action_dispatch/journey/nfa/simulator"
78 changes: 0 additions & 78 deletions actionpack/lib/action_dispatch/journey/nfa/builder.rb

This file was deleted.

11 changes: 0 additions & 11 deletions actionpack/lib/action_dispatch/journey/nfa/dot.rb
Expand Up @@ -9,17 +9,6 @@ def to_dot
" #{from} -> #{to} [label=\"#{sym || 'ε'}\"];"
}

# memo_nodes = memos.values.flatten.map { |n|
# label = n
# if Journey::Route === n
# label = "#{n.verb.source} #{n.path.spec}"
# end
# " #{n.object_id} [label=\"#{label}\", shape=box];"
# }
# memo_edges = memos.flat_map { |k, memos|
# (memos || []).map { |v| " #{k} -> #{v.object_id};" }
# }.uniq

<<-eodot
digraph nfa {
rankdir=LR;
Expand Down
47 changes: 0 additions & 47 deletions actionpack/lib/action_dispatch/journey/nfa/simulator.rb

This file was deleted.

119 changes: 0 additions & 119 deletions actionpack/lib/action_dispatch/journey/nfa/transition_table.rb

This file was deleted.

12 changes: 6 additions & 6 deletions actionpack/test/journey/gtg/builder_test.rb
Expand Up @@ -40,10 +40,10 @@ def test_match_data_ambiguous
/articles/:id(.:format)
}

sim = NFA::Simulator.new table
sim = Simulator.new table

match = sim.match "/articles/new"
assert_equal 2, match.memos.length
memos = sim.memos "/articles/new"
assert_equal 2, memos.length
end

##
Expand All @@ -54,10 +54,10 @@ def test_match_same_paths
/articles/new(.:format)
}

sim = NFA::Simulator.new table
sim = Simulator.new table

match = sim.match "/articles/new"
assert_equal 2, match.memos.length
memos = sim.memos "/articles/new"
assert_equal 2, memos.length
end

private
Expand Down
100 changes: 0 additions & 100 deletions actionpack/test/journey/nfa/simulator_test.rb

This file was deleted.

0 comments on commit 639f5fd

Please sign in to comment.