focused_controller 1.1.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bba50f15d9a2bb936bd4b78ed12ae12c8dde7970
4
- data.tar.gz: 07c4280195ca55e71849e1ede1f32ba274d51af8
3
+ metadata.gz: 64bbf1cbd70b5c981b090907d47cb17ccae247cc
4
+ data.tar.gz: 7dd77442333a3cc8786f4a6664ff5ab3f251c15c
5
5
  SHA512:
6
- metadata.gz: fc77f35481b3d741e8988495362e67d28862ff379f300b131927a39b80636be07dea2fec7b7f97fe41eb1af41269b6d80faa1aeab78d19dc21f1a3bcdfc86268
7
- data.tar.gz: a58a337acdeb40611d7632abc5a4a22df6670feaad647d5e5973a990e1d68f529b7248bf6fc5da17cb92673c92b1e5dfaca49065d386c25c8bae6b3988b9ed56
6
+ metadata.gz: ca4d406ffce23448c7bb478933f08cb3bfc9c6bb237a75659dc53c033d3ed4749d8cb67e64bc6b2135e7f3bac28d1b82e978c1f10365822114d21f67e59aff1b
7
+ data.tar.gz: 816e20545e95ee31b1dbf9710eba3002876ec1145601925250ca62daf051544de8d2e13b10ea23e901f2e8068d4643c0d2a3cbba0a3ac831463a9f091731d629
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 1.1.1 ##
2
+
3
+ * Fix issue with `url_for` in Rails 4.0.1
4
+
1
5
  ## Version 1.1.0 ##
2
6
 
3
7
  * Rails 4 support
@@ -1,5 +1,7 @@
1
+ require "action_dispatch/routing"
2
+
1
3
  module FocusedController
2
- class Route
4
+ class Route < ActionDispatch::Routing::RouteSet::Dispatcher
3
5
  attr_reader :name
4
6
 
5
7
  def initialize(name)
@@ -1,3 +1,3 @@
1
1
  module FocusedController
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -72,5 +72,23 @@ module FocusedController
72
72
  end
73
73
  recognize('/posts').app.must_equal app
74
74
  end
75
+
76
+ it "generates a route with url_for" do
77
+ route_set.draw do
78
+ focused_controller_routes do
79
+ resources :posts
80
+
81
+ namespace :admin do
82
+ resources :comments
83
+ end
84
+ end
85
+ end
86
+
87
+ path = route_set.url_for(controller: "posts_controller/index", action: "call", page: "2", only_path: true)
88
+ path.must_equal "/posts?page=2"
89
+
90
+ path = route_set.url_for(controller: "admin/comments_controller/show", action: "call", id: "62", page: "2", only_path: true)
91
+ path.must_equal "/admin/comments/62?page=2"
92
+ end
75
93
  end
76
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: focused_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-22 00:00:00.000000000 Z
11
+ date: 2013-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -312,3 +312,4 @@ test_files:
312
312
  - test/unit/rspec_functional_helper.rb
313
313
  - test/unit/rspec_helper_test.rb
314
314
  - test/unit/test_helper_test.rb
315
+ has_rdoc: