Skip to content

Commit

Permalink
Merge branch 'master' into 0.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jul 3, 2015
2 parents bf9763e + d4b49b2 commit 6034dcb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lotus/router/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Lotus
class Router
# @since 0.1.0
VERSION = '0.4.1'.freeze
VERSION = '0.4.2'.freeze
end
end
2 changes: 1 addition & 1 deletion lotus-router.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.0.0'

spec.add_dependency 'http_router', '~> 0.11'
spec.add_dependency 'lotus-utils', '~> 0.5'
spec.add_dependency 'lotus-utils', '~> 0.5', '>= 0.5.1'

spec.add_development_dependency 'bundler', '~> 1.5'
spec.add_development_dependency 'minitest', '~> 5'
Expand Down
12 changes: 12 additions & 0 deletions test/prefix_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ def call(env)
trace '/home', to: 'home#index', as: :trace_home
options '/home', to: 'home#index', as: :options_home

get '/admin', to: 'home#index', as: :get_admin
get '/admin/new', to: 'home#index', as: :new_admin
get '/admin/edit', to: 'home#index', as: :edit_admin
post '/admin', to: 'home#index', as: :create_admin
put '/admin', to: 'home#index', as: :put_admin

resources :users
resource :asteroid

Expand All @@ -64,6 +70,12 @@ def call(env)
@router.path(:user, id: 1).must_equal '/admin/users/1'
@router.path(:edit_user, id: 1).must_equal '/admin/users/1/edit'

@router.path(:get_admin).must_equal '/admin/admin'
@router.path(:new_admin).must_equal '/admin/admin/new'
@router.path(:create_admin).must_equal '/admin/admin'
@router.path(:edit_admin).must_equal '/admin/admin/edit'
@router.path(:put_admin).must_equal '/admin/admin'

@router.path(:new_asteroid).must_equal '/admin/asteroid/new'
@router.path(:asteroid).must_equal '/admin/asteroid'
@router.path(:edit_asteroid).must_equal '/admin/asteroid/edit'
Expand Down
2 changes: 1 addition & 1 deletion test/version_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

describe Lotus::Router::VERSION do
it 'exposes version' do
Lotus::Router::VERSION.must_equal '0.4.1'
Lotus::Router::VERSION.must_equal '0.4.2'
end
end

0 comments on commit 6034dcb

Please sign in to comment.